)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"87c712beafecc72731361f377ad6d822877d2f76","unresolved":false,"context_lines":[{"line_number":14,"context_line":"3. Probably some reorganization (ovsdb/ directory)"},{"line_number":15,"context_line":"4. Documentation"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Partially-Implements: blueprint vsctl-to-ovsdb"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I2c1b5bc9cb6b9860676bb5e3eaca0402d7e99b01"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a961159_83588958","line":17,"updated":"2015-01-04 21:58:06.000000000","message":"Only partially?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"66eac3b38af4540bec82d39adbaf4fe1898f019f","unresolved":false,"context_lines":[{"line_number":14,"context_line":"3. Probably some reorganization (ovsdb/ directory)"},{"line_number":15,"context_line":"4. Documentation"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Partially-Implements: blueprint vsctl-to-ovsdb"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I2c1b5bc9cb6b9860676bb5e3eaca0402d7e99b01"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a961159_e182b0c5","line":17,"in_reply_to":"3a961159_83588958","updated":"2015-01-17 07:21:11.000000000","message":"Yes, this is just breaking out the ovsdb-related stuff into an abstract interface. There will also be a patch with the native ovsdb implementation of the interface.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"}],"neutron/agent/linux/interface.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"7b703dd4c63b43e45ad2a199e2aad72afcf15bc1","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                      internal\u003dTrue):"},{"line_number":210,"context_line":"        attrs \u003d [(\u0027external-ids\u0027, {\u0027iface-id\u0027: port_id,"},{"line_number":211,"context_line":"                                   \u0027iface-status\u0027: \u0027active\u0027,"},{"line_number":212,"context_line":"                                   \u0027attached-mac\u0027: port_id})]"},{"line_number":213,"context_line":"        if internal:"},{"line_number":214,"context_line":"            attrs.insert(0, (\u0027type\u0027, \u0027internal\u0027))"},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_4ed488e8","line":212,"updated":"2014-12-24 02:12:15.000000000","message":"mac_address?","commit_id":"d706db6942fe0a4dff2e034b2921c976bc02d4ca"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"034d7f288ab8567387c1565b826c49628253e137","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                      internal\u003dTrue):"},{"line_number":210,"context_line":"        attrs \u003d [(\u0027external-ids\u0027, {\u0027iface-id\u0027: port_id,"},{"line_number":211,"context_line":"                                   \u0027iface-status\u0027: \u0027active\u0027,"},{"line_number":212,"context_line":"                                   \u0027attached-mac\u0027: port_id})]"},{"line_number":213,"context_line":"        if internal:"},{"line_number":214,"context_line":"            attrs.insert(0, (\u0027type\u0027, \u0027internal\u0027))"},{"line_number":215,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_c46e97ff","line":212,"in_reply_to":"3a961159_4ed488e8","updated":"2014-12-24 04:39:00.000000000","message":"ah, thanks. I have no idea what I was thinking. :)","commit_id":"d706db6942fe0a4dff2e034b2921c976bc02d4ca"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _ovs_add_port(self, bridge, device_name, port_id, mac_address,"},{"line_number":209,"context_line":"                      internal\u003dTrue):"},{"line_number":210,"context_line":"        attrs \u003d [(\u0027external_ids\u0027, {\u0027iface-id\u0027: port_id,"},{"line_number":211,"context_line":"                                   \u0027iface-status\u0027: \u0027active\u0027,"},{"line_number":212,"context_line":"                                   \u0027attached-mac\u0027: mac_address})]"},{"line_number":213,"context_line":"        if internal:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_be408c60","line":210,"updated":"2015-01-20 03:52:21.000000000","message":"Yikes, so this attribute id was incorrect all this time?","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def _ovs_add_port(self, bridge, device_name, port_id, mac_address,"},{"line_number":209,"context_line":"                      internal\u003dTrue):"},{"line_number":210,"context_line":"        attrs \u003d [(\u0027external_ids\u0027, {\u0027iface-id\u0027: port_id,"},{"line_number":211,"context_line":"                                   \u0027iface-status\u0027: \u0027active\u0027,"},{"line_number":212,"context_line":"                                   \u0027attached-mac\u0027: mac_address})]"},{"line_number":213,"context_line":"        if internal:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_9aa21199","line":210,"in_reply_to":"3a961159_be408c60","updated":"2015-01-21 20:45:04.000000000","message":"ovs-vsctl will convert the - to an _ internally, but external_ids is the actual field name, so we might as well use it.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"}],"neutron/agent/linux/ovs_lib.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"0455bc15babaa7b18432956bd45b8f9770feb13c","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        return self.ovsdb.br_exists(bridge_name).execute()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def get_bridge_name_for_port_name(self, port_name):"},{"line_number":84,"context_line":"        return self.ovsdb.port_to_br(port_name).execute()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def port_exists(self, port_name):"},{"line_number":87,"context_line":"        return bool(self.get_bridge_name_for_port_name(port_name))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_70303a56","line":84,"updated":"2014-12-24 07:34:43.000000000","message":"It is set check_error\u003dFalse. Do you intend so?","commit_id":"294a3161355e27585e173b195981c23f18dfdc6a"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"0455bc15babaa7b18432956bd45b8f9770feb13c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        return self.ovsdb.iface_to_br(iface).execute()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def get_bridges(self):"},{"line_number":93,"context_line":"        return self.ovsdb.list_br().execute()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def get_bridge_external_bridge_id(self, bridge):"},{"line_number":96,"context_line":"        return self.ovsdb.br_get_external_id(bridge, \u0027bridge-id\u0027).execute()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_d0d2cefe","line":93,"updated":"2014-12-24 07:34:43.000000000","message":"It is set check_error\u003dFalse. Do you intend so?","commit_id":"294a3161355e27585e173b195981c23f18dfdc6a"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"0455bc15babaa7b18432956bd45b8f9770feb13c","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        return {}"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def db_get_val(self, table, record, column, check_error\u003dFalse):"},{"line_number":111,"context_line":"        return self.ovsdb.db_get(table, record, column).execute()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _db_str_to_map(self, full_str):"},{"line_number":114,"context_line":"        list \u003d full_str.strip(\"{}\").split(\", \")"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_70311aa1","line":111,"updated":"2014-12-24 07:34:43.000000000","message":".execute(check_error)","commit_id":"294a3161355e27585e173b195981c23f18dfdc6a"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"0455bc15babaa7b18432956bd45b8f9770feb13c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self.br_name \u003d br_name"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def set_controller(self, controllers):"},{"line_number":130,"context_line":"        self.ovsdb.set_controller(self.br_name, controllers).execute(True)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def del_controller(self):"},{"line_number":133,"context_line":"        self.ovsdb.del_controller(self.br_name).execute()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_1001b6ae","line":130,"updated":"2014-12-24 07:34:43.000000000","message":"nit: .execute(check_error\u003dTrue)","commit_id":"294a3161355e27585e173b195981c23f18dfdc6a"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.vsctl_timeout \u003d cfg.CONF.ovs_vsctl_timeout"},{"line_number":66,"context_line":"        self.ovsdb \u003d ovsdb.OVSDBInterface.get(self)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # To make existing unit tests pass for now"},{"line_number":69,"context_line":"    def run_vsctl(self, args, check_error\u003dFalse):"},{"line_number":70,"context_line":"        txn \u003d self.ovsdb.transaction()"},{"line_number":71,"context_line":"        return txn.run_vsctl(args, check_error)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_31e726e6","line":68,"updated":"2015-01-03 00:49:19.000000000","message":"Please convert to a TODO or FIXME with your name attached.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.vsctl_timeout \u003d cfg.CONF.ovs_vsctl_timeout"},{"line_number":66,"context_line":"        self.ovsdb \u003d ovsdb.OVSDBInterface.get(self)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # To make existing unit tests pass for now"},{"line_number":69,"context_line":"    def run_vsctl(self, args, check_error\u003dFalse):"},{"line_number":70,"context_line":"        txn \u003d self.ovsdb.transaction()"},{"line_number":71,"context_line":"        return txn.run_vsctl(args, check_error)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_89700ea6","line":68,"in_reply_to":"3a961159_31e726e6","updated":"2015-01-09 19:29:35.000000000","message":"Will do. The intention was for this to remain WIP and this kind of thing be gone before non-architectural-related review took place. Definitely going to be more careful about making sure WIP is checked after making updates in the future.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"87c712beafecc72731361f377ad6d822877d2f76","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # To make existing unit tests pass for now"},{"line_number":69,"context_line":"    def run_vsctl(self, args, check_error\u003dFalse):"},{"line_number":70,"context_line":"        txn \u003d self.ovsdb.transaction()"},{"line_number":71,"context_line":"        return txn.run_vsctl(args, check_error)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def add_bridge(self, bridge_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a3574525","line":70,"updated":"2015-01-04 21:58:06.000000000","message":"it\u0027s strange not to use self.ovsdb.transaction() as a context","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # To make existing unit tests pass for now"},{"line_number":69,"context_line":"    def run_vsctl(self, args, check_error\u003dFalse):"},{"line_number":70,"context_line":"        txn \u003d self.ovsdb.transaction()"},{"line_number":71,"context_line":"        return txn.run_vsctl(args, check_error)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def add_bridge(self, bridge_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_c6bda605","line":70,"in_reply_to":"3a961159_a3574525","updated":"2015-01-09 19:29:35.000000000","message":"The way it is currently written, you can\u0027t get the output of the command because you can\u0027t get the return value from calling exit(). I suppose I should add storing the result on the transaction object.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        return txn.run_vsctl(args, check_error)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def add_bridge(self, bridge_name):"},{"line_number":74,"context_line":"        self.ovsdb.add_br(bridge_name).execute()"},{"line_number":75,"context_line":"        return OVSBridge(bridge_name, self.root_helper)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def delete_bridge(self, bridge_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b1f076ca","line":74,"updated":"2015-01-03 00:49:19.000000000","message":"The constant repetition of execute() suggests the addition of an \u0027immediate\u0027 mode in OVSDBInterface which ensures that commands are automatically executed, e.g.\n\n self.ovsdb.mode \u003d OVS_TXN_IMMEDIATE\n self.ovsdb.add_br(bridge_name)\n self.ovsdb.del_br(bridge_name)","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        return txn.run_vsctl(args, check_error)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def add_bridge(self, bridge_name):"},{"line_number":74,"context_line":"        self.ovsdb.add_br(bridge_name).execute()"},{"line_number":75,"context_line":"        return OVSBridge(bridge_name, self.root_helper)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def delete_bridge(self, bridge_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_294aba5b","line":74,"in_reply_to":"3a961159_b1f076ca","updated":"2015-01-09 19:29:35.000000000","message":"Since almost no individual ovs_lib method needs to run multiple commands outside of a transaction, it seems like this would just mean that we\u0027d need to set the txn mode, run the command w/o execute, then set the txn mode back when we are done instead of just running execute().\n\nI\u0027m also generally very suspicious of storing global state when I\u0027m not sure if the caller will do something weird, sharing a BaseOVS across multiple threads or something.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        return self.ovsdb.br_exists(bridge_name).execute()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def get_bridge_name_for_port_name(self, port_name):"},{"line_number":84,"context_line":"        return self.ovsdb.port_to_br(port_name).execute()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def port_exists(self, port_name):"},{"line_number":87,"context_line":"        return bool(self.get_bridge_name_for_port_name(port_name))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_31356646","line":84,"updated":"2015-01-03 00:49:19.000000000","message":"Doesn\u0027t removing the error handling from the previous implementation constitute a change in behavior?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        return self.ovsdb.br_exists(bridge_name).execute()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def get_bridge_name_for_port_name(self, port_name):"},{"line_number":84,"context_line":"        return self.ovsdb.port_to_br(port_name).execute()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def port_exists(self, port_name):"},{"line_number":87,"context_line":"        return bool(self.get_bridge_name_for_port_name(port_name))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a647ba1d","line":84,"in_reply_to":"3a961159_31356646","updated":"2015-01-09 19:29:35.000000000","message":"Yes. Just haven\u0027t gotten to the error handling yet as per TODO in commit message.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"66eac3b38af4540bec82d39adbaf4fe1898f019f","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        return self.ovsdb.br_exists(bridge_name).execute()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def get_bridge_name_for_port_name(self, port_name):"},{"line_number":84,"context_line":"        return self.ovsdb.port_to_br(port_name).execute()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def port_exists(self, port_name):"},{"line_number":87,"context_line":"        return bool(self.get_bridge_name_for_port_name(port_name))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_8c5e83e7","line":84,"in_reply_to":"3a961159_a647ba1d","updated":"2015-01-17 07:21:11.000000000","message":"Actually, this function is only used in port_exists, and get_bridge_for_iface should return the exact same value, is used other places, and port_exists could just be a call to db_get_val(\u0027Port\u0027, port_name, \u0027name\u0027, check_error\u003dTrue) with appropriate exception handling.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return bool(self.get_bridge_name_for_port_name(port_name))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def get_bridge_for_iface(self, iface):"},{"line_number":90,"context_line":"        return self.ovsdb.iface_to_br(iface).execute()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def get_bridges(self):"},{"line_number":93,"context_line":"        return self.ovsdb.list_br().execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_310c8694","line":90,"updated":"2015-01-03 00:49:19.000000000","message":"Is there any danger in OVSVsctlTransaction.execute() stripping the output without checking for bool(value) \u003d\u003d True (e.g. is the result of execute() on vsctl is always a string)?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return bool(self.get_bridge_name_for_port_name(port_name))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def get_bridge_for_iface(self, iface):"},{"line_number":90,"context_line":"        return self.ovsdb.iface_to_br(iface).execute()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def get_bridges(self):"},{"line_number":93,"context_line":"        return self.ovsdb.list_br().execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_0666cebb","line":90,"in_reply_to":"3a961159_310c8694","updated":"2015-01-09 19:29:35.000000000","message":"I\u0027m planning on the ovsdb interface always returning \u0027sane\u0027 types instead of always being strings as is done now.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"66eac3b38af4540bec82d39adbaf4fe1898f019f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return bool(self.get_bridge_name_for_port_name(port_name))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def get_bridge_for_iface(self, iface):"},{"line_number":90,"context_line":"        return self.ovsdb.iface_to_br(iface).execute()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def get_bridges(self):"},{"line_number":93,"context_line":"        return self.ovsdb.list_br().execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_cee798a9","line":90,"in_reply_to":"3a961159_310c8694","updated":"2015-01-17 07:21:11.000000000","message":"Transaction.execute() will always call strip() on the output from utils.execute(), which will always be a (potentially empty) string. If check_error\u003dTrue, it is possible for Transaction.execute() to return None. The various Command classes are responsible for parsing the output and returning sane types, etc.\n\nNote, that as it is currently set up, results from transactions with multiple operations are just pass/fail with processing of results. This works fine for what we use transactions for (setting multiple values at a time while adding a port, etc.), but does mean that creating transactions with multiple \u0027get/list/find\u0027-type operations would be useless.\n\nEven if things were re-architected in the ovs-vsctl backend, the output of the things like \u0027get\u0027, \u0027list-ports\u0027, etc. would be lots of lines with no real way to find out which line was from which operation in the transaction.\n\nWith the native ovsdb back-end, it should be possible to write it where you can get the results of each part of the transaction.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        return self.ovsdb.iface_to_br(iface).execute()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def get_bridges(self):"},{"line_number":93,"context_line":"        return self.ovsdb.list_br().execute()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def get_bridge_external_bridge_id(self, bridge):"},{"line_number":96,"context_line":"        return self.ovsdb.br_get_external_id(bridge, \u0027bridge-id\u0027).execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_510f5288","line":93,"updated":"2015-01-03 00:49:19.000000000","message":"The previous implementation set check_error\u003dTrue, is there a reason not to replicate that here?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        return self.ovsdb.iface_to_br(iface).execute()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def get_bridges(self):"},{"line_number":93,"context_line":"        return self.ovsdb.list_br().execute()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def get_bridge_external_bridge_id(self, bridge):"},{"line_number":96,"context_line":"        return self.ovsdb.br_get_external_id(bridge, \u0027bridge-id\u0027).execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a964eae6","line":93,"in_reply_to":"3a961159_510f5288","updated":"2015-01-09 19:29:35.000000000","message":"It\u0027s a TODO item.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self.ovsdb.db_clear(table_name, record, column).execute()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _db_get_map(self, table, record, column, check_error\u003dFalse):"},{"line_number":105,"context_line":"        output \u003d self.db_get_val(table, record, column, check_error\u003dFalse)"},{"line_number":106,"context_line":"        if output:"},{"line_number":107,"context_line":"            return self._db_str_to_map(output)"},{"line_number":108,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_d148a2b5","line":105,"updated":"2015-01-03 00:49:19.000000000","message":"check_error\u003dFalse -\u003e check_error\u003dcheck_error","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self.ovsdb.db_clear(table_name, record, column).execute()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _db_get_map(self, table, record, column, check_error\u003dFalse):"},{"line_number":105,"context_line":"        output \u003d self.db_get_val(table, record, column, check_error\u003dFalse)"},{"line_number":106,"context_line":"        if output:"},{"line_number":107,"context_line":"            return self._db_str_to_map(output)"},{"line_number":108,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e95ef212","line":105,"in_reply_to":"3a961159_d148a2b5","updated":"2015-01-09 19:29:35.000000000","message":"Oops, thanks. Will fix.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        return {}"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def db_get_val(self, table, record, column, check_error\u003dFalse):"},{"line_number":111,"context_line":"        return self.ovsdb.db_get(table, record, column).execute()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _db_str_to_map(self, full_str):"},{"line_number":114,"context_line":"        list \u003d full_str.strip(\"{}\").split(\", \")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_914e1ac1","line":111,"updated":"2015-01-03 00:49:19.000000000","message":"Why is check_error not passed to execute() here?\n\nAlso, is the previous rstrip() call no longer required?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        return {}"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def db_get_val(self, table, record, column, check_error\u003dFalse):"},{"line_number":111,"context_line":"        return self.ovsdb.db_get(table, record, column).execute()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _db_str_to_map(self, full_str):"},{"line_number":114,"context_line":"        list \u003d full_str.strip(\"{}\").split(\", \")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e6ff02aa","line":111,"in_reply_to":"3a961159_914e1ac1","updated":"2015-01-09 19:29:35.000000000","message":"This and the rest of the check_error just not done yet as per commit message. The interface will not ever require the result returned to be processed.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        super(OVSBridge, self).__init__(root_helper)"},{"line_number":127,"context_line":"        self.br_name \u003d br_name"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def set_controller(self, controllers):"},{"line_number":130,"context_line":"        self.ovsdb.set_controller(self.br_name, controllers).execute(True)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def del_controller(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_31d1e6cd","line":129,"updated":"2015-01-03 00:49:19.000000000","message":"Is there a reason to change to \u0027controllers\u0027 from \u0027controller_names\u0027?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        super(OVSBridge, self).__init__(root_helper)"},{"line_number":127,"context_line":"        self.br_name \u003d br_name"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def set_controller(self, controllers):"},{"line_number":130,"context_line":"        self.ovsdb.set_controller(self.br_name, controllers).execute(True)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def del_controller(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e6ed42f2","line":129,"in_reply_to":"3a961159_31d1e6cd","updated":"2015-01-09 19:29:35.000000000","message":"controller_names is just a very bad name for the option since the values are things like tcp:1.1.1.1 etc.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self.br_name \u003d br_name"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def set_controller(self, controllers):"},{"line_number":130,"context_line":"        self.ovsdb.set_controller(self.br_name, controllers).execute(True)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def del_controller(self):"},{"line_number":133,"context_line":"        self.ovsdb.del_controller(self.br_name).execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_71da8eea","line":130,"updated":"2015-01-03 00:49:19.000000000","message":"(No action required) Naming optional parameters aids in readability (e.g. True vs check_error\u003dTrue).","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self.br_name \u003d br_name"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def set_controller(self, controllers):"},{"line_number":130,"context_line":"        self.ovsdb.set_controller(self.br_name, controllers).execute(True)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def del_controller(self):"},{"line_number":133,"context_line":"        self.ovsdb.del_controller(self.br_name).execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a6917a55","line":130,"in_reply_to":"3a961159_71da8eea","updated":"2015-01-09 19:29:35.000000000","message":"Will fix. Still trying to figure out exactly what I want to do with the check_error stuff. Not sure if I want the Interface to just always just throw a particular exception type (common among the interface backends) and always handle exceptions the way we want in ovs_lib itself, or allow to pass in whether or not to bother throwing an exception in the first place. Opinions?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        self.ovsdb.set_controller(self.br_name, controllers).execute(True)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def del_controller(self):"},{"line_number":133,"context_line":"        self.ovsdb.del_controller(self.br_name).execute()"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def get_controller(self):"},{"line_number":136,"context_line":"        return self.ovsdb.get_controller(self.br_name).execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_91d53ab9","line":133,"updated":"2015-01-03 00:49:19.000000000","message":"Is there a reason that check_error\u003dTrue is not supplied to this method and the 3 that follow?  The comment on line 14 2 suggests that you\u0027re aware of this issue but it\u0027s not clear to me why the other 2 don\u0027t have a similar (and more explicit, ala TODO) comment.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        self.ovsdb.set_controller(self.br_name, controllers).execute(True)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def del_controller(self):"},{"line_number":133,"context_line":"        self.ovsdb.del_controller(self.br_name).execute()"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def get_controller(self):"},{"line_number":136,"context_line":"        return self.ovsdb.get_controller(self.br_name).execute()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a9ab0ad6","line":133,"in_reply_to":"3a961159_91d53ab9","updated":"2015-01-09 19:29:35.000000000","message":"Yep, just a global TODO that I planned on going back and reviewing every function. Good to have this comment here so I can make sure I don\u0027t miss it when going back through.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"87c712beafecc72731361f377ad6d822877d2f76","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        self.ovsdb.set_fail_mode(self.br_name, \u0027secure\u0027).execute()"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def set_protocols(self, protocols):"},{"line_number":142,"context_line":"        # check_error\u003dTrue"},{"line_number":143,"context_line":"        self.set_db_attribute(\u0027bridge\u0027, self.br_name, \u0027protocols\u0027, protocols)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def create(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_c3529134","line":142,"updated":"2015-01-04 21:58:06.000000000","message":"What means the comment?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        self.ovsdb.set_fail_mode(self.br_name, \u0027secure\u0027).execute()"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def set_protocols(self, protocols):"},{"line_number":142,"context_line":"        # check_error\u003dTrue"},{"line_number":143,"context_line":"        self.set_db_attribute(\u0027bridge\u0027, self.br_name, \u0027protocols\u0027, protocols)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def create(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_6123fc58","line":142,"in_reply_to":"3a961159_c3529134","updated":"2015-01-09 19:29:35.000000000","message":"It\u0027s a TODO to remind myself to handle check_error-type situations as per the commit message. The WIP flag got accidentally removed when I changed the commit message. I\u0027ll make sure the commit message itself says WIP in case the WIP flag accidentally gets removed again.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def replace_port(self, port_name, *interface_attr_tuples):"},{"line_number":160,"context_line":"        \"\"\"Replace existing port or create it, and configure port interface.\"\"\""},{"line_number":161,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":162,"context_line":"            txn.add(self.ovsdb.del_port(self.br_name, port_name))"},{"line_number":163,"context_line":"            txn.add(self.ovsdb.add_port(self.br_name, port_name))"},{"line_number":164,"context_line":"            txn.add(self.ovsdb.db_set(\u0027Interface\u0027, port_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b1e4f6ac","line":161,"updated":"2015-01-03 00:49:19.000000000","message":"This is neat!  It\u0027s a shame we\u0027ll have to rework so much code to take advantage of it.  The \u0027mode\u0027 switch mentioned earlier might make the job less onerous, at least in the short-term.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def replace_port(self, port_name, *interface_attr_tuples):"},{"line_number":160,"context_line":"        \"\"\"Replace existing port or create it, and configure port interface.\"\"\""},{"line_number":161,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":162,"context_line":"            txn.add(self.ovsdb.del_port(self.br_name, port_name))"},{"line_number":163,"context_line":"            txn.add(self.ovsdb.add_port(self.br_name, port_name))"},{"line_number":164,"context_line":"            txn.add(self.ovsdb.db_set(\u0027Interface\u0027, port_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e64542b5","line":161,"in_reply_to":"3a961159_b1e4f6ac","updated":"2015-01-09 19:29:35.000000000","message":"There really aren\u0027t any places in the code outside of ovs_lib that make use of committing multiple commands as a single transaction anymore now that there is the replace_port() method. But I felt that it was an important feature to add to the underlying interface abstraction since both ovs-vsctl and ovsdb natively support transactions.\n\nI don\u0027t think there is any code that I can think of that runs multiple commands serially that shouldn\u0027t be done in a single transaction, though. So we might just be trading manually putting .execute() where we want to execute an immediately with two lines, setting the flag and then calling the method w/o execute().","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":162,"context_line":"            txn.add(self.ovsdb.del_port(self.br_name, port_name))"},{"line_number":163,"context_line":"            txn.add(self.ovsdb.add_port(self.br_name, port_name))"},{"line_number":164,"context_line":"            txn.add(self.ovsdb.db_set(\u0027Interface\u0027, port_name,"},{"line_number":165,"context_line":"                                      *interface_attr_tuples))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def delete_port(self, port_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_51ebd277","line":164,"updated":"2015-01-03 00:49:19.000000000","message":"If interface_attr_tuples is not provided, won\u0027t this command ail with missing arguments?  The previous implementation did a check that is suggested here to avoid the possibility of this kind of failure.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":162,"context_line":"            txn.add(self.ovsdb.del_port(self.br_name, port_name))"},{"line_number":163,"context_line":"            txn.add(self.ovsdb.add_port(self.br_name, port_name))"},{"line_number":164,"context_line":"            txn.add(self.ovsdb.db_set(\u0027Interface\u0027, port_name,"},{"line_number":165,"context_line":"                                      *interface_attr_tuples))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def delete_port(self, port_name):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_865c7e7f","line":164,"in_reply_to":"3a961159_51ebd277","updated":"2015-01-09 19:29:35.000000000","message":"It shouldn\u0027t as we are just passing it to the underlying interface, which if it isn\u0027t set will just be an empty tuple.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                        tunnel_type\u003dconstants.TYPE_GRE,"},{"line_number":228,"context_line":"                        vxlan_udp_port\u003dconstants.VXLAN_UDP_PORT,"},{"line_number":229,"context_line":"                        dont_fragment\u003dTrue):"},{"line_number":230,"context_line":"        attrs \u003d [(\u0027type\u0027, tunnel_type)]"},{"line_number":231,"context_line":"        options \u003d {}"},{"line_number":232,"context_line":"        if (tunnel_type \u003d\u003d constants.TYPE_VXLAN and"},{"line_number":233,"context_line":"                vxlan_udp_port !\u003d constants.VXLAN_UDP_PORT):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_f194bee9","line":230,"updated":"2015-01-03 00:49:19.000000000","message":"(No action required) attrs -\u003e interface_attrs","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                        dont_fragment\u003dTrue):"},{"line_number":230,"context_line":"        attrs \u003d [(\u0027type\u0027, tunnel_type)]"},{"line_number":231,"context_line":"        options \u003d {}"},{"line_number":232,"context_line":"        if (tunnel_type \u003d\u003d constants.TYPE_VXLAN and"},{"line_number":233,"context_line":"                vxlan_udp_port !\u003d constants.VXLAN_UDP_PORT):"},{"line_number":234,"context_line":"            options[\u0027dst_port\u0027] \u003d vxlan_udp_port"},{"line_number":235,"context_line":"        options[\u0027df_default\u0027] \u003d str(dont_fragment).lower()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_7101ae38","line":232,"updated":"2015-01-03 00:49:19.000000000","message":"Please add back the comment from the previous implementation\u0027s conditional.  Or, better yet, use a self-documenting conditional variable, e.g.\n\n vxlan_uses_default_udp_port \u003d (tunnel_type \u003d\u003d constants.TYPE_VXLAN and vxlan_udp_port \u003d\u003d constants.VXLAN_UDP_PORT)\n if not vxlan_uses_default_udp_port:\n   ...","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"66eac3b38af4540bec82d39adbaf4fe1898f019f","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                        dont_fragment\u003dTrue):"},{"line_number":230,"context_line":"        attrs \u003d [(\u0027type\u0027, tunnel_type)]"},{"line_number":231,"context_line":"        options \u003d {}"},{"line_number":232,"context_line":"        if (tunnel_type \u003d\u003d constants.TYPE_VXLAN and"},{"line_number":233,"context_line":"                vxlan_udp_port !\u003d constants.VXLAN_UDP_PORT):"},{"line_number":234,"context_line":"            options[\u0027dst_port\u0027] \u003d vxlan_udp_port"},{"line_number":235,"context_line":"        options[\u0027df_default\u0027] \u003d str(dont_fragment).lower()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_c9a4f208","line":232,"in_reply_to":"3a961159_7101ae38","updated":"2015-01-17 07:21:11.000000000","message":"Can\u0027t use as written because it changes the logic (non-vxlan ports would set options[\u0027dst_port\u0027]), but will do vxlan_uses_custom_udp_port, etc.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                        dont_fragment\u003dTrue):"},{"line_number":230,"context_line":"        attrs \u003d [(\u0027type\u0027, tunnel_type)]"},{"line_number":231,"context_line":"        options \u003d {}"},{"line_number":232,"context_line":"        if (tunnel_type \u003d\u003d constants.TYPE_VXLAN and"},{"line_number":233,"context_line":"                vxlan_udp_port !\u003d constants.VXLAN_UDP_PORT):"},{"line_number":234,"context_line":"            options[\u0027dst_port\u0027] \u003d vxlan_udp_port"},{"line_number":235,"context_line":"        options[\u0027df_default\u0027] \u003d str(dont_fragment).lower()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_897e4e69","line":232,"in_reply_to":"3a961159_7101ae38","updated":"2015-01-09 19:29:35.000000000","message":"will do.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        return self.get_port_ofport(local_name)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def get_port_name_list(self):"},{"line_number":263,"context_line":"        return self.ovsdb.list_ports(self.br_name).execute()"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def get_port_stats(self, port_name):"},{"line_number":266,"context_line":"        return self._db_get_map(\"Interface\", port_name, \"statistics\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_319f2605","line":263,"updated":"2015-01-03 00:49:19.000000000","message":"check_error\u003dTrue ?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        return self.get_port_ofport(local_name)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def get_port_name_list(self):"},{"line_number":263,"context_line":"        return self.ovsdb.list_ports(self.br_name).execute()"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def get_port_stats(self, port_name):"},{"line_number":266,"context_line":"        return self._db_get_map(\"Interface\", port_name, \"statistics\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e98c3283","line":263,"in_reply_to":"3a961159_319f2605","updated":"2015-01-09 19:29:35.000000000","message":"global TODO, will fix","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        edge_ports \u003d set()"},{"line_number":305,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":306,"context_line":"        for p in self.ovsdb.db_list(\u0027Interface\u0027, port_names).execute():"},{"line_number":307,"context_line":"            if p[\u0027ofport\u0027] \u003d\u003d []:"},{"line_number":308,"context_line":"                LOG.warn(_LW(\"Found not yet ready openvswitch port: %s\"),"},{"line_number":309,"context_line":"                         p.name)"},{"line_number":310,"context_line":"            elif p[\u0027ofport\u0027] \u003c 1:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_51a2f24b","line":307,"updated":"2015-01-03 00:49:19.000000000","message":"Consider using a named constant to identify a not-ready port rather than a magic empty list.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        edge_ports \u003d set()"},{"line_number":305,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":306,"context_line":"        for p in self.ovsdb.db_list(\u0027Interface\u0027, port_names).execute():"},{"line_number":307,"context_line":"            if p[\u0027ofport\u0027] \u003d\u003d []:"},{"line_number":308,"context_line":"                LOG.warn(_LW(\"Found not yet ready openvswitch port: %s\"),"},{"line_number":309,"context_line":"                         p.name)"},{"line_number":310,"context_line":"            elif p[\u0027ofport\u0027] \u003c 1:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_29cd5abb","line":307,"in_reply_to":"3a961159_51a2f24b","updated":"2015-01-09 19:29:35.000000000","message":"Will do.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            if p[\u0027ofport\u0027] \u003d\u003d []:"},{"line_number":308,"context_line":"                LOG.warn(_LW(\"Found not yet ready openvswitch port: %s\"),"},{"line_number":309,"context_line":"                         p.name)"},{"line_number":310,"context_line":"            elif p[\u0027ofport\u0027] \u003c 1:"},{"line_number":311,"context_line":"                LOG.warn(_LW(\"Found failed openvswitch port: %s\"), p.name)"},{"line_number":312,"context_line":"            else:"},{"line_number":313,"context_line":"                ext_ids \u003d p[\u0027external_ids\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_7188cec6","line":310,"updated":"2015-01-03 00:49:19.000000000","message":"Would INVALID_OFPORT be preferable here, or are there other values to worry about?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            if p[\u0027ofport\u0027] \u003d\u003d []:"},{"line_number":308,"context_line":"                LOG.warn(_LW(\"Found not yet ready openvswitch port: %s\"),"},{"line_number":309,"context_line":"                         p.name)"},{"line_number":310,"context_line":"            elif p[\u0027ofport\u0027] \u003c 1:"},{"line_number":311,"context_line":"                LOG.warn(_LW(\"Found failed openvswitch port: %s\"), p.name)"},{"line_number":312,"context_line":"            else:"},{"line_number":313,"context_line":"                ext_ids \u003d p[\u0027external_ids\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_26b90a7d","line":310,"in_reply_to":"3a961159_7188cec6","updated":"2015-01-09 19:29:35.000000000","message":"INVALID_OFPORT is currently as string, but I am hoping to get rid of all of the string-isms from the library. Mostly I did it this way to maintain the same logic as previous which handles the case for ofport \u003d 0...even though that *should* never be returned by OVS.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            elif p[\u0027ofport\u0027] \u003c 1:"},{"line_number":311,"context_line":"                LOG.warn(_LW(\"Found failed openvswitch port: %s\"), p.name)"},{"line_number":312,"context_line":"            else:"},{"line_number":313,"context_line":"                ext_ids \u003d p[\u0027external_ids\u0027]"},{"line_number":314,"context_line":"                if ext_ids.get(\u0027attached-mac\u0027):"},{"line_number":315,"context_line":"                    if \u0027iface-id\u0027 in ext_ids:"},{"line_number":316,"context_line":"                        edge_ports.add(ext_ids[\u0027iface-id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_51b91278","line":313,"updated":"2015-01-03 00:49:19.000000000","message":"(No action required) Nice cleanup!","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            elif p[\u0027ofport\u0027] \u003c 1:"},{"line_number":311,"context_line":"                LOG.warn(_LW(\"Found failed openvswitch port: %s\"), p.name)"},{"line_number":312,"context_line":"            else:"},{"line_number":313,"context_line":"                ext_ids \u003d p[\u0027external_ids\u0027]"},{"line_number":314,"context_line":"                if ext_ids.get(\u0027attached-mac\u0027):"},{"line_number":315,"context_line":"                    if \u0027iface-id\u0027 in ext_ids:"},{"line_number":316,"context_line":"                        edge_ports.add(ext_ids[\u0027iface-id\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_c9bdb605","line":313,"in_reply_to":"3a961159_51b91278","updated":"2015-01-09 19:29:35.000000000","message":"Thanks!","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                    if \u0027iface-id\u0027 in ext_ids:"},{"line_number":316,"context_line":"                        edge_ports.add(ext_ids[\u0027iface-id\u0027])"},{"line_number":317,"context_line":"                    elif \u0027xs-vif-uuid\u0027 in ext_ids:"},{"line_number":318,"context_line":"                        edge_ports.add(self.get_xapi_iface_id("},{"line_number":319,"context_line":"                            ext_ids[\u0027xs-vif-uuid\u0027]))"},{"line_number":320,"context_line":"        return edge_ports"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_31b6468b","line":318,"updated":"2015-01-03 00:49:19.000000000","message":"(No action required) Try to avoid nesting function calls.  In general the simpler the statement is, the more readable and maintainable it will be.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                    if \u0027iface-id\u0027 in ext_ids:"},{"line_number":316,"context_line":"                        edge_ports.add(ext_ids[\u0027iface-id\u0027])"},{"line_number":317,"context_line":"                    elif \u0027xs-vif-uuid\u0027 in ext_ids:"},{"line_number":318,"context_line":"                        edge_ports.add(self.get_xapi_iface_id("},{"line_number":319,"context_line":"                            ext_ids[\u0027xs-vif-uuid\u0027]))"},{"line_number":320,"context_line":"        return edge_ports"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_86463e7a","line":318,"in_reply_to":"3a961159_31b6468b","updated":"2015-01-09 19:29:35.000000000","message":"Force of habit. I generally try to avoid allocating variables if I can avoid it. :)","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        \"\"\""},{"line_number":337,"context_line":"        return {p[\u0027name\u0027]: p[\u0027tag\u0027] for p in self.ovsdb.db_list("},{"line_number":338,"context_line":"            \u0027Port\u0027, self.get_port_name_list()).execute()}"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def get_vif_port_by_id(self, port_id):"},{"line_number":341,"context_line":"        ports \u003d self.ovsdb.db_find(\u0027Interface\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_91aa9a18","line":338,"updated":"2015-01-03 00:49:19.000000000","message":"Is there any point in limiting the returned columns here to name and tag, as the previous implementation did?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        \"\"\""},{"line_number":337,"context_line":"        return {p[\u0027name\u0027]: p[\u0027tag\u0027] for p in self.ovsdb.db_list("},{"line_number":338,"context_line":"            \u0027Port\u0027, self.get_port_name_list()).execute()}"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def get_vif_port_by_id(self, port_id):"},{"line_number":341,"context_line":"        ports \u003d self.ovsdb.db_find(\u0027Interface\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_6154dcfe","line":338,"in_reply_to":"3a961159_91aa9a18","updated":"2015-01-09 19:29:35.000000000","message":"I wrestled with this a bit and went with what was moderately easier to implement as the overhead of pulling back the entire record is pretty small.\n\nI\u0027ll probably go ahead and add the ability to limit the columns returned on the direct db functions like list/find.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            \u0027Port\u0027, self.get_port_name_list()).execute()}"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def get_vif_port_by_id(self, port_id):"},{"line_number":341,"context_line":"        ports \u003d self.ovsdb.db_find(\u0027Interface\u0027,"},{"line_number":342,"context_line":"                                   (\u0027external_ids\u0027, \u0027\u003d\u0027,"},{"line_number":343,"context_line":"                                    {\u0027iface-id\u0027: port_id})).execute()"},{"line_number":344,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_f162fe14","line":341,"updated":"2015-01-03 00:49:19.000000000","message":"Again, is there a reason not to limit the fields being returned?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            \u0027Port\u0027, self.get_port_name_list()).execute()}"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def get_vif_port_by_id(self, port_id):"},{"line_number":341,"context_line":"        ports \u003d self.ovsdb.db_find(\u0027Interface\u0027,"},{"line_number":342,"context_line":"                                   (\u0027external_ids\u0027, \u0027\u003d\u0027,"},{"line_number":343,"context_line":"                                    {\u0027iface-id\u0027: port_id})).execute()"},{"line_number":344,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_0145d842","line":341,"in_reply_to":"3a961159_f162fe14","updated":"2015-01-09 19:29:35.000000000","message":"same as above.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            for port in ports:"},{"line_number":346,"context_line":"                if self.br_name !\u003d self.get_bridge_for_iface(port[\u0027name\u0027]):"},{"line_number":347,"context_line":"                    continue"},{"line_number":348,"context_line":"                if port[\u0027ofport\u0027] \u003d\u003d [] or port[\u0027ofport\u0027] \u003d\u003d -1:"},{"line_number":349,"context_line":"                    LOG.warn(_LW(\"ofport: %(ofport)s for VIF: %(vif)s is not a\""},{"line_number":350,"context_line":"                                 \" positive integer\"), {"},{"line_number":351,"context_line":"                                     \u0027ofport\u0027: port[\u0027ofport\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_316d6605","line":348,"updated":"2015-01-03 00:49:19.000000000","message":"Consider the use of constants (or maybe even a helper method) to determine whether a port is valid.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            for port in ports:"},{"line_number":346,"context_line":"                if self.br_name !\u003d self.get_bridge_for_iface(port[\u0027name\u0027]):"},{"line_number":347,"context_line":"                    continue"},{"line_number":348,"context_line":"                if port[\u0027ofport\u0027] \u003d\u003d [] or port[\u0027ofport\u0027] \u003d\u003d -1:"},{"line_number":349,"context_line":"                    LOG.warn(_LW(\"ofport: %(ofport)s for VIF: %(vif)s is not a\""},{"line_number":350,"context_line":"                                 \" positive integer\"), {"},{"line_number":351,"context_line":"                                     \u0027ofport\u0027: port[\u0027ofport\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_29347aab","line":348,"in_reply_to":"3a961159_316d6605","updated":"2015-01-09 19:29:35.000000000","message":"Will do.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                                 \" positive integer\"), {"},{"line_number":351,"context_line":"                                     \u0027ofport\u0027: port[\u0027ofport\u0027],"},{"line_number":352,"context_line":"                                     \u0027vif\u0027: port_id})"},{"line_number":353,"context_line":"                    continue"},{"line_number":354,"context_line":"                return VifPort(port[\u0027name\u0027], port[\u0027ofport\u0027], port_id,"},{"line_number":355,"context_line":"                               port[\u0027external_ids\u0027][\u0027attached-mac\u0027], self)"},{"line_number":356,"context_line":"            LOG.info(_LI(\"Port %(port_id)s not present in bridge %(br_name)s\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_517032dc","line":353,"updated":"2015-01-03 00:49:19.000000000","message":"The previous implementation returned here, is there a reason not to retain that behavior?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                                 \" positive integer\"), {"},{"line_number":351,"context_line":"                                     \u0027ofport\u0027: port[\u0027ofport\u0027],"},{"line_number":352,"context_line":"                                     \u0027vif\u0027: port_id})"},{"line_number":353,"context_line":"                    continue"},{"line_number":354,"context_line":"                return VifPort(port[\u0027name\u0027], port[\u0027ofport\u0027], port_id,"},{"line_number":355,"context_line":"                               port[\u0027external_ids\u0027][\u0027attached-mac\u0027], self)"},{"line_number":356,"context_line":"            LOG.info(_LI(\"Port %(port_id)s not present in bridge %(br_name)s\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_412e0044","line":353,"in_reply_to":"3a961159_517032dc","updated":"2015-01-09 19:29:35.000000000","message":"I think it was a holdover when we used to treat an unassigned port as a failure, and in general it just seemed very weird to give up if a port that was potentially not the one we were looking for was not ready/broken. Though I suppose that it would be very odd for there to actually be two ports with the same iface-id, but it looked like the function was written with that in mind, so it just seemed weird to me to return while were still iterating.\n\nI\u0027ll revisit this decision.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            if interface_attrs:"},{"line_number":171,"context_line":"                txn.add(self.ovsdb.db_set(\u0027Interface\u0027, port_name,"},{"line_number":172,"context_line":"                                          *interface_attrs))"},{"line_number":173,"context_line":"        return self.get_port_ofport(port_name)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def replace_port(self, port_name, *interface_attr_tuples):"},{"line_number":176,"context_line":"        \"\"\"Replace existing port or create it, and configure port interface.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_fc0edc3b","line":173,"updated":"2015-01-16 16:54:29.000000000","message":"Port cleanup missing.","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        return self.add_port(local_name, *attrs)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def get_port_name_list(self):"},{"line_number":275,"context_line":"        return self.ovsdb.list_ports(self.br_name).execute(check_error\u003dTrue)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def get_port_stats(self, port_name):"},{"line_number":278,"context_line":"        return self.db_get_val(\"Interface\", port_name, \"statistics\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_37e79d13","line":275,"updated":"2015-01-16 16:54:29.000000000","message":"I may miss smth substantial here, but afaik list_ports implementation does not split output prior to returning it to caller. Won\u0027t it be a problem when e.g. neutron/plugins/bigswitch/agent/restproxy_agent.py attempts to use it as an iterable?","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        edge_ports \u003d set()"},{"line_number":323,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":324,"context_line":"        # TODO(twilson) Add column filter, passing arguments like if_exists"},{"line_number":325,"context_line":"        for p in self.ovsdb.db_list("},{"line_number":326,"context_line":"                \u0027Interface\u0027, port_names,"},{"line_number":327,"context_line":"                columns\u003d[\u0027name\u0027, \u0027external_ids\u0027, \u0027ofport\u0027],"},{"line_number":328,"context_line":"                if_exists\u003dTrue).execute(check_error\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_596502ae","line":325,"updated":"2015-01-20 03:52:21.000000000","message":"Consider assigning the result of db_list to a variable to improve readability.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        edge_ports \u003d set()"},{"line_number":323,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":324,"context_line":"        # TODO(twilson) Add column filter, passing arguments like if_exists"},{"line_number":325,"context_line":"        for p in self.ovsdb.db_list("},{"line_number":326,"context_line":"                \u0027Interface\u0027, port_names,"},{"line_number":327,"context_line":"                columns\u003d[\u0027name\u0027, \u0027external_ids\u0027, \u0027ofport\u0027],"},{"line_number":328,"context_line":"                if_exists\u003dTrue).execute(check_error\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_85463622","line":325,"in_reply_to":"3a961159_596502ae","updated":"2015-01-21 20:45:04.000000000","message":"I\u0027ll probably never get used to the practice of allocating unnecessary variables merely for perceived legibility reasons. I also realize I\u0027m in the minority there and will do my best to adjust. :)","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                \u0027Interface\u0027, port_names,"},{"line_number":327,"context_line":"                columns\u003d[\u0027name\u0027, \u0027external_ids\u0027, \u0027ofport\u0027],"},{"line_number":328,"context_line":"                if_exists\u003dTrue).execute(check_error\u003dTrue):"},{"line_number":329,"context_line":"            if p[\u0027ofport\u0027] \u003d\u003d []:"},{"line_number":330,"context_line":"                LOG.warn(_LW(\"Found not yet ready openvswitch port: %s\"),"},{"line_number":331,"context_line":"                         p[\u0027name\u0027])"},{"line_number":332,"context_line":"            elif p[\u0027ofport\u0027] \u003d\u003d INVALID_OFPORT:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_d90ad21f","line":329,"updated":"2015-01-20 03:52:21.000000000","message":"(Redux) Consider using a named constant to identify a not-ready port rather than a magic empty list.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                \u0027Interface\u0027, port_names,"},{"line_number":327,"context_line":"                columns\u003d[\u0027name\u0027, \u0027external_ids\u0027, \u0027ofport\u0027],"},{"line_number":328,"context_line":"                if_exists\u003dTrue).execute(check_error\u003dTrue):"},{"line_number":329,"context_line":"            if p[\u0027ofport\u0027] \u003d\u003d []:"},{"line_number":330,"context_line":"                LOG.warn(_LW(\"Found not yet ready openvswitch port: %s\"),"},{"line_number":331,"context_line":"                         p[\u0027name\u0027])"},{"line_number":332,"context_line":"            elif p[\u0027ofport\u0027] \u003d\u003d INVALID_OFPORT:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_450a8ed3","line":329,"in_reply_to":"3a961159_d90ad21f","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            elif p[\u0027ofport\u0027] \u003d\u003d INVALID_OFPORT:"},{"line_number":333,"context_line":"                LOG.warn(_LW(\"Found failed openvswitch port: %s\"), p.name)"},{"line_number":334,"context_line":"            else:"},{"line_number":335,"context_line":"                ext_ids \u003d p[\u0027external_ids\u0027]"},{"line_number":336,"context_line":"                if ext_ids.get(\u0027attached-mac\u0027):"},{"line_number":337,"context_line":"                    if \u0027iface-id\u0027 in ext_ids:"},{"line_number":338,"context_line":"                        edge_ports.add(ext_ids[\u0027iface-id\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_b9226652","line":335,"updated":"2015-01-20 03:52:21.000000000","message":"Not sure why you\u0027re shorting external_ids to ext_ids here.  It would be preferable to reuse the names that appear in the data returned from ovs, as is done elsewhere in this module.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            elif p[\u0027ofport\u0027] \u003d\u003d INVALID_OFPORT:"},{"line_number":333,"context_line":"                LOG.warn(_LW(\"Found failed openvswitch port: %s\"), p.name)"},{"line_number":334,"context_line":"            else:"},{"line_number":335,"context_line":"                ext_ids \u003d p[\u0027external_ids\u0027]"},{"line_number":336,"context_line":"                if ext_ids.get(\u0027attached-mac\u0027):"},{"line_number":337,"context_line":"                    if \u0027iface-id\u0027 in ext_ids:"},{"line_number":338,"context_line":"                        edge_ports.add(ext_ids[\u0027iface-id\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_a595f289","line":335,"in_reply_to":"3a961159_b9226652","updated":"2015-01-21 20:45:04.000000000","message":"It makes things a lot easier to read because it leads to less forced line-breaks. When you\u0027ve got long variable names and long method names, and lots of indentation, it just gets too hard to fit things in 79 characters legibly.\n\nI managed to remove a level of indentation to remove a dreaded line break and changed the variable to external_ids, though. :)","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                    if \u0027iface-id\u0027 in ext_ids:"},{"line_number":338,"context_line":"                        edge_ports.add(ext_ids[\u0027iface-id\u0027])"},{"line_number":339,"context_line":"                    elif \u0027xs-vif-uuid\u0027 in ext_ids:"},{"line_number":340,"context_line":"                        if_id \u003d self.get_xapi_iface_id(ext_ids[\u0027xs-vif-uuid\u0027])"},{"line_number":341,"context_line":"                        edge_ports.add(if_id)"},{"line_number":342,"context_line":"        return edge_ports"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_5916e24a","line":340,"updated":"2015-01-20 03:52:21.000000000","message":"if_id -\u003e iface_id","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                    if \u0027iface-id\u0027 in ext_ids:"},{"line_number":338,"context_line":"                        edge_ports.add(ext_ids[\u0027iface-id\u0027])"},{"line_number":339,"context_line":"                    elif \u0027xs-vif-uuid\u0027 in ext_ids:"},{"line_number":340,"context_line":"                        if_id \u003d self.get_xapi_iface_id(ext_ids[\u0027xs-vif-uuid\u0027])"},{"line_number":341,"context_line":"                        edge_ports.add(if_id)"},{"line_number":342,"context_line":"        return edge_ports"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_45cc4e36","line":340,"in_reply_to":"3a961159_5916e24a","updated":"2015-01-21 20:45:04.000000000","message":"unless I make this change. Does the name of a purely temporary variable that is only used directly below its definition really matter? Isn\u0027t it more legible to have less line breaks?","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        \"\"\""},{"line_number":359,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":360,"context_line":"        return {p[\u0027name\u0027]: p[\u0027tag\u0027] for p in self.ovsdb.db_list("},{"line_number":361,"context_line":"            \u0027Port\u0027, port_names, columns\u003d[\u0027name\u0027, \u0027tag\u0027]).execute("},{"line_number":362,"context_line":"                check_error\u003dTrue)}"},{"line_number":363,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_334218ac","line":360,"updated":"2015-01-19 22:16:34.000000000","message":"the dict comprehension is quite unreadable","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        \"\"\""},{"line_number":359,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":360,"context_line":"        return {p[\u0027name\u0027]: p[\u0027tag\u0027] for p in self.ovsdb.db_list("},{"line_number":361,"context_line":"            \u0027Port\u0027, port_names, columns\u003d[\u0027name\u0027, \u0027tag\u0027]).execute("},{"line_number":362,"context_line":"                check_error\u003dTrue)}"},{"line_number":363,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_7949de65","line":360,"in_reply_to":"3a961159_334218ac","updated":"2015-01-20 03:52:21.000000000","message":"I concur.  Separating out the db_list() call from the comprehension would seem an easy fix.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        \"\"\""},{"line_number":359,"context_line":"        port_names \u003d self.get_port_name_list()"},{"line_number":360,"context_line":"        return {p[\u0027name\u0027]: p[\u0027tag\u0027] for p in self.ovsdb.db_list("},{"line_number":361,"context_line":"            \u0027Port\u0027, port_names, columns\u003d[\u0027name\u0027, \u0027tag\u0027]).execute("},{"line_number":362,"context_line":"                check_error\u003dTrue)}"},{"line_number":363,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_45c1aee3","line":360,"in_reply_to":"3a961159_7949de65","updated":"2015-01-21 20:45:04.000000000","message":"But look at how much better it is than what used to be there. :) j/k. fixed.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":369,"context_line":"            for port in ports:"},{"line_number":370,"context_line":"                if self.br_name !\u003d self.get_bridge_for_iface(port[\u0027name\u0027]):"},{"line_number":371,"context_line":"                    continue"},{"line_number":372,"context_line":"                if port[\u0027ofport\u0027] \u003d\u003d [] or port[\u0027ofport\u0027] \u003d\u003d -1:"},{"line_number":373,"context_line":"                    LOG.warn(_LW(\"ofport: %(ofport)s for VIF: %(vif)s is not a\""},{"line_number":374,"context_line":"                                 \" positive integer\"), {"},{"line_number":375,"context_line":"                                     \u0027ofport\u0027: port[\u0027ofport\u0027],"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_79971e9d","line":372,"updated":"2015-01-20 03:52:21.000000000","message":"Please switch to using constants in place of \u0027magic\u0027 values, e.g.\n\n INVALID_OFPORT \u003d -1\n OFPORT_NOT_READY \u003d []\n INVALID_PORT_STATES \u003d [INVALID_OFPORT, OFPORT_NOT_READY]\n\n if port[\u0027ofport\u0027] in INVALID_PORT_STATES:\n  ...","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":369,"context_line":"            for port in ports:"},{"line_number":370,"context_line":"                if self.br_name !\u003d self.get_bridge_for_iface(port[\u0027name\u0027]):"},{"line_number":371,"context_line":"                    continue"},{"line_number":372,"context_line":"                if port[\u0027ofport\u0027] \u003d\u003d [] or port[\u0027ofport\u0027] \u003d\u003d -1:"},{"line_number":373,"context_line":"                    LOG.warn(_LW(\"ofport: %(ofport)s for VIF: %(vif)s is not a\""},{"line_number":374,"context_line":"                                 \" positive integer\"), {"},{"line_number":375,"context_line":"                                     \u0027ofport\u0027: port[\u0027ofport\u0027],"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_451d2e73","line":372,"in_reply_to":"3a961159_79971e9d","updated":"2015-01-21 20:45:04.000000000","message":"Not sure I like conflating \u0027not ready\u0027 and \u0027invalid\u0027 after going to lots of work with the retry patch to treat them differently. Went ahead and just changed this line to:\n\n    if port[\u0027ofport] in [UNASSIGNED_OFPORT, INVALID_OFPORT]:\n\nfor now.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                    LOG.warn(_LW(\"ofport: %(ofport)s for VIF: %(vif)s is not a\""},{"line_number":374,"context_line":"                                 \" positive integer\"), {"},{"line_number":375,"context_line":"                                     \u0027ofport\u0027: port[\u0027ofport\u0027],"},{"line_number":376,"context_line":"                                     \u0027vif\u0027: port_id})"},{"line_number":377,"context_line":"                    continue"},{"line_number":378,"context_line":"                return VifPort(port[\u0027name\u0027], port[\u0027ofport\u0027], port_id,"},{"line_number":379,"context_line":"                               port[\u0027external_ids\u0027][\u0027attached-mac\u0027], self)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_19d61a54","line":376,"updated":"2015-01-20 03:52:21.000000000","message":"style: multiline dicts","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                    LOG.warn(_LW(\"ofport: %(ofport)s for VIF: %(vif)s is not a\""},{"line_number":374,"context_line":"                                 \" positive integer\"), {"},{"line_number":375,"context_line":"                                     \u0027ofport\u0027: port[\u0027ofport\u0027],"},{"line_number":376,"context_line":"                                     \u0027vif\u0027: port_id})"},{"line_number":377,"context_line":"                    continue"},{"line_number":378,"context_line":"                return VifPort(port[\u0027name\u0027], port[\u0027ofport\u0027], port_id,"},{"line_number":379,"context_line":"                               port[\u0027external_ids\u0027][\u0027attached-mac\u0027], self)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_a8030272","line":376,"in_reply_to":"3a961159_19d61a54","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":379,"context_line":"                               port[\u0027external_ids\u0027][\u0027attached-mac\u0027], self)"},{"line_number":380,"context_line":"            LOG.info(_LI(\"Port %(port_id)s not present in bridge %(br_name)s\"),"},{"line_number":381,"context_line":"                     {\u0027port_id\u0027: port_id, \u0027br_name\u0027: self.br_name})"},{"line_number":382,"context_line":"        except Exception as error:"},{"line_number":383,"context_line":"            LOG.warn(_LW(\"Unable to parse interface details. Exception: %s\"),"},{"line_number":384,"context_line":"                     error)"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_79339ec4","line":382,"updated":"2015-01-20 03:52:21.000000000","message":"Where is this exception expected to come from?  The only things I can see are the call to self.get_bridge_for_iface() and the dictionary accesses.  In the former case, is there a reason we wouldn\u0027t want to just raise in response to an osvdb error?  And in the latter, wouldn\u0027t it be preferable to catch KeyError?","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":379,"context_line":"                               port[\u0027external_ids\u0027][\u0027attached-mac\u0027], self)"},{"line_number":380,"context_line":"            LOG.info(_LI(\"Port %(port_id)s not present in bridge %(br_name)s\"),"},{"line_number":381,"context_line":"                     {\u0027port_id\u0027: port_id, \u0027br_name\u0027: self.br_name})"},{"line_number":382,"context_line":"        except Exception as error:"},{"line_number":383,"context_line":"            LOG.warn(_LW(\"Unable to parse interface details. Exception: %s\"),"},{"line_number":384,"context_line":"                     error)"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_000074a9","line":382,"in_reply_to":"3a961159_79339ec4","updated":"2015-01-21 20:45:04.000000000","message":"The only thing I see that could possibly throw any kind of exception is the port[\u0027external_ids\u0027][\u0027attached-mac\u0027] call. And even that only in a contrived example because we always set attached-mac when we set iface-id.\n\nThe port dict keys are all requested specifically, db_find will return [] on not finding anything and neither it nor get_bridge_for_iface pass check_error\u003dTrue.\n\nSo it looks like this could be rewritten to do the query where iface-id\u003dport_id AND attached-mac!\u003d\"\", and then we could take out the exception altogether, because if something throws an exception, something very weird has happened and needs to be fixed.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f78c5bbcf3622e6ec389bde088ba946272db4fb7","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        return self.ovsdb.br_exists(bridge_name).execute()"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def port_exists(self, port_name):"},{"line_number":112,"context_line":"        return bool(self.ovsdb.db_get(\u0027Port\u0027, port_name, \u0027name\u0027).execute("},{"line_number":113,"context_line":"            check_error\u003dFalse, log_errors\u003dFalse))"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def get_bridge_for_iface(self, iface):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_b4d88b1e","line":112,"updated":"2015-01-22 10:47:25.000000000","message":"the following seems easier to read:\n\n  return self.bool(\n     self.ovsdb...(\n        check_error\u003dFalse, log_errors\u003dFalse))","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4168f5dcc7f16f0012cff4a989f63edcca0a3eca","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        return self.ovsdb.br_exists(bridge_name).execute()"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def port_exists(self, port_name):"},{"line_number":112,"context_line":"        return bool(self.ovsdb.db_get(\u0027Port\u0027, port_name, \u0027name\u0027).execute("},{"line_number":113,"context_line":"            check_error\u003dFalse, log_errors\u003dFalse))"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def get_bridge_for_iface(self, iface):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_c00aa720","line":112,"in_reply_to":"1a930d6b_b4d88b1e","updated":"2015-01-22 16:29:03.000000000","message":"That looked worse to me, so I propose a compromise:\n\n     cmd \u003d self.ovsdb.db_get(\u0027Port\u0027, port_name, \u0027name\u0027)\n     return bool(cmd.execute(check_error\u003dFalse, log_errors\u003dFalse))","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"70e438921d05e36269818fd8116ec6bd548d0267","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                LOG.warn(_LW(\"ofport: %(ofport)s for VIF: %(vif)s is not a\""},{"line_number":375,"context_line":"                             \" positive integer\"),"},{"line_number":376,"context_line":"                         {\u0027ofport\u0027: port[\u0027ofport\u0027], \u0027vif\u0027: port_id})"},{"line_number":377,"context_line":"                continue"},{"line_number":378,"context_line":"            mac \u003d port[\u0027external_ids\u0027].get(\u0027attached-mac\u0027)"},{"line_number":379,"context_line":"            if not mac:"},{"line_number":380,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_e2cecb82","line":377,"updated":"2015-01-22 15:52:32.000000000","message":"In this case the original code was returning directly instead of continuing the \u0027for\u0027 cycle.  Is it possible to get more than one port with the same iface_id ?","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4168f5dcc7f16f0012cff4a989f63edcca0a3eca","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                LOG.warn(_LW(\"ofport: %(ofport)s for VIF: %(vif)s is not a\""},{"line_number":375,"context_line":"                             \" positive integer\"),"},{"line_number":376,"context_line":"                         {\u0027ofport\u0027: port[\u0027ofport\u0027], \u0027vif\u0027: port_id})"},{"line_number":377,"context_line":"                continue"},{"line_number":378,"context_line":"            mac \u003d port[\u0027external_ids\u0027].get(\u0027attached-mac\u0027)"},{"line_number":379,"context_line":"            if not mac:"},{"line_number":380,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_40307701","line":377,"in_reply_to":"1a930d6b_e2cecb82","updated":"2015-01-22 16:29:03.000000000","message":"There is nothing in OVS preventing it, though it should be impossible in neutron unless two ports end up being created with the guid AND one of them fails to be created, but the other doesn\u0027t. But I figured, since we are being \"really careful\" by doing for port in ports: where there should only be one port returned, we might as well continue just in case we find an actually valid port. :p","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"cb4b5784367c25caea8fcf50858a77154fdd77d5","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                if \u0027iface-id\u0027 in external_ids:"},{"line_number":339,"context_line":"                    edge_ports.add(external_ids[\u0027iface-id\u0027])"},{"line_number":340,"context_line":"                elif \u0027xs-vif-uuid\u0027 in external_ids:"},{"line_number":341,"context_line":"                    if_id \u003d self.get_xapi_iface_id(external_ids[\u0027xs-vif-uuid\u0027])"},{"line_number":342,"context_line":"                    edge_ports.add(if_id)"},{"line_number":343,"context_line":"        return edge_ports"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_c8e2bc00","line":341,"updated":"2015-01-23 01:40:15.000000000","message":"(No action required) My pattern-matcher would rather see iface_id here and on the next line so that there is a correlation between iface-id on lines 338-339, but that\u0027s just me.","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"bf778176f950cd4cf85596d8b318d947fe1a8dbd","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                if \u0027iface-id\u0027 in external_ids:"},{"line_number":339,"context_line":"                    edge_ports.add(external_ids[\u0027iface-id\u0027])"},{"line_number":340,"context_line":"                elif \u0027xs-vif-uuid\u0027 in external_ids:"},{"line_number":341,"context_line":"                    if_id \u003d self.get_xapi_iface_id(external_ids[\u0027xs-vif-uuid\u0027])"},{"line_number":342,"context_line":"                    edge_ports.add(if_id)"},{"line_number":343,"context_line":"        return edge_ports"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_fb61fb39","line":341,"in_reply_to":"1a930d6b_c8e2bc00","updated":"2015-01-23 15:00:05.000000000","message":"Done","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"fc133a786701b3ce9f2ee3252a585bff0830dd11","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                if \u0027iface-id\u0027 in external_ids:"},{"line_number":339,"context_line":"                    edge_ports.add(external_ids[\u0027iface-id\u0027])"},{"line_number":340,"context_line":"                elif \u0027xs-vif-uuid\u0027 in external_ids:"},{"line_number":341,"context_line":"                    if_id \u003d self.get_xapi_iface_id(external_ids[\u0027xs-vif-uuid\u0027])"},{"line_number":342,"context_line":"                    edge_ports.add(if_id)"},{"line_number":343,"context_line":"        return edge_ports"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_072bd282","line":341,"in_reply_to":"1a930d6b_c8e2bc00","updated":"2015-01-23 02:25:31.000000000","message":"iface_id introduces an extra line break due to line length. I can do it, I just generally prefer reading a single line when possible.","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"cb4b5784367c25caea8fcf50858a77154fdd77d5","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        results \u003d cmd.execute(check_error\u003dTrue)"},{"line_number":363,"context_line":"        return {p[\u0027name\u0027]: p[\u0027tag\u0027] for p in results}"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def get_vif_port_by_id(self, port_id):"},{"line_number":366,"context_line":"        ports \u003d self.ovsdb.db_find("},{"line_number":367,"context_line":"            \u0027Interface\u0027, (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027iface-id\u0027: port_id}),"},{"line_number":368,"context_line":"            (\u0027external_ids\u0027, \u0027!\u003d\u0027, {\u0027attached-mac\u0027: \u0027\u0027}),"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_83ced7b2","line":365,"updated":"2015-01-23 01:40:15.000000000","message":"(No action required) So...much...cleaner","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"fc133a786701b3ce9f2ee3252a585bff0830dd11","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        results \u003d cmd.execute(check_error\u003dTrue)"},{"line_number":363,"context_line":"        return {p[\u0027name\u0027]: p[\u0027tag\u0027] for p in results}"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def get_vif_port_by_id(self, port_id):"},{"line_number":366,"context_line":"        ports \u003d self.ovsdb.db_find("},{"line_number":367,"context_line":"            \u0027Interface\u0027, (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027iface-id\u0027: port_id}),"},{"line_number":368,"context_line":"            (\u0027external_ids\u0027, \u0027!\u003d\u0027, {\u0027attached-mac\u0027: \u0027\u0027}),"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_0752f212","line":365,"in_reply_to":"1a930d6b_83ced7b2","updated":"2015-01-23 02:25:31.000000000","message":"Always nice when a new API doesn\u0027t take things the other direction. :)","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"cb4b5784367c25caea8fcf50858a77154fdd77d5","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                         {\u0027ofport\u0027: port[\u0027ofport\u0027], \u0027vif\u0027: port_id})"},{"line_number":377,"context_line":"                continue"},{"line_number":378,"context_line":"            mac \u003d port[\u0027external_ids\u0027].get(\u0027attached-mac\u0027)"},{"line_number":379,"context_line":"            if not mac:"},{"line_number":380,"context_line":"                continue"},{"line_number":381,"context_line":"            return VifPort(port[\u0027name\u0027], port[\u0027ofport\u0027], port_id, mac, self)"},{"line_number":382,"context_line":"        LOG.info(_LI(\"Port %(port_id)s not present in bridge %(br_name)s\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_488c0c36","line":379,"updated":"2015-01-23 01:40:15.000000000","message":"If the mac can\u0027t be an empty string, what would it be that would evaluate to False?","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"bf778176f950cd4cf85596d8b318d947fe1a8dbd","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                         {\u0027ofport\u0027: port[\u0027ofport\u0027], \u0027vif\u0027: port_id})"},{"line_number":377,"context_line":"                continue"},{"line_number":378,"context_line":"            mac \u003d port[\u0027external_ids\u0027].get(\u0027attached-mac\u0027)"},{"line_number":379,"context_line":"            if not mac:"},{"line_number":380,"context_line":"                continue"},{"line_number":381,"context_line":"            return VifPort(port[\u0027name\u0027], port[\u0027ofport\u0027], port_id, mac, self)"},{"line_number":382,"context_line":"        LOG.info(_LI(\"Port %(port_id)s not present in bridge %(br_name)s\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_5b884fe7","line":379,"in_reply_to":"1a930d6b_488c0c36","updated":"2015-01-23 15:00:05.000000000","message":"Done","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"fc133a786701b3ce9f2ee3252a585bff0830dd11","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                         {\u0027ofport\u0027: port[\u0027ofport\u0027], \u0027vif\u0027: port_id})"},{"line_number":377,"context_line":"                continue"},{"line_number":378,"context_line":"            mac \u003d port[\u0027external_ids\u0027].get(\u0027attached-mac\u0027)"},{"line_number":379,"context_line":"            if not mac:"},{"line_number":380,"context_line":"                continue"},{"line_number":381,"context_line":"            return VifPort(port[\u0027name\u0027], port[\u0027ofport\u0027], port_id, mac, self)"},{"line_number":382,"context_line":"        LOG.info(_LI(\"Port %(port_id)s not present in bridge %(br_name)s\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_2319a388","line":379,"in_reply_to":"1a930d6b_488c0c36","updated":"2015-01-23 02:25:31.000000000","message":"This is actually just to get an existing unit test to pass where it passes in results that don\u0027t have mac addresses and ensures that it doesn\u0027t create a VifPort.\n\nI could have gone in and modified the test\u0027s helper function to not test the case, but was afraid a reviewer would see that I removed the case and think I was just deleting something that the new code didn\u0027t cover. So I left the check to specifically reject values without a mac.\n\nIf you would prefer, I can modify the test to not return mock data that we should be specifically disallowing with our query.","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1c39f50ee27c636fd9f98a01610b7d2aef6f5b74","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                          *interface_attrs))"},{"line_number":178,"context_line":"        return self.get_port_ofport(port_name)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def replace_port(self, port_name, *interface_attr_tuples):"},{"line_number":181,"context_line":"        \"\"\"Replace existing port or create it, and configure port interface.\"\"\""},{"line_number":182,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":183,"context_line":"            txn.add(self.ovsdb.del_port(port_name))"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_ae01ca07","line":180,"updated":"2015-01-24 10:17:12.000000000","message":"(No action required)\nnit: interface_attr_tuples vs. interface_attrs above.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                          *interface_attrs))"},{"line_number":178,"context_line":"        return self.get_port_ofport(port_name)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def replace_port(self, port_name, *interface_attr_tuples):"},{"line_number":181,"context_line":"        \"\"\"Replace existing port or create it, and configure port interface.\"\"\""},{"line_number":182,"context_line":"        with self.ovsdb.transaction() as txn:"},{"line_number":183,"context_line":"            txn.add(self.ovsdb.del_port(port_name))"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_a689ca76","line":180,"in_reply_to":"1a930d6b_ae01ca07","updated":"2015-01-26 18:19:45.000000000","message":"Done","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1c39f50ee27c636fd9f98a01610b7d2aef6f5b74","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        self.ovsdb.del_port(port_name, self.br_name).execute()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def run_ofctl(self, cmd, args, process_input\u003dNone):"},{"line_number":194,"context_line":"        full_args \u003d [\"ovs-ofctl\", cmd, self.br_name] + args"},{"line_number":195,"context_line":"        try:"},{"line_number":196,"context_line":"            return utils.execute(full_args, root_helper\u003dself.root_helper,"},{"line_number":197,"context_line":"                                 process_input\u003dprocess_input)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_290dd437","line":194,"updated":"2015-01-24 10:17:12.000000000","message":"(No action required) I understand this is probably out of scope here, but am just curious whether we also want to abstract out flow controls.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        self.ovsdb.del_port(port_name, self.br_name).execute()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def run_ofctl(self, cmd, args, process_input\u003dNone):"},{"line_number":194,"context_line":"        full_args \u003d [\"ovs-ofctl\", cmd, self.br_name] + args"},{"line_number":195,"context_line":"        try:"},{"line_number":196,"context_line":"            return utils.execute(full_args, root_helper\u003dself.root_helper,"},{"line_number":197,"context_line":"                                 process_input\u003dprocess_input)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_5a91dbef","line":194,"in_reply_to":"1a930d6b_290dd437","updated":"2015-01-26 18:19:45.000000000","message":"I\u0027m not at all interested in doing it myself, but I believe blueprint ovs-ofctl-to-python is for replacingovs_lib ofctl stuff with native ovsdb, but directly in the agents themselves so there would be no OpenFlow code here.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"}],"neutron/agent/linux/ovsdb_vsctl.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    def __init__(self, context, cmd, opts\u003dNone, args\u003dNone):"},{"line_number":32,"context_line":"        self.context \u003d context"},{"line_number":33,"context_line":"        self.cmd \u003d cmd"},{"line_number":34,"context_line":"        self.opts \u003d opts or []"},{"line_number":35,"context_line":"        self.args \u003d args or []"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def execute(self, check_error\u003dFalse, global_options\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_2e350746","line":34,"updated":"2015-01-03 00:49:19.000000000","message":"I have mixed feelings about this form of default because it conflates bool(opts) with None.  If someone does something stupid, like supplying a value for opts or args that evaluate to boolean false, the result might be unexpected, e.g.\n\ncmd \u003d OVSVsctlCommand(context, cmd, False):\ncmd.execute() # wat, no exception?\n\nSo where None is defined as a default marker, I think it makes sense to check for it explicitly, e.g.\n\nif opts is None:\n opts \u003d []\n\nApologies in advance for hitting your \u0027why isn\u0027t this language statically-typed?\u0027 button.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    def __init__(self, context, cmd, opts\u003dNone, args\u003dNone):"},{"line_number":32,"context_line":"        self.context \u003d context"},{"line_number":33,"context_line":"        self.cmd \u003d cmd"},{"line_number":34,"context_line":"        self.opts \u003d opts or []"},{"line_number":35,"context_line":"        self.args \u003d args or []"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def execute(self, check_error\u003dFalse, global_options\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_76fbbd7b","line":34,"in_reply_to":"3a961159_2e350746","updated":"2015-01-09 19:29:35.000000000","message":"Explicit is better than implicit...as long as we aren\u0027t talking about types! ;-p\n\nWhat do you think about using something immutable like a tuple as the default and then just doing self.opts \u003d opts?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            super(OVSVsctlBrExistsCommand, self).execute(check_error\u003dTrue)"},{"line_number":50,"context_line":"        except RuntimeError as e:"},{"line_number":51,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":52,"context_line":"                if \u0027Exit code: 2\\n\u0027 in str(e):"},{"line_number":53,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":54,"context_line":"                    return False"},{"line_number":55,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_ee113fb0","line":52,"updated":"2015-01-03 00:49:19.000000000","message":"(No action required) e.message is probably preferable to str(e) for the purposes of this check.  \n\nAlso, do I recall you saying you were going to fix how we throw exec errors to allow inspection without having to resort to this kind of string comparison?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            super(OVSVsctlBrExistsCommand, self).execute(check_error\u003dTrue)"},{"line_number":50,"context_line":"        except RuntimeError as e:"},{"line_number":51,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":52,"context_line":"                if \u0027Exit code: 2\\n\u0027 in str(e):"},{"line_number":53,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":54,"context_line":"                    return False"},{"line_number":55,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_c1c75064","line":52,"in_reply_to":"3a961159_ee113fb0","updated":"2015-01-09 19:29:35.000000000","message":"I\u0027m planning on trying to convert us to using processutils.execute() which stores the exit_code on the ERR object. I wrote something that did this and it ended up looking almost exactly like what processutils.execute did. There are other syntactic differences between the two execute() implementations, but the processutils version would be handy if we do end up removing passing root_helper to everything.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        opts \u003d [\u0027--format\u003djson\u0027]"},{"line_number":67,"context_line":"        res \u003d super(OVSVsctlDbCommand, self).execute(check_error\u003dTrue,"},{"line_number":68,"context_line":"                                                     global_options\u003dopts)"},{"line_number":69,"context_line":"        json \u003d jsonutils.loads(res)"},{"line_number":70,"context_line":"        headings \u003d json[\u0027headings\u0027]"},{"line_number":71,"context_line":"        data \u003d json[\u0027data\u0027]"},{"line_number":72,"context_line":"        results \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_4e0fb388","line":69,"updated":"2015-01-03 00:49:19.000000000","message":"Consider add at least a token error handler around unpacking of the json blob to make for easier troubleshooting.\n\nAlso, I think it would make sense to separate command execution from result parsing if only to simplify testing.  Parsing should be amenable to unit testing for the most part and separating input retrieval out would mean one less thing to mock.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        opts \u003d [\u0027--format\u003djson\u0027]"},{"line_number":67,"context_line":"        res \u003d super(OVSVsctlDbCommand, self).execute(check_error\u003dTrue,"},{"line_number":68,"context_line":"                                                     global_options\u003dopts)"},{"line_number":69,"context_line":"        json \u003d jsonutils.loads(res)"},{"line_number":70,"context_line":"        headings \u003d json[\u0027headings\u0027]"},{"line_number":71,"context_line":"        data \u003d json[\u0027data\u0027]"},{"line_number":72,"context_line":"        results \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_01c23853","line":69,"in_reply_to":"3a961159_4e0fb388","updated":"2015-01-09 19:29:35.000000000","message":"Sounds like a plan.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def br_get_external_id(self, bridge_name, field_name):"},{"line_number":139,"context_line":"        return OVSVsctlCommand(self.context, \u0027br-get-external-id\u0027,"},{"line_number":140,"context_line":"                               args\u003d[bridge_name, \u0027bridge-id\u0027])"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def db_set(self, table_name, record, *col_values):"},{"line_number":143,"context_line":"        \"\"\"Set fields in a db record"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_3183a6cd","line":140,"updated":"2015-01-03 00:49:19.000000000","message":"I\u0027m assuming the following change is required?\n\n\u0027bridge-id\u0027 \u003d\u003e field_name","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def br_get_external_id(self, bridge_name, field_name):"},{"line_number":139,"context_line":"        return OVSVsctlCommand(self.context, \u0027br-get-external-id\u0027,"},{"line_number":140,"context_line":"                               args\u003d[bridge_name, \u0027bridge-id\u0027])"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def db_set(self, table_name, record, *col_values):"},{"line_number":143,"context_line":"        \"\"\"Set fields in a db record"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e19b6c71","line":140,"in_reply_to":"3a961159_3183a6cd","updated":"2015-01-09 19:29:35.000000000","message":"Good catch. Oops. :)","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def db_set(self, table_name, record, *col_values):"},{"line_number":143,"context_line":"        \"\"\"Set fields in a db record"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        col_values: an iterable containing one or more column/value pairs."},{"line_number":146,"context_line":"                    values may be atomic, or unnested sequences, or mappings"},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":"        args \u003d [table_name, record]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_2ed187cd","line":145,"updated":"2015-01-03 00:49:19.000000000","message":"Would it make sense to use a dict instead to allow assignment via kwargs? e.g.\n\nobj.db_set(\u0027foo\u0027, \u0027bar\u0027, val1\u003d\u0027val1\u0027)\n\nOr is the order of provision important?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def db_set(self, table_name, record, *col_values):"},{"line_number":143,"context_line":"        \"\"\"Set fields in a db record"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        col_values: an iterable containing one or more column/value pairs."},{"line_number":146,"context_line":"                    values may be atomic, or unnested sequences, or mappings"},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":"        args \u003d [table_name, record]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_d338033e","line":145,"in_reply_to":"3a961159_2ed187cd","updated":"2015-01-09 19:29:35.000000000","message":"Setting multiple values on a single column, order is not important. Setting multiple column values, I can\u0027t find anything conclusive. The existing interface preserved order, so I kept it. BUT, I like the idea of also accepting kwargs and then merging those in for callers that know that they don\u0027t care about order...because I\u0027m not really a huge fan of the passing col,val tuples thing unless it\u0027s absolutely necessary.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                                                          column])"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def set_controller(self, bridge_name, controllers):"},{"line_number":161,"context_line":"        # XXX check_error\u003dTrue"},{"line_number":162,"context_line":"        return OVSVsctlCommand(self.context, \u0027set-controller\u0027,"},{"line_number":163,"context_line":"                               args\u003d[bridge_name] + controllers)"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_4ed413bd","line":161,"updated":"2015-01-03 00:49:19.000000000","message":"Please use TODO(otherwiseguy) for comments of this nature.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                                                          column])"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def set_controller(self, bridge_name, controllers):"},{"line_number":161,"context_line":"        # XXX check_error\u003dTrue"},{"line_number":162,"context_line":"        return OVSVsctlCommand(self.context, \u0027set-controller\u0027,"},{"line_number":163,"context_line":"                               args\u003d[bridge_name] + controllers)"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_d638f13d","line":161,"in_reply_to":"3a961159_4ed413bd","updated":"2015-01-09 19:29:35.000000000","message":"Will do.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    return args"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"def _val_to_python(val):"},{"line_number":228,"context_line":"    if isinstance(val, collections.Sequence) and len(val) \u003d\u003d 2:"},{"line_number":229,"context_line":"        if val[0] \u003d\u003d \"uuid\":"},{"line_number":230,"context_line":"            return uuid.UUID(val[1])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_aea9f725","line":227,"updated":"2015-01-03 00:49:19.000000000","message":"So the point of this method is to parse things that are known and leave things alone that it doesn\u0027t?  I ask only because there is no \u0027else\u0027 clause in case the data is corrupt, just making sure that there is no need to catch that kind of issue early.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    return args"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"def _val_to_python(val):"},{"line_number":228,"context_line":"    if isinstance(val, collections.Sequence) and len(val) \u003d\u003d 2:"},{"line_number":229,"context_line":"        if val[0] \u003d\u003d \"uuid\":"},{"line_number":230,"context_line":"            return uuid.UUID(val[1])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a185e4af","line":227,"in_reply_to":"3a961159_aea9f725","updated":"2015-01-09 19:29:35.000000000","message":"If val is a string type, it is technically a sequence, so this function assumes that any sequence that isn\u0027t valid OVSDB is a string. Dealing with python2/3 string type issues, etc. didn\u0027t seem worth it considering that ovs itself has tons of unittests to verify its output isn\u0027t broken and we\u0027re pulling the data over either CLI or unix socket.\n\nKind of a corollary to the \u0027premature optimization is the root of all evil\u0027 maybe. Making code much more complex to handle bugs that almost certainly will never happen and will be very obvious in log messages if they ever do may not make the world a better place. :)\n\nI\u0027m certainly willing to revisit this if you feel strongly about it, though.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"class OVSVsctlDbGetCommand(OVSVsctlDbCommand):"},{"line_number":93,"context_line":"    def execute(self, check_error\u003dFalse):"},{"line_number":94,"context_line":"        return super(OVSVsctlDbGetCommand, self).execute()[0].values()[0]"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class OVSVsctlTransaction(ovsdb.OVSDBTransaction):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_dc85a059","line":94,"updated":"2015-01-16 16:54:29.000000000","message":"That needs explanation.","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                                       args\u003d[bridge_name])"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def port_to_br(self, port_name):"},{"line_number":146,"context_line":"        return OVSVsctlCommand(self.context, \u0027port-to-br\u0027, args\u003d[port_name])"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def iface_to_br(self, iface_name):"},{"line_number":149,"context_line":"        return OVSVsctlCommand(self.context, \u0027iface-to-br\u0027, args\u003d[iface_name])"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_a64fe58a","line":146,"updated":"2015-01-16 16:54:29.000000000","message":"In original code, we pass check_error\u003dTrue here. Is it removed intentionally?","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        return OVSVsctlCommand(self.context, \u0027port-to-br\u0027, args\u003d[port_name])"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def iface_to_br(self, iface_name):"},{"line_number":149,"context_line":"        return OVSVsctlCommand(self.context, \u0027iface-to-br\u0027, args\u003d[iface_name])"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def list_br(self):"},{"line_number":152,"context_line":"        return OVSVsctlListCommand(self.context, \u0027list-br\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_e19e37b7","line":149,"updated":"2015-01-16 16:54:29.000000000","message":"In the original code, we res.strip() output. Is it removed intentionally?","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def list_br(self):"},{"line_number":152,"context_line":"        return OVSVsctlListCommand(self.context, \u0027list-br\u0027)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def br_get_external_id(self, bridge_name, field_name):"},{"line_number":155,"context_line":"        return OVSVsctlCommand(self.context, \u0027br-get-external-id\u0027,"},{"line_number":156,"context_line":"                               args\u003d[bridge_name, \u0027bridge-id\u0027])"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_41962b95","line":154,"updated":"2015-01-16 16:54:29.000000000","message":"Ditto.","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        \"\"\"Set fields in a db record"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        col_values: an iterable containing one or more column/value pairs."},{"line_number":162,"context_line":"                    values may be atomic, or unnested sequences, or mappings"},{"line_number":163,"context_line":"        \"\"\""},{"line_number":164,"context_line":"        args \u003d [table_name, record]"},{"line_number":165,"context_line":"        args +\u003d _set_colval_args(*col_values)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_bc37f4ae","line":162,"updated":"2015-01-16 16:54:29.000000000","message":"nit: values -\u003e Values","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def db_get(self, table_name, record, column):"},{"line_number":173,"context_line":"        # Use the \u0027list\u0027 command as it can return json and \u0027get\u0027 cannot so that"},{"line_number":174,"context_line":"        # we can get real return types instead of treating everyting as string"},{"line_number":175,"context_line":"        # NOTE: openvswitch can return a single atomic value for fields that"},{"line_number":176,"context_line":"        # are sets, but only have one value. This makes directly iterating over"},{"line_number":177,"context_line":"        # the result of a db_get() call unsafe."}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_7c510cd8","line":174,"updated":"2015-01-16 16:54:29.000000000","message":"nit: everything","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        res \u003d self.run_vsctl(args)"},{"line_number":51,"context_line":"        if res is None:"},{"line_number":52,"context_line":"            return"},{"line_number":53,"context_line":"        res \u003d res.replace(r\u0027\\\\\u0027, \u0027\\\\\u0027).split(\"\\n\")"},{"line_number":54,"context_line":"        for i, record in enumerate(res):"},{"line_number":55,"context_line":"            self.commands[i].result \u003d record"},{"line_number":56,"context_line":"        return [cmd.result for cmd in self.commands]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_d34f14be","line":53,"updated":"2015-01-19 22:16:34.000000000","message":"splitlines() is equivalent to split(\"\\n\") but safer/clearer?","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        res \u003d self.run_vsctl(args)"},{"line_number":51,"context_line":"        if res is None:"},{"line_number":52,"context_line":"            return"},{"line_number":53,"context_line":"        res \u003d res.replace(r\u0027\\\\\u0027, \u0027\\\\\u0027).split(\"\\n\")"},{"line_number":54,"context_line":"        for i, record in enumerate(res):"},{"line_number":55,"context_line":"            self.commands[i].result \u003d record"},{"line_number":56,"context_line":"        return [cmd.result for cmd in self.commands]"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_8072a4e3","line":53,"in_reply_to":"3a961159_d34f14be","updated":"2015-01-21 20:45:04.000000000","message":"Actually, they return subtly different results in one case. \"\".split(\"\\n\") will return [\"\"], whereas \"\".splitlines() will return []. \nThis change was breaking the br_exists command, but I had meant to turn it into a \u0027list\u0027 command. It\u0027s now fixed.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        except Exception as e:"},{"line_number":66,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":67,"context_line":"                if self.log_errors:"},{"line_number":68,"context_line":"                    LOG.error(_LE(\"Unable to execute %(cmd)s. \""},{"line_number":69,"context_line":"                              \"Exception: %(exception)s\"),"},{"line_number":70,"context_line":"                              {\u0027cmd\u0027: full_args, \u0027exception\u0027: e})"},{"line_number":71,"context_line":"                if not self.check_error:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_f34c10cc","line":68,"updated":"2015-01-19 22:16:34.000000000","message":"use LOG.exception","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        except Exception as e:"},{"line_number":66,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":67,"context_line":"                if self.log_errors:"},{"line_number":68,"context_line":"                    LOG.error(_LE(\"Unable to execute %(cmd)s. \""},{"line_number":69,"context_line":"                              \"Exception: %(exception)s\"),"},{"line_number":70,"context_line":"                              {\u0027cmd\u0027: full_args, \u0027exception\u0027: e})"},{"line_number":71,"context_line":"                if not self.check_error:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_e850aa60","line":68,"in_reply_to":"3a961159_f34c10cc","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def result(self, raw_result):"},{"line_number":117,"context_line":"        # If check_error\u003dFalse, run_vsctl can return None"},{"line_number":118,"context_line":"        if not raw_result:"},{"line_number":119,"context_line":"            self._result \u003d raw_result"},{"line_number":120,"context_line":"            return"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_93b02cff","line":119,"updated":"2015-01-19 22:16:34.000000000","message":"using:\n\n  self._result \u003d None\n\nseems safer","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"2be50299e8853a587d4b36013164a9f76ab04504","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def result(self, raw_result):"},{"line_number":117,"context_line":"        # If check_error\u003dFalse, run_vsctl can return None"},{"line_number":118,"context_line":"        if not raw_result:"},{"line_number":119,"context_line":"            self._result \u003d raw_result"},{"line_number":120,"context_line":"            return"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_d619a6d2","line":119,"in_reply_to":"3a961159_93b02cff","updated":"2015-01-20 18:30:11.000000000","message":"None implies that an exception occurred, but check_error\u003dFalse. An empty string implies that that --if-exists was passed, but the record did not exist. This fact is used by BrExistsCommand for example to determine whether the command failed.\n\nThe difference could potentially be useful to the caller, so I pass it on through. At the very least I should document this behavior. I\u0027ll also try to think of a more obvious way to make things work, but am a bit limited by how ovs-vsctl works.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        except (ValueError, TypeError) as e:"},{"line_number":125,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":126,"context_line":"            # log and raise."},{"line_number":127,"context_line":"            LOG.error(_LE(\"Could not parse: %(val)s Exception: %(exc)s\"),"},{"line_number":128,"context_line":"                      {\u0027val\u0027: raw_result, \u0027exc\u0027: e})"},{"line_number":129,"context_line":"            raise"},{"line_number":130,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_b3de083d","line":127,"updated":"2015-01-19 22:16:34.000000000","message":"you should use LOG.exception","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        except (ValueError, TypeError) as e:"},{"line_number":125,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":126,"context_line":"            # log and raise."},{"line_number":127,"context_line":"            LOG.error(_LE(\"Could not parse: %(val)s Exception: %(exc)s\"),"},{"line_number":128,"context_line":"                      {\u0027val\u0027: raw_result, \u0027exc\u0027: e})"},{"line_number":129,"context_line":"            raise"},{"line_number":130,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_43ffe101","line":127,"in_reply_to":"3a961159_b3de083d","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"class DbGetCommand(DbCommand):"},{"line_number":142,"context_line":"    @DbCommand.result.getter"},{"line_number":143,"context_line":"    def result(self):"},{"line_number":144,"context_line":"        return self._result[0].values()[0] if self._result else self._result"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_b3e9a881","line":142,"updated":"2015-01-19 22:16:34.000000000","message":"why not @property?","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"2be50299e8853a587d4b36013164a9f76ab04504","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"class DbGetCommand(DbCommand):"},{"line_number":142,"context_line":"    @DbCommand.result.getter"},{"line_number":143,"context_line":"    def result(self):"},{"line_number":144,"context_line":"        return self._result[0].values()[0] if self._result else self._result"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_6fd91028","line":142,"in_reply_to":"3a961159_b3e9a881","updated":"2015-01-20 18:30:11.000000000","message":"Because it has to override the parent property. Doing @property here will override both setter and getter.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":141,"context_line":"class DbGetCommand(DbCommand):"},{"line_number":142,"context_line":"    @DbCommand.result.getter"},{"line_number":143,"context_line":"    def result(self):"},{"line_number":144,"context_line":"        return self._result[0].values()[0] if self._result else self._result"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"class BrExistsCommand(DbCommand):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_d390f451","line":144,"updated":"2015-01-19 22:16:34.000000000","message":"a comment seems required to explain self._result format\n\nself.result property is computed everytime the code get the property ... overloading result.setter allows to compute it once.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":141,"context_line":"class DbGetCommand(DbCommand):"},{"line_number":142,"context_line":"    @DbCommand.result.getter"},{"line_number":143,"context_line":"    def result(self):"},{"line_number":144,"context_line":"        return self._result[0].values()[0] if self._result else self._result"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"class BrExistsCommand(DbCommand):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_b54a6481","line":144,"in_reply_to":"3a961159_d390f451","updated":"2015-01-21 20:45:04.000000000","message":"Comment added.\n\nTrue, but it was a little tricky to override the setter, so I didn\u0027t. Basically, super() doesn\u0027t work for setters, so you have to do DbCommand.result.fset(self, val), but I went ahead and did it.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                                                    log_errors\u003dFalse)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class OVSDBVsctl(ovsdb.API):"},{"line_number":158,"context_line":"    def transaction(self, **kwargs):"},{"line_number":159,"context_line":"        return Transaction(self.context, **kwargs)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_1457bf28","line":157,"updated":"2015-01-20 03:52:21.000000000","message":"OVSDBVsctl -\u003e OvsdbVsctl ?","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                                                    log_errors\u003dFalse)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class OVSDBVsctl(ovsdb.API):"},{"line_number":158,"context_line":"    def transaction(self, **kwargs):"},{"line_number":159,"context_line":"        return Transaction(self.context, **kwargs)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_985f5d0e","line":157,"in_reply_to":"3a961159_1457bf28","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    # op. Will try to find a better way to default this op to \u0027\u003d\u0027"},{"line_number":251,"context_line":"    for entry in col_values:"},{"line_number":252,"context_line":"        if len(entry) \u003d\u003d 2:"},{"line_number":253,"context_line":"            col, op, val \u003d (entry[0], \u0027\u003d\u0027, entry[1])"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            col, op, val \u003d entry"},{"line_number":256,"context_line":"        if isinstance(val, collections.Mapping):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_538b2417","line":253,"updated":"2015-01-19 22:16:34.000000000","message":"() are not required","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    # op. Will try to find a better way to default this op to \u0027\u003d\u0027"},{"line_number":251,"context_line":"    for entry in col_values:"},{"line_number":252,"context_line":"        if len(entry) \u003d\u003d 2:"},{"line_number":253,"context_line":"            col, op, val \u003d (entry[0], \u0027\u003d\u0027, entry[1])"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            col, op, val \u003d entry"},{"line_number":256,"context_line":"        if isinstance(val, collections.Mapping):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_589335a3","line":253,"in_reply_to":"3a961159_538b2417","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    # op. Will try to find a better way to default this op to \u0027\u003d\u0027"},{"line_number":251,"context_line":"    for entry in col_values:"},{"line_number":252,"context_line":"        if len(entry) \u003d\u003d 2:"},{"line_number":253,"context_line":"            col, op, val \u003d (entry[0], \u0027\u003d\u0027, entry[1])"},{"line_number":254,"context_line":"        else:"},{"line_number":255,"context_line":"            col, op, val \u003d entry"},{"line_number":256,"context_line":"        if isinstance(val, collections.Mapping):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_f9c5ce3e","line":253,"in_reply_to":"3a961159_538b2417","updated":"2015-01-20 03:52:21.000000000","message":"While not required, I don\u0027t think it\u0027s harmful to include parentheses where an author thinks they aid in readability.   Consider prefacing such comments with something like \u0027(No action required)\u0027 to indicate that the comment is optional.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f78c5bbcf3622e6ec389bde088ba946272db4fb7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                if self.log_errors:"},{"line_number":68,"context_line":"                    LOG.exception(_LE(\"Unable to execute %(cmd)s. \""},{"line_number":69,"context_line":"                                  \"Exception: %(exception)s\"),"},{"line_number":70,"context_line":"                                  {\u0027cmd\u0027: full_args, \u0027exception\u0027: e})"},{"line_number":71,"context_line":"                if not self.check_error:"},{"line_number":72,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_34601b32","line":70,"updated":"2015-01-22 10:47:25.000000000","message":"LOG.exception adds exception details so it should be:\n\n  LOG.exception(_LE(\"Unable to execute %s\"), full,args)","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4168f5dcc7f16f0012cff4a989f63edcca0a3eca","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                if self.log_errors:"},{"line_number":68,"context_line":"                    LOG.exception(_LE(\"Unable to execute %(cmd)s. \""},{"line_number":69,"context_line":"                                  \"Exception: %(exception)s\"),"},{"line_number":70,"context_line":"                                  {\u0027cmd\u0027: full_args, \u0027exception\u0027: e})"},{"line_number":71,"context_line":"                if not self.check_error:"},{"line_number":72,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_6047334c","line":70,"in_reply_to":"1a930d6b_34601b32","updated":"2015-01-22 16:29:03.000000000","message":"Done","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f78c5bbcf3622e6ec389bde088ba946272db4fb7","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        except (ValueError, TypeError) as e:"},{"line_number":125,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":126,"context_line":"            # log and raise."},{"line_number":127,"context_line":"            LOG.exception(_LE(\"Could not parse: %(val)s Exception: %(exc)s\"),"},{"line_number":128,"context_line":"                          {\u0027val\u0027: raw_result, \u0027exc\u0027: e})"},{"line_number":129,"context_line":"            raise"},{"line_number":130,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_5454c753","line":127,"updated":"2015-01-22 10:47:25.000000000","message":"itto","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4168f5dcc7f16f0012cff4a989f63edcca0a3eca","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        except (ValueError, TypeError) as e:"},{"line_number":125,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":126,"context_line":"            # log and raise."},{"line_number":127,"context_line":"            LOG.exception(_LE(\"Could not parse: %(val)s Exception: %(exc)s\"),"},{"line_number":128,"context_line":"                          {\u0027val\u0027: raw_result, \u0027exc\u0027: e})"},{"line_number":129,"context_line":"            raise"},{"line_number":130,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_a0783b90","line":127,"in_reply_to":"1a930d6b_5454c753","updated":"2015-01-22 16:29:03.000000000","message":"Done","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"cb4b5784367c25caea8fcf50858a77154fdd77d5","unresolved":false,"context_lines":[{"line_number":283,"context_line":"def _py_to_val(pyval):"},{"line_number":284,"context_line":"    \"\"\"Convert python value to ovs-vsctl value argument\"\"\""},{"line_number":285,"context_line":"    if isinstance(pyval, bool):"},{"line_number":286,"context_line":"        return \u0027true\u0027 if pyval is True else \u0027false\u0027"},{"line_number":287,"context_line":"    elif pyval \u003d\u003d \u0027\u0027:"},{"line_number":288,"context_line":"        return \u0027\"\"\u0027"},{"line_number":289,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_c8c55c3e","line":286,"updated":"2015-01-23 01:40:15.000000000","message":"(No action required) pyval is True -\u003e pyval\n\nNo point in comparing a boolean to a boolean to create another boolean.","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"95b68bf1ba1bf16465cfb92e12efa8816bb87c07","unresolved":false,"context_lines":[{"line_number":283,"context_line":"def _py_to_val(pyval):"},{"line_number":284,"context_line":"    \"\"\"Convert python value to ovs-vsctl value argument\"\"\""},{"line_number":285,"context_line":"    if isinstance(pyval, bool):"},{"line_number":286,"context_line":"        return \u0027true\u0027 if pyval is True else \u0027false\u0027"},{"line_number":287,"context_line":"    elif pyval \u003d\u003d \u0027\u0027:"},{"line_number":288,"context_line":"        return \u0027\"\"\u0027"},{"line_number":289,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_27e34f06","line":286,"in_reply_to":"1a930d6b_8cbd086b","updated":"2015-01-23 18:37:16.000000000","message":"Ah, good point. I see an opportunity for removing a conditional. :)","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3198ddf539cc8cbc7ce01128e4fbc20f21fc3800","unresolved":false,"context_lines":[{"line_number":283,"context_line":"def _py_to_val(pyval):"},{"line_number":284,"context_line":"    \"\"\"Convert python value to ovs-vsctl value argument\"\"\""},{"line_number":285,"context_line":"    if isinstance(pyval, bool):"},{"line_number":286,"context_line":"        return \u0027true\u0027 if pyval is True else \u0027false\u0027"},{"line_number":287,"context_line":"    elif pyval \u003d\u003d \u0027\u0027:"},{"line_number":288,"context_line":"        return \u0027\"\"\u0027"},{"line_number":289,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_8cbd086b","line":286,"in_reply_to":"1a930d6b_c3fd3f3d","updated":"2015-01-23 18:14:12.000000000","message":"Your point would be valid if pyval could be anything but a boolean, but that possibility is excluded by the conditional on the line above.","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"fc133a786701b3ce9f2ee3252a585bff0830dd11","unresolved":false,"context_lines":[{"line_number":283,"context_line":"def _py_to_val(pyval):"},{"line_number":284,"context_line":"    \"\"\"Convert python value to ovs-vsctl value argument\"\"\""},{"line_number":285,"context_line":"    if isinstance(pyval, bool):"},{"line_number":286,"context_line":"        return \u0027true\u0027 if pyval is True else \u0027false\u0027"},{"line_number":287,"context_line":"    elif pyval \u003d\u003d \u0027\u0027:"},{"line_number":288,"context_line":"        return \u0027\"\"\u0027"},{"line_number":289,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_c3fd3f3d","line":286,"in_reply_to":"1a930d6b_c8c55c3e","updated":"2015-01-23 02:25:31.000000000","message":"This is actually comparing pyval to the actual value True, not testing if it evaluates to True.\n\n    1 is True \u003d\u003d False","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1c39f50ee27c636fd9f98a01610b7d2aef6f5b74","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        except (ValueError, TypeError):"},{"line_number":124,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":125,"context_line":"            # log and raise."},{"line_number":126,"context_line":"            LOG.exception(_LE(\"Could not parse: %(val)s\"),"},{"line_number":127,"context_line":"                          {\u0027val\u0027: raw_result})"},{"line_number":128,"context_line":"            raise"},{"line_number":129,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_091f385c","line":126,"updated":"2015-01-24 10:17:12.000000000","message":"You should use save_and_reraise_exception here since LOG may switch thread.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        except (ValueError, TypeError):"},{"line_number":124,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":125,"context_line":"            # log and raise."},{"line_number":126,"context_line":"            LOG.exception(_LE(\"Could not parse: %(val)s\"),"},{"line_number":127,"context_line":"                          {\u0027val\u0027: raw_result})"},{"line_number":128,"context_line":"            raise"},{"line_number":129,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_e9f02c00","line":126,"updated":"2015-01-24 11:17:37.000000000","message":"no need to build a dict with one value","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        except (ValueError, TypeError):"},{"line_number":124,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":125,"context_line":"            # log and raise."},{"line_number":126,"context_line":"            LOG.exception(_LE(\"Could not parse: %(val)s\"),"},{"line_number":127,"context_line":"                          {\u0027val\u0027: raw_result})"},{"line_number":128,"context_line":"            raise"},{"line_number":129,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_664442b7","line":126,"in_reply_to":"1a930d6b_091f385c","updated":"2015-01-26 18:19:45.000000000","message":"Done","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        except (ValueError, TypeError):"},{"line_number":124,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":125,"context_line":"            # log and raise."},{"line_number":126,"context_line":"            LOG.exception(_LE(\"Could not parse: %(val)s\"),"},{"line_number":127,"context_line":"                          {\u0027val\u0027: raw_result})"},{"line_number":128,"context_line":"            raise"},{"line_number":129,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_a619cad8","line":126,"in_reply_to":"1a930d6b_e9f02c00","updated":"2015-01-26 18:19:45.000000000","message":"Done","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ea63b02d1df9e8250f5e3d1165e9aed4a34baccf","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        except (ValueError, TypeError):"},{"line_number":124,"context_line":"            # This shouldn\u0027t happen, but if it does and we check_errors"},{"line_number":125,"context_line":"            # log and raise."},{"line_number":126,"context_line":"            LOG.exception(_LE(\"Could not parse: %(val)s\"),"},{"line_number":127,"context_line":"                          {\u0027val\u0027: raw_result})"},{"line_number":128,"context_line":"            raise"},{"line_number":129,"context_line":"        headings \u003d json[\u0027headings\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_5a8e3b7a","line":126,"in_reply_to":"1a930d6b_e9f02c00","updated":"2015-01-26 16:14:36.000000000","message":"good catches both.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1c39f50ee27c636fd9f98a01610b7d2aef6f5b74","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def db_get(self, table_name, record, column):"},{"line_number":199,"context_line":"        # Use the \u0027list\u0027 command as it can return json and \u0027get\u0027 cannot so that"},{"line_number":200,"context_line":"        # we can get real return types instead of treating everyting as string"},{"line_number":201,"context_line":"        # NOTE: openvswitch can return a single atomic value for fields that"},{"line_number":202,"context_line":"        # are sets, but only have one value. This makes directly iterating over"},{"line_number":203,"context_line":"        # the result of a db_get() call unsafe."}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_2924f4ad","line":200,"updated":"2015-01-24 10:17:12.000000000","message":"nit: everyting -\u003e everything","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def db_get(self, table_name, record, column):"},{"line_number":199,"context_line":"        # Use the \u0027list\u0027 command as it can return json and \u0027get\u0027 cannot so that"},{"line_number":200,"context_line":"        # we can get real return types instead of treating everyting as string"},{"line_number":201,"context_line":"        # NOTE: openvswitch can return a single atomic value for fields that"},{"line_number":202,"context_line":"        # are sets, but only have one value. This makes directly iterating over"},{"line_number":203,"context_line":"        # the result of a db_get() call unsafe."}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_e68672da","line":200,"in_reply_to":"1a930d6b_2924f4ad","updated":"2015-01-26 18:19:45.000000000","message":"Done","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"}],"neutron/agent/ovsdb.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Openstack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b1c31637","line":1,"updated":"2015-01-03 00:49:19.000000000","message":"Documentation in devref is suggested by this module.  I think a graph of the classes along with their individual purposes and a high-level description of their interaction prove useful both for reviewers and future maintainers.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 Openstack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_f3733f14","line":1,"in_reply_to":"3a961159_b1c31637","updated":"2015-01-09 19:29:35.000000000","message":"Sounds like a plan. I\u0027ll start on that right after getting the functional tests done.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import abc"},{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo.config import cfg"},{"line_number":19,"context_line":"from oslo.utils import importutils"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_ced563e6","line":16,"updated":"2015-01-03 00:49:19.000000000","message":"(nit) six is not a stdlib import","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import abc"},{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo.config import cfg"},{"line_number":19,"context_line":"from oslo.utils import importutils"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_5362533e","line":16,"in_reply_to":"3a961159_ced563e6","updated":"2015-01-09 19:29:35.000000000","message":"oops!","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":36,"context_line":"class OVSDBCommand(object):"},{"line_number":37,"context_line":"    @abc.abstractmethod"},{"line_number":38,"context_line":"    def execute(self):"},{"line_number":39,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_6ed0eff7","line":36,"updated":"2015-01-03 00:49:19.000000000","message":"(No action required) Consider normalizing the names to camel case such that there is a more obvious separation between components of the name (e.g. OvsdbCommand).","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":36,"context_line":"class OVSDBCommand(object):"},{"line_number":37,"context_line":"    @abc.abstractmethod"},{"line_number":38,"context_line":"    def execute(self):"},{"line_number":39,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_d3fba346","line":36,"in_reply_to":"3a961159_6ed0eff7","updated":"2015-01-09 19:29:35.000000000","message":"What do you think about just dropping the OVSDB prefix altogether? We are in the ovsdb module and ovsdb.Ovsdb* is kind of redundant and we don\u0027t allow doing things like from ovsdb import Command etc. anyway. ovsdb.Command, ovsdb.Transaction is looks better to me.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def __enter__(self):"},{"line_number":53,"context_line":"        return self"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __exit__(self, exc_type, exc_val, tb):"},{"line_number":56,"context_line":"        self.execute()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_561a417d","line":55,"updated":"2015-01-09 19:29:35.000000000","message":"I should add a self.result \u003d self.execute() here so if there is a transaction that results in output that it is accessible to the caller.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":60,"context_line":"class OVSDBInterface(object):"},{"line_number":61,"context_line":"    def __init__(self, context):"},{"line_number":62,"context_line":"        self.context \u003d context"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_d1c26252","line":60,"updated":"2015-01-03 00:49:19.000000000","message":"Given how overloaded the term \u0027Interface\u0027 is in the world of networking, consider changing the name of this class to something less ambiguous (e.g. AbstractOvsdb).","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":60,"context_line":"class OVSDBInterface(object):"},{"line_number":61,"context_line":"    def __init__(self, context):"},{"line_number":62,"context_line":"        self.context \u003d context"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_161a79c6","line":60,"in_reply_to":"3a961159_d1c26252","updated":"2015-01-09 19:29:35.000000000","message":"Good point.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":60,"context_line":"class OVSDBInterface(object):"},{"line_number":61,"context_line":"    def __init__(self, context):"},{"line_number":62,"context_line":"        self.context \u003d context"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_f1b59ed0","line":61,"updated":"2015-01-03 00:49:19.000000000","message":"Context is an extremely generic name in Neutron.  Consider defining an interface that makes explicit what data is required from such an object, and call instances of that interface something more descriptive (e.g. ovs_config).","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"002efb8b3bc479ed43d33ddbbb6817e35296bce9","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":60,"context_line":"class OVSDBInterface(object):"},{"line_number":61,"context_line":"    def __init__(self, context):"},{"line_number":62,"context_line":"        self.context \u003d context"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_9425935c","line":61,"in_reply_to":"3a961159_730f4f3a","updated":"2015-01-19 01:49:41.000000000","message":"Although, the reason I pass the parent object as context instead of just the values is that you have to be able to handle when someone does:\n    ovs \u003d BaseOVS(\u0027sudo\u0027)\n    ovs.vsctl_timeout \u003d 7\n    ovs.ovsdb.whatever()\n\nYou would have a stale value after just passing the value to ovsdb __init__.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":60,"context_line":"class OVSDBInterface(object):"},{"line_number":61,"context_line":"    def __init__(self, context):"},{"line_number":62,"context_line":"        self.context \u003d context"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_730f4f3a","line":61,"in_reply_to":"3a961159_f1b59ed0","updated":"2015-01-09 19:29:35.000000000","message":"Currently, I think this is just the \"parent\" object. I\u0027m not a fan of cirucular references like this, e.g.\nBaseOVS.ovsdb with ovsdb having a link to the BaseOVS instance, but the problem I had was the ovs-vsctl implementation needing vsctl_timeout and root_helper and the ovsdb implementation only needing vsctl_timeout.\n\nOf course, if I can complete the \"stop passing around root_helper\" patch and get it merged, then the interface could just take a vsctl_timeout.\n\nThoughts?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"4c4704f8e1f97ba75cc360657ae5ed1ead8d65d4","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        return iface(context)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @abc.abstractmethod"},{"line_number":71,"context_line":"    def add_br(self, bridge_name, may_exist\u003dTrue):"},{"line_number":72,"context_line":"        pass"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b10236b2","line":71,"updated":"2015-01-03 00:49:19.000000000","message":"I find it a little confusing that the parameters use \u0027bridge\u0027 but the methods use the abbreviation \u0027br\u0027.  I\u0027m guessing the intent in using the \u0027br\u0027 abreviation is to match what is used by ovsdb and the ovs cli, but maybe it would make sense to standardize on one of \u0027bridge\u0027 or \u0027br\u0027 rather than using both?","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"68d835b136a9583a7b06358545290ea2af2be096","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        return iface(context)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @abc.abstractmethod"},{"line_number":71,"context_line":"    def add_br(self, bridge_name, may_exist\u003dTrue):"},{"line_number":72,"context_line":"        pass"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_b678c52d","line":71,"in_reply_to":"3a961159_b10236b2","updated":"2015-01-09 19:29:35.000000000","message":"I kind of agonized over this decision and decided to make the interface match the ovs-vsctl command names since they have very specific behaviors and meanings that need to be replicated, so it seemed to make sense to copy the names to make that a little more explicit by making all of the function names exactly the same as the ovs-vsctl couterparts and not to be confused with how ovs_lib would do things.\n\nReally, these parameters like bridge_name/port_name/iface_name, in the context of the function there is no ambiguity if we just use \u0027name\u0027, so I guess I\u0027ll just do that.","commit_id":"9de9a4387680c4f57e7211f42b730882b297e746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":24,"context_line":"}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OPTS \u003d ["},{"line_number":27,"context_line":"    cfg.StrOpt(\u0027ovsdb_interface\u0027,"},{"line_number":28,"context_line":"               choices\u003dinterface_map.keys(),"},{"line_number":29,"context_line":"               default\u003d\u0027vsctl\u0027,"},{"line_number":30,"context_line":"               help\u003d_(\u0027The interface for interacting with the OVSDB\u0027)),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_83e1fb9c","line":27,"updated":"2015-01-16 16:54:29.000000000","message":"(No action required)\nShould we go even further and use stevedore to load particular implementations?","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    @staticmethod"},{"line_number":65,"context_line":"    def get(context, iface_name\u003dNone):"},{"line_number":66,"context_line":"        iface \u003d importutils.import_class("},{"line_number":67,"context_line":"            interface_map[iface_name or cfg.CONF.OVS.ovsdb_interface])"},{"line_number":68,"context_line":"        return iface(context)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_036a6bec","line":67,"updated":"2015-01-16 16:54:29.000000000","message":"We may easily get KeyError here.","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c8fa4aa4201d4f2bd2b3819bfa043fc79de7d251","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        pass"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    @abc.abstractmethod"},{"line_number":119,"context_line":"    def set_controller(self, bridge_name, controllers):"},{"line_number":120,"context_line":"        pass"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_1cfe486a","line":119,"updated":"2015-01-16 16:54:29.000000000","message":"are those controller methods used anywhere except tests that solely check they actually work?","commit_id":"777b44b8e029e7709b5957cd5fafdbf7715d8a2d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def __enter__(self):"},{"line_number":60,"context_line":"        return self"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def __exit__(self, exc_type, exc_val, tb):"},{"line_number":63,"context_line":"        self.result \u003d self.commit()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_13543c21","line":62,"updated":"2015-01-19 22:16:34.000000000","message":"self.commit iscalled even if exc_type !\u003d None? it seems wrong","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":67,"context_line":"class API(object):"},{"line_number":68,"context_line":"    def __init__(self, context):"},{"line_number":69,"context_line":"        self.context \u003d context"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_13027c0c","line":67,"updated":"2015-01-19 22:16:34.000000000","message":"i would prefer you define a docstring for all abstract methods","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def transaction(self, **kwargs):"},{"line_number":79,"context_line":"        \"\"\"Create a transaction"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param kwargs: Should support check_error and log_errors"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        pass"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_3973d617","line":81,"updated":"2015-01-20 03:52:21.000000000","message":"If there are specific kwargs expected, they should probably be broken out into named parameters, e.g.\n\ndef transaction(self, check_error\u003dFalse, log_errors\u003dFalse, **kwargs):\n ...","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def transaction(self, **kwargs):"},{"line_number":79,"context_line":"        \"\"\"Create a transaction"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param kwargs: Should support check_error and log_errors"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        pass"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_9e0025ac","line":81,"in_reply_to":"3a961159_3973d617","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param kwargs: Should support check_error and log_errors"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        pass"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @abc.abstractmethod"},{"line_number":86,"context_line":"    def add_br(self, bridge_name, may_exist\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_f31df078","line":83,"updated":"2015-01-19 22:16:34.000000000","message":"pass is considered as dead code by python coverage tool","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param kwargs: Should support check_error and log_errors"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        pass"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @abc.abstractmethod"},{"line_number":86,"context_line":"    def add_br(self, bridge_name, may_exist\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_fe268967","line":83,"in_reply_to":"3a961159_f31df078","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param kwargs: Should support check_error and log_errors"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        pass"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @abc.abstractmethod"},{"line_number":86,"context_line":"    def add_br(self, bridge_name, may_exist\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_594262ac","line":83,"in_reply_to":"3a961159_f31df078","updated":"2015-01-20 03:52:21.000000000","message":"a method requires at minimum either a docstring or a \u0027pass\u0027 statement to be considered valid.  If you follow Cedric\u0027s suggestion of adding docstrings to all abstract methods in this class, then pass won\u0027t be required for any of them.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        pass"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @abc.abstractmethod"},{"line_number":86,"context_line":"    def add_br(self, bridge_name, may_exist\u003dTrue):"},{"line_number":87,"context_line":"        pass"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_9964ca22","line":86,"updated":"2015-01-20 03:52:21.000000000","message":"+1 to using \u0027name\u0027 instead of a more specific name (e.g. \u0027bridge_name\u0027) where no ambiguity exists.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        pass"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @abc.abstractmethod"},{"line_number":86,"context_line":"    def add_br(self, bridge_name, may_exist\u003dTrue):"},{"line_number":87,"context_line":"        pass"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_1e2c3547","line":86,"in_reply_to":"3a961159_9964ca22","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7264d5266b610f72fc5ee1eb357fd7de6c55e2d8","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        # TODO(twilson) Consider handling kwargs for arguments where order"},{"line_number":121,"context_line":"        # doesn\u0027t matter. Though that would break the assert_called_once_with"},{"line_number":122,"context_line":"        # unit tests"},{"line_number":123,"context_line":"        pass"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @abc.abstractmethod"},{"line_number":126,"context_line":"    def db_clear(self, table_name, record, column):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_73190087","line":123,"updated":"2015-01-19 22:16:34.000000000","message":"itto","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        # TODO(twilson) Consider handling kwargs for arguments where order"},{"line_number":121,"context_line":"        # doesn\u0027t matter. Though that would break the assert_called_once_with"},{"line_number":122,"context_line":"        # unit tests"},{"line_number":123,"context_line":"        pass"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @abc.abstractmethod"},{"line_number":126,"context_line":"    def db_clear(self, table_name, record, column):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_2ef53e83","line":123,"in_reply_to":"3a961159_73190087","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f78c5bbcf3622e6ec389bde088ba946272db4fb7","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def __enter__(self):"},{"line_number":59,"context_line":"        return self"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __exit__(self, exc_type, exc_val, tb):"},{"line_number":62,"context_line":"        self.result \u003d self.commit()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_34bc9b69","line":61,"updated":"2015-01-22 10:47:25.000000000","message":"self.commit is called even if exc_type !\u003d None? it seems wrong","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4168f5dcc7f16f0012cff4a989f63edcca0a3eca","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def __enter__(self):"},{"line_number":59,"context_line":"        return self"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __exit__(self, exc_type, exc_val, tb):"},{"line_number":62,"context_line":"        self.result \u003d self.commit()"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a930d6b_00690fbe","line":61,"in_reply_to":"1a930d6b_34bc9b69","updated":"2015-01-22 16:29:03.000000000","message":"Done","commit_id":"85d10f0cc13eb4baef527117a450e063b8479ebe"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"fc133a786701b3ce9f2ee3252a585bff0830dd11","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OPTS \u003d ["}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_446ec202","line":23,"updated":"2015-01-23 02:25:31.000000000","message":"I\u0027ll rename OVSDBIdl to OvsdbIdl or something when I actually implement it in the next patch after this one merges.","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3198ddf539cc8cbc7ce01128e4fbc20f21fc3800","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OPTS \u003d ["}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_acc004e1","line":23,"in_reply_to":"1a930d6b_446ec202","updated":"2015-01-23 18:14:12.000000000","message":"+1","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"cb4b5784367c25caea8fcf50858a77154fdd77d5","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"\"\"Create a transaction"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param check_error: Allow the transaction to raise an exception?"},{"line_number":83,"context_line":"        :type check_error:  bool"},{"line_number":84,"context_line":"        :param log_errors:  Log an error if the transaction fails?"},{"line_number":85,"context_line":"        :type log_errors:   bool"},{"line_number":86,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_e8dbf818","line":83,"updated":"2015-01-23 01:40:15.000000000","message":"(No action required) Ugh.  type annotations.  I can maybe see the point where a complex type is required, but for optional variables whose default is clearly visible in the method signature?  Or the majority of parameters whose type is string?  I\u0027ll leave it for someone (Cedric?) with more patience than me to review the docstrings.","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d1ffe6fe9aebf15f1fa8a5d26bd4bdd5c61ffa58","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"\"\"Create a transaction"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param check_error: Allow the transaction to raise an exception?"},{"line_number":83,"context_line":"        :type check_error:  bool"},{"line_number":84,"context_line":"        :param log_errors:  Log an error if the transaction fails?"},{"line_number":85,"context_line":"        :type log_errors:   bool"},{"line_number":86,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a930d6b_284089a4","line":83,"in_reply_to":"1a930d6b_e8dbf818","updated":"2015-01-23 15:09:27.000000000","message":"I saw them being used in oslo.processutils. Granted, some types are very easy to see. Others not so much. \u0027table\u0027 is there a table object I need to lookup? \u0027bridge\u0027, is that just a name or an OVSBridge? You can make really long descriptive attributes, but that leads to forcing weird formatting at times. I figured if I was going to annotate some, I\u0027d just go ahead and annotate them all. \n\nIf someone is actually reading this file with almost no code in it, they are probably trying to figure something out or writing an implementation of the API. Either way, the more data they have, the easier their life will be.","commit_id":"69ec60d34565a299f4b114d4bf20b48fd8a5dd19"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo.utils import importutils"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_49430042","line":21,"updated":"2015-01-24 11:17:37.000000000","message":"Why not using stevedore entry-points instead of hardcoding 2 choices?","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ea63b02d1df9e8250f5e3d1165e9aed4a34baccf","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo.utils import importutils"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_ba89df76","line":21,"in_reply_to":"1a930d6b_0dbe63b4","updated":"2015-01-26 16:14:36.000000000","message":"I really doubt we need the complexity this suggestion would entail.  Are we really expecting to have 3rd party implementations of ovslib?","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8f58c479174ddeaddb8e320c7bfea15dc42333bb","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo.utils import importutils"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_0dbe63b4","line":21,"in_reply_to":"1a930d6b_49430042","updated":"2015-01-24 15:09:21.000000000","message":"+1. Btw I suggested it before.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo.utils import importutils"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_4dba2b6f","line":21,"in_reply_to":"1a930d6b_49430042","updated":"2015-01-26 18:19:45.000000000","message":"There will most likely never be more than two choices and it is conceivable it will go back down to no choice if the second works well. I don\u0027t really know anything about stevedore, so I\u0027m skeptical about using a library just to replace a dict that is unlikely to change.\n\nIs this something that I can consider when I add the native OVSDB implementation?","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"93c155bcc55d3be5345ff31236adce0fa58e5232","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo.utils import importutils"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_9d897877","line":21,"in_reply_to":"1a930d6b_4dba2b6f","updated":"2015-01-26 18:34:19.000000000","message":"I think this part can be postponed for later consideration for sure.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7bd1f13980ae864a5baf5ff271864b4ae3e9434a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo.utils import importutils"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_7ac3f756","line":21,"in_reply_to":"1a930d6b_ba89df76","updated":"2015-01-26 16:18:02.000000000","message":"We saw ryu implementation proposed for Kilo. I guess it would belong here.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OPTS \u003d ["}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_09565806","line":23,"updated":"2015-01-24 11:17:37.000000000","message":"The change references a currently nonexistent module?","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OPTS \u003d ["}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_edbe7764","line":23,"in_reply_to":"1a930d6b_09565806","updated":"2015-01-26 18:19:45.000000000","message":"Yes, that was for the next patch. I was originally going to do both patches at once. I have now removed it. Thanks.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ea63b02d1df9e8250f5e3d1165e9aed4a34baccf","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"interface_map \u003d {"},{"line_number":22,"context_line":"    \u0027vsctl\u0027: \u0027neutron.agent.linux.ovsdb_vsctl.OvsdbVsctl\u0027,"},{"line_number":23,"context_line":"    \u0027ovsdb\u0027: \u0027neutron.agent.ovsdb_idl.OVSDBIdl\u0027,"},{"line_number":24,"context_line":"}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OPTS \u003d ["}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_5a60fbce","line":23,"in_reply_to":"1a930d6b_09565806","updated":"2015-01-26 16:14:36.000000000","message":"Yikes, good catch.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.context \u003d context"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @staticmethod"},{"line_number":72,"context_line":"    def get(context, iface_name\u003dNone):"},{"line_number":73,"context_line":"        \"\"\"Return the configured OVSDB API implementation\"\"\""},{"line_number":74,"context_line":"        iface \u003d importutils.import_class("},{"line_number":75,"context_line":"            interface_map[iface_name or cfg.CONF.OVS.ovsdb_interface])"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_6940bc34","line":72,"updated":"2015-01-24 11:17:37.000000000","message":"iface_name seems never used \u003d\u003e YAGNI","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.context \u003d context"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @staticmethod"},{"line_number":72,"context_line":"    def get(context, iface_name\u003dNone):"},{"line_number":73,"context_line":"        \"\"\"Return the configured OVSDB API implementation\"\"\""},{"line_number":74,"context_line":"        iface \u003d importutils.import_class("},{"line_number":75,"context_line":"            interface_map[iface_name or cfg.CONF.OVS.ovsdb_interface])"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_4d16ab56","line":72,"in_reply_to":"1a930d6b_6940bc34","updated":"2015-01-26 18:19:45.000000000","message":"I plan on using it in tests to make it easy to test both interfaces against each other. I could override the config before instantiating each API, but it seemed cleaner to just be able to specify the interface you wanted.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ea63b02d1df9e8250f5e3d1165e9aed4a34baccf","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.context \u003d context"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @staticmethod"},{"line_number":72,"context_line":"    def get(context, iface_name\u003dNone):"},{"line_number":73,"context_line":"        \"\"\"Return the configured OVSDB API implementation\"\"\""},{"line_number":74,"context_line":"        iface \u003d importutils.import_class("},{"line_number":75,"context_line":"            interface_map[iface_name or cfg.CONF.OVS.ovsdb_interface])"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_f1155249","line":72,"in_reply_to":"1a930d6b_6940bc34","updated":"2015-01-26 16:14:36.000000000","message":"Please review line 75.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"05e2074371ff188c288868776320ba53583c50e0","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.context \u003d context"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    @staticmethod"},{"line_number":72,"context_line":"    def get(context, iface_name\u003dNone):"},{"line_number":73,"context_line":"        \"\"\"Return the configured OVSDB API implementation\"\"\""},{"line_number":74,"context_line":"        iface \u003d importutils.import_class("},{"line_number":75,"context_line":"            interface_map[iface_name or cfg.CONF.OVS.ovsdb_interface])"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_25407433","line":72,"in_reply_to":"1a930d6b_f1155249","updated":"2015-01-26 16:33:00.000000000","message":"i mean, iface_name is never (?) set when get is called","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"\"\"Create a transaction"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param check_error: Allow the transaction to raise an exception?"},{"line_number":83,"context_line":"        :type check_error:  bool"},{"line_number":84,"context_line":"        :param log_errors:  Log an error if the transaction fails?"},{"line_number":85,"context_line":"        :type log_errors:   bool"},{"line_number":86,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_097bb87b","line":83,"updated":"2015-01-24 11:17:37.000000000","message":"Not sure we need to document all argument types as most of them are trivial to deduce","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"\"\"Create a transaction"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param check_error: Allow the transaction to raise an exception?"},{"line_number":83,"context_line":"        :type check_error:  bool"},{"line_number":84,"context_line":"        :param log_errors:  Log an error if the transaction fails?"},{"line_number":85,"context_line":"        :type log_errors:   bool"},{"line_number":86,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_8d0b3329","line":83,"in_reply_to":"1a930d6b_097bb87b","updated":"2015-01-26 18:19:45.000000000","message":"Is it going to hurt anything? More info, especially in an interface doc is better than less info, IMHO. I\u0027m not sure it is wise to depend on people\u0027s ability to deduce things. :p","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ea63b02d1df9e8250f5e3d1165e9aed4a34baccf","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"\"\"Create a transaction"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param check_error: Allow the transaction to raise an exception?"},{"line_number":83,"context_line":"        :type check_error:  bool"},{"line_number":84,"context_line":"        :param log_errors:  Log an error if the transaction fails?"},{"line_number":85,"context_line":"        :type log_errors:   bool"},{"line_number":86,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_d41e845e","line":83,"in_reply_to":"1a930d6b_097bb87b","updated":"2015-01-26 16:14:36.000000000","message":"Please see Terry\u0027s comments on PS 17.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :type name:       string"},{"line_number":94,"context_line":"        :param may_exist: Do not fail if bridge already exists"},{"line_number":95,"context_line":"        :type may_exist:  bool"},{"line_number":96,"context_line":"        :returns:        :class:`Command` with no result"},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_69aefce7","line":96,"updated":"2015-01-24 11:17:37.000000000","message":"\"returns\" descriptions in docstrings seem strange.\n\nIMO, they should provide returned object class or describe returned object. \"class: `Command` with no result\" is none of them. Consider defining VoidCommand, StringCommand, BooleanCommand and use them in docstring and code or describes returned objects.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ea63b02d1df9e8250f5e3d1165e9aed4a34baccf","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :type name:       string"},{"line_number":94,"context_line":"        :param may_exist: Do not fail if bridge already exists"},{"line_number":95,"context_line":"        :type may_exist:  bool"},{"line_number":96,"context_line":"        :returns:        :class:`Command` with no result"},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_9a4fc36a","line":96,"in_reply_to":"1a930d6b_69aefce7","updated":"2015-01-26 16:14:36.000000000","message":"I\u0027m not sure of the value of this level of detail, frankly.  It might be a \u0027nice-to-have\u0027, but how exactly is this going to be useful?  Commands tend to be executed in a context where the return type is known, so being able to discover what the type is going to be would seem to be of limited utility and not worth the added complexity.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :type name:       string"},{"line_number":94,"context_line":"        :param may_exist: Do not fail if bridge already exists"},{"line_number":95,"context_line":"        :type may_exist:  bool"},{"line_number":96,"context_line":"        :returns:        :class:`Command` with no result"},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_b0492462","line":96,"in_reply_to":"1a930d6b_69aefce7","updated":"2015-01-26 18:19:45.000000000","message":"The problem is that the sphinx documentation format doesn\u0027t match up well with what needs to be documented. We are returning a Command object (which should actually document with :rtype:), but also need to document what goes in the result attribute on that object. Just documenting the type of the Command\u0027s result attribute is not sufficient. We need to document what the result actual *is*, e.g. the name of a bridge. \n\nAlso, a VoidCommand, StringCommand, BooleanCommand, etc. would be completely identical to the Command object that they inherit from. They all would just be Commands with a result attribute and an identical execute(). So we\u0027d be creating a lot of aliases for Command for the sole purpose of documenting the type of the result attribute, which would really be better documented as a description of what the result is.\n\nTo actually fit the documentation format perfectly, every abstractmethod that returns a command would need its own Command class which would be documented like:\n\n    class IfaceToBridge(Command):\n        \"\"\"A Command to find an OVS Interface\u0027s bridge\n\t...\n        :attr result: The name of the interface\u0027s bridge\n        :type result: string\n        \"\"\"\n\nthen for the ABC, define the factory methods as returning those Commands.\n\n    def iface_to_br(self, name):\n        \"\"\"Create a command to return the name of the bridge with the interface\n\t\n        ...\n        :rtype: :class:`IfaceToBridge`\n        \"\"\"\n\nI\u0027m not completely opposed to something like the above, but it is definitely overkill for the ovs-vsctl implementation. As I work on the native OVSDB implementation, my opinion might change, but for now I\u0027d like to leave this part as-is.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @abc.abstractmethod"},{"line_number":111,"context_line":"    def br_exists(self, bridge_name):"},{"line_number":112,"context_line":"        \"\"\"Create a command to check if an OVS bridge exists"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        :param name: The name of the bridge"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_a9b46435","line":111,"updated":"2015-01-24 11:17:37.000000000","message":"it should name according to docstring","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @abc.abstractmethod"},{"line_number":111,"context_line":"    def br_exists(self, bridge_name):"},{"line_number":112,"context_line":"        \"\"\"Create a command to check if an OVS bridge exists"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        :param name: The name of the bridge"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_70dfbc69","line":111,"in_reply_to":"1a930d6b_a9b46435","updated":"2015-01-26 18:19:45.000000000","message":"Oops! There were tons of those needed to change. Done.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        :param name: The name of the OVS port"},{"line_number":124,"context_line":"        :type name:  string"},{"line_number":125,"context_line":"        :returns:    :class:`Command` with bridge name result"},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_096d78cc","line":125,"updated":"2015-01-24 11:17:37.000000000","message":"\"class:`Command` with bridge name result\" is inconsistent, it should be \"class:`Command` with string result\"","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        :param name: The name of the OVS port"},{"line_number":124,"context_line":"        :type name:  string"},{"line_number":125,"context_line":"        :returns:    :class:`Command` with bridge name result"},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_70b17c46","line":125,"in_reply_to":"1a930d6b_096d78cc","updated":"2015-01-26 18:19:45.000000000","message":"Cedric: I disagree with this one. Returning any string is not what this Command does. It returns the name of a bridge. I wouldn\u0027t mind breaking these up into :returns: and :rtype:, but I\u0027m still going to keep what the actual return value should be (e.g. bridge name) in \u0027returns\u0027 as it is important information to specify in an API.\n\nFor now, I just ask that we can leave the comment format as-is and let me evolve it once I have a second concrete implementation of the API, as there is a good chance that I will run into things there that will make me want to change things slightly.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ea63b02d1df9e8250f5e3d1165e9aed4a34baccf","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        :param name: The name of the OVS port"},{"line_number":124,"context_line":"        :type name:  string"},{"line_number":125,"context_line":"        :returns:    :class:`Command` with bridge name result"},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_d710465b","line":125,"in_reply_to":"1a930d6b_096d78cc","updated":"2015-01-26 16:14:36.000000000","message":"Ugh.  I would rather see the semantic meaning documented rather than dumbing it down to type-only.  Consider:\n\n:class: `Command` instance returning the bridge name.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        :type name:   string"},{"line_number":150,"context_line":"        :param field: The external_ids field to return"},{"line_number":151,"context_line":"        :type field:  string"},{"line_number":152,"context_line":"        :returns:     :class:`Command` with field value result"},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_a95d4417","line":152,"updated":"2015-01-24 11:17:37.000000000","message":"itto\n\n\"field value\" does not explicit result type.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        :type name:   string"},{"line_number":150,"context_line":"        :param field: The external_ids field to return"},{"line_number":151,"context_line":"        :type field:  string"},{"line_number":152,"context_line":"        :returns:     :class:`Command` with field value result"},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_9067c8e8","line":152,"in_reply_to":"1a930d6b_a95d4417","updated":"2015-01-26 18:19:45.000000000","message":"same","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"195f0831efdbf170ef7c29ecd716c84f9749616a","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        :param record:     The record id (name/uuid) to be modified"},{"line_number":162,"context_line":"        :type table:       string"},{"line_number":163,"context_line":"        :param col_values: The columns and their associated values"},{"line_number":164,"context_line":"        :type col_values:  Tuples of (column, value). Values may be atomic"},{"line_number":165,"context_line":"                           values or unnested sequences/mappings"},{"line_number":166,"context_line":"        :returns:          :class:`Command` with no result"},{"line_number":167,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_499860c0","line":164,"updated":"2015-01-24 11:17:37.000000000","message":"col_values type description is useful :)","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"cbb77f341c9551054e1d5bf08ccd7451f0cdf6f2","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        :param record:     The record id (name/uuid) to be modified"},{"line_number":162,"context_line":"        :type table:       string"},{"line_number":163,"context_line":"        :param col_values: The columns and their associated values"},{"line_number":164,"context_line":"        :type col_values:  Tuples of (column, value). Values may be atomic"},{"line_number":165,"context_line":"                           values or unnested sequences/mappings"},{"line_number":166,"context_line":"        :returns:          :class:`Command` with no result"},{"line_number":167,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a930d6b_90aee8e4","line":164,"in_reply_to":"1a930d6b_499860c0","updated":"2015-01-26 18:19:45.000000000","message":":) yeah...it\u0027s a bit...non-obvious.","commit_id":"ce162fe122e6387c62397854e1fd40f386043300"}],"neutron/tests/functional/agent/test_ovs_lib.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_set_protocols(self):"},{"line_number":92,"context_line":"        self.br.set_protocols(\u0027OpenFlow10\u0027)"},{"line_number":93,"context_line":"        # and again, ick, this has to change"},{"line_number":94,"context_line":"        self.assertEqual("},{"line_number":95,"context_line":"            self.br.db_get_val(\u0027Bridge\u0027, self.br.br_name, \u0027protocols\u0027),"},{"line_number":96,"context_line":"            \"OpenFlow10\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_34459bb4","line":93,"updated":"2015-01-20 03:52:21.000000000","message":"Is this comment necessary?","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_set_protocols(self):"},{"line_number":92,"context_line":"        self.br.set_protocols(\u0027OpenFlow10\u0027)"},{"line_number":93,"context_line":"        # and again, ick, this has to change"},{"line_number":94,"context_line":"        self.assertEqual("},{"line_number":95,"context_line":"            self.br.db_get_val(\u0027Bridge\u0027, self.br.br_name, \u0027protocols\u0027),"},{"line_number":96,"context_line":"            \"OpenFlow10\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_2e3c5e2f","line":93,"in_reply_to":"3a961159_34459bb4","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"}],"neutron/tests/unit/agent/linux/test_ovs_lib.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from neutron.tests import tools"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"OVS_LINUX_KERN_VERS_WITHOUT_VXLAN \u003d \"3.12.0\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class OFCTLParamListMatcher(object):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_d48457d5","line":29,"updated":"2015-01-20 03:52:21.000000000","message":"(No action required) OVS_LINUX_KERN_VERS_WITHOUT_VXLAN is defined here and in neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py, but isn\u0027t actually used anywhere. :/","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        return \"--timeout\u003d%s\" % self.br.vsctl_timeout"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _vsctl_mock(self, *args):"},{"line_number":71,"context_line":"        cmd \u003d [\u0027ovs-vsctl\u0027, self.TO, \u0027--oneline\u0027, \u0027--format\u003djson\u0027, \u0027--\u0027]"},{"line_number":72,"context_line":"        cmd +\u003d args"},{"line_number":73,"context_line":"        return mock.call(cmd, root_helper\u003dself.root_helper,"},{"line_number":74,"context_line":"                         log_fail_as_error\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_3473db17","line":71,"updated":"2015-01-20 03:52:21.000000000","message":"Consider adding a helper method for composing the cmd, since lines 71-72 and 77-78 duplicate each other.\n\nAlso, nice cleanup!","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        return \"--timeout\u003d%s\" % self.br.vsctl_timeout"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _vsctl_mock(self, *args):"},{"line_number":71,"context_line":"        cmd \u003d [\u0027ovs-vsctl\u0027, self.TO, \u0027--oneline\u0027, \u0027--format\u003djson\u0027, \u0027--\u0027]"},{"line_number":72,"context_line":"        cmd +\u003d args"},{"line_number":73,"context_line":"        return mock.call(cmd, root_helper\u003dself.root_helper,"},{"line_number":74,"context_line":"                         log_fail_as_error\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_6ef9064d","line":71,"in_reply_to":"3a961159_3473db17","updated":"2015-01-21 20:45:04.000000000","message":"Done","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"bbaf914034ed891755b829f8eadce6c10d66f1e5","unresolved":false,"context_lines":[{"line_number":752,"context_line":""},{"line_number":753,"context_line":"    def _assert_vif_port(self, vif_port, ofport\u003dNone, mac\u003dNone):"},{"line_number":754,"context_line":"        if not ofport or ofport \u003d\u003d -1 or not mac:"},{"line_number":755,"context_line":"            self.assertIsNone(vif_port, \"Got %s\" % vif_port)"},{"line_number":756,"context_line":"            return"},{"line_number":757,"context_line":"        self.assertEqual(\u0027tap99id\u0027, vif_port.vif_id)"},{"line_number":758,"context_line":"        self.assertEqual(mac, vif_port.vif_mac)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_f4d6b3c3","line":755,"updated":"2015-01-20 03:52:21.000000000","message":"(No action required) I\u0027m not sure why this custom message is required since an assertion failure should print out the value anyway.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d285bee30bb9c1980521e51bf19b13fdcd06fcc0","unresolved":false,"context_lines":[{"line_number":752,"context_line":""},{"line_number":753,"context_line":"    def _assert_vif_port(self, vif_port, ofport\u003dNone, mac\u003dNone):"},{"line_number":754,"context_line":"        if not ofport or ofport \u003d\u003d -1 or not mac:"},{"line_number":755,"context_line":"            self.assertIsNone(vif_port, \"Got %s\" % vif_port)"},{"line_number":756,"context_line":"            return"},{"line_number":757,"context_line":"        self.assertEqual(\u0027tap99id\u0027, vif_port.vif_id)"},{"line_number":758,"context_line":"        self.assertEqual(mac, vif_port.vif_mac)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a930d6b_4e77ea02","line":755,"in_reply_to":"3a961159_f4d6b3c3","updated":"2015-01-21 20:45:04.000000000","message":"The assertion prints the repr() of the vif_port and not the str() which shows all of the values.","commit_id":"750d37d13455c3981f59e289c8811d16d4c4ff4d"}]}
