)]}'
{"quantum/plugins/cisco/common/cisco_exceptions.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"from quantum.common import exceptions"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class NetworkVlanIDNotFound(exceptions.QuantumException):"},{"line_number":28,"context_line":"    \"\"\"Segmentation ID for network is not found\"\"\""},{"line_number":29,"context_line":"    message \u003d _(\"Segmentation ID for network %(net_id)s is not found.\")"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F7GM%3D","line":27,"updated":"2013-04-11 15:51:28.000000000","message":"Should name be NetworkVlanIdNotFound, or since this is now segment ID, say Segment, instead of Vlan?","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"from quantum.common import exceptions"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class NetworkVlanIDNotFound(exceptions.QuantumException):"},{"line_number":28,"context_line":"    \"\"\"Segmentation ID for network is not found\"\"\""},{"line_number":29,"context_line":"    message \u003d _(\"Segmentation ID for network %(net_id)s is not found.\")"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fz7A%3D","line":27,"in_reply_to":"AAAAOn%2F%2F7GM%3D","updated":"2013-04-24 21:18:48.000000000","message":"Changed the exception name to use \"Segment\".","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class NexusHostUnknown(exceptions.QuantumException):"},{"line_number":85,"context_line":"    \"\"\"Connect to Nexus Switch failed\"\"\""},{"line_number":86,"context_line":"    message \u003d _(\"Nexus Connect to %(nexus_host)s failed\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6gY%3D","line":85,"updated":"2013-04-11 19:23:25.000000000","message":"\"Failed to find the Nexus Switch.\"","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class NexusHostUnknown(exceptions.QuantumException):"},{"line_number":85,"context_line":"    \"\"\"Connect to Nexus Switch failed\"\"\""},{"line_number":86,"context_line":"    message \u003d _(\"Nexus Connect to %(nexus_host)s failed\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fz6g%3D","line":85,"in_reply_to":"AAAAOn%2F%2F6gY%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class NexusHostUnknown(exceptions.QuantumException):"},{"line_number":85,"context_line":"    \"\"\"Connect to Nexus Switch failed\"\"\""},{"line_number":86,"context_line":"    message \u003d _(\"Nexus Connect to %(nexus_host)s failed\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class NexusConnectFailed(exceptions.QuantumException):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6gQ%3D","line":86,"updated":"2013-04-11 19:23:25.000000000","message":"\"Unable to connect to %(nexus_host)s\"","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class NexusHostUnknown(exceptions.QuantumException):"},{"line_number":85,"context_line":"    \"\"\"Connect to Nexus Switch failed\"\"\""},{"line_number":86,"context_line":"    message \u003d _(\"Nexus Connect to %(nexus_host)s failed\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class NexusConnectFailed(exceptions.QuantumException):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fz6c%3D","line":86,"in_reply_to":"AAAAOn%2F%2F6gQ%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class NexusConnectFailed(exceptions.QuantumException):"},{"line_number":90,"context_line":"    \"\"\"Connect to Nexus Switch failed\"\"\""},{"line_number":91,"context_line":"    message \u003d _(\"Connect to Nexus %(nexus_host)s failed. Exc doc: %(doc)s\")"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6f8%3D","line":90,"updated":"2013-04-11 19:23:25.000000000","message":"\"Failed to connect to the Nexus Switch.\"","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class NexusConnectFailed(exceptions.QuantumException):"},{"line_number":90,"context_line":"    \"\"\"Connect to Nexus Switch failed\"\"\""},{"line_number":91,"context_line":"    message \u003d _(\"Connect to Nexus %(nexus_host)s failed. Exc doc: %(doc)s\")"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fz5w%3D","line":90,"in_reply_to":"AAAAOn%2F%2F6f8%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class NexusConnectFailed(exceptions.QuantumException):"},{"line_number":90,"context_line":"    \"\"\"Connect to Nexus Switch failed\"\"\""},{"line_number":91,"context_line":"    message \u003d _(\"Connect to Nexus %(nexus_host)s failed. Exc doc: %(doc)s\")"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class NexusConfigFailed(exceptions.QuantumException):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6fc%3D","line":91,"updated":"2013-04-11 19:23:25.000000000","message":"\"Failed to connect to Nexus %(nexus_host)s. Reason: %(doc)s\"","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class NexusConnectFailed(exceptions.QuantumException):"},{"line_number":90,"context_line":"    \"\"\"Connect to Nexus Switch failed\"\"\""},{"line_number":91,"context_line":"    message \u003d _(\"Connect to Nexus %(nexus_host)s failed. Exc doc: %(doc)s\")"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class NexusConfigFailed(exceptions.QuantumException):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fz5o%3D","line":91,"in_reply_to":"AAAAOn%2F%2F6fc%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class NexusConfigFailed(exceptions.QuantumException):"},{"line_number":95,"context_line":"    \"\"\"Configuration of Nexus Switch failed\"\"\""},{"line_number":96,"context_line":"    message \u003d _(\"Nexus Config failed: %(config)s. Exc doc: %(doc)s\")"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"class NexusPortBindingNotFound(exceptions.QuantumException):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6fU%3D","line":96,"updated":"2013-04-11 19:23:25.000000000","message":"\"Failed to configure Nexus %(nexus_host)s. Reason: %(doc)s\"","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class NexusConfigFailed(exceptions.QuantumException):"},{"line_number":95,"context_line":"    \"\"\"Configuration of Nexus Switch failed\"\"\""},{"line_number":96,"context_line":"    message \u003d _(\"Nexus Config failed: %(config)s. Exc doc: %(doc)s\")"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"class NexusPortBindingNotFound(exceptions.QuantumException):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fz5k%3D","line":96,"in_reply_to":"AAAAOn%2F%2F6fU%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class NexusHostUnknown(exceptions.QuantumException):"},{"line_number":85,"context_line":"    \"\"\"Failed to find the Nexus switch.\"\"\""},{"line_number":86,"context_line":"    message \u003d _(\"Unable to find %(nexus_host)s.\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuOw%3D","line":85,"updated":"2013-04-26 06:21:46.000000000","message":"just wonder why this is not call NexusSwitchUnknown instead of \"Host\"","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class NexusHostUnknown(exceptions.QuantumException):"},{"line_number":85,"context_line":"    \"\"\"Failed to find the Nexus switch.\"\"\""},{"line_number":86,"context_line":"    message \u003d _(\"Unable to find %(nexus_host)s.\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fs6E%3D","line":85,"in_reply_to":"AAAAOn%2F%2FuOw%3D","updated":"2013-04-28 21:44:14.000000000","message":"\"Host\" is used in the exception name because it\u0027s indicating that a compute host isn\u0027t configured in cisco_plugins.ini. We\u0027re assuming that if the nexus plugin is being used, then all compute hosts should be cabled to a nexus TOR switch, and this should be reflected in cisco_plugins.ini.  Perhaps I should change the name to \"NexusCompHostNotConfigured\", and change the document string (since that is obviously wrong).","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"}],"quantum/plugins/cisco/common/config.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"unresolved":false,"context_lines":[{"line_number":74,"context_line":"# Example:"},{"line_number":75,"context_line":"# {(\u00271.1.1.1\u0027, \u0027username\u0027): \u0027admin\u0027,"},{"line_number":76,"context_line":"#  (\u00271.1.1.1\u0027, \u0027password\u0027): \u0027mySecretPassword\u0027,"},{"line_number":77,"context_line":"#  (\u00271.1.1.1\u0027, \u0027ssh_port\u0027): 22,"},{"line_number":78,"context_line":"#  (\u00271.1.1.1\u0027, \u0027compute1\u0027): \u00271/1\u0027, ...}"},{"line_number":79,"context_line":"#"},{"line_number":80,"context_line":"nexus_dictionary \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Ft5o%3D","line":77,"updated":"2013-04-26 13:51:18.000000000","message":"Just FYI. No reason to change but this entire comment section will be changing in the near future once the n1k code gets merged in.\nI bring it up because my goal hear was to just give examples, not to list every keyword being used under [NEXUS_SWITCH] and soon [N1K] and then other device support in the future, ex. [ASR9K]","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":74,"context_line":"# Example:"},{"line_number":75,"context_line":"# {(\u00271.1.1.1\u0027, \u0027username\u0027): \u0027admin\u0027,"},{"line_number":76,"context_line":"#  (\u00271.1.1.1\u0027, \u0027password\u0027): \u0027mySecretPassword\u0027,"},{"line_number":77,"context_line":"#  (\u00271.1.1.1\u0027, \u0027ssh_port\u0027): 22,"},{"line_number":78,"context_line":"#  (\u00271.1.1.1\u0027, \u0027compute1\u0027): \u00271/1\u0027, ...}"},{"line_number":79,"context_line":"#"},{"line_number":80,"context_line":"nexus_dictionary \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fs4o%3D","line":77,"in_reply_to":"AAAAOn%2F%2Ft5o%3D","updated":"2013-04-28 21:44:14.000000000","message":"Understood.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"}],"quantum/plugins/cisco/db/nexus_models_v2.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"            (self.port_id, self.vlan_id, self.switch_ip, self.instance_id)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __eq__(self, other):"},{"line_number":46,"context_line":"        if (self.port_id \u003d\u003d other.port_id and"},{"line_number":47,"context_line":"            self.vlan_id \u003d\u003d other.vlan_id and"},{"line_number":48,"context_line":"            self.switch_ip \u003d\u003d other.switch_ip and"},{"line_number":49,"context_line":"            self.instance_id \u003d\u003d other.instance_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FloM%3D","line":46,"updated":"2013-05-02 19:22:15.000000000","message":"Can be simplified.\n\nreturn (\n    self.port_id \u003d\u003d other.port_id and\n    self.vlan_id \u003d\u003d other.vlan_id and\n    self.switch_ip \u003d\u003d other.switch_ip and\n    self.instance_id \u003d\u003d other.instance_id\n)","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"            (self.port_id, self.vlan_id, self.switch_ip, self.instance_id)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def __eq__(self, other):"},{"line_number":46,"context_line":"        if (self.port_id \u003d\u003d other.port_id and"},{"line_number":47,"context_line":"            self.vlan_id \u003d\u003d other.vlan_id and"},{"line_number":48,"context_line":"            self.switch_ip \u003d\u003d other.switch_ip and"},{"line_number":49,"context_line":"            self.instance_id \u003d\u003d other.instance_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FkVY%3D","line":46,"in_reply_to":"AAAAOn%2F%2FloM%3D","updated":"2013-05-03 18:28:41.000000000","message":"Done","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"}],"quantum/plugins/cisco/models/virt_phy_sw_v2.py":[{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \"\"\""},{"line_number":66,"context_line":"        conf.CiscoConfigOptions()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        for key in cfg.CONF.CISCO_PLUGINS.keys():"},{"line_number":69,"context_line":"            plugin_obj \u003d cfg.CONF.CISCO_PLUGINS[key]"},{"line_number":70,"context_line":"            self._plugins[key] \u003d importutils.import_object(plugin_obj)"},{"line_number":71,"context_line":"            LOG.debug(_(\"Loaded device plugin %s\\n\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6Ro%3D","line":68,"updated":"2013-04-11 21:42:28.000000000","message":"Just want to add that it seemed that we have two ways to refer to the config options. \n     -- conf.\n     -- cfg.CONF.\n\nSuggest using only one way, and remove one of the imports in above","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"5e99c45bac727a1ce01fa096f9ebf94fa3e915ec","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \"\"\""},{"line_number":66,"context_line":"        conf.CiscoConfigOptions()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        for key in cfg.CONF.CISCO_PLUGINS.keys():"},{"line_number":69,"context_line":"            plugin_obj \u003d cfg.CONF.CISCO_PLUGINS[key]"},{"line_number":70,"context_line":"            self._plugins[key] \u003d importutils.import_object(plugin_obj)"},{"line_number":71,"context_line":"            LOG.debug(_(\"Loaded device plugin %s\\n\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F68Y%3D","line":68,"updated":"2013-04-11 15:29:35.000000000","message":"Was there a reason why you changed this syntax?\nShort cuts to CISCO, CISCO_PLUGINS were created in config.py.\nEx.\nCISCO \u003d cfg.CONF.CISCO","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \"\"\""},{"line_number":66,"context_line":"        conf.CiscoConfigOptions()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        for key in cfg.CONF.CISCO_PLUGINS.keys():"},{"line_number":69,"context_line":"            plugin_obj \u003d cfg.CONF.CISCO_PLUGINS[key]"},{"line_number":70,"context_line":"            self._plugins[key] \u003d importutils.import_object(plugin_obj)"},{"line_number":71,"context_line":"            LOG.debug(_(\"Loaded device plugin %s\\n\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fz5Q%3D","line":68,"in_reply_to":"AAAAOn%2F%2F68Y%3D","updated":"2013-04-24 21:18:48.000000000","message":"I\u0027ve changed this back to its original form. I had originally changed it because I couldn\u0027t figure out how to patch this config in unit test cases using the cisco path (vs. the oslo base path), but now I\u0027m able to patch using the cisco path.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \"\"\""},{"line_number":66,"context_line":"        conf.CiscoConfigOptions()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        for key in cfg.CONF.CISCO_PLUGINS.keys():"},{"line_number":69,"context_line":"            plugin_obj \u003d cfg.CONF.CISCO_PLUGINS[key]"},{"line_number":70,"context_line":"            self._plugins[key] \u003d importutils.import_object(plugin_obj)"},{"line_number":71,"context_line":"            LOG.debug(_(\"Loaded device plugin %s\\n\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fz5M%3D","line":68,"in_reply_to":"AAAAOn%2F%2F6Ro%3D","updated":"2013-04-24 21:18:48.000000000","message":"As explained in previous response, I\u0027ve reverted back to original form.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":223,"context_line":"                                           self._func_name(),"},{"line_number":224,"context_line":"                                           args)"},{"line_number":225,"context_line":"        except:"},{"line_number":226,"context_line":"            # TODO: The call to the nexus plugin update network"},{"line_number":227,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":228,"context_line":"            # \"re-updated\" back to the original network config."},{"line_number":229,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6ec%3D","line":226,"updated":"2013-04-11 19:43:24.000000000","message":"Please sign your soul away here.\n# TODO(Dane): ...","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":223,"context_line":"                                           self._func_name(),"},{"line_number":224,"context_line":"                                           args)"},{"line_number":225,"context_line":"        except:"},{"line_number":226,"context_line":"            # TODO: The call to the nexus plugin update network"},{"line_number":227,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":228,"context_line":"            # \"re-updated\" back to the original network config."},{"line_number":229,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fzrk%3D","line":226,"in_reply_to":"AAAAOn%2F%2F6ec%3D","updated":"2013-04-24 21:18:48.000000000","message":"Added.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"unresolved":false,"context_lines":[{"line_number":225,"context_line":"        except:"},{"line_number":226,"context_line":"            # TODO: The call to the nexus plugin update network"},{"line_number":227,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":228,"context_line":"            # \"re-updated\" back to the original network config."},{"line_number":229,"context_line":"            raise"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        return ovs_output[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6Rw%3D","line":228,"updated":"2013-04-11 21:42:28.000000000","message":"Nothing is done in the exception handling. Therefore, the try....except is not necessary in here","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":225,"context_line":"        except:"},{"line_number":226,"context_line":"            # TODO: The call to the nexus plugin update network"},{"line_number":227,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":228,"context_line":"            # \"re-updated\" back to the original network config."},{"line_number":229,"context_line":"            raise"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        return ovs_output[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fzrc%3D","line":228,"in_reply_to":"AAAAOn%2F%2F6Rw%3D","updated":"2013-04-24 21:18:48.000000000","message":"I added this try/except intentionally, with a TODO comment, to serve as a place holder for future rollback changes.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"5e99c45bac727a1ce01fa096f9ebf94fa3e915ec","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        net_name \u003d net_dict[\u0027name\u0027]"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        vlan_id \u003d self._get_segmentation_id(net_id)"},{"line_number":258,"context_line":"        if hasattr(conf, \u0027CISCO_TEST\u0027):"},{"line_number":259,"context_line":"            host \u003d cfg.CONF.CISCO_TEST.host"},{"line_number":260,"context_line":"        else:"},{"line_number":261,"context_line":"            host \u003d self._get_instance_host(tenant_id, instance_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F68E%3D","line":258,"updated":"2013-04-11 15:29:35.000000000","message":"CISCO_TEST is always going to be defined now.\nI think you want\nif conf.CISCO_TEST.host is not None:","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":255,"context_line":"        net_name \u003d net_dict[\u0027name\u0027]"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        vlan_id \u003d self._get_segmentation_id(net_id)"},{"line_number":258,"context_line":"        if hasattr(conf, \u0027CISCO_TEST\u0027):"},{"line_number":259,"context_line":"            host \u003d cfg.CONF.CISCO_TEST.host"},{"line_number":260,"context_line":"        else:"},{"line_number":261,"context_line":"            host \u003d self._get_instance_host(tenant_id, instance_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F638%3D","line":258,"updated":"2013-04-11 15:51:28.000000000","message":"Suggest creating a separate bug and use a mock in the test scripts for _get_instance_host() so don\u0027t have test code in production code.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":255,"context_line":"        net_name \u003d net_dict[\u0027name\u0027]"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        vlan_id \u003d self._get_segmentation_id(net_id)"},{"line_number":258,"context_line":"        if hasattr(conf, \u0027CISCO_TEST\u0027):"},{"line_number":259,"context_line":"            host \u003d cfg.CONF.CISCO_TEST.host"},{"line_number":260,"context_line":"        else:"},{"line_number":261,"context_line":"            host \u003d self._get_instance_host(tenant_id, instance_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzrA%3D","line":258,"in_reply_to":"AAAAOn%2F%2F638%3D","updated":"2013-04-24 21:18:48.000000000","message":"I\u0027ve done some extra code cleaning and removed references to CISCO_TEST in the operational code, and added mocks to handle this in unit tests (in next version about to be committed).","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":255,"context_line":"        net_name \u003d net_dict[\u0027name\u0027]"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        vlan_id \u003d self._get_segmentation_id(net_id)"},{"line_number":258,"context_line":"        if hasattr(conf, \u0027CISCO_TEST\u0027):"},{"line_number":259,"context_line":"            host \u003d cfg.CONF.CISCO_TEST.host"},{"line_number":260,"context_line":"        else:"},{"line_number":261,"context_line":"            host \u003d self._get_instance_host(tenant_id, instance_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzrE%3D","line":258,"in_reply_to":"AAAAOn%2F%2F68E%3D","updated":"2013-04-24 21:18:48.000000000","message":"Good catch. I\u0027m going to add some extra code cleaning and remove references to CISCO_TEST (and use mocks in unit tests instead).","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":285,"context_line":"            instance_id \u003d port[\u0027port\u0027][\u0027device_id\u0027]"},{"line_number":286,"context_line":"            device_owner \u003d port[\u0027port\u0027][\u0027device_owner\u0027]"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"            create_net \u003d (cfg.CONF.CISCO_TEST.host or"},{"line_number":289,"context_line":"                          (device_owner !\u003d \u0027network:dhcp\u0027 and"},{"line_number":290,"context_line":"                           instance_id))"},{"line_number":291,"context_line":"            if create_net:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F630%3D","line":288,"updated":"2013-04-11 15:51:28.000000000","message":"ditto on test code.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":285,"context_line":"            instance_id \u003d port[\u0027port\u0027][\u0027device_id\u0027]"},{"line_number":286,"context_line":"            device_owner \u003d port[\u0027port\u0027][\u0027device_owner\u0027]"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"            create_net \u003d (cfg.CONF.CISCO_TEST.host or"},{"line_number":289,"context_line":"                          (device_owner !\u003d \u0027network:dhcp\u0027 and"},{"line_number":290,"context_line":"                           instance_id))"},{"line_number":291,"context_line":"            if create_net:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fzqo%3D","line":288,"in_reply_to":"AAAAOn%2F%2F630%3D","updated":"2013-04-24 21:18:48.000000000","message":"Done.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"            return ovs_output[0]"},{"line_number":348,"context_line":"        except:"},{"line_number":349,"context_line":"            # TODO: The call to the nexus plugin create network"},{"line_number":350,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":351,"context_line":"            # \"re-updated\" back to the original port config."},{"line_number":352,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6dY%3D","line":349,"updated":"2013-04-11 19:43:24.000000000","message":"# TODO(Dane): ...","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"            return ovs_output[0]"},{"line_number":348,"context_line":"        except:"},{"line_number":349,"context_line":"            # TODO: The call to the nexus plugin create network"},{"line_number":350,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":351,"context_line":"            # \"re-updated\" back to the original port config."},{"line_number":352,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F63w%3D","line":349,"updated":"2013-04-11 15:51:28.000000000","message":"Ditto on empty except clause.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"            return ovs_output[0]"},{"line_number":348,"context_line":"        except:"},{"line_number":349,"context_line":"            # TODO: The call to the nexus plugin create network"},{"line_number":350,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":351,"context_line":"            # \"re-updated\" back to the original port config."},{"line_number":352,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzqY%3D","line":349,"in_reply_to":"AAAAOn%2F%2F63w%3D","updated":"2013-04-24 21:18:48.000000000","message":"The try/except/todo-comment is an (intentional) placeholder for future rollback logic to be added.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"            return ovs_output[0]"},{"line_number":348,"context_line":"        except:"},{"line_number":349,"context_line":"            # TODO: The call to the nexus plugin create network"},{"line_number":350,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":351,"context_line":"            # \"re-updated\" back to the original port config."},{"line_number":352,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzqQ%3D","line":349,"in_reply_to":"AAAAOn%2F%2F6dY%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":376,"context_line":"            tenant_id \u003d port[\u0027tenant_id\u0027]"},{"line_number":377,"context_line":"            net_id \u003d port[\u0027network_id\u0027]"},{"line_number":378,"context_line":"            instance_id \u003d port[\u0027device_id\u0027]"},{"line_number":379,"context_line":"            self._invoke_nexus_for_net_create(context, tenant_id,"},{"line_number":380,"context_line":"                                              net_id, instance_id)"},{"line_number":381,"context_line":"            # Raise the original exception."},{"line_number":382,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6ck%3D","line":379,"updated":"2013-04-11 19:43:24.000000000","message":"Wrap a try around this to ignore exceptions from it.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":376,"context_line":"            tenant_id \u003d port[\u0027tenant_id\u0027]"},{"line_number":377,"context_line":"            net_id \u003d port[\u0027network_id\u0027]"},{"line_number":378,"context_line":"            instance_id \u003d port[\u0027device_id\u0027]"},{"line_number":379,"context_line":"            self._invoke_nexus_for_net_create(context, tenant_id,"},{"line_number":380,"context_line":"                                              net_id, instance_id)"},{"line_number":381,"context_line":"            # Raise the original exception."},{"line_number":382,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzaU%3D","line":379,"in_reply_to":"AAAAOn%2F%2F6ck%3D","updated":"2013-04-24 21:18:48.000000000","message":"Good catch. Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":217,"context_line":"            vlan_id \u003d self._get_segmentation_id(ovs_output[0][\u0027id\u0027])"},{"line_number":218,"context_line":"            if not self._validate_vlan_id(vlan_id):"},{"line_number":219,"context_line":"                return ovs_output[0]"},{"line_number":220,"context_line":"            vlanids \u003d self._get_all_segmentation_ids()"},{"line_number":221,"context_line":"            args \u003d [ovs_output[0][\u0027tenant_id\u0027], id, {\u0027vlan_id\u0027: vlan_id},"},{"line_number":222,"context_line":"                    {\u0027net_admin_state\u0027: ovs_output[0][\u0027admin_state_up\u0027]},"},{"line_number":223,"context_line":"                    {\u0027vlan_ids\u0027: vlanids}]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuCY%3D","line":220,"updated":"2013-04-26 12:47:53.000000000","message":"Nit: Use \"vlan_ids\"?","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":217,"context_line":"            vlan_id \u003d self._get_segmentation_id(ovs_output[0][\u0027id\u0027])"},{"line_number":218,"context_line":"            if not self._validate_vlan_id(vlan_id):"},{"line_number":219,"context_line":"                return ovs_output[0]"},{"line_number":220,"context_line":"            vlanids \u003d self._get_all_segmentation_ids()"},{"line_number":221,"context_line":"            args \u003d [ovs_output[0][\u0027tenant_id\u0027], id, {\u0027vlan_id\u0027: vlan_id},"},{"line_number":222,"context_line":"                    {\u0027net_admin_state\u0027: ovs_output[0][\u0027admin_state_up\u0027]},"},{"line_number":223,"context_line":"                    {\u0027vlan_ids\u0027: vlanids}]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fs3o%3D","line":220,"in_reply_to":"AAAAOn%2F%2FuCY%3D","updated":"2013-04-28 21:44:14.000000000","message":"This is existing code that I\u0027m just nesting in a try block, but I\u0027ll add this change.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":225,"context_line":"                                           self._func_name(),"},{"line_number":226,"context_line":"                                           args)"},{"line_number":227,"context_line":"        except Exception:"},{"line_number":228,"context_line":"            # TODO(dane): The call to the nexus plugin update network"},{"line_number":229,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":230,"context_line":"            # \"re-updated\" back to the original network config."},{"line_number":231,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuBY%3D","line":228,"updated":"2013-04-26 12:47:53.000000000","message":"Is there a separate bug to implement this and following TODOs or should they be done as part of this commit?","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":225,"context_line":"                                           self._func_name(),"},{"line_number":226,"context_line":"                                           args)"},{"line_number":227,"context_line":"        except Exception:"},{"line_number":228,"context_line":"            # TODO(dane): The call to the nexus plugin update network"},{"line_number":229,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":230,"context_line":"            # \"re-updated\" back to the original network config."},{"line_number":231,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fs4E%3D","line":228,"in_reply_to":"AAAAOn%2F%2FuBY%3D","updated":"2013-04-28 21:44:14.000000000","message":"As I brought up in a status meeting last week, this will be done as a separate bug.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":288,"context_line":"            instance_id \u003d port[\u0027port\u0027][\u0027device_id\u0027]"},{"line_number":289,"context_line":"            device_owner \u003d port[\u0027port\u0027][\u0027device_owner\u0027]"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"            if self._do_create_net(device_owner, instance_id):"},{"line_number":292,"context_line":"                net_id \u003d port[\u0027port\u0027][\u0027network_id\u0027]"},{"line_number":293,"context_line":"                tenant_id \u003d port[\u0027port\u0027][\u0027tenant_id\u0027]"},{"line_number":294,"context_line":"                self._invoke_nexus_for_net_create("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuB4%3D","line":291,"updated":"2013-04-26 12:47:53.000000000","message":"Nit:  Name gives indication that this is taking some action, when it is really testing a condition.\n\nNit: Doesn\u0027t need to be a instance method, could be class method or (better?) a standalone function.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":288,"context_line":"            instance_id \u003d port[\u0027port\u0027][\u0027device_id\u0027]"},{"line_number":289,"context_line":"            device_owner \u003d port[\u0027port\u0027][\u0027device_owner\u0027]"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"            if self._do_create_net(device_owner, instance_id):"},{"line_number":292,"context_line":"                net_id \u003d port[\u0027port\u0027][\u0027network_id\u0027]"},{"line_number":293,"context_line":"                tenant_id \u003d port[\u0027port\u0027][\u0027tenant_id\u0027]"},{"line_number":294,"context_line":"                self._invoke_nexus_for_net_create("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fs18%3D","line":291,"in_reply_to":"AAAAOn%2F%2FuB4%3D","updated":"2013-04-28 21:44:14.000000000","message":"I changed the name to _should_call_create_net.\n\nI don\u0027t see value in making this a module (standalone) function, since it logically belongs to this class. I also don\u0027t think it makes sense make this a class method. I will convert it to a a static method to eliminate the instance reference.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        except Exception as e:"},{"line_number":298,"context_line":"            # Create network on the Nexus plugin has failed, so we need"},{"line_number":299,"context_line":"            # to rollback the port creation on the VSwitch plugin."},{"line_number":300,"context_line":"            try:"},{"line_number":301,"context_line":"                id \u003d ovs_output[0][\u0027id\u0027]"},{"line_number":302,"context_line":"                args \u003d [context, id]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuB0%3D","line":299,"updated":"2013-04-26 12:47:53.000000000","message":"Nit: Could just say \"Rollback the port creation on VSwitch plugin\" or remove, as action is pretty obvious.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        except Exception as e:"},{"line_number":298,"context_line":"            # Create network on the Nexus plugin has failed, so we need"},{"line_number":299,"context_line":"            # to rollback the port creation on the VSwitch plugin."},{"line_number":300,"context_line":"            try:"},{"line_number":301,"context_line":"                id \u003d ovs_output[0][\u0027id\u0027]"},{"line_number":302,"context_line":"                args \u003d [context, id]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fs1g%3D","line":299,"in_reply_to":"AAAAOn%2F%2FuB0%3D","updated":"2013-04-28 21:44:14.000000000","message":"I added this comment to underscore/summarize the fact that create *network* on the nexus plugin failed, so create *port* on the vswitch plugin needed to be rolled back (i.e. switching between port vs. network operations is intentional).","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":298,"context_line":"            # Create network on the Nexus plugin has failed, so we need"},{"line_number":299,"context_line":"            # to rollback the port creation on the VSwitch plugin."},{"line_number":300,"context_line":"            try:"},{"line_number":301,"context_line":"                id \u003d ovs_output[0][\u0027id\u0027]"},{"line_number":302,"context_line":"                args \u003d [context, id]"},{"line_number":303,"context_line":"                ovs_output \u003d self._invoke_plugin_per_device("},{"line_number":304,"context_line":"                    const.VSWITCH_PLUGIN,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuBE%3D","line":301,"updated":"2013-04-26 12:47:53.000000000","message":"Not: Could eliminate temp variable.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":298,"context_line":"            # Create network on the Nexus plugin has failed, so we need"},{"line_number":299,"context_line":"            # to rollback the port creation on the VSwitch plugin."},{"line_number":300,"context_line":"            try:"},{"line_number":301,"context_line":"                id \u003d ovs_output[0][\u0027id\u0027]"},{"line_number":302,"context_line":"                args \u003d [context, id]"},{"line_number":303,"context_line":"                ovs_output \u003d self._invoke_plugin_per_device("},{"line_number":304,"context_line":"                    const.VSWITCH_PLUGIN,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fs1s%3D","line":301,"in_reply_to":"AAAAOn%2F%2FuBE%3D","updated":"2013-04-28 21:44:14.000000000","message":"I prefer the temp variable for readability. I think it makes it clearer that we\u0027re passing a context and an id to delete_port, rather than a context and an \"ovs_output[0][\u0027id\u0027]\"","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":323,"context_line":"        plugins."},{"line_number":324,"context_line":"        \"\"\""},{"line_number":325,"context_line":"        LOG.debug(_(\"update_port() called\"))"},{"line_number":326,"context_line":"        # Get port"},{"line_number":327,"context_line":"        old_port \u003d self.get_port(context, id)"},{"line_number":328,"context_line":"        # Check old port device_id"},{"line_number":329,"context_line":"        old_device \u003d old_port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuBg%3D","line":326,"updated":"2013-04-26 12:47:53.000000000","message":"Nit: Don\u0027t really see much value in several of these inline comments, consider pulling to clean up.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":323,"context_line":"        plugins."},{"line_number":324,"context_line":"        \"\"\""},{"line_number":325,"context_line":"        LOG.debug(_(\"update_port() called\"))"},{"line_number":326,"context_line":"        # Get port"},{"line_number":327,"context_line":"        old_port \u003d self.get_port(context, id)"},{"line_number":328,"context_line":"        # Check old port device_id"},{"line_number":329,"context_line":"        old_device \u003d old_port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsZY%3D","line":326,"in_reply_to":"AAAAOn%2F%2FuBg%3D","updated":"2013-04-28 21:44:14.000000000","message":"Again, this is existing code which is just being moved outside of a try block, but I\u0027ll make this change. You might want to file a bug if you feel we need to audit existing comments/variable names in the Cisco plugin.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":369,"context_line":"                                                        self._func_name(),"},{"line_number":370,"context_line":"                                                        args)"},{"line_number":371,"context_line":"        except Exception as e:"},{"line_number":372,"context_line":"            # The OVS plugin delete port failed. For consistency, state"},{"line_number":373,"context_line":"            # should be restored as much as possible to what it was"},{"line_number":374,"context_line":"            # before the delete port operation. So roll back what was"},{"line_number":375,"context_line":"            # done for the Nexus plugin."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuBA%3D","line":372,"updated":"2013-04-26 12:47:53.000000000","message":"Nit: could just say \"Rollback delete port for Nexus plugin, due to failure\" or \"Recreate port for Nexus plugin, due to failure\".","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":369,"context_line":"                                                        self._func_name(),"},{"line_number":370,"context_line":"                                                        args)"},{"line_number":371,"context_line":"        except Exception as e:"},{"line_number":372,"context_line":"            # The OVS plugin delete port failed. For consistency, state"},{"line_number":373,"context_line":"            # should be restored as much as possible to what it was"},{"line_number":374,"context_line":"            # before the delete port operation. So roll back what was"},{"line_number":375,"context_line":"            # done for the Nexus plugin."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsZQ%3D","line":372,"in_reply_to":"AAAAOn%2F%2FuBA%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":373,"context_line":"            # should be restored as much as possible to what it was"},{"line_number":374,"context_line":"            # before the delete port operation. So roll back what was"},{"line_number":375,"context_line":"            # done for the Nexus plugin."},{"line_number":376,"context_line":"            try:"},{"line_number":377,"context_line":"                tenant_id \u003d port[\u0027tenant_id\u0027]"},{"line_number":378,"context_line":"                net_id \u003d port[\u0027network_id\u0027]"},{"line_number":379,"context_line":"                instance_id \u003d port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuA8%3D","line":376,"updated":"2013-04-26 12:47:53.000000000","message":"Should we really recreate the port in Nexus, if delete in OVS fails? The state may already be inconsistent, if we cannot delete from OVS.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":373,"context_line":"            # should be restored as much as possible to what it was"},{"line_number":374,"context_line":"            # before the delete port operation. So roll back what was"},{"line_number":375,"context_line":"            # done for the Nexus plugin."},{"line_number":376,"context_line":"            try:"},{"line_number":377,"context_line":"                tenant_id \u003d port[\u0027tenant_id\u0027]"},{"line_number":378,"context_line":"                net_id \u003d port[\u0027network_id\u0027]"},{"line_number":379,"context_line":"                instance_id \u003d port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsWA%3D","line":376,"in_reply_to":"AAAAOn%2F%2FuA8%3D","updated":"2013-04-28 21:44:14.000000000","message":"Yes, we want to recreate the _network_ in the Nexus plugin, and it it is highly unlikely that this create network operation will fail. The Nexus plugin create network method is independent of OVS state/support, and the Nexus plugin database should still be in a working state (since the Nexus plugin delete_port operation was just seen to work successfully). In any event, this rollback is done best effort (i.e. inside a try/finally, with a re-raise of the original exception).","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":230,"context_line":"            self._invoke_plugin_per_device(const.NEXUS_PLUGIN,"},{"line_number":231,"context_line":"                                           self._func_name(),"},{"line_number":232,"context_line":"                                           args)"},{"line_number":233,"context_line":"        except Exception:"},{"line_number":234,"context_line":"            # TODO(dane): The call to the nexus plugin update network"},{"line_number":235,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":236,"context_line":"            # \"re-updated\" back to the original network config."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FjMI%3D","line":233,"updated":"2013-05-05 07:13:50.000000000","message":"Consider logging that the update has failed","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":230,"context_line":"            self._invoke_plugin_per_device(const.NEXUS_PLUGIN,"},{"line_number":231,"context_line":"                                           self._func_name(),"},{"line_number":232,"context_line":"                                           args)"},{"line_number":233,"context_line":"        except Exception:"},{"line_number":234,"context_line":"            # TODO(dane): The call to the nexus plugin update network"},{"line_number":235,"context_line":"            # failed, so the OVS plugin should be rolled back, that is,"},{"line_number":236,"context_line":"            # \"re-updated\" back to the original network config."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FiOo%3D","line":233,"in_reply_to":"AAAAOn%2F%2FjMI%3D","updated":"2013-05-06 15:38:57.000000000","message":"Done","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":278,"context_line":"        return nexus_output"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @staticmethod"},{"line_number":281,"context_line":"    def _should_call_create_net(device_owner, instance_id):"},{"line_number":282,"context_line":"        return (device_owner !\u003d \u0027network:dhcp\u0027 and"},{"line_number":283,"context_line":"                instance_id)"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FjME%3D","line":281,"updated":"2013-05-05 07:13:50.000000000","message":"Consider checking the instance_id first.","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":278,"context_line":"        return nexus_output"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @staticmethod"},{"line_number":281,"context_line":"    def _should_call_create_net(device_owner, instance_id):"},{"line_number":282,"context_line":"        return (device_owner !\u003d \u0027network:dhcp\u0027 and"},{"line_number":283,"context_line":"                instance_id)"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FiOY%3D","line":281,"in_reply_to":"AAAAOn%2F%2FjME%3D","updated":"2013-05-06 15:38:57.000000000","message":"Done","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":"        for key in conf.CISCO_PLUGINS.keys():"},{"line_number":70,"context_line":"            plugin_obj \u003d conf.CISCO_PLUGINS[key]"},{"line_number":71,"context_line":"            self._plugins[key] \u003d importutils.import_object(plugin_obj)"},{"line_number":72,"context_line":"            LOG.debug(_(\"Loaded device plugin %s\\n\"),"},{"line_number":73,"context_line":"                      conf.CISCO_PLUGINS[key])"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if ((const.VSWITCH_PLUGIN in self._plugins) and"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2Fgbo%3D","line":72,"updated":"2013-05-07 14:40:18.000000000","message":"\\n is not required","commit_id":"3ba9b9873cec0571c4657af48fed9365050c49cc"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":"        for key in conf.CISCO_PLUGINS.keys():"},{"line_number":70,"context_line":"            plugin_obj \u003d conf.CISCO_PLUGINS[key]"},{"line_number":71,"context_line":"            self._plugins[key] \u003d importutils.import_object(plugin_obj)"},{"line_number":72,"context_line":"            LOG.debug(_(\"Loaded device plugin %s\\n\"),"},{"line_number":73,"context_line":"                      conf.CISCO_PLUGINS[key])"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if ((const.VSWITCH_PLUGIN in self._plugins) and"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAO3%2F%2F8v4%3D","line":72,"in_reply_to":"AAAAOn%2F%2Fgbo%3D","updated":"2013-05-16 12:47:51.000000000","message":"I added this (removal of \\n) in the description for Bug #1180783.","commit_id":"3ba9b9873cec0571c4657af48fed9365050c49cc"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def _get_all_segmentation_ids(self):"},{"line_number":170,"context_line":"        vlan_ids \u003d cdb.get_ovs_vlans()"},{"line_number":171,"context_line":"        vlanids \u003d \u0027\u0027"},{"line_number":172,"context_line":"        for v_id in vlan_ids:"},{"line_number":173,"context_line":"            if int(v_id) \u003e 0:"},{"line_number":174,"context_line":"                vlanids \u003d str(v_id) + \u0027,\u0027 + vlanids"},{"line_number":175,"context_line":"        return vlanids.strip(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FgZs%3D","line":172,"updated":"2013-05-07 14:46:18.000000000","message":"Unrelated to this change, but can we file a bug to clean this up?\nReplace 170-175 with:\n\nreturn \u0027,\u0027.join(str(v_id) for v_id in cdb.get_ovs_vlans() if int(v_id) \u003e 0)","commit_id":"3ba9b9873cec0571c4657af48fed9365050c49cc"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def _get_all_segmentation_ids(self):"},{"line_number":170,"context_line":"        vlan_ids \u003d cdb.get_ovs_vlans()"},{"line_number":171,"context_line":"        vlanids \u003d \u0027\u0027"},{"line_number":172,"context_line":"        for v_id in vlan_ids:"},{"line_number":173,"context_line":"            if int(v_id) \u003e 0:"},{"line_number":174,"context_line":"                vlanids \u003d str(v_id) + \u0027,\u0027 + vlanids"},{"line_number":175,"context_line":"        return vlanids.strip(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAO3%2F%2F8wE%3D","line":172,"in_reply_to":"AAAAOn%2F%2FgZs%3D","updated":"2013-05-16 12:47:51.000000000","message":"I filed Bug #1180783 for this.","commit_id":"3ba9b9873cec0571c4657af48fed9365050c49cc"}],"quantum/plugins/cisco/network_plugin.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":226,"context_line":"                                att_id\u003dport[\u0027device_id\u0027])"},{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        kwargs \u003d {const.PORT: port}"},{"line_number":229,"context_line":"        # TODO (Sumit): Might first need to check here if port is active"},{"line_number":230,"context_line":"        self._invoke_device_plugins(self._func_name(), [context, id,"},{"line_number":231,"context_line":"                                                        kwargs])"},{"line_number":232,"context_line":"        return super(PluginV2, self).delete_port(context, id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5mA%3D","line":229,"updated":"2013-04-12 13:54:23.000000000","message":"Do we want to disposition this (and the one right above) TODO at this time?","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":226,"context_line":"                                att_id\u003dport[\u0027device_id\u0027])"},{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        kwargs \u003d {const.PORT: port}"},{"line_number":229,"context_line":"        # TODO (Sumit): Might first need to check here if port is active"},{"line_number":230,"context_line":"        self._invoke_device_plugins(self._func_name(), [context, id,"},{"line_number":231,"context_line":"                                                        kwargs])"},{"line_number":232,"context_line":"        return super(PluginV2, self).delete_port(context, id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzTk%3D","line":229,"in_reply_to":"AAAAOn%2F%2F5mA%3D","updated":"2013-04-24 21:18:48.000000000","message":"I don\u0027t know the reason why this code was originally added, nor why it was commented out, and it\u0027s outside the scope of the blueprint. Better to save this TODO for further investigation.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":"import webob.dec"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from sqlalchemy import orm"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fuxk%3D","line":21,"updated":"2013-04-25 19:45:01.000000000","message":"I think this should be webob.exc or just webob","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":"import webob.dec"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from sqlalchemy import orm"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsV8%3D","line":21,"in_reply_to":"AAAAOn%2F%2FuA4%3D","updated":"2013-04-28 21:44:14.000000000","message":"I prefer to keep the module level import, but I\u0027ll use a temp variable below to shorten the references to webob.exc.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":"import webob.dec"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from sqlalchemy import orm"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuA4%3D","line":21,"in_reply_to":"AAAAOn%2F%2FuuQ%3D","updated":"2013-04-26 12:47:53.000000000","message":"Or should you use \"from webob import exc as wexc\"?","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":"import webob.dec"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from sqlalchemy import orm"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuuQ%3D","line":21,"in_reply_to":"AAAAOn%2F%2Fuxk%3D","updated":"2013-04-25 20:10:55.000000000","message":"Ah, yes. Will change to webob.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"                            \u0027get_subnet\u0027, \u0027get_subnets\u0027, ]"},{"line_number":51,"context_line":"    _master \u003d True"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    wexc \u003d webob.exc"},{"line_number":54,"context_line":"    CISCO_FAULT_MAP \u003d {"},{"line_number":55,"context_line":"        cexc.NetworkSegmentIDNotFound: wexc.HTTPNotFound,"},{"line_number":56,"context_line":"        cexc.NoMoreNics: wexc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Foag%3D","line":53,"updated":"2013-05-01 06:23:06.000000000","message":"Agree with Paul!","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"                            \u0027get_subnet\u0027, \u0027get_subnets\u0027, ]"},{"line_number":51,"context_line":"    _master \u003d True"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    wexc \u003d webob.exc"},{"line_number":54,"context_line":"    CISCO_FAULT_MAP \u003d {"},{"line_number":55,"context_line":"        cexc.NetworkSegmentIDNotFound: wexc.HTTPNotFound,"},{"line_number":56,"context_line":"        cexc.NoMoreNics: wexc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FriM%3D","line":53,"updated":"2013-04-29 12:48:09.000000000","message":"You can do \"from webob import exc as wexc\" at top, instead of module import and assignment.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"                            \u0027get_subnet\u0027, \u0027get_subnets\u0027, ]"},{"line_number":51,"context_line":"    _master \u003d True"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    wexc \u003d webob.exc"},{"line_number":54,"context_line":"    CISCO_FAULT_MAP \u003d {"},{"line_number":55,"context_line":"        cexc.NetworkSegmentIDNotFound: wexc.HTTPNotFound,"},{"line_number":56,"context_line":"        cexc.NoMoreNics: wexc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnZc%3D","line":53,"in_reply_to":"AAAAOn%2F%2Foag%3D","updated":"2013-05-01 20:29:47.000000000","message":"Done","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"                            \u0027get_subnet\u0027, \u0027get_subnets\u0027, ]"},{"line_number":51,"context_line":"    _master \u003d True"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    wexc \u003d webob.exc"},{"line_number":54,"context_line":"    CISCO_FAULT_MAP \u003d {"},{"line_number":55,"context_line":"        cexc.NetworkSegmentIDNotFound: wexc.HTTPNotFound,"},{"line_number":56,"context_line":"        cexc.NoMoreNics: wexc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Fn0A%3D","line":53,"in_reply_to":"AAAAOn%2F%2FriM%3D","updated":"2013-05-01 20:29:47.000000000","message":"Done","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _extend_fault_map(self):"},{"line_number":123,"context_line":"        \"\"\"Extend the Quantum Fault Map for Cisco exceptions."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Map exceptions which are specific to the Cisco Plugin"},{"line_number":126,"context_line":"        to standard HTTP exceptions."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoaU%3D","line":124,"updated":"2013-05-01 06:23:06.000000000","message":"nit: make this Docstrings formatted as the rest of the code","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _extend_fault_map(self):"},{"line_number":123,"context_line":"        \"\"\"Extend the Quantum Fault Map for Cisco exceptions."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Map exceptions which are specific to the Cisco Plugin"},{"line_number":126,"context_line":"        to standard HTTP exceptions."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnOU%3D","line":124,"in_reply_to":"AAAAOn%2F%2Fnjg%3D","updated":"2013-05-01 20:54:42.000000000","message":"I have seen some commit for PEP257, so let\u0027s keep it as it is now","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _extend_fault_map(self):"},{"line_number":123,"context_line":"        \"\"\"Extend the Quantum Fault Map for Cisco exceptions."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Map exceptions which are specific to the Cisco Plugin"},{"line_number":126,"context_line":"        to standard HTTP exceptions."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnNc%3D","line":124,"in_reply_to":"AAAAOn%2F%2FoJg%3D","updated":"2013-05-01 20:55:07.000000000","message":"See https://review.openstack.org/27798","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _extend_fault_map(self):"},{"line_number":123,"context_line":"        \"\"\"Extend the Quantum Fault Map for Cisco exceptions."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Map exceptions which are specific to the Cisco Plugin"},{"line_number":126,"context_line":"        to standard HTTP exceptions."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoJg%3D","line":124,"in_reply_to":"AAAAOn%2F%2FoaU%3D","updated":"2013-05-01 20:53:13.000000000","message":"All new functions/methods should use PEP257. I saw another bug (don\u0027t know the # off the top of my head) where all the functions in this file are converted to PEP257. It may even merge in, by the time this commit goes through.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _extend_fault_map(self):"},{"line_number":123,"context_line":"        \"\"\"Extend the Quantum Fault Map for Cisco exceptions."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Map exceptions which are specific to the Cisco Plugin"},{"line_number":126,"context_line":"        to standard HTTP exceptions."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Fnjg%3D","line":124,"in_reply_to":"AAAAOn%2F%2FoaU%3D","updated":"2013-05-01 20:29:47.000000000","message":"That\u0027s the way I had it originally (consistent with existing doc strings in the rest of the module), but changed it after a review comment suggested that new doc strings should conform to PEP257. Do you know if there\u0027s a general consensus on which takes priority: Consistency with existing doc strings, or conformance with PEP257? My preference would be the former. In order to get on with this review, I\u0027ll update all of the other doc strings in this module.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":184,"context_line":"                  const.BASE_PLUGIN_REF: self}"},{"line_number":185,"context_line":"        self._invoke_device_plugins(self._func_name(), [context, id,"},{"line_number":186,"context_line":"                                                        kwargs])"},{"line_number":187,"context_line":"        return super(PluginV2, self).delete_network(context, id)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def get_network(self, context, id, fields\u003dNone):"},{"line_number":190,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoaE%3D","line":187,"updated":"2013-05-01 06:23:06.000000000","message":"Why you are not catching the exception anymore?","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":184,"context_line":"                  const.BASE_PLUGIN_REF: self}"},{"line_number":185,"context_line":"        self._invoke_device_plugins(self._func_name(), [context, id,"},{"line_number":186,"context_line":"                                                        kwargs])"},{"line_number":187,"context_line":"        return super(PluginV2, self).delete_network(context, id)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def get_network(self, context, id, fields\u003dNone):"},{"line_number":190,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnOQ%3D","line":187,"in_reply_to":"AAAAOn%2F%2FngA%3D","updated":"2013-05-01 20:54:42.000000000","message":"understand!","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":184,"context_line":"                  const.BASE_PLUGIN_REF: self}"},{"line_number":185,"context_line":"        self._invoke_device_plugins(self._func_name(), [context, id,"},{"line_number":186,"context_line":"                                                        kwargs])"},{"line_number":187,"context_line":"        return super(PluginV2, self).delete_network(context, id)"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def get_network(self, context, id, fields\u003dNone):"},{"line_number":190,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FngA%3D","line":187,"in_reply_to":"AAAAOn%2F%2FoaE%3D","updated":"2013-05-01 20:29:47.000000000","message":"I didn\u0027t see any value in catching the exception just to re-raise it (unless I\u0027m missing something). I don\u0027t think that there\u0027s any exception processing to be done at this main plugin level... the assumption being that the 2 plugin methods being called here (cisco model layer and super plugin method) are doing their part to raise quantum exceptions for any foreseeable error conditions, so that the exceptions can be mapped to the proper HTTP error codes.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":231,"context_line":"        # TODO(Sumit): Might first need to check here if port is active"},{"line_number":232,"context_line":"        self._invoke_device_plugins(self._func_name(), [context, id,"},{"line_number":233,"context_line":"                                                        kwargs])"},{"line_number":234,"context_line":"        return super(PluginV2, self).delete_port(context, id)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def update_port(self, context, id, port):"},{"line_number":237,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoXg%3D","line":234,"updated":"2013-05-01 06:23:06.000000000","message":"ditto","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":231,"context_line":"        # TODO(Sumit): Might first need to check here if port is active"},{"line_number":232,"context_line":"        self._invoke_device_plugins(self._func_name(), [context, id,"},{"line_number":233,"context_line":"                                                        kwargs])"},{"line_number":234,"context_line":"        return super(PluginV2, self).delete_port(context, id)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def update_port(self, context, id, port):"},{"line_number":237,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2Fnfs%3D","line":234,"in_reply_to":"AAAAOn%2F%2FoXg%3D","updated":"2013-05-01 20:29:47.000000000","message":"See previous response.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":"import webob.exc as wexc"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from sqlalchemy import orm"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FjMA%3D","line":21,"updated":"2013-05-05 07:13:50.000000000","message":"this should be in the second block. Please see HACKING.rst","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":"import webob.exc as wexc"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from sqlalchemy import orm"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FiOE%3D","line":21,"in_reply_to":"AAAAOn%2F%2FjMA%3D","updated":"2013-05-06 15:38:57.000000000","message":"Done","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"}],"quantum/plugins/cisco/nexus/cisco_nexus_network_driver_v2.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":51,"context_line":"            # for the original exception."},{"line_number":52,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig,"},{"line_number":53,"context_line":"                                         doc\u003de.__doc__)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":56,"context_line":"                     nexus_password):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6Zk%3D","line":53,"updated":"2013-04-11 20:02:52.000000000","message":"Vertically line up 2nd arg with first.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":51,"context_line":"            # for the original exception."},{"line_number":52,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig,"},{"line_number":53,"context_line":"                                         doc\u003de.__doc__)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":56,"context_line":"                     nexus_password):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzR4%3D","line":53,"in_reply_to":"AAAAOn%2F%2F6Zk%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":66,"context_line":"            # for the original exception."},{"line_number":67,"context_line":"            raise cexc.NexusConnectFailed(nexus_host\u003dnexus_host,"},{"line_number":68,"context_line":"                                          doc\u003de.__doc__)"},{"line_number":69,"context_line":"        return man"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def create_xml_snippet(self, cutomized_config):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6ZY%3D","line":68,"updated":"2013-04-11 20:02:52.000000000","message":"Ditto","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":66,"context_line":"            # for the original exception."},{"line_number":67,"context_line":"            raise cexc.NexusConnectFailed(nexus_host\u003dnexus_host,"},{"line_number":68,"context_line":"                                          doc\u003de.__doc__)"},{"line_number":69,"context_line":"        return man"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def create_xml_snippet(self, cutomized_config):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzR0%3D","line":68,"in_reply_to":"AAAAOn%2F%2F6ZY%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from quantum.plugins.cisco.db import network_db_v2 as cdb"},{"line_number":29,"context_line":"from quantum.plugins.cisco.nexus import cisco_nexus_snippets as snipp"},{"line_number":30,"context_line":"from quantum.plugins.cisco.common import cisco_exceptions as cexc"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuA0%3D","line":30,"updated":"2013-04-26 12:47:53.000000000","message":"Correct ordering of import - alphabetical.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from quantum.plugins.cisco.db import network_db_v2 as cdb"},{"line_number":29,"context_line":"from quantum.plugins.cisco.nexus import cisco_nexus_snippets as snipp"},{"line_number":30,"context_line":"from quantum.plugins.cisco.common import cisco_exceptions as cexc"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsG8%3D","line":30,"in_reply_to":"AAAAOn%2F%2FuA0%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _edit_config(self, mgr, target\u003d\u0027running\u0027, config\u003d\u0027\u0027):"},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        Loads all or part of a specified configuration to the specified"},{"line_number":45,"context_line":"        target configuration."},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuAw%3D","line":44,"updated":"2013-04-26 12:47:53.000000000","message":"Nit: Should follow PEP257 for new docstrings created.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _edit_config(self, mgr, target\u003d\u0027running\u0027, config\u003d\u0027\u0027):"},{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        Loads all or part of a specified configuration to the specified"},{"line_number":45,"context_line":"        target configuration."},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsF0%3D","line":44,"in_reply_to":"AAAAOn%2F%2FuAw%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":51,"context_line":"            # for the original exception."},{"line_number":52,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig,"},{"line_number":53,"context_line":"                                         doc\u003de.__doc__)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":56,"context_line":"                     nexus_password):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuxY%3D","line":53,"updated":"2013-04-25 19:45:01.000000000","message":"arg alignment?","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":51,"context_line":"            # for the original exception."},{"line_number":52,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig,"},{"line_number":53,"context_line":"                                         doc\u003de.__doc__)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":56,"context_line":"                     nexus_password):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fuug%3D","line":53,"in_reply_to":"AAAAOn%2F%2FuxY%3D","updated":"2013-04-25 20:10:55.000000000","message":"The arg alignment is actually okay. It looks skewed in this graphical diff because the bold keywords and classnames are displayed in slightly wider font.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":66,"context_line":"            # for the original exception."},{"line_number":67,"context_line":"            raise cexc.NexusConnectFailed(nexus_host\u003dnexus_host,"},{"line_number":68,"context_line":"                                          doc\u003de.__doc__)"},{"line_number":69,"context_line":"        return man"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def create_xml_snippet(self, cutomized_config):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuxU%3D","line":68,"updated":"2013-04-25 19:45:01.000000000","message":"arg alignment?","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":66,"context_line":"            # for the original exception."},{"line_number":67,"context_line":"            raise cexc.NexusConnectFailed(nexus_host\u003dnexus_host,"},{"line_number":68,"context_line":"                                          doc\u003de.__doc__)"},{"line_number":69,"context_line":"        return man"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def create_xml_snippet(self, cutomized_config):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fuuc%3D","line":68,"in_reply_to":"AAAAOn%2F%2FuxU%3D","updated":"2013-04-25 20:10:55.000000000","message":"Ditto.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":55,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":56,"context_line":"            # for the original exception."},{"line_number":57,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig,"},{"line_number":58,"context_line":"                                         doc\u003de.__doc__)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":61,"context_line":"                     nexus_password):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoW8%3D","line":58,"updated":"2013-05-01 06:23:06.000000000","message":"I dont really think sending the whole doc information in the exeception will be useful for debugging, do you?","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":55,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":56,"context_line":"            # for the original exception."},{"line_number":57,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig,"},{"line_number":58,"context_line":"                                         doc\u003de.__doc__)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":61,"context_line":"                     nexus_password):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnOM%3D","line":58,"in_reply_to":"AAAAOn%2F%2FnZs%3D","updated":"2013-05-01 20:54:42.000000000","message":"sounds good, please do!","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":55,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":56,"context_line":"            # for the original exception."},{"line_number":57,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig,"},{"line_number":58,"context_line":"                                         doc\u003de.__doc__)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":61,"context_line":"                     nexus_password):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnZs%3D","line":58,"in_reply_to":"AAAAOn%2F%2FoW8%3D","updated":"2013-05-01 20:29:47.000000000","message":"I think there\u0027s debug/triage value in including something about the original error, otherwise we\u0027ll get a NexusConfigFailed exception, without any information about the specific failure that occurred in ncclient (short of doing a repro). I\u0027ll convert this to printing the original exception itself (i.e. its __str__ attribute). Let me know if that\u0027s not acceptable.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":71,"context_line":"            # for the original exception."},{"line_number":72,"context_line":"            raise cexc.NexusConnectFailed(nexus_host\u003dnexus_host,"},{"line_number":73,"context_line":"                                          doc\u003de.__doc__)"},{"line_number":74,"context_line":"        return man"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def create_xml_snippet(self, cutomized_config):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoW4%3D","line":73,"updated":"2013-05-01 06:23:06.000000000","message":"ditto","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"            # Raise a Quantum exception. Include documentation"},{"line_number":71,"context_line":"            # for the original exception."},{"line_number":72,"context_line":"            raise cexc.NexusConnectFailed(nexus_host\u003dnexus_host,"},{"line_number":73,"context_line":"                                          doc\u003de.__doc__)"},{"line_number":74,"context_line":"        return man"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def create_xml_snippet(self, cutomized_config):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnZk%3D","line":73,"in_reply_to":"AAAAOn%2F%2FoW4%3D","updated":"2013-05-01 20:29:47.000000000","message":"See previous response.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"}],"quantum/plugins/cisco/nexus/cisco_nexus_plugin_v2.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"5e99c45bac727a1ce01fa096f9ebf94fa3e915ec","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import logging"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from oslo.config import cfg"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"from quantum.common import exceptions as exc"},{"line_number":32,"context_line":"from quantum.openstack.common import importutils"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F67o%3D","line":29,"updated":"2013-04-11 15:29:35.000000000","message":"Not sure you\u0027ll need to import this. See below.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import logging"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from oslo.config import cfg"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"from quantum.common import exceptions as exc"},{"line_number":32,"context_line":"from quantum.openstack.common import importutils"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzP0%3D","line":29,"in_reply_to":"AAAAOn%2F%2F67o%3D","updated":"2013-04-24 21:18:48.000000000","message":"Removed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"5e99c45bac727a1ce01fa096f9ebf94fa3e915ec","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        Extracts the configuration parameters from the configuration file"},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        self._client \u003d importutils.import_object(cfg.CONF.CISCO.nexus_driver)"},{"line_number":56,"context_line":"        LOG.debug(_(\"Loaded driver %s\"), cfg.CONF.CISCO.nexus_driver)"},{"line_number":57,"context_line":"        self._nexus_switches \u003d cisco_cfg.get_nexus_dictionary()"},{"line_number":58,"context_line":"        self.credentials \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F67Y%3D","line":55,"updated":"2013-04-11 15:29:35.000000000","message":"Same comment as I made in virt_phy_sw_v2.py","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        Extracts the configuration parameters from the configuration file"},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        self._client \u003d importutils.import_object(cfg.CONF.CISCO.nexus_driver)"},{"line_number":56,"context_line":"        LOG.debug(_(\"Loaded driver %s\"), cfg.CONF.CISCO.nexus_driver)"},{"line_number":57,"context_line":"        self._nexus_switches \u003d cisco_cfg.get_nexus_dictionary()"},{"line_number":58,"context_line":"        self.credentials \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzPw%3D","line":55,"in_reply_to":"AAAAOn%2F%2F67Y%3D","updated":"2013-04-24 21:18:48.000000000","message":"Reverted.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":88,"context_line":"        switch_ip \u003d \u0027\u0027"},{"line_number":89,"context_line":"        port_id \u003d \u0027\u0027"},{"line_number":90,"context_line":"        for keys in self._nexus_switches.keys():"},{"line_number":91,"context_line":"            if str(keys[1]) \u003d\u003d str(host):"},{"line_number":92,"context_line":"                switch_ip \u003d keys[0]"},{"line_number":93,"context_line":"                port_id \u003d self._nexus_switches[keys[0], keys[1]]"},{"line_number":94,"context_line":"        if not switch_ip:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5kA%3D","line":91,"updated":"2013-04-12 13:54:23.000000000","message":"Does the _nexus_switches key contain different fields, besides host name (seems the case from the UT I saw)?\n\nIf so, what happens if we have a host named \"password\" or \"username\"? Unlikely, but possible.\n\nConcern over the data structure layout here with respect to doing lookups. If we are seaching based on part of the key, won\u0027t we run into ambiguous entries?\n\nIf this is an issue, then maybe a separate bug should be created to address this concern?","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":88,"context_line":"        switch_ip \u003d \u0027\u0027"},{"line_number":89,"context_line":"        port_id \u003d \u0027\u0027"},{"line_number":90,"context_line":"        for keys in self._nexus_switches.keys():"},{"line_number":91,"context_line":"            if str(keys[1]) \u003d\u003d str(host):"},{"line_number":92,"context_line":"                switch_ip \u003d keys[0]"},{"line_number":93,"context_line":"                port_id \u003d self._nexus_switches[keys[0], keys[1]]"},{"line_number":94,"context_line":"        if not switch_ip:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzHw%3D","line":91,"in_reply_to":"AAAAOn%2F%2F5kA%3D","updated":"2013-04-24 21:18:48.000000000","message":"This code block is outside the scope of this blueprint\u0027s change set., but to answer your question, the keys for _nexus_switches are 2-tuples, each key containing an IP address and some inner key string. The inner key strings are either fixed strings (\u0027ssh_port\u0027, \u0027username\u0027, or \u0027password\u0027), or variable hostnames. As I understand it, the use of variable hostnames as part of the keys was a design simplification, providing a convenient way of listing a variable number of hosts with their associated physical ports on the switch. This _nexus_switches dictionary is populated at startup from tables configured in cisco_plugins.ini, for example:\n    [NEXUS_SWITCH:1.1.1.1]\n    compute1\u003d1/1\n    compute2\u003d1/2\n    ssh_port\u003d22\n    username\u003dadmin\n    password\u003dmySecretPassword\nWhile it\u0027s remotely possible that someone could try to configure one of these tables using \u0027username\u0027 or \u0027password\u0027 as a hostname, e.g.:\n    username\u003d1/1\n    . . .\n    username\u003dadmin\nthis would jump out as a fairly obvious configuration problem, so IMO it\u0027s not worth the added complexity of hardening this code.\nAs for ambiguity of entries, the current design limitation is that each host node can by connected up to 1 nexus switch max, so there should only be one matching entry in the config.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"        for keys in self._nexus_switches.keys():"},{"line_number":91,"context_line":"            if str(keys[1]) \u003d\u003d str(host):"},{"line_number":92,"context_line":"                switch_ip \u003d keys[0]"},{"line_number":93,"context_line":"                port_id \u003d self._nexus_switches[keys[0], keys[1]]"},{"line_number":94,"context_line":"        if not switch_ip:"},{"line_number":95,"context_line":"            raise cisco_exc.NexusHostUnknown(nexus_host\u003dhost)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5lE%3D","line":93,"updated":"2013-04-12 13:54:23.000000000","message":"If my previous comment is in error, and there a unique host key in _nexus_switches, could you break, once a match is found? If not, then it seems non-deterministic - taking the last match.\n\nAlso, you could use a tuple, instead of a keys array:\n\nfor hostname, ip_address in self._nexus_switches.keys():\n\nGives more meaningful name instead of keys[0] and keys[1], improving readability and reducing errors (mixing up indexes).","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"        for keys in self._nexus_switches.keys():"},{"line_number":91,"context_line":"            if str(keys[1]) \u003d\u003d str(host):"},{"line_number":92,"context_line":"                switch_ip \u003d keys[0]"},{"line_number":93,"context_line":"                port_id \u003d self._nexus_switches[keys[0], keys[1]]"},{"line_number":94,"context_line":"        if not switch_ip:"},{"line_number":95,"context_line":"            raise cisco_exc.NexusHostUnknown(nexus_host\u003dhost)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzFA%3D","line":93,"in_reply_to":"AAAAOn%2F%2F5lE%3D","updated":"2013-04-24 21:18:48.000000000","message":"The current design only supports at most 1 nexus switch per host node, so it shouldn\u0027t be a matter of ambiguity, but I\u0027ll add a break for performance, and I\u0027ll convert this block to use tuple keys.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":100,"context_line":"        vlan_created \u003d False"},{"line_number":101,"context_line":"        vlan_enabled \u003d False"},{"line_number":102,"context_line":"        if not binding:"},{"line_number":103,"context_line":"            _nexus_ip \u003d switch_ip"},{"line_number":104,"context_line":"            _nexus_ports \u003d (port_id,)"},{"line_number":105,"context_line":"            _nexus_ssh_port \u003d \\"},{"line_number":106,"context_line":"                self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5kU%3D","line":103,"updated":"2013-04-12 13:54:23.000000000","message":"Not part of the change, but wondering why leading underscore is used for these? Aren\u0027t they just local variables (or am I missing something - don\u0027t see them as module variables)?","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":100,"context_line":"        vlan_created \u003d False"},{"line_number":101,"context_line":"        vlan_enabled \u003d False"},{"line_number":102,"context_line":"        if not binding:"},{"line_number":103,"context_line":"            _nexus_ip \u003d switch_ip"},{"line_number":104,"context_line":"            _nexus_ports \u003d (port_id,)"},{"line_number":105,"context_line":"            _nexus_ssh_port \u003d \\"},{"line_number":106,"context_line":"                self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzDg%3D","line":103,"in_reply_to":"AAAAOn%2F%2F5kU%3D","updated":"2013-04-24 21:18:48.000000000","message":"This is a (non-universal) convention to indicate that these variables should only be used privately.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":131,"context_line":"            nxos_db.add_nexusport_binding(port_id, str(vlan_id),"},{"line_number":132,"context_line":"                                          switch_ip, instance)"},{"line_number":133,"context_line":"        except:"},{"line_number":134,"context_line":"            # Add binding failed, roll back any vlan creation/enabling"},{"line_number":135,"context_line":"            if vlan_created:"},{"line_number":136,"context_line":"                self._client.delete_vlan("},{"line_number":137,"context_line":"                    str(vlan_id), _nexus_ip,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6Ww%3D","line":134,"updated":"2013-04-11 20:14:40.000000000","message":"We want to ignore any further exceptions raised here.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":131,"context_line":"            nxos_db.add_nexusport_binding(port_id, str(vlan_id),"},{"line_number":132,"context_line":"                                          switch_ip, instance)"},{"line_number":133,"context_line":"        except:"},{"line_number":134,"context_line":"            # Add binding failed, roll back any vlan creation/enabling"},{"line_number":135,"context_line":"            if vlan_created:"},{"line_number":136,"context_line":"                self._client.delete_vlan("},{"line_number":137,"context_line":"                    str(vlan_id), _nexus_ip,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzC4%3D","line":134,"in_reply_to":"AAAAOn%2F%2F6Ww%3D","updated":"2013-04-24 21:18:48.000000000","message":"Good catch. Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":222,"context_line":"                    # The delete vlan operation on the Nexus failed,"},{"line_number":223,"context_line":"                    # so this delete_port request has failed. For"},{"line_number":224,"context_line":"                    # consistency, roll back the Nexus database to what"},{"line_number":225,"context_line":"                    # it was before this request."},{"line_number":226,"context_line":"                    nxos_db.add_nexusport_binding(row[\u0027port_id\u0027],"},{"line_number":227,"context_line":"                                                  row[\u0027vlan_id\u0027],"},{"line_number":228,"context_line":"                                                  row[\u0027switch_ip\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6Ws%3D","line":225,"updated":"2013-04-11 20:14:40.000000000","message":"We want to ignore any further exceptions raised here.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":222,"context_line":"                    # The delete vlan operation on the Nexus failed,"},{"line_number":223,"context_line":"                    # so this delete_port request has failed. For"},{"line_number":224,"context_line":"                    # consistency, roll back the Nexus database to what"},{"line_number":225,"context_line":"                    # it was before this request."},{"line_number":226,"context_line":"                    nxos_db.add_nexusport_binding(row[\u0027port_id\u0027],"},{"line_number":227,"context_line":"                                                  row[\u0027vlan_id\u0027],"},{"line_number":228,"context_line":"                                                  row[\u0027switch_ip\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FzCw%3D","line":225,"in_reply_to":"AAAAOn%2F%2F6Ws%3D","updated":"2013-04-24 21:18:48.000000000","message":"Fixed.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":130,"context_line":"            nxos_db.add_nexusport_binding(port_id, str(vlan_id),"},{"line_number":131,"context_line":"                                          switch_ip, instance)"},{"line_number":132,"context_line":"        except Exception as e:"},{"line_number":133,"context_line":"            try:"},{"line_number":134,"context_line":"                # Add binding failed, roll back any vlan creation/enabling"},{"line_number":135,"context_line":"                if vlan_created:"},{"line_number":136,"context_line":"                    self._client.delete_vlan("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoW0%3D","line":133,"updated":"2013-05-01 06:23:06.000000000","message":"No message at all in this exception?","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":130,"context_line":"            nxos_db.add_nexusport_binding(port_id, str(vlan_id),"},{"line_number":131,"context_line":"                                          switch_ip, instance)"},{"line_number":132,"context_line":"        except Exception as e:"},{"line_number":133,"context_line":"            try:"},{"line_number":134,"context_line":"                # Add binding failed, roll back any vlan creation/enabling"},{"line_number":135,"context_line":"                if vlan_created:"},{"line_number":136,"context_line":"                    self._client.delete_vlan("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnN4%3D","line":133,"in_reply_to":"AAAAOn%2F%2FnXc%3D","updated":"2013-05-01 20:54:42.000000000","message":"it does, thanks!","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":130,"context_line":"            nxos_db.add_nexusport_binding(port_id, str(vlan_id),"},{"line_number":131,"context_line":"                                          switch_ip, instance)"},{"line_number":132,"context_line":"        except Exception as e:"},{"line_number":133,"context_line":"            try:"},{"line_number":134,"context_line":"                # Add binding failed, roll back any vlan creation/enabling"},{"line_number":135,"context_line":"                if vlan_created:"},{"line_number":136,"context_line":"                    self._client.delete_vlan("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnXc%3D","line":133,"in_reply_to":"AAAAOn%2F%2FoW0%3D","updated":"2013-05-01 20:29:47.000000000","message":"The exception is getting re-raised in the finally block below. We don\u0027t want to re-raise this exception until after rollback is completed.  Does this answer your question, or am I missing anything?","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":220,"context_line":"                        str(row[\u0027vlan_id\u0027]), _nexus_ip,"},{"line_number":221,"context_line":"                        _nexus_username, _nexus_password,"},{"line_number":222,"context_line":"                        _nexus_ports, _nexus_ssh_port)"},{"line_number":223,"context_line":"                except Exception as e:"},{"line_number":224,"context_line":"                    # The delete vlan operation on the Nexus failed,"},{"line_number":225,"context_line":"                    # so this delete_port request has failed. For"},{"line_number":226,"context_line":"                    # consistency, roll back the Nexus database to what"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoWw%3D","line":223,"updated":"2013-05-01 06:23:06.000000000","message":"ditto","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":220,"context_line":"                        str(row[\u0027vlan_id\u0027]), _nexus_ip,"},{"line_number":221,"context_line":"                        _nexus_username, _nexus_password,"},{"line_number":222,"context_line":"                        _nexus_ports, _nexus_ssh_port)"},{"line_number":223,"context_line":"                except Exception as e:"},{"line_number":224,"context_line":"                    # The delete vlan operation on the Nexus failed,"},{"line_number":225,"context_line":"                    # so this delete_port request has failed. For"},{"line_number":226,"context_line":"                    # consistency, roll back the Nexus database to what"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnXI%3D","line":223,"in_reply_to":"AAAAOn%2F%2FoWw%3D","updated":"2013-05-01 20:29:47.000000000","message":"See previous response.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # Grab the switch IP and port for this host"},{"line_number":82,"context_line":"        switch_ip \u003d \u0027\u0027"},{"line_number":83,"context_line":"        port_id \u003d \u0027\u0027"},{"line_number":84,"context_line":"        for ip, attr in self._nexus_switches.keys():"},{"line_number":85,"context_line":"            if str(attr) \u003d\u003d str(host):"},{"line_number":86,"context_line":"                switch_ip \u003d ip"},{"line_number":87,"context_line":"                port_id \u003d self._nexus_switches[switch_ip, attr]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fln4%3D","line":84,"updated":"2013-05-02 19:22:15.000000000","message":"keys() is the implicit iterator for dicts, so that can be dropped.  Consider using a for:else loop here instead of extra conditional.\n\nfor switch_ip, attr in self._nexus_switches:\n   if str(attr) \u003d\u003d str(host):\n        port_id \u003d self._nexus_switches[switch_ip, attr]\n        break\nelse:\n    raise cisco_exc.NexusComputeHostNotConfigured(host\u003dhost)","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # Grab the switch IP and port for this host"},{"line_number":82,"context_line":"        switch_ip \u003d \u0027\u0027"},{"line_number":83,"context_line":"        port_id \u003d \u0027\u0027"},{"line_number":84,"context_line":"        for ip, attr in self._nexus_switches.keys():"},{"line_number":85,"context_line":"            if str(attr) \u003d\u003d str(host):"},{"line_number":86,"context_line":"                switch_ip \u003d ip"},{"line_number":87,"context_line":"                port_id \u003d self._nexus_switches[switch_ip, attr]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FkTM%3D","line":84,"in_reply_to":"AAAAOn%2F%2Fln4%3D","updated":"2013-05-03 18:28:41.000000000","message":"Done","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"}],"quantum/tests/unit/cisco/test_network_plugin.py":[{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"unresolved":false,"context_lines":[{"line_number":107,"context_line":"        test_patch.start()"},{"line_number":108,"context_line":"        nexus_patch \u003d mock.patch.dict(c_config.nexus_dictionary,"},{"line_number":109,"context_line":"                                      nexus_dictionary)"},{"line_number":110,"context_line":"        nexus_patch.start()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        with mock.patch(\u0027oslo.config.cfg.CONF.OVS\u0027, **ovs_cfg):"},{"line_number":113,"context_line":"            super(TestCiscoPortsV2, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F6Kk%3D","line":110,"updated":"2013-04-11 21:42:28.000000000","message":"Just wonder if a tearDown() method is needed to stop the mock in case other tests would need the configs","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":107,"context_line":"        test_patch.start()"},{"line_number":108,"context_line":"        nexus_patch \u003d mock.patch.dict(c_config.nexus_dictionary,"},{"line_number":109,"context_line":"                                      nexus_dictionary)"},{"line_number":110,"context_line":"        nexus_patch.start()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        with mock.patch(\u0027oslo.config.cfg.CONF.OVS\u0027, **ovs_cfg):"},{"line_number":113,"context_line":"            super(TestCiscoPortsV2, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5kI%3D","line":110,"in_reply_to":"AAAAOn%2F%2F6Kk%3D","updated":"2013-04-12 13:54:23.000000000","message":"@Robert: Preferred method is to use addCleanup() in setUp().","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":107,"context_line":"        test_patch.start()"},{"line_number":108,"context_line":"        nexus_patch \u003d mock.patch.dict(c_config.nexus_dictionary,"},{"line_number":109,"context_line":"                                      nexus_dictionary)"},{"line_number":110,"context_line":"        nexus_patch.start()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        with mock.patch(\u0027oslo.config.cfg.CONF.OVS\u0027, **ovs_cfg):"},{"line_number":113,"context_line":"            super(TestCiscoPortsV2, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FwKM%3D","line":110,"in_reply_to":"AAAAOn%2F%2F6Kk%3D","updated":"2013-04-24 21:18:48.000000000","message":"There\u0027s an addCleanup() below to cover this.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"18e716376d5729246035637f852d9cdb7dff87ea","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        self.mock_ncclient.configure_mock(**config)"},{"line_number":129,"context_line":"        # Continue testing"},{"line_number":130,"context_line":"        yield"},{"line_number":131,"context_line":"        # Unconfigure attribute"},{"line_number":132,"context_line":"        config \u003d {attr: None}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    @contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5EY%3D","line":131,"updated":"2013-04-12 18:32:50.000000000","message":"Code after \"yield\" seems incomplete. Is there some clean-up or revert logic that needs to go in here?","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":128,"context_line":"        self.mock_ncclient.configure_mock(**config)"},{"line_number":129,"context_line":"        # Continue testing"},{"line_number":130,"context_line":"        yield"},{"line_number":131,"context_line":"        # Unconfigure attribute"},{"line_number":132,"context_line":"        config \u003d {attr: None}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    @contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FwL0%3D","line":131,"in_reply_to":"AAAAOn%2F%2F5EY%3D","updated":"2013-04-24 21:18:48.000000000","message":"Yes, good catch. This was an incomplete cut-and-paste.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":"        config \u003d {attr: None}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    @contextmanager"},{"line_number":135,"context_line":"    def _create_port_res(self, fmt\u003dNone, no_delete\u003dFalse,"},{"line_number":136,"context_line":"                         **kwargs):"},{"line_number":137,"context_line":"        \"\"\""},{"line_number":138,"context_line":"        Create a network, subnet, and port, yield the result,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5jM%3D","line":135,"updated":"2013-04-12 13:54:23.000000000","message":"would it be clearer to change the name (e.g. preserve) or remove the negative (e.g. delete)?  Prevents the double negative in finally clause.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":"        config \u003d {attr: None}"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    @contextmanager"},{"line_number":135,"context_line":"    def _create_port_res(self, fmt\u003dNone, no_delete\u003dFalse,"},{"line_number":136,"context_line":"                         **kwargs):"},{"line_number":137,"context_line":"        \"\"\""},{"line_number":138,"context_line":"        Create a network, subnet, and port, yield the result,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FwKg%3D","line":135,"in_reply_to":"AAAAOn%2F%2F5jM%3D","updated":"2013-04-24 21:18:48.000000000","message":"\"no_delete\" is the form commonly used in other similar test methods, and this matches my personal preference (default setting or expected/typical case uses False). Having \"delete\" in the name is clearer, since that indicates what operation is being included or omitted, IMO.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"from contextlib import contextmanager"},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"from oslo.config import cfg"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from quantum import context"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuAg%3D","line":19,"updated":"2013-04-26 12:47:53.000000000","message":"Nit: Ordering of imports - alphabetical. Move inspect up.\n\nNot sure if the \"from...\" should be grouped together and after the \"import...\" ones.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"from contextlib import contextmanager"},{"line_number":19,"context_line":"import inspect"},{"line_number":20,"context_line":"from oslo.config import cfg"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from quantum import context"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsFQ%3D","line":19,"in_reply_to":"AAAAOn%2F%2FuAg%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":27,"context_line":"from quantum.plugins.cisco.common import cisco_constants as const"},{"line_number":28,"context_line":"from quantum.plugins.cisco.common import cisco_exceptions as c_exc"},{"line_number":29,"context_line":"from quantum.plugins.cisco.common import config as cisco_config"},{"line_number":30,"context_line":"from quantum.plugins.cisco.db import network_db_v2  # noqa"},{"line_number":31,"context_line":"from quantum.plugins.cisco.db import nexus_db_v2"},{"line_number":32,"context_line":"from quantum.plugins.cisco.models.virt_phy_sw_v2 import ("},{"line_number":33,"context_line":"    VirtualPhysicalSwitchModelV2 as model)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuKs%3D","line":30,"updated":"2013-04-26 06:21:46.000000000","message":"It seems that this line (30) is not need it anymore","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":27,"context_line":"from quantum.plugins.cisco.common import cisco_constants as const"},{"line_number":28,"context_line":"from quantum.plugins.cisco.common import cisco_exceptions as c_exc"},{"line_number":29,"context_line":"from quantum.plugins.cisco.common import config as cisco_config"},{"line_number":30,"context_line":"from quantum.plugins.cisco.db import network_db_v2  # noqa"},{"line_number":31,"context_line":"from quantum.plugins.cisco.db import nexus_db_v2"},{"line_number":32,"context_line":"from quantum.plugins.cisco.models.virt_phy_sw_v2 import ("},{"line_number":33,"context_line":"    VirtualPhysicalSwitchModelV2 as model)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsFU%3D","line":30,"in_reply_to":"AAAAOn%2F%2FuKs%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"                       test_db_plugin.TestPortsV2):"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def setUp(self):"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        Configure for end-to-end quantum testing with a mock NetConf client"},{"line_number":84,"context_line":"        (ncclient) module, including:"},{"line_number":85,"context_line":"        - Configure the OVS plugin to use VLANs in the range of 1000-1100."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuAY%3D","line":82,"updated":"2013-04-26 12:47:53.000000000","message":"PEP257 for docstring here and others added in file.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"                       test_db_plugin.TestPortsV2):"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def setUp(self):"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        Configure for end-to-end quantum testing with a mock NetConf client"},{"line_number":84,"context_line":"        (ncclient) module, including:"},{"line_number":85,"context_line":"        - Configure the OVS plugin to use VLANs in the range of 1000-1100."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsFM%3D","line":82,"in_reply_to":"AAAAOn%2F%2FuAY%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":98,"context_line":"            ovs_config: {"},{"line_number":99,"context_line":"                \u0027OVS\u0027: {\u0027bridge_mappings\u0027: \u0027physnet1:br-eth1\u0027,"},{"line_number":100,"context_line":"                        \u0027network_vlan_ranges\u0027: [range_str],"},{"line_number":101,"context_line":"                        \u0027tenant_network_type\u0027: \u0027vlan\u0027}},"},{"line_number":102,"context_line":"            cisco_config: {"},{"line_number":103,"context_line":"                \u0027CISCO\u0027: {\u0027nexus_driver\u0027: nexus_driver},"},{"line_number":104,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FuAQ%3D","line":101,"updated":"2013-04-26 12:47:53.000000000","message":"Nit: Closing brace for ovs_config aligned (like cisco_config), for consistency.","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":98,"context_line":"            ovs_config: {"},{"line_number":99,"context_line":"                \u0027OVS\u0027: {\u0027bridge_mappings\u0027: \u0027physnet1:br-eth1\u0027,"},{"line_number":100,"context_line":"                        \u0027network_vlan_ranges\u0027: [range_str],"},{"line_number":101,"context_line":"                        \u0027tenant_network_type\u0027: \u0027vlan\u0027}},"},{"line_number":102,"context_line":"            cisco_config: {"},{"line_number":103,"context_line":"                \u0027CISCO\u0027: {\u0027nexus_driver\u0027: nexus_driver},"},{"line_number":104,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsFE%3D","line":101,"in_reply_to":"AAAAOn%2F%2FuAQ%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"            }"},{"line_number":105,"context_line":"        }"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        for module in config:"},{"line_number":108,"context_line":"            for group in config[module]:"},{"line_number":109,"context_line":"                for opt in config[module][group]:"},{"line_number":110,"context_line":"                    module.cfg.CONF.set_override(opt,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Ft9U%3D","line":107,"updated":"2013-04-26 12:47:53.000000000","message":"If desired, you can remove the indexing into the struct with:\n\nfor module, groups in config.items():\n    for group, options in groups.items():\n        for opt, value in options.items():\n            module.cfg.CONF.set_override(opt, value, group)","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":133,"context_line":"                \u0027_get_instance_host\u0027: return_testhost"},{"line_number":134,"context_line":"            }"},{"line_number":135,"context_line":"        }"},{"line_number":136,"context_line":"        for module in func_patches:"},{"line_number":137,"context_line":"            for func in func_patches[module]:"},{"line_number":138,"context_line":"                patch \u003d mock.patch.object(module, func,"},{"line_number":139,"context_line":"                                          func_patches[module][func])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Ft9M%3D","line":136,"updated":"2013-04-26 12:47:53.000000000","message":"Ditto on indexing","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_get_seg_id_fail(self):"},{"line_number":265,"context_line":"        \"\"\""},{"line_number":266,"context_line":"        Test the Cisco NetworkVlanIDNotFound exception by simulating"},{"line_number":267,"context_line":"        a return of None by the OVS DB get_network_binding method"},{"line_number":268,"context_line":"        during port creation."},{"line_number":269,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Ft8A%3D","line":266,"updated":"2013-04-26 12:47:53.000000000","message":"NetworkSegmentIDNotFound","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_get_seg_id_fail(self):"},{"line_number":265,"context_line":"        \"\"\""},{"line_number":266,"context_line":"        Test the Cisco NetworkVlanIDNotFound exception by simulating"},{"line_number":267,"context_line":"        a return of None by the OVS DB get_network_binding method"},{"line_number":268,"context_line":"        during port creation."},{"line_number":269,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsFA%3D","line":266,"in_reply_to":"AAAAOn%2F%2Ft8A%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":"        nexus_patch.start()"},{"line_number":122,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        def return_testhost(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoWg%3D","line":124,"updated":"2013-05-01 06:23:06.000000000","message":"are these \"args and kwargs\" really being used?","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":"        nexus_patch.start()"},{"line_number":122,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        def return_testhost(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnNs%3D","line":124,"in_reply_to":"AAAAOn%2F%2FnSA%3D","updated":"2013-05-01 20:54:42.000000000","message":"make sense, thanks for the explanation.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":"        nexus_patch.start()"},{"line_number":122,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        def return_testhost(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnSA%3D","line":124,"in_reply_to":"AAAAOn%2F%2FoWg%3D","updated":"2013-05-01 20:29:47.000000000","message":"I\u0027m using the *args, **kwargs as a generic wildcard for arguments being passed to this mock function (return_true). What this does is to help keep this SetUp method future-proof in the sense that if the function being mocked out (_should_call_create_net in this case) should ever get re-defined (e.g. keyword arguments get added), the return_true mock function will still be valid and the tests in this class will be unaffected.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        def return_testhost(*args, **kwargs):"},{"line_number":128,"context_line":"            return \u0027testhost\u0027"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        func_patches \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FoWI%3D","line":127,"updated":"2013-05-01 06:23:06.000000000","message":"ditto","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        def return_testhost(*args, **kwargs):"},{"line_number":128,"context_line":"            return \u0027testhost\u0027"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        func_patches \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAOn%2F%2FnR8%3D","line":127,"in_reply_to":"AAAAOn%2F%2FoWI%3D","updated":"2013-05-01 20:29:47.000000000","message":"See previous response.","commit_id":"a9c90a9437b38c93d702a138c2de642c5e85b495"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":119,"context_line":"        nexus_patch \u003d mock.patch.dict(cisco_config.nexus_dictionary,"},{"line_number":120,"context_line":"                                      nexus_config)"},{"line_number":121,"context_line":"        nexus_patch.start()"},{"line_number":122,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Flnk%3D","line":122,"updated":"2013-05-02 19:22:15.000000000","message":"Consider mock.patch.stopall that way you don\u0027t have to register so many clean-up handlers.","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":119,"context_line":"        nexus_patch \u003d mock.patch.dict(cisco_config.nexus_dictionary,"},{"line_number":120,"context_line":"                                      nexus_config)"},{"line_number":121,"context_line":"        nexus_patch.start()"},{"line_number":122,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FkPA%3D","line":122,"in_reply_to":"AAAAOn%2F%2Flnk%3D","updated":"2013-05-03 18:28:41.000000000","message":"Done","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":"        nexus_patch.start()"},{"line_number":122,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        def return_testhost(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Flmw%3D","line":124,"updated":"2013-05-02 19:22:15.000000000","message":"Lines 124-142 can be simplified.\n\nThis can be simplified.\n\nmock_sw \u003d mock.patch.object(\n     virt_phy_sw_v2,\n     \u0027VirtualPhysicalSwitchModelV2\u0027\n).start()\n\nmock_sw._should_call_create_net.return_value \u003d True\nmock_sw._get_instance_host.return_value \u003d \u0027testhost\u0027","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":121,"context_line":"        nexus_patch.start()"},{"line_number":122,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        def return_true(*args, **kwargs):"},{"line_number":125,"context_line":"            return True"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        def return_testhost(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FkDg%3D","line":124,"in_reply_to":"AAAAOn%2F%2Flmw%3D","updated":"2013-05-03 18:28:41.000000000","message":"I couldn\u0027t get your suggested code snippet to work (all tests appear to be failing in the cleanup). I was able to get a variation to work, whereby I\u0027m creating a mock for each function that needs to be patched, rather than one mock for the class:\n        patches \u003d {\n            \u0027_should_call_create_net\u0027: True,\n            \u0027_get_instance_host\u0027: \u0027testhost\u0027\n            }\n        for func in patches:\n            mock_sw \u003d mock.patch.object(\n                virt_phy_sw_v2.VirtualPhysicalSwitchModelV2,\n                func).start()\n            mock_sw.return_value \u003d patches[func]","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":317,"context_line":"        a fictitious host name during port creation."},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        \"\"\""},{"line_number":320,"context_line":"        def return_fict_host(*args, **kwargs):"},{"line_number":321,"context_line":"            return \u0027fictitious_host\u0027"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        with mock.patch.object(virt_phy_sw_v2.VirtualPhysicalSwitchModelV2,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Flmc%3D","line":320,"updated":"2013-05-02 19:22:15.000000000","message":"unneeded","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":317,"context_line":"        a fictitious host name during port creation."},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        \"\"\""},{"line_number":320,"context_line":"        def return_fict_host(*args, **kwargs):"},{"line_number":321,"context_line":"            return \u0027fictitious_host\u0027"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        with mock.patch.object(virt_phy_sw_v2.VirtualPhysicalSwitchModelV2,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FkNg%3D","line":320,"in_reply_to":"AAAAOn%2F%2Flmc%3D","updated":"2013-05-03 18:28:41.000000000","message":"Done","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":320,"context_line":"        def return_fict_host(*args, **kwargs):"},{"line_number":321,"context_line":"            return \u0027fictitious_host\u0027"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        with mock.patch.object(virt_phy_sw_v2.VirtualPhysicalSwitchModelV2,"},{"line_number":324,"context_line":"                               \u0027_get_instance_host\u0027,"},{"line_number":325,"context_line":"                               return_fict_host):"},{"line_number":326,"context_line":"            with self._create_port_res(self.fmt, no_delete\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Flmk%3D","line":323,"updated":"2013-05-02 19:22:15.000000000","message":"with mock.patch.object(virt_phy_sw_v2.VirtualPhysicalSwitchModelV2, \u0027_get_instance_host\u0027) as mock_get_instance:\n    mock_get_instance.return_value \u003d \u0027fictitious_host\u0027","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":320,"context_line":"        def return_fict_host(*args, **kwargs):"},{"line_number":321,"context_line":"            return \u0027fictitious_host\u0027"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        with mock.patch.object(virt_phy_sw_v2.VirtualPhysicalSwitchModelV2,"},{"line_number":324,"context_line":"                               \u0027_get_instance_host\u0027,"},{"line_number":325,"context_line":"                               return_fict_host):"},{"line_number":326,"context_line":"            with self._create_port_res(self.fmt, no_delete\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FkNc%3D","line":323,"in_reply_to":"AAAAOn%2F%2Flmk%3D","updated":"2013-05-03 18:28:41.000000000","message":"Done","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":344,"context_line":"                # switch was a removal of vlan from the test interface."},{"line_number":345,"context_line":"                last_nexus_cfg \u003d (self.mock_ncclient.manager.connect()."},{"line_number":346,"context_line":"                                  edit_config.mock_calls[-1][2][\u0027config\u0027])"},{"line_number":347,"context_line":"                self.assertTrue(\u0027\u003cvlan\u003e\u0027 in last_nexus_cfg and"},{"line_number":348,"context_line":"                                \u0027\u003cremove\u003e\u0027 in last_nexus_cfg)"},{"line_number":349,"context_line":"                self._assertExpectedHTTP(res.status_int, KeyError)"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FlmI%3D","line":347,"updated":"2013-05-02 19:22:15.000000000","message":"The compound statement hides which part fails.  Consider:\n\nself.assertIn(\u0027\u003cvlan\u003e\u0027 in last_nexus_cfg)\nself.assertIn(\u0027\u003cremove\u003e\u0027 in last_nexus_cfg)","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":344,"context_line":"                # switch was a removal of vlan from the test interface."},{"line_number":345,"context_line":"                last_nexus_cfg \u003d (self.mock_ncclient.manager.connect()."},{"line_number":346,"context_line":"                                  edit_config.mock_calls[-1][2][\u0027config\u0027])"},{"line_number":347,"context_line":"                self.assertTrue(\u0027\u003cvlan\u003e\u0027 in last_nexus_cfg and"},{"line_number":348,"context_line":"                                \u0027\u003cremove\u003e\u0027 in last_nexus_cfg)"},{"line_number":349,"context_line":"                self._assertExpectedHTTP(res.status_int, KeyError)"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FkNE%3D","line":347,"in_reply_to":"AAAAOn%2F%2FlmI%3D","updated":"2013-05-03 18:28:41.000000000","message":"Done","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":411,"context_line":"            # Confirm that the binding has been restored (rolled back)."},{"line_number":412,"context_line":"            end_rows \u003d nexus_db_v2.get_nexusvlan_binding(self.vlan_start,"},{"line_number":413,"context_line":"                                                         self.switch_ip)"},{"line_number":414,"context_line":"            self.assertTrue(start_rows \u003d\u003d end_rows)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"class TestCiscoNetworksV2(CiscoNetworkPluginV2TestCase,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2Fll8%3D","line":414,"updated":"2013-05-02 19:22:15.000000000","message":"self.assertEqual(start_rows, end_rows)","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":411,"context_line":"            # Confirm that the binding has been restored (rolled back)."},{"line_number":412,"context_line":"            end_rows \u003d nexus_db_v2.get_nexusvlan_binding(self.vlan_start,"},{"line_number":413,"context_line":"                                                         self.switch_ip)"},{"line_number":414,"context_line":"            self.assertTrue(start_rows \u003d\u003d end_rows)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"class TestCiscoNetworksV2(CiscoNetworkPluginV2TestCase,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2FkM8%3D","line":414,"in_reply_to":"AAAAOn%2F%2Fll8%3D","updated":"2013-05-03 18:28:41.000000000","message":"Done","commit_id":"9df64c9e31d86c3c25e4e1886f6ddb6e6f2bfd34"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":366,"context_line":"            # the nexus configuration for this port after deletion failure."},{"line_number":367,"context_line":"            end_rows \u003d nexus_db_v2.get_nexusvlan_binding(self.vlan_start,"},{"line_number":368,"context_line":"                                                         self.switch_ip)"},{"line_number":369,"context_line":"            #self.assertTrue(nexus_bindings_match(start_rows, end_rows))"},{"line_number":370,"context_line":"            self.assertEqual(start_rows, end_rows)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def test_nexus_delete_port_rollback(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FjtE%3D","line":369,"updated":"2013-05-03 22:23:02.000000000","message":"Why is this commented out?","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":366,"context_line":"            # the nexus configuration for this port after deletion failure."},{"line_number":367,"context_line":"            end_rows \u003d nexus_db_v2.get_nexusvlan_binding(self.vlan_start,"},{"line_number":368,"context_line":"                                                         self.switch_ip)"},{"line_number":369,"context_line":"            #self.assertTrue(nexus_bindings_match(start_rows, end_rows))"},{"line_number":370,"context_line":"            self.assertEqual(start_rows, end_rows)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def test_nexus_delete_port_rollback(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FiNs%3D","line":369,"in_reply_to":"AAAAOn%2F%2FjtE%3D","updated":"2013-05-06 15:38:57.000000000","message":"Removed. This was old code which had been replaced by the line which follows it.","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":398,"context_line":"            # Confirm that the binding has been restored (rolled back)."},{"line_number":399,"context_line":"            end_rows \u003d nexus_db_v2.get_nexusvlan_binding(self.vlan_start,"},{"line_number":400,"context_line":"                                                         self.switch_ip)"},{"line_number":401,"context_line":"            self.assertTrue(start_rows \u003d\u003d end_rows)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"class TestCiscoNetworksV2(CiscoNetworkPluginV2TestCase,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FjtI%3D","line":401,"updated":"2013-05-03 22:23:02.000000000","message":"self.assertEqual(start_rows, end_rows)","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":398,"context_line":"            # Confirm that the binding has been restored (rolled back)."},{"line_number":399,"context_line":"            end_rows \u003d nexus_db_v2.get_nexusvlan_binding(self.vlan_start,"},{"line_number":400,"context_line":"                                                         self.switch_ip)"},{"line_number":401,"context_line":"            self.assertTrue(start_rows \u003d\u003d end_rows)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"class TestCiscoNetworksV2(CiscoNetworkPluginV2TestCase,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2FiNk%3D","line":401,"in_reply_to":"AAAAOn%2F%2FjtI%3D","updated":"2013-05-06 15:38:57.000000000","message":"Done","commit_id":"d9afc7e7b1e6204562c5ff5076123513d04d01b6"}],"quantum/tests/unit/cisco/test_nexus_plugin.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def nexus_bindings_match(rows1, rows2):"},{"line_number":38,"context_line":"    if len(rows1) \u003d\u003d len(rows2):"},{"line_number":39,"context_line":"        for i in range(len(rows1)):"},{"line_number":40,"context_line":"            if (rows1[i].port_id !\u003d rows2[i].port_id or"},{"line_number":41,"context_line":"                rows1[i].instance_id !\u003d rows1[i].instance_id):"},{"line_number":42,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5h0%3D","line":39,"updated":"2013-04-12 13:54:23.000000000","message":"Instead of this function, can\u0027t you just do:\n    start_rows \u003d\u003d end_rows\n\nI would think that would work, as long as the objects have equality operator defined. If not, you can use zip to compare:\n\nfor a,b in zip(row1, row2):\n    if a.port_id !\u003d b.port_id or a.instance_id !\u003d b.instance_id:\n        ...","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def nexus_bindings_match(rows1, rows2):"},{"line_number":38,"context_line":"    if len(rows1) \u003d\u003d len(rows2):"},{"line_number":39,"context_line":"        for i in range(len(rows1)):"},{"line_number":40,"context_line":"            if (rows1[i].port_id !\u003d rows2[i].port_id or"},{"line_number":41,"context_line":"                rows1[i].instance_id !\u003d rows1[i].instance_id):"},{"line_number":42,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FwJs%3D","line":39,"in_reply_to":"AAAAOn%2F%2F5h0%3D","updated":"2013-04-24 21:18:48.000000000","message":"These objects didn\u0027t have __eq__ magic defined, so I moved this logic to __eq__.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":166,"context_line":"        # Insert an exception fault in nexus driver\u0027s delete_vlan()"},{"line_number":167,"context_line":"        # attempt to delete a port, and confirm that the inserted"},{"line_number":168,"context_line":"        # exception is raised."},{"line_number":169,"context_line":"        from quantum.plugins.cisco.nexus import cisco_nexus_network_driver_v2"},{"line_number":170,"context_line":"        with mock.patch.object(cisco_nexus_network_driver_v2.CiscoNEXUSDriver,"},{"line_number":171,"context_line":"                               \u0027delete_vlan\u0027, side_effect\u003dValueError):"},{"line_number":172,"context_line":"            self.assertRaises(ValueError,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2F5iY%3D","line":169,"updated":"2013-04-12 13:54:23.000000000","message":"Any reason this import is not at module level?","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":166,"context_line":"        # Insert an exception fault in nexus driver\u0027s delete_vlan()"},{"line_number":167,"context_line":"        # attempt to delete a port, and confirm that the inserted"},{"line_number":168,"context_line":"        # exception is raised."},{"line_number":169,"context_line":"        from quantum.plugins.cisco.nexus import cisco_nexus_network_driver_v2"},{"line_number":170,"context_line":"        with mock.patch.object(cisco_nexus_network_driver_v2.CiscoNEXUSDriver,"},{"line_number":171,"context_line":"                               \u0027delete_vlan\u0027, side_effect\u003dValueError):"},{"line_number":172,"context_line":"            self.assertRaises(ValueError,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FwIQ%3D","line":169,"in_reply_to":"AAAAOn%2F%2F5iY%3D","updated":"2013-04-24 21:18:48.000000000","message":"Yes. There is a dependency ordering issue revolving around the import vs. mocking of the ncclient module. The ncclient module is not used by most plugins, so it is not included by default in devstack. I don\u0027t want to force people to install ncclient just to run unit tests, so I mock out this module in sys.modules dictionary. However, this mocking needs to be done before any modules are imported which in turn import ncclient. The cisco_nexus_network_driver_v2 module is one such module, so this module is not imported until after ncclient is mocked in this class\u0027 setup method.","commit_id":"29b7a4b7bc9301f35eaa711e28769f88339913d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def test_nexus_delete_port_rollback(self):"},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":"        Test for rollback (i.e. restoration) of a VLAN entry in the"},{"line_number":136,"context_line":"        nexus database whenever the nexus plugin fails to update the"},{"line_number":137,"context_line":"        nexus switch (vlan delete fails) during a delete_port operation."},{"line_number":138,"context_line":"        This test assumes that there is only one port configured in"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Ft7M%3D","line":135,"updated":"2013-04-26 12:47:53.000000000","message":"PEP257","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def test_nexus_delete_port_rollback(self):"},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":"        Test for rollback (i.e. restoration) of a VLAN entry in the"},{"line_number":136,"context_line":"        nexus database whenever the nexus plugin fails to update the"},{"line_number":137,"context_line":"        nexus switch (vlan delete fails) during a delete_port operation."},{"line_number":138,"context_line":"        This test assumes that there is only one port configured in"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FsE8%3D","line":135,"in_reply_to":"AAAAOn%2F%2Ft7M%3D","updated":"2013-04-28 21:44:14.000000000","message":"Done","commit_id":"da80a55993ebf65120e886317ef36267164d08f8"}]}
