)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"56a38fd4c52ce2362949b24928d216e3ff07d0fe","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes bug 1040447"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"In the evnet that an IP address and gateway are defined on an interface that is"},{"line_number":12,"context_line":"used in a flat network, then the interface details will be copied to the"},{"line_number":13,"context_line":"bridge when it is created."},{"line_number":14,"context_line":"If the network is deleted then the IP addresses are returned to the interface."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAALH%2F%2Fop8%3D","line":11,"updated":"2012-08-24 06:19:12.000000000","message":"event","commit_id":"2a39695f84d62e1acb31084b0006d1b482c5a2a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9ae5eefd1137a4eb0bd797879ee73dedbe659253","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Fixes bug 1040447"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"In the evnet that an IP address and gateway are defined on an interface that is"},{"line_number":12,"context_line":"used in a flat network, then the interface details will be copied to the"},{"line_number":13,"context_line":"bridge when it is created."},{"line_number":14,"context_line":"If the network is deleted then the IP addresses are returned to the interface."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAALH%2F%2FodQ%3D","line":11,"in_reply_to":"AAAALH%2F%2Fop8%3D","updated":"2012-08-24 14:43:26.000000000","message":"Done","commit_id":"2a39695f84d62e1acb31084b0006d1b482c5a2a8"}],"quantum/agent/linux/ip_lib.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":276,"context_line":"                      \u0027dev\u0027,"},{"line_number":277,"context_line":"                      self.name)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def get_gateway(self, scope\u003dNone, filters\u003d[]):"},{"line_number":280,"context_line":"        retval \u003d None"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        if scope:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FnTo%3D","line":279,"updated":"2012-08-27 15:19:15.000000000","message":"The default argument for filters needs to be changed to a immutable value (None, (), etc).  The following pattern is recommended:\n\ndef foo(value\u003dNone):\n  if value is None:\n    value \u003d []\n\nSee the following link for more details:\n\nhttp://stackoverflow.com/questions/1132941/least-astonishment-in-python-the-mutable-default-argument","commit_id":"82789f6fbcfdbbc959a9e3091cfc38a3262ddf07"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":276,"context_line":"                      \u0027dev\u0027,"},{"line_number":277,"context_line":"                      self.name)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def get_gateway(self, scope\u003dNone, filters\u003d[]):"},{"line_number":280,"context_line":"        retval \u003d None"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        if scope:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FnM4%3D","line":279,"in_reply_to":"AAAALH%2F%2FnTo%3D","updated":"2012-08-27 16:13:29.000000000","message":"ok, interesting link","commit_id":"82789f6fbcfdbbc959a9e3091cfc38a3262ddf07"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        if scope:"},{"line_number":283,"context_line":"            filters +\u003d [\u0027scope\u0027, scope]"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        for line in self._run(\u0027list\u0027, \u0027dev\u0027, self.name, *filters).split(\u0027\\n\u0027):"},{"line_number":286,"context_line":"            line \u003d line.strip()"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"            if not line.startswith(\u0027default\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FnTg%3D","line":285,"updated":"2012-08-27 15:19:15.000000000","message":"(Suggestion only) \n\nConsider finding the default route separately from operating on it e.g.:\n\nroute_list_lines \u003d self._run(\u0027list\u0027, \u0027dev\u0027, self.name, *filters).split(\u0027\\n\u0027)\ndefault_route_line \u003d  next((x.strip() for x in route_list_lines if x.strip().startswith(\u0027default\u0027)), None)\nif default_route_line:\n  pass","commit_id":"82789f6fbcfdbbc959a9e3091cfc38a3262ddf07"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":288,"context_line":"            if not line.startswith(\u0027default\u0027):"},{"line_number":289,"context_line":"                continue"},{"line_number":290,"context_line":"            parts \u003d line.split()"},{"line_number":291,"context_line":"            retval \u003d dict(gateway\u003dparts[2])"},{"line_number":292,"context_line":"            if len(parts) \u003e 4:"},{"line_number":293,"context_line":"                retval.update(metric\u003dint(parts[4]))"},{"line_number":294,"context_line":"            break"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FnTU%3D","line":291,"updated":"2012-08-27 15:19:15.000000000","message":"(Suggestion only) Consider replacing the use of a magic number with a named constant:\n\ngateway_index \u003d 2\nretv \u003d dict(gateway\u003dparts[gateway_index])","commit_id":"82789f6fbcfdbbc959a9e3091cfc38a3262ddf07"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":289,"context_line":"                continue"},{"line_number":290,"context_line":"            parts \u003d line.split()"},{"line_number":291,"context_line":"            retval \u003d dict(gateway\u003dparts[2])"},{"line_number":292,"context_line":"            if len(parts) \u003e 4:"},{"line_number":293,"context_line":"                retval.update(metric\u003dint(parts[4]))"},{"line_number":294,"context_line":"            break"},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FnTI%3D","line":292,"updated":"2012-08-27 15:19:15.000000000","message":"(Suggestion only) Consider adding a comment or making this statement self-documenting:\n\nmetric_index \u003d 4\nparts_has_metric \u003d (len(parts) \u003e metric_index)\nif parts_has_metric:\n   pass","commit_id":"82789f6fbcfdbbc959a9e3091cfc38a3262ddf07"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    def flush(self):"},{"line_number":229,"context_line":"        self._as_root(\u0027flush\u0027, self.name)"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def list(self, scope\u003dNone, to\u003dNone, filters\u003dNone):"},{"line_number":232,"context_line":"        if filters is None:"},{"line_number":233,"context_line":"            filters \u003d []"},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FnJ4%3D","line":231,"updated":"2012-08-27 16:57:43.000000000","message":"Good catch!","commit_id":"dbeb79504c8b706ba5fa18144f4e7a0d23586d5d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        if filters is None:"},{"line_number":284,"context_line":"            filters \u003d []"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        retval \u003d None"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        if scope:"},{"line_number":289,"context_line":"            filters +\u003d [\u0027scope\u0027, scope]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FnKA%3D","line":286,"updated":"2012-08-27 16:57:43.000000000","message":"(Suggestion only) Consider using Python\u0027s implicit return of None :\n - remove this line\n - indent the return statement on line 305 so that it\u0027s inside the if block","commit_id":"dbeb79504c8b706ba5fa18144f4e7a0d23586d5d"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":283,"context_line":"        if filters is None:"},{"line_number":284,"context_line":"            filters \u003d []"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        retval \u003d None"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        if scope:"},{"line_number":289,"context_line":"            filters +\u003d [\u0027scope\u0027, scope]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2Fkqk%3D","line":286,"in_reply_to":"AAAALH%2F%2FnKA%3D","updated":"2012-08-30 06:11:17.000000000","message":"Gary: This is the one that I was talking about. However, this is just a suggestion. I will go ahead and approve this, sorry for the confusion.","commit_id":"dbeb79504c8b706ba5fa18144f4e7a0d23586d5d"}],"quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"56a38fd4c52ce2362949b24928d216e3ff07d0fe","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            if (len(values) \u003e 5 and values[4].startswith(\u0027inet\u0027)):"},{"line_number":191,"context_line":"                ip \u003d {\u0027address\u0027: values[5],"},{"line_number":192,"context_line":"                      \u0027broadcast\u0027: values[7]}"},{"line_number":193,"context_line":"                ips.append(ip)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        # Update default gateway if necessary"},{"line_number":196,"context_line":"        gateway \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FoqI%3D","line":193,"updated":"2012-08-24 06:18:55.000000000","message":"I think ip_lib.py already has logic for parsing ip addresses, and if not, this (and the route parsing below) should probably be added there.  This helps keep the plugin agent code pretty clean, and makes sure that others can benefit from the parsing logic rather than re-invent the wheel.","commit_id":"2a39695f84d62e1acb31084b0006d1b482c5a2a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9ae5eefd1137a4eb0bd797879ee73dedbe659253","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            if (len(values) \u003e 5 and values[4].startswith(\u0027inet\u0027)):"},{"line_number":191,"context_line":"                ip \u003d {\u0027address\u0027: values[5],"},{"line_number":192,"context_line":"                      \u0027broadcast\u0027: values[7]}"},{"line_number":193,"context_line":"                ips.append(ip)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        # Update default gateway if necessary"},{"line_number":196,"context_line":"        gateway \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FodY%3D","line":193,"in_reply_to":"AAAALH%2F%2FoqI%3D","updated":"2012-08-24 14:43:26.000000000","message":"Thanks for pointing this out. I\u0027ll look into that.","commit_id":"2a39695f84d62e1acb31084b0006d1b482c5a2a8"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"56a38fd4c52ce2362949b24928d216e3ff07d0fe","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_interface_ip_details(self, destination, source, ips,"},{"line_number":233,"context_line":"                                    gateway):"},{"line_number":234,"context_line":"        # Append IP\u0027s to bridge if necessary"},{"line_number":235,"context_line":"        for ip in ips:"},{"line_number":236,"context_line":"            utils.execute([\u0027ip\u0027, \u0027addr\u0027, \u0027add\u0027, ip[\u0027address\u0027],"},{"line_number":237,"context_line":"                           \u0027broadcast\u0027, ip[\u0027broadcast\u0027], \u0027dev\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FoqE%3D","line":234,"updated":"2012-08-24 06:18:55.000000000","message":"similar comment about these actions being part of ip_lib.","commit_id":"2a39695f84d62e1acb31084b0006d1b482c5a2a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9ae5eefd1137a4eb0bd797879ee73dedbe659253","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def update_interface_ip_details(self, destination, source, ips,"},{"line_number":233,"context_line":"                                    gateway):"},{"line_number":234,"context_line":"        # Append IP\u0027s to bridge if necessary"},{"line_number":235,"context_line":"        for ip in ips:"},{"line_number":236,"context_line":"            utils.execute([\u0027ip\u0027, \u0027addr\u0027, \u0027add\u0027, ip[\u0027address\u0027],"},{"line_number":237,"context_line":"                           \u0027broadcast\u0027, ip[\u0027broadcast\u0027], \u0027dev\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FodU%3D","line":234,"in_reply_to":"AAAALH%2F%2FoqE%3D","updated":"2012-08-24 14:43:26.000000000","message":"Ditto","commit_id":"2a39695f84d62e1acb31084b0006d1b482c5a2a8"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                               root_helper\u003dself.root_helper)"},{"line_number":189,"context_line":"        rows \u003d retval.split(\u0027\\n\u0027)"},{"line_number":190,"context_line":"        for row in rows:"},{"line_number":191,"context_line":"            values \u003d row.split(\u0027 \u0027)"},{"line_number":192,"context_line":"            if values[0] \u003d\u003d \u0027default\u0027:"},{"line_number":193,"context_line":"                gateway \u003d values[2]"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALH%2F%2FoNI%3D","line":191,"updated":"2012-08-24 17:40:31.000000000","message":"(Suggestion only) Consider omitting the argument to split(), since whitespace is the default.","commit_id":"df1dbcef31e61257d5f26796afc24a060c065cd1"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        rows \u003d retval.split(\u0027\\n\u0027)"},{"line_number":190,"context_line":"        for row in rows:"},{"line_number":191,"context_line":"            values \u003d row.split(\u0027 \u0027)"},{"line_number":192,"context_line":"            if values[0] \u003d\u003d \u0027default\u0027:"},{"line_number":193,"context_line":"                gateway \u003d values[2]"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        return ips, gateway"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALH%2F%2FoNA%3D","line":192,"updated":"2012-08-24 17:40:31.000000000","message":"(Suggestion only) Consider using constants for indexing into the fields rather than magic numbers.  Comment also applies to the following line.","commit_id":"df1dbcef31e61257d5f26796afc24a060c065cd1"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        for row in rows:"},{"line_number":191,"context_line":"            values \u003d row.split(\u0027 \u0027)"},{"line_number":192,"context_line":"            if values[0] \u003d\u003d \u0027default\u0027:"},{"line_number":193,"context_line":"                gateway \u003d values[2]"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        return ips, gateway"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALH%2F%2FoNE%3D","line":193,"updated":"2012-08-24 17:40:31.000000000","message":"Once a value is found, is there a reason to continue evaluation?  If not, consider adding a \u0027break\u0027 statement on the following line.","commit_id":"df1dbcef31e61257d5f26796afc24a060c065cd1"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            # Ensure that the gateway can be updated by changing the metric"},{"line_number":226,"context_line":"            metric \u003d 100"},{"line_number":227,"context_line":"            if \u0027metric\u0027 in gateway:"},{"line_number":228,"context_line":"                metric \u003d gateway[\u0027metric\u0027] - 1"},{"line_number":229,"context_line":"            dst_device.route.add_gateway(gateway\u003dgateway[\u0027gateway\u0027],"},{"line_number":230,"context_line":"                                         metric\u003dmetric)"},{"line_number":231,"context_line":"            src_device.route.delete_gateway(gateway\u003dgateway[\u0027gateway\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FnRU%3D","line":228,"updated":"2012-08-27 15:19:15.000000000","message":"Probably an ignorant question, but why is the metric being decremented by 1?","commit_id":"82789f6fbcfdbbc959a9e3091cfc38a3262ddf07"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":225,"context_line":"            # Ensure that the gateway can be updated by changing the metric"},{"line_number":226,"context_line":"            metric \u003d 100"},{"line_number":227,"context_line":"            if \u0027metric\u0027 in gateway:"},{"line_number":228,"context_line":"                metric \u003d gateway[\u0027metric\u0027] - 1"},{"line_number":229,"context_line":"            dst_device.route.add_gateway(gateway\u003dgateway[\u0027gateway\u0027],"},{"line_number":230,"context_line":"                                         metric\u003dmetric)"},{"line_number":231,"context_line":"            src_device.route.delete_gateway(gateway\u003dgateway[\u0027gateway\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FnM8%3D","line":228,"in_reply_to":"AAAALH%2F%2FnRU%3D","updated":"2012-08-27 16:13:29.000000000","message":"Creating the default gateway with the same metric assigned to a different interface fails. The only way of getting this to work was changing the metric.\nI am open to suggestions.","commit_id":"82789f6fbcfdbbc959a9e3091cfc38a3262ddf07"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f4be6cf4872fab568e46555474f28f024dcf2df8","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            # Ensure that the gateway can be updated by changing the metric"},{"line_number":226,"context_line":"            metric \u003d 100"},{"line_number":227,"context_line":"            if \u0027metric\u0027 in gateway:"},{"line_number":228,"context_line":"                metric \u003d gateway[\u0027metric\u0027] - 1"},{"line_number":229,"context_line":"            dst_device.route.add_gateway(gateway\u003dgateway[\u0027gateway\u0027],"},{"line_number":230,"context_line":"                                         metric\u003dmetric)"},{"line_number":231,"context_line":"            src_device.route.delete_gateway(gateway\u003dgateway[\u0027gateway\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FnJ8%3D","line":228,"updated":"2012-08-27 16:57:43.000000000","message":"I\u0027m afraid I have no advice as to how this could be done better.  Anyone else?","commit_id":"dbeb79504c8b706ba5fa18144f4e7a0d23586d5d"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":225,"context_line":"            # Ensure that the gateway can be updated by changing the metric"},{"line_number":226,"context_line":"            metric \u003d 100"},{"line_number":227,"context_line":"            if \u0027metric\u0027 in gateway:"},{"line_number":228,"context_line":"                metric \u003d gateway[\u0027metric\u0027] - 1"},{"line_number":229,"context_line":"            dst_device.route.add_gateway(gateway\u003dgateway[\u0027gateway\u0027],"},{"line_number":230,"context_line":"                                         metric\u003dmetric)"},{"line_number":231,"context_line":"            src_device.route.delete_gateway(gateway\u003dgateway[\u0027gateway\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2Fk2E%3D","line":228,"in_reply_to":"AAAALH%2F%2FnJ8%3D","updated":"2012-08-30 00:22:43.000000000","message":"Not really!!  :-(","commit_id":"dbeb79504c8b706ba5fa18144f4e7a0d23586d5d"}]}
