)]}'
{"etc/quantum/plugins/cisco/cisco_plugins.ini":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":12,"context_line":"#model_class\u003dquantum.plugins.cisco.models.virt_phy_sw_v2.VirtualPhysicalSwitchModelV2"},{"line_number":13,"context_line":"#manager_class\u003dquantum.plugins.cisco.segmentation.l2network_vlan_mgr_v2.L2NetworkVLANMgr"},{"line_number":14,"context_line":"#nexus_driver\u003dquantum.plugins.cisco.tests.unit.v2.nexus.fake_nexus_driver.CiscoNEXUSFakeDriver"},{"line_number":15,"context_line":"#svi_round_robin\u003dTrue"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# IMPORTANT: Comment out the following two lines for production deployments"},{"line_number":18,"context_line":"[CISCO_TEST]"}],"source_content_type":"text/x-properties","patch_set":8,"id":"AAAAPH%2F%2Fsa4%3D","line":15,"updated":"2013-05-26 09:11:07.000000000","message":"The default in https://review.openstack.org/#/c/30153/8/quantum/plugins/cisco/common/config.py is False.\nIn general when we comment out values in the config file they are the default values.","commit_id":"cbc4aaa57d4195dec0e53d3b3cb827abdfc43dad"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":12,"context_line":"#model_class\u003dquantum.plugins.cisco.models.virt_phy_sw_v2.VirtualPhysicalSwitchModelV2"},{"line_number":13,"context_line":"#manager_class\u003dquantum.plugins.cisco.segmentation.l2network_vlan_mgr_v2.L2NetworkVLANMgr"},{"line_number":14,"context_line":"#nexus_driver\u003dquantum.plugins.cisco.tests.unit.v2.nexus.fake_nexus_driver.CiscoNEXUSFakeDriver"},{"line_number":15,"context_line":"#svi_round_robin\u003dTrue"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# IMPORTANT: Comment out the following two lines for production deployments"},{"line_number":18,"context_line":"[CISCO_TEST]"}],"source_content_type":"text/x-properties","patch_set":8,"id":"AAAAPH%2F%2FsLM%3D","line":15,"in_reply_to":"AAAAPH%2F%2Fsa4%3D","updated":"2013-05-26 21:43:47.000000000","message":"Done","commit_id":"cbc4aaa57d4195dec0e53d3b3cb827abdfc43dad"}],"quantum/plugins/cisco/common/config.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"               help\u003d_(\"Maximum Port Profile value\")),"},{"line_number":45,"context_line":"    cfg.StrOpt(\u0027max_networks\u0027, default\u003d\u002765568\u0027,"},{"line_number":46,"context_line":"               help\u003d_(\"Maximum Network value\")),"},{"line_number":47,"context_line":"    cfg.StrOpt(\u0027svi_round_robin\u0027, default\u003dFalse,"},{"line_number":48,"context_line":"               help\u003d_(\"Distribute SVI interface over all switches\")),"},{"line_number":49,"context_line":"    cfg.StrOpt(\u0027model_class\u0027,"},{"line_number":50,"context_line":"               default\u003d\u0027quantum.plugins.cisco.models.virt_phy_sw_v2.\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2F238%3D","line":47,"updated":"2013-06-07 12:23:44.000000000","message":"Should be BoolOpt?","commit_id":"45f7a0067e6285efbd2acf5563bd976ce4032515"}],"quantum/plugins/cisco/db/nexus_db_v2.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":155,"context_line":"    LOG.debug(_(\"get_nexussvi_bindings() called\"))"},{"line_number":156,"context_line":"    session \u003d db.get_session()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    filters \u003d dict(port_id\u003d\u0027router\u0027)"},{"line_number":159,"context_line":"    bindings \u003d (session.query(nexus_models_v2.NexusPortBinding)."},{"line_number":160,"context_line":"                filter_by(**filters).all())"},{"line_number":161,"context_line":"    if not bindings:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2FeMw%3D","line":158,"updated":"2013-06-03 02:11:21.000000000","message":"In the future please use:\n\nfilters \u003d {\u0027port_id\u0027: \u0027router\u0027}","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":155,"context_line":"    LOG.debug(_(\"get_nexussvi_bindings() called\"))"},{"line_number":156,"context_line":"    session \u003d db.get_session()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    filters \u003d dict(port_id\u003d\u0027router\u0027)"},{"line_number":159,"context_line":"    bindings \u003d (session.query(nexus_models_v2.NexusPortBinding)."},{"line_number":160,"context_line":"                filter_by(**filters).all())"},{"line_number":161,"context_line":"    if not bindings:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fc6w%3D","line":158,"in_reply_to":"AAAAPH%2F%2FeMw%3D","updated":"2013-06-03 17:10:38.000000000","message":"Done","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"}],"quantum/plugins/cisco/models/virt_phy_sw_v2.py":[{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        return ovs_output[0]"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"},{"line_number":397,"context_line":"        \"\"\"Add a router interface on a subnet"},{"line_number":398,"context_line":"           Only invoke the Nexus plugin to create SVI if a Nexus"},{"line_number":399,"context_line":"           plugin is loaded, otherwise send it to the vswitch plugin"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fy04%3D","line":396,"updated":"2013-05-22 21:55:55.000000000","message":"It looks only interface_info[\u0027subnet_id\u0027] is used.\nwhy are you using dist here? \nalso value checking for sunbet_id is needed","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        return ovs_output[0]"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"},{"line_number":397,"context_line":"        \"\"\"Add a router interface on a subnet"},{"line_number":398,"context_line":"           Only invoke the Nexus plugin to create SVI if a Nexus"},{"line_number":399,"context_line":"           plugin is loaded, otherwise send it to the vswitch plugin"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FwW8%3D","line":396,"in_reply_to":"AAAAPH%2F%2FwmA%3D","updated":"2013-05-23 19:24:57.000000000","message":"I added an exception and raise.","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        return ovs_output[0]"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"},{"line_number":397,"context_line":"        \"\"\"Add a router interface on a subnet"},{"line_number":398,"context_line":"           Only invoke the Nexus plugin to create SVI if a Nexus"},{"line_number":399,"context_line":"           plugin is loaded, otherwise send it to the vswitch plugin"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyZ0%3D","line":396,"in_reply_to":"AAAAPH%2F%2Fy04%3D","updated":"2013-05-23 00:28:47.000000000","message":"This is the dictionary passed from the quantum server to the plugin. I\u0027m only using one key from the dictionary but i have to receive the entire dictionary.\n\nsubnet_id is checked by quantum before passing in the arguments. I tested this by trying fake subnet ids.","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        return ovs_output[0]"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"},{"line_number":397,"context_line":"        \"\"\"Add a router interface on a subnet"},{"line_number":398,"context_line":"           Only invoke the Nexus plugin to create SVI if a Nexus"},{"line_number":399,"context_line":"           plugin is loaded, otherwise send it to the vswitch plugin"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FwmA%3D","line":396,"in_reply_to":"AAAAPH%2F%2FyZ0%3D","updated":"2013-05-23 17:57:24.000000000","message":"I got it. \nmay be we should raise error if port_id is specified.","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":406,"context_line":"            gateway_ip \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":407,"context_line":"            # Get cidr"},{"line_number":408,"context_line":"            cidr \u003d subnet[\u0027cidr\u0027]"},{"line_number":409,"context_line":"            netmask \u003d cidr.split(\u0027/\u0027)[1]"},{"line_number":410,"context_line":"            gateway_ip \u003d gateway_ip + \u0027/\u0027 + netmask"},{"line_number":411,"context_line":"            network_id \u003d subnet[\u0027network_id\u0027]"},{"line_number":412,"context_line":"            vlan_id \u003d self._get_segmentation_id(network_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fy0M%3D","line":409,"updated":"2013-05-22 21:55:55.000000000","message":"nit: cidr.split(\u0027/\u0027,1)[1]","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":406,"context_line":"            gateway_ip \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":407,"context_line":"            # Get cidr"},{"line_number":408,"context_line":"            cidr \u003d subnet[\u0027cidr\u0027]"},{"line_number":409,"context_line":"            netmask \u003d cidr.split(\u0027/\u0027)[1]"},{"line_number":410,"context_line":"            gateway_ip \u003d gateway_ip + \u0027/\u0027 + netmask"},{"line_number":411,"context_line":"            network_id \u003d subnet[\u0027network_id\u0027]"},{"line_number":412,"context_line":"            vlan_id \u003d self._get_segmentation_id(network_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyZw%3D","line":409,"in_reply_to":"AAAAPH%2F%2Fy0M%3D","updated":"2013-05-23 00:28:47.000000000","message":"Done","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"652df1326c102177eac09d8579b264f3097c3388","unresolved":false,"context_lines":[{"line_number":394,"context_line":"        return ovs_output[0]"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"},{"line_number":397,"context_line":"        \"\"\"Add a router interface on a subnet"},{"line_number":398,"context_line":"           Only invoke the Nexus plugin to create SVI if a Nexus"},{"line_number":399,"context_line":"           plugin is loaded, otherwise send it to the vswitch plugin"},{"line_number":400,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FuXo%3D","line":397,"updated":"2013-05-24 14:21:08.000000000","message":"Nit: on this and rests of functions...\n\nPEP257:  Period at end of first line, and then a blank line before the rest of the docstring. Indentation at same level as quotes.","commit_id":"ea96253edcfc94c2293b84828b604c516f49256e"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":394,"context_line":"        return ovs_output[0]"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"},{"line_number":397,"context_line":"        \"\"\"Add a router interface on a subnet"},{"line_number":398,"context_line":"           Only invoke the Nexus plugin to create SVI if a Nexus"},{"line_number":399,"context_line":"           plugin is loaded, otherwise send it to the vswitch plugin"},{"line_number":400,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FuCY%3D","line":397,"in_reply_to":"AAAAPH%2F%2FuXo%3D","updated":"2013-05-24 15:17:56.000000000","message":"Done","commit_id":"ea96253edcfc94c2293b84828b604c516f49256e"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if nexus_driver.endswith(\u0027CiscoNEXUSDriver\u0027):"},{"line_number":404,"context_line":"            LOG.debug(_(\"Nexus plugin loaded, creating SVI on switch\"))"},{"line_number":405,"context_line":"            if not \u0027subnet_id\u0027 in interface_info:"},{"line_number":406,"context_line":"                raise cexc.SubnetNotSpecified()"},{"line_number":407,"context_line":"            subnet \u003d self.get_subnet(context, interface_info[\u0027subnet_id\u0027])"},{"line_number":408,"context_line":"            gateway_ip \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":409,"context_line":"            # Get cidr"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FtBs%3D","line":406,"updated":"2013-05-24 23:14:55.000000000","message":"if \u0027port_id\u0027 in interface_info:\n    raise ERROR\n\nis also needed.","commit_id":"cbc4aaa57d4195dec0e53d3b3cb827abdfc43dad"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if nexus_driver.endswith(\u0027CiscoNEXUSDriver\u0027):"},{"line_number":404,"context_line":"            LOG.debug(_(\"Nexus plugin loaded, creating SVI on switch\"))"},{"line_number":405,"context_line":"            if not \u0027subnet_id\u0027 in interface_info:"},{"line_number":406,"context_line":"                raise cexc.SubnetNotSpecified()"},{"line_number":407,"context_line":"            subnet \u003d self.get_subnet(context, interface_info[\u0027subnet_id\u0027])"},{"line_number":408,"context_line":"            gateway_ip \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":409,"context_line":"            # Get cidr"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2Fs9Q%3D","line":406,"in_reply_to":"AAAAPH%2F%2FtBs%3D","updated":"2013-05-25 01:03:43.000000000","message":"Nachi,\n\nWhat situation would a port_id be specified with the dictionary? The CLI only accepts a router_id and a subnet_id for router_interface_add.","commit_id":"cbc4aaa57d4195dec0e53d3b3cb827abdfc43dad"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if nexus_driver.endswith(\u0027CiscoNEXUSDriver\u0027):"},{"line_number":404,"context_line":"            LOG.debug(_(\"Nexus plugin loaded, creating SVI on switch\"))"},{"line_number":405,"context_line":"            if not \u0027subnet_id\u0027 in interface_info:"},{"line_number":406,"context_line":"                raise cexc.SubnetNotSpecified()"},{"line_number":407,"context_line":"            subnet \u003d self.get_subnet(context, interface_info[\u0027subnet_id\u0027])"},{"line_number":408,"context_line":"            gateway_ip \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":409,"context_line":"            # Get cidr"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fr2E%3D","line":406,"updated":"2013-05-27 08:06:19.000000000","message":"(Continues from the previous patch set)\nadd_router_interface takes two type of parameters: subnet_id and port_id. Though the current CLI supports subnet_id only, the quantumclient library itself supports port-id mode. So we need to consider a case where port_id is passed instead of subnet_id.\n\nI am proposing a patch to support port_id for router-interface-add/delete command https://review.openstack.org/#/c/23718/","commit_id":"84c33bc1b30ffaf17e6c6d651ae9d2da6654996b"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if nexus_driver.endswith(\u0027CiscoNEXUSDriver\u0027):"},{"line_number":404,"context_line":"            LOG.debug(_(\"Nexus plugin loaded, creating SVI on switch\"))"},{"line_number":405,"context_line":"            if not \u0027subnet_id\u0027 in interface_info:"},{"line_number":406,"context_line":"                raise cexc.SubnetNotSpecified()"},{"line_number":407,"context_line":"            subnet \u003d self.get_subnet(context, interface_info[\u0027subnet_id\u0027])"},{"line_number":408,"context_line":"            gateway_ip \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":409,"context_line":"            # Get cidr"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FrLI%3D","line":406,"in_reply_to":"AAAAPH%2F%2Fr2E%3D","updated":"2013-05-27 19:44:37.000000000","message":"In case a port is specified instead of a subnet, the add_router_interface will simply raise the SubnetNotSpecified exception and that is the desired mode of operation here. port_ids are not useful here the goal of this patch is to move the physical/vswtich port to a SVI interface on a switch.\n\nIn case of an absent nexus driver, it\u0027ll simply offload the call with subnet/port etc info to the vswitch plugin to be taken care of as the vswitch plugin sees fit using the else: clause.","commit_id":"84c33bc1b30ffaf17e6c6d651ae9d2da6654996b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":437,"context_line":"        if nexus_driver.endswith(\u0027CiscoNEXUSDriver\u0027):"},{"line_number":438,"context_line":"            LOG.debug(_(\"Nexus plugin loaded, deleting SVI from switch\"))"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"            subnet \u003d self.get_subnet(context, interface_info[\u0027subnet_id\u0027])"},{"line_number":441,"context_line":"            network_id \u003d subnet[\u0027network_id\u0027]"},{"line_number":442,"context_line":"            vlan_id \u003d self._get_segmentation_id(network_id)"},{"line_number":443,"context_line":"            n_args \u003d [vlan_id, router_id]"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fr14%3D","line":440,"updated":"2013-05-27 08:06:19.000000000","message":"Same comment on add_router_interface","commit_id":"84c33bc1b30ffaf17e6c6d651ae9d2da6654996b"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":437,"context_line":"        if nexus_driver.endswith(\u0027CiscoNEXUSDriver\u0027):"},{"line_number":438,"context_line":"            LOG.debug(_(\"Nexus plugin loaded, deleting SVI from switch\"))"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"            subnet \u003d self.get_subnet(context, interface_info[\u0027subnet_id\u0027])"},{"line_number":441,"context_line":"            network_id \u003d subnet[\u0027network_id\u0027]"},{"line_number":442,"context_line":"            vlan_id \u003d self._get_segmentation_id(network_id)"},{"line_number":443,"context_line":"            n_args \u003d [vlan_id, router_id]"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FrLE%3D","line":440,"in_reply_to":"AAAAPH%2F%2Fr14%3D","updated":"2013-05-27 19:44:37.000000000","message":"Same as above, this only kicks in if the interface was created using the above block with the Nexus driver active which requires a subnet to be specified instead of a port.","commit_id":"84c33bc1b30ffaf17e6c6d651ae9d2da6654996b"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"unresolved":false,"context_lines":[{"line_number":407,"context_line":"                raise cexc.PortIdForNexusSvi()"},{"line_number":408,"context_line":"            subnet \u003d self.get_subnet(context, interface_info[\u0027subnet_id\u0027])"},{"line_number":409,"context_line":"            gateway_ip \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":410,"context_line":"            # Get cidr"},{"line_number":411,"context_line":"            cidr \u003d subnet[\u0027cidr\u0027]"},{"line_number":412,"context_line":"            netmask \u003d cidr.split(\u0027/\u0027, 1)[1]"},{"line_number":413,"context_line":"            gateway_ip \u003d gateway_ip + \u0027/\u0027 + netmask"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAPX%2F%2F234%3D","line":410,"updated":"2013-06-07 12:23:44.000000000","message":"Nit: this comment isn\u0027t very helpful.","commit_id":"45f7a0067e6285efbd2acf5563bd976ce4032515"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":401,"context_line":"        nexus_driver \u003d cfg.CONF.CISCO.nexus_driver"},{"line_number":402,"context_line":"        if nexus_driver.endswith(\u0027CiscoNEXUSDriver\u0027):"},{"line_number":403,"context_line":"            LOG.debug(_(\"Nexus plugin loaded, creating SVI on switch\"))"},{"line_number":404,"context_line":"            if not \u0027subnet_id\u0027 in interface_info:"},{"line_number":405,"context_line":"                raise cexc.SubnetNotSpecified()"},{"line_number":406,"context_line":"            if \u0027port_id\u0027 in interface_info:"},{"line_number":407,"context_line":"                raise cexc.PortIdForNexusSvi()"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPX%2F%2Fzp4%3D","line":404,"updated":"2013-06-10 07:19:57.000000000","message":"it\u0027s better to use \u0027x not in y\u0027 - it\u0027s more readable","commit_id":"7958c6c1cf6fe19517d0f083890a3ac50f9bbc09"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":401,"context_line":"        nexus_driver \u003d cfg.CONF.CISCO.nexus_driver"},{"line_number":402,"context_line":"        if nexus_driver.endswith(\u0027CiscoNEXUSDriver\u0027):"},{"line_number":403,"context_line":"            LOG.debug(_(\"Nexus plugin loaded, creating SVI on switch\"))"},{"line_number":404,"context_line":"            if not \u0027subnet_id\u0027 in interface_info:"},{"line_number":405,"context_line":"                raise cexc.SubnetNotSpecified()"},{"line_number":406,"context_line":"            if \u0027port_id\u0027 in interface_info:"},{"line_number":407,"context_line":"                raise cexc.PortIdForNexusSvi()"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPX%2F%2FznE%3D","line":404,"in_reply_to":"AAAAPX%2F%2Fzp4%3D","updated":"2013-06-10 07:43:27.000000000","message":"Done","commit_id":"7958c6c1cf6fe19517d0f083890a3ac50f9bbc09"}],"quantum/plugins/cisco/nexus/cisco_nexus_network_driver_v2.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":35,"context_line":"class CiscoNEXUSDriver():"},{"line_number":36,"context_line":"    \"\"\"Nexus Driver Main Class.\"\"\""},{"line_number":37,"context_line":"    def __init__(self):"},{"line_number":38,"context_line":"        self.connections \u003d {}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _edit_config(self, mgr, target\u003d\u0027running\u0027, config\u003d\u0027\u0027,"},{"line_number":41,"context_line":"                     allowed_exc_strs\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2Fsa0%3D","line":38,"updated":"2013-05-26 09:11:07.000000000","message":"Could this be a problem is there is more than one process running? Say for example if the plugin is run via HTTPD.","commit_id":"cbc4aaa57d4195dec0e53d3b3cb827abdfc43dad"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":35,"context_line":"class CiscoNEXUSDriver():"},{"line_number":36,"context_line":"    \"\"\"Nexus Driver Main Class.\"\"\""},{"line_number":37,"context_line":"    def __init__(self):"},{"line_number":38,"context_line":"        self.connections \u003d {}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _edit_config(self, mgr, target\u003d\u0027running\u0027, config\u003d\u0027\u0027,"},{"line_number":41,"context_line":"                     allowed_exc_strs\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FsLQ%3D","line":38,"in_reply_to":"AAAAPH%2F%2Fsa0%3D","updated":"2013-05-26 21:43:47.000000000","message":"The hardware devices support multiple simultaneous connections. From a python perspective, as long as it\u0027s in a separate memory space there should be no parallel read/writes on the same handle.","commit_id":"cbc4aaa57d4195dec0e53d3b3cb827abdfc43dad"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":68,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":69,"context_line":"                     nexus_password):"},{"line_number":70,"context_line":"        \"\"\"Make SSH connection to the Nexus Switch.\"\"\""},{"line_number":71,"context_line":"        if nexus_host in self.connections.keys():"},{"line_number":72,"context_line":"            if self.connections[nexus_host].connected:"},{"line_number":73,"context_line":"                return self.connections[nexus_host]"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2FeMo%3D","line":71,"updated":"2013-06-03 02:11:21.000000000","message":"replace 71-73:\n\nif getattr(self.connections.get(nexus_host), \u0027connected\u0027, None):\n    return self.connections[nexus_host]","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":68,"context_line":"    def nxos_connect(self, nexus_host, nexus_ssh_port, nexus_user,"},{"line_number":69,"context_line":"                     nexus_password):"},{"line_number":70,"context_line":"        \"\"\"Make SSH connection to the Nexus Switch.\"\"\""},{"line_number":71,"context_line":"        if nexus_host in self.connections.keys():"},{"line_number":72,"context_line":"            if self.connections[nexus_host].connected:"},{"line_number":73,"context_line":"                return self.connections[nexus_host]"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fc6o%3D","line":71,"in_reply_to":"AAAAPH%2F%2FeMo%3D","updated":"2013-06-03 17:10:38.000000000","message":"Done","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"652df1326c102177eac09d8579b264f3097c3388","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                                nexus_user, nexus_password)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        confstr \u003d snipp.CMD_VLAN_SVI_SNIPPET % (vlan_id, gateway_ip)"},{"line_number":243,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":244,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"},{"line_number":245,"context_line":"        man.edit_config(target\u003d\u0027running\u0027, config\u003dconfstr)"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fgho%3D","line":243,"updated":"2013-05-31 15:56:57.000000000","message":"If you think more functions like this will be used in the future, the common code 239, 243-245, could be extracted out to another function and reused by callers. May not be worth it for these two.","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":240,"context_line":"                                nexus_user, nexus_password)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        confstr \u003d snipp.CMD_VLAN_SVI_SNIPPET % (vlan_id, gateway_ip)"},{"line_number":243,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":244,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"},{"line_number":245,"context_line":"        man.edit_config(target\u003d\u0027running\u0027, config\u003dconfstr)"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fgf0%3D","line":243,"in_reply_to":"AAAAPH%2F%2Fgho%3D","updated":"2013-05-31 16:07:13.000000000","message":"Outside the scope of this commit.","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"}],"quantum/plugins/cisco/nexus/cisco_nexus_plugin_v2.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"907c978b6e6023529da1fe44fd73ff4662cb3ef9","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def add_router_interface(self, vlan_name, vlan_id, gateway_ip, router_id):"},{"line_number":152,"context_line":"        \"\"\"Create VLAN SVI on the Nexus switch.\"\"\""},{"line_number":153,"context_line":"        # Find a switch to create the SVI on"},{"line_number":154,"context_line":"        switch_ip \u003d self._find_switch_for_svi()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        _nexus_ip \u003d switch_ip"},{"line_number":157,"context_line":"        _nexus_ssh_port \u003d self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FzG8%3D","line":154,"updated":"2013-05-22 19:39:58.000000000","message":"_find_switch_for_svi can return None.\nShould you check for this condition here?","commit_id":"96c0eeeb30313bb587168837f109cf85fe1843d4"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def add_router_interface(self, vlan_name, vlan_id, gateway_ip, router_id):"},{"line_number":152,"context_line":"        \"\"\"Create VLAN SVI on the Nexus switch.\"\"\""},{"line_number":153,"context_line":"        # Find a switch to create the SVI on"},{"line_number":154,"context_line":"        switch_ip \u003d self._find_switch_for_svi()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        _nexus_ip \u003d switch_ip"},{"line_number":157,"context_line":"        _nexus_ssh_port \u003d self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fy%2FA%3D","line":154,"in_reply_to":"AAAAPH%2F%2FzG8%3D","updated":"2013-05-22 20:29:12.000000000","message":"I added an exception and raise","commit_id":"96c0eeeb30313bb587168837f109cf85fe1843d4"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"907c978b6e6023529da1fe44fd73ff4662cb3ef9","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                # Build a switch dictionary with weights"},{"line_number":207,"context_line":"                for binding in bindings:"},{"line_number":208,"context_line":"                    if binding.switch_ip in switch_dict:"},{"line_number":209,"context_line":"                        switch_ip \u003d binding.switch_ip"},{"line_number":210,"context_line":"                        switch_dict[switch_ip] \u003d switch_dict[switch_ip] + 1"},{"line_number":211,"context_line":"                    else:"},{"line_number":212,"context_line":"                        switch_dict[switch_ip] \u003d 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FzH4%3D","line":209,"updated":"2013-05-22 19:39:58.000000000","message":"move this one two lines up or else: will throw exception","commit_id":"96c0eeeb30313bb587168837f109cf85fe1843d4"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":206,"context_line":"                # Build a switch dictionary with weights"},{"line_number":207,"context_line":"                for binding in bindings:"},{"line_number":208,"context_line":"                    if binding.switch_ip in switch_dict:"},{"line_number":209,"context_line":"                        switch_ip \u003d binding.switch_ip"},{"line_number":210,"context_line":"                        switch_dict[switch_ip] \u003d switch_dict[switch_ip] + 1"},{"line_number":211,"context_line":"                    else:"},{"line_number":212,"context_line":"                        switch_dict[switch_ip] \u003d 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fy%2B0%3D","line":209,"in_reply_to":"AAAAPH%2F%2FzH4%3D","updated":"2013-05-22 20:29:12.000000000","message":"Thanks for pointing  this out, the logic in this block was flawed. I replaced it.","commit_id":"96c0eeeb30313bb587168837f109cf85fe1843d4"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"907c978b6e6023529da1fe44fd73ff4662cb3ef9","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                    else:"},{"line_number":212,"context_line":"                        switch_dict[switch_ip] \u003d 1"},{"line_number":213,"context_line":"                # Search for the lowest value in the dict"},{"line_number":214,"context_line":"                if len(switch_dict.items()) \u003e 0:"},{"line_number":215,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dlambda x: x[1])"},{"line_number":216,"context_line":"                    return switch_ip"},{"line_number":217,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FzIU%3D","line":214,"updated":"2013-05-22 19:39:58.000000000","message":"nit: if switch_dict.items():","commit_id":"96c0eeeb30313bb587168837f109cf85fe1843d4"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":211,"context_line":"                    else:"},{"line_number":212,"context_line":"                        switch_dict[switch_ip] \u003d 1"},{"line_number":213,"context_line":"                # Search for the lowest value in the dict"},{"line_number":214,"context_line":"                if len(switch_dict.items()) \u003e 0:"},{"line_number":215,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dlambda x: x[1])"},{"line_number":216,"context_line":"                    return switch_ip"},{"line_number":217,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2Fy%2Bw%3D","line":214,"in_reply_to":"AAAAPH%2F%2FzIU%3D","updated":"2013-05-22 20:29:12.000000000","message":"Done","commit_id":"96c0eeeb30313bb587168837f109cf85fe1843d4"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if not switch_ip:"},{"line_number":156,"context_line":"            raise cisco_exc.NoNexusSwitch()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        _nexus_ip \u003d switch_ip"},{"line_number":159,"context_line":"        _nexus_ssh_port \u003d self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"},{"line_number":160,"context_line":"        _nexus_creds \u003d self.get_credential(_nexus_ip)"},{"line_number":161,"context_line":"        _nexus_username \u003d _nexus_creds[\u0027username\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fyxo%3D","line":158,"updated":"2013-05-22 21:55:55.000000000","message":"nit: why variables start with _ ?","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if not switch_ip:"},{"line_number":156,"context_line":"            raise cisco_exc.NoNexusSwitch()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        _nexus_ip \u003d switch_ip"},{"line_number":159,"context_line":"        _nexus_ssh_port \u003d self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"},{"line_number":160,"context_line":"        _nexus_creds \u003d self.get_credential(_nexus_ip)"},{"line_number":161,"context_line":"        _nexus_username \u003d _nexus_creds[\u0027username\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2Fwl4%3D","line":158,"in_reply_to":"AAAAPH%2F%2FyZU%3D","updated":"2013-05-23 17:57:24.000000000","message":"OK","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if not switch_ip:"},{"line_number":156,"context_line":"            raise cisco_exc.NoNexusSwitch()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        _nexus_ip \u003d switch_ip"},{"line_number":159,"context_line":"        _nexus_ssh_port \u003d self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"},{"line_number":160,"context_line":"        _nexus_creds \u003d self.get_credential(_nexus_ip)"},{"line_number":161,"context_line":"        _nexus_username \u003d _nexus_creds[\u0027username\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPH%2F%2FyZU%3D","line":158,"in_reply_to":"AAAAPH%2F%2Fyxo%3D","updated":"2013-05-23 00:28:47.000000000","message":"This was just the formatting choice with the Cisco plugin to use an _ to signify hardware specific variables.","commit_id":"202a1ae6bea62317439155f7d7d8aaa8eec5f6e5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"652df1326c102177eac09d8579b264f3097c3388","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                # Build a switch dictionary with weights"},{"line_number":219,"context_line":"                for binding in bindings:"},{"line_number":220,"context_line":"                    switch_ip \u003d binding.switch_ip"},{"line_number":221,"context_line":"                    switch_dict[switch_ip] \u003d switch_dict[switch_ip] + 1"},{"line_number":222,"context_line":"                # Search for the lowest value in the dict"},{"line_number":223,"context_line":"                if switch_dict.items():"},{"line_number":224,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dswitch_dict.get)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2Ftao%3D","line":221,"updated":"2013-05-24 19:25:50.000000000","message":"can do switch_dict[switch_ip] +\u003d 1","commit_id":"d2f881ee9c0d82e6e59436fb32392a803043d659"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"652df1326c102177eac09d8579b264f3097c3388","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                    return switch_ip[0]"},{"line_number":226,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"},{"line_number":227,"context_line":"                # Return the first switch in the config"},{"line_number":228,"context_line":"                for switch_ip, attr in self._nexus_switches:"},{"line_number":229,"context_line":"                    return switch_ip"},{"line_number":230,"context_line":"        else:"},{"line_number":231,"context_line":"            LOG.debug(_(\"No round robin scheme, using first switch\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2Ftac%3D","line":228,"updated":"2013-05-24 19:25:50.000000000","message":"Maybe reduce the duplication here and in the else clause?","commit_id":"d2f881ee9c0d82e6e59436fb32392a803043d659"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"652df1326c102177eac09d8579b264f3097c3388","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                # Build a switch dictionary with weights"},{"line_number":219,"context_line":"                for binding in bindings:"},{"line_number":220,"context_line":"                    switch_ip \u003d binding.switch_ip"},{"line_number":221,"context_line":"                    switch_dict[switch_ip] \u003d switch_dict[switch_ip] + 1"},{"line_number":222,"context_line":"                # Search for the lowest value in the dict"},{"line_number":223,"context_line":"                if switch_dict.items():"},{"line_number":224,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dswitch_dict.get)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FqF0%3D","line":221,"updated":"2013-05-28 13:19:30.000000000","message":"Is it possible to have a binding with a switch_ip that is not one of the Nexus switches (e.g. IndexError)?\n\nCould do:\nswitch_dict[switch_ip] +\u003d 1","commit_id":"84c33bc1b30ffaf17e6c6d651ae9d2da6654996b"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":218,"context_line":"                # Build a switch dictionary with weights"},{"line_number":219,"context_line":"                for binding in bindings:"},{"line_number":220,"context_line":"                    switch_ip \u003d binding.switch_ip"},{"line_number":221,"context_line":"                    switch_dict[switch_ip] \u003d switch_dict[switch_ip] + 1"},{"line_number":222,"context_line":"                # Search for the lowest value in the dict"},{"line_number":223,"context_line":"                if switch_dict.items():"},{"line_number":224,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dswitch_dict.get)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fp24%3D","line":221,"in_reply_to":"AAAAPH%2F%2FqF0%3D","updated":"2013-05-28 14:43:20.000000000","message":"No it\u0027s not possible. The syntax is perfectly fine.","commit_id":"84c33bc1b30ffaf17e6c6d651ae9d2da6654996b"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"652df1326c102177eac09d8579b264f3097c3388","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                    switch_ip \u003d binding.switch_ip"},{"line_number":221,"context_line":"                    switch_dict[switch_ip] \u003d switch_dict[switch_ip] + 1"},{"line_number":222,"context_line":"                # Search for the lowest value in the dict"},{"line_number":223,"context_line":"                if switch_dict.items():"},{"line_number":224,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dswitch_dict.get)"},{"line_number":225,"context_line":"                    return switch_ip[0]"},{"line_number":226,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FqF8%3D","line":223,"updated":"2013-05-28 13:19:30.000000000","message":"Wouldn\u0027t this always be true?\n\nSeems like it could only be false if there are no switches and no bindings (as a not found binding would cause index error). Or am I missing something?","commit_id":"84c33bc1b30ffaf17e6c6d651ae9d2da6654996b"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":220,"context_line":"                    switch_ip \u003d binding.switch_ip"},{"line_number":221,"context_line":"                    switch_dict[switch_ip] \u003d switch_dict[switch_ip] + 1"},{"line_number":222,"context_line":"                # Search for the lowest value in the dict"},{"line_number":223,"context_line":"                if switch_dict.items():"},{"line_number":224,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dswitch_dict.get)"},{"line_number":225,"context_line":"                    return switch_ip[0]"},{"line_number":226,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2Fp2g%3D","line":223,"in_reply_to":"AAAAPH%2F%2FqF8%3D","updated":"2013-05-28 14:43:20.000000000","message":"Yes it\u0027s always true, no harm in checking for some oddball cases where this dict might be empty.","commit_id":"84c33bc1b30ffaf17e6c6d651ae9d2da6654996b"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":156,"context_line":"        if not switch_ip:"},{"line_number":157,"context_line":"            raise cisco_exc.NoNexusSwitch()"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        _nexus_ip \u003d switch_ip"},{"line_number":160,"context_line":"        _nexus_ssh_port \u003d self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"},{"line_number":161,"context_line":"        _nexus_creds \u003d self.get_credential(_nexus_ip)"},{"line_number":162,"context_line":"        _nexus_username \u003d _nexus_creds[\u0027username\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2FeMM%3D","line":159,"updated":"2013-06-03 02:11:21.000000000","message":"Why the underscores here?  These var names will never leak outside of this method, so no need to suggest they\u0027re private because they are anyway.\n\nnexus_ip \u003d switch_ip\n...","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":156,"context_line":"        if not switch_ip:"},{"line_number":157,"context_line":"            raise cisco_exc.NoNexusSwitch()"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        _nexus_ip \u003d switch_ip"},{"line_number":160,"context_line":"        _nexus_ssh_port \u003d self._nexus_switches[switch_ip, \u0027ssh_port\u0027]"},{"line_number":161,"context_line":"        _nexus_creds \u003d self.get_credential(_nexus_ip)"},{"line_number":162,"context_line":"        _nexus_username \u003d _nexus_creds[\u0027username\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fc4k%3D","line":159,"in_reply_to":"AAAAPH%2F%2FeMM%3D","updated":"2013-06-03 17:10:38.000000000","message":"Mark,\nThis styling is used throughout this file. Changing it here would mean changing it everywhere in the file and testing everything again. I think this should be committed as a separate patch, I\u0027ll file an enhancement for this.","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"652df1326c102177eac09d8579b264f3097c3388","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        try:"},{"line_number":177,"context_line":"            nxos_db.get_nexusvm_binding(vlan_id, router_id)"},{"line_number":178,"context_line":"            raise cisco_exc.SubnetInterfacePresent(subnet_id\u003dsubnet_id,"},{"line_number":179,"context_line":"                                                   router_id\u003drouter_id)"},{"line_number":180,"context_line":"        except cisco_exc.NexusPortBindingNotFound:"},{"line_number":181,"context_line":"            self._client.create_vlan_svi(vlan_id, _nexus_ip, _nexus_username,"},{"line_number":182,"context_line":"                                         _nexus_password, _nexus_ssh_port,"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2FghY%3D","line":179,"updated":"2013-05-31 15:56:57.000000000","message":"Align column?","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":176,"context_line":"        try:"},{"line_number":177,"context_line":"            nxos_db.get_nexusvm_binding(vlan_id, router_id)"},{"line_number":178,"context_line":"            raise cisco_exc.SubnetInterfacePresent(subnet_id\u003dsubnet_id,"},{"line_number":179,"context_line":"                                                   router_id\u003drouter_id)"},{"line_number":180,"context_line":"        except cisco_exc.NexusPortBindingNotFound:"},{"line_number":181,"context_line":"            self._client.create_vlan_svi(vlan_id, _nexus_ip, _nexus_username,"},{"line_number":182,"context_line":"                                         _nexus_password, _nexus_ssh_port,"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fgfs%3D","line":179,"in_reply_to":"AAAAPH%2F%2FghY%3D","updated":"2013-05-31 16:07:13.000000000","message":"PEP8 is fine with it.","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":192,"context_line":"        row \u003d nxos_db.get_nexusvm_binding(vlan_id, router_id)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        # Delete the SVI interface from the switch"},{"line_number":195,"context_line":"        _nexus_ip \u003d row[\u0027switch_ip\u0027]"},{"line_number":196,"context_line":"        _nexus_ssh_port \u003d self._nexus_switches[_nexus_ip, \u0027ssh_port\u0027]"},{"line_number":197,"context_line":"        _nexus_creds \u003d self.get_credential(_nexus_ip)"},{"line_number":198,"context_line":"        _nexus_username \u003d _nexus_creds[\u0027username\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2FeMI%3D","line":195,"updated":"2013-06-03 02:11:21.000000000","message":"Same as above drop the underscores for the var names.","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":210,"context_line":"        LOG.debug(_(\"Grabbing a switch to create SVI\"))"},{"line_number":211,"context_line":"        if conf.CISCO.svi_round_robin:"},{"line_number":212,"context_line":"            LOG.debug(_(\"Using round robin to create SVI\"))"},{"line_number":213,"context_line":"            switch_dict \u003d {}"},{"line_number":214,"context_line":"            for switch_ip, attr in self._nexus_switches:"},{"line_number":215,"context_line":"                switch_dict[switch_ip] \u003d 0"},{"line_number":216,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2FeLw%3D","line":213,"updated":"2013-06-03 02:11:21.000000000","message":"replace 213-215:\n\nswitch_dict \u003d dict(\n    (switch_ip, 0) for switch_ip, _ in self._nexus_switches\n)","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":210,"context_line":"        LOG.debug(_(\"Grabbing a switch to create SVI\"))"},{"line_number":211,"context_line":"        if conf.CISCO.svi_round_robin:"},{"line_number":212,"context_line":"            LOG.debug(_(\"Using round robin to create SVI\"))"},{"line_number":213,"context_line":"            switch_dict \u003d {}"},{"line_number":214,"context_line":"            for switch_ip, attr in self._nexus_switches:"},{"line_number":215,"context_line":"                switch_dict[switch_ip] \u003d 0"},{"line_number":216,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fc40%3D","line":213,"in_reply_to":"AAAAPH%2F%2FeLw%3D","updated":"2013-06-03 17:10:38.000000000","message":"Done","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":223,"context_line":"                    else:"},{"line_number":224,"context_line":"                        switch_dict[switch_ip] +\u003d 1"},{"line_number":225,"context_line":"                # Search for the lowest value in the dict"},{"line_number":226,"context_line":"                if switch_dict.items():"},{"line_number":227,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dswitch_dict.get)"},{"line_number":228,"context_line":"                    return switch_ip[0]"},{"line_number":229,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2FeL8%3D","line":226,"updated":"2013-06-03 02:11:21.000000000","message":"if switch_dict:","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":223,"context_line":"                    else:"},{"line_number":224,"context_line":"                        switch_dict[switch_ip] +\u003d 1"},{"line_number":225,"context_line":"                # Search for the lowest value in the dict"},{"line_number":226,"context_line":"                if switch_dict.items():"},{"line_number":227,"context_line":"                    switch_ip \u003d min(switch_dict.items(), key\u003dswitch_dict.get)"},{"line_number":228,"context_line":"                    return switch_ip[0]"},{"line_number":229,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fc4w%3D","line":226,"in_reply_to":"AAAAPH%2F%2FeL8%3D","updated":"2013-06-03 17:10:38.000000000","message":"Done","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":171,"context_line":"            self._client.create_vlan("},{"line_number":172,"context_line":"                vlan_name, str(vlan_id), _nexus_ip,"},{"line_number":173,"context_line":"                _nexus_username, _nexus_password,"},{"line_number":174,"context_line":"                [], _nexus_ssh_port, vlan_id)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        # Check if a router interface has already been created"},{"line_number":177,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPX%2F%2Fzpo%3D","line":174,"updated":"2013-06-10 07:19:57.000000000","message":"shouldn\u0027t vlan binding be added here?","commit_id":"7958c6c1cf6fe19517d0f083890a3ac50f9bbc09"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":171,"context_line":"            self._client.create_vlan("},{"line_number":172,"context_line":"                vlan_name, str(vlan_id), _nexus_ip,"},{"line_number":173,"context_line":"                _nexus_username, _nexus_password,"},{"line_number":174,"context_line":"                [], _nexus_ssh_port, vlan_id)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        # Check if a router interface has already been created"},{"line_number":177,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPX%2F%2FznI%3D","line":174,"in_reply_to":"AAAAPX%2F%2Fzpo%3D","updated":"2013-06-10 07:43:27.000000000","message":"The binding is added right below when we create the SVI interface, in case the vlan wasn\u0027t present on the switch then it\u0027s almost certain that this is the first time it\u0027s being added to the switch. \n\nThere\u0027s still an off chance that something went wrong with adding the row the last time, in which case the block below would ensure that a binding is already present in the DB or we add one immediately.","commit_id":"7958c6c1cf6fe19517d0f083890a3ac50f9bbc09"}],"quantum/tests/unit/cisco/test_nexus_plugin.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"907c978b6e6023529da1fe44fd73ff4662cb3ef9","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                                                               vlan_id,"},{"line_number":135,"context_line":"                                                               gateway_ip,"},{"line_number":136,"context_line":"                                                               router_id)"},{"line_number":137,"context_line":"        self.assertEqual(result, True)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def test_nexus_remove_router_interface(self):"},{"line_number":140,"context_line":"        \"\"\"Tests deletion of a router interface.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2FzGo%3D","line":137,"updated":"2013-05-22 19:39:58.000000000","message":"nit: self.assertTrue(result)\n\nDo you need to add negative scenario where result would be False?","commit_id":"96c0eeeb30313bb587168837f109cf85fe1843d4"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"652df1326c102177eac09d8579b264f3097c3388","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        self.assertEqual(expected_instance_id, INSTANCE)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_nexus_add_router_interface(self):"},{"line_number":127,"context_line":"        \"\"\"Tests addition of a router interface.\"\"\""},{"line_number":128,"context_line":"        vlan_name \u003d self.vlan_name"},{"line_number":129,"context_line":"        vlan_id \u003d self.vlan_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FuKc%3D","line":126,"updated":"2013-05-24 14:21:08.000000000","message":"Negative test case(s)? For example, VLAN already exists on add interface?","commit_id":"ea96253edcfc94c2293b84828b604c516f49256e"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        self.assertEqual(expected_instance_id, INSTANCE)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_nexus_add_router_interface(self):"},{"line_number":127,"context_line":"        \"\"\"Tests addition of a router interface.\"\"\""},{"line_number":128,"context_line":"        vlan_name \u003d self.vlan_name"},{"line_number":129,"context_line":"        vlan_id \u003d self.vlan_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2FuCM%3D","line":126,"in_reply_to":"AAAAPH%2F%2FuKc%3D","updated":"2013-05-24 15:17:56.000000000","message":"The function invokes the usual method to create vlans, negative tests care taken care of by the create_vlan negative tests.","commit_id":"ea96253edcfc94c2293b84828b604c516f49256e"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":137,"context_line":"                                                               subnet_id,"},{"line_number":138,"context_line":"                                                               gateway_ip,"},{"line_number":139,"context_line":"                                                               router_id)"},{"line_number":140,"context_line":"        self.assertEqual(result, True)"},{"line_number":141,"context_line":"        result \u003d self._cisco_nexus_plugin.remove_router_interface(vlan_id,"},{"line_number":142,"context_line":"                                                                  router_id)"},{"line_number":143,"context_line":"        self.assertEqual(result, router_id)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2FeLg%3D","line":140,"updated":"2013-06-03 02:11:21.000000000","message":"self.assertTrue(result)","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"unresolved":false,"context_lines":[{"line_number":137,"context_line":"                                                               subnet_id,"},{"line_number":138,"context_line":"                                                               gateway_ip,"},{"line_number":139,"context_line":"                                                               router_id)"},{"line_number":140,"context_line":"        self.assertEqual(result, True)"},{"line_number":141,"context_line":"        result \u003d self._cisco_nexus_plugin.remove_router_interface(vlan_id,"},{"line_number":142,"context_line":"                                                                  router_id)"},{"line_number":143,"context_line":"        self.assertEqual(result, router_id)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAPH%2F%2Fc4g%3D","line":140,"in_reply_to":"AAAAPH%2F%2FeLg%3D","updated":"2013-06-03 17:10:38.000000000","message":"Done","commit_id":"bd628e6d6a0b1e8ede0ae451f5ff443e20a1a6f3"}]}
