)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"ab41e4c997c00a943d525fc89b376e53e876a684","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Cisco nexus plugin fails to untrunk vlan if other hosts using vlan"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-Bug: #1246080"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Without this fix, if two or more compute hosts have"},{"line_number":12,"context_line":"instances which are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2BFw4%3D","line":9,"updated":"2013-12-02 17:25:06.000000000","message":"super nit: this should go after the long description","commit_id":"a0a462f0303f68d885ff344898437e310c64188c"}],"neutron/plugins/cisco/nexus/cisco_nexus_plugin_v2.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"5387dfb00b43dcaf04a56b1d58f6dffd24658b16","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                        nxos_db.get_nexusvlan_binding(row.vlan_id,"},{"line_number":320,"context_line":"                                                      row.switch_ip)"},{"line_number":321,"context_line":"                    except cisco_exc.NexusPortBindingNotFound:"},{"line_number":322,"context_line":"                        if auto_delete:"},{"line_number":323,"context_line":"                            # Delete this vlan from this switch"},{"line_number":324,"context_line":"                            self._client.delete_vlan(switch_ip, row.vlan_id)"},{"line_number":325,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fp9c%3D","line":322,"updated":"2013-10-30 19:27:44.000000000","message":"move \"if auto_delete\" conditional above try:","commit_id":"27c4bbb79f4448987c462dd3a0e02beef49d0a74"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"c6ca4c884b4ca806401f5359f758ab9bb7fe1862","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                        nxos_db.get_nexusvlan_binding(row.vlan_id,"},{"line_number":320,"context_line":"                                                      row.switch_ip)"},{"line_number":321,"context_line":"                    except cisco_exc.NexusPortBindingNotFound:"},{"line_number":322,"context_line":"                        if auto_delete:"},{"line_number":323,"context_line":"                            # Delete this vlan from this switch"},{"line_number":324,"context_line":"                            self._client.delete_vlan(switch_ip, row.vlan_id)"},{"line_number":325,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fp8g%3D","line":322,"in_reply_to":"AAAATn%2F%2Fp9c%3D","updated":"2013-10-30 19:31:25.000000000","message":"Yes, this would be more efficient. Thanks for catching this.","commit_id":"27c4bbb79f4448987c462dd3a0e02beef49d0a74"}],"neutron/tests/unit/cisco/test_network_plugin.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5cd852c6cb9f13b0739db5c0b1c8c313b01394e3","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            with self.subnet(network\u003dnetwork, cidr\u003dCIDR_1) as subnet:"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"                # Create an instance on first compute host"},{"line_number":341,"context_line":"                arg_list \u003d (portbindings.HOST_ID,)"},{"line_number":342,"context_line":"                port_dict_1 \u003d {portbindings.HOST_ID: COMP_HOST_NAME,"},{"line_number":343,"context_line":"                               \u0027device_id\u0027: DEVICE_ID_1,"},{"line_number":344,"context_line":"                               \u0027device_owner\u0027: DEVICE_OWNER}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fp8Q%3D","line":341,"updated":"2013-10-30 19:33:43.000000000","message":"Consider L341-350 into a helper function, and use for L353-368 too.","commit_id":"27c4bbb79f4448987c462dd3a0e02beef49d0a74"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"296ced35cc51c556a459636e1fd48ec024405301","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            with self.subnet(network\u003dnetwork, cidr\u003dCIDR_1) as subnet:"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"                # Create an instance on first compute host"},{"line_number":341,"context_line":"                arg_list \u003d (portbindings.HOST_ID,)"},{"line_number":342,"context_line":"                port_dict_1 \u003d {portbindings.HOST_ID: COMP_HOST_NAME,"},{"line_number":343,"context_line":"                               \u0027device_id\u0027: DEVICE_ID_1,"},{"line_number":344,"context_line":"                               \u0027device_owner\u0027: DEVICE_OWNER}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fp1c%3D","line":341,"in_reply_to":"AAAATn%2F%2Fp8Q%3D","updated":"2013-10-30 20:41:27.000000000","message":"Good suggestion.","commit_id":"27c4bbb79f4448987c462dd3a0e02beef49d0a74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"edf02e6364dd0a176838fb381e505a446eb95868","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                    COMP_HOST_NAME, DEVICE_ID_1, vlan_creation_expected\u003dTrue):"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"                    # Create an instance on second compute host"},{"line_number":360,"context_line":"                    with _create_port_check_vlan("},{"line_number":361,"context_line":"                        COMP_HOST_NAME_2, DEVICE_ID_2,"},{"line_number":362,"context_line":"                        vlan_creation_expected\u003dFalse):"},{"line_number":363,"context_line":"                        pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FppY%3D","line":360,"updated":"2013-10-30 21:11:24.000000000","message":"Does this second one need to be nested?","commit_id":"42bfa1ae75b78e16250c6c4739650b4970e2b2a1"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"22b87a43e6c4aa2161faae9d9b2faacb44b1f1a5","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                    COMP_HOST_NAME, DEVICE_ID_1, vlan_creation_expected\u003dTrue):"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"                    # Create an instance on second compute host"},{"line_number":360,"context_line":"                    with _create_port_check_vlan("},{"line_number":361,"context_line":"                        COMP_HOST_NAME_2, DEVICE_ID_2,"},{"line_number":362,"context_line":"                        vlan_creation_expected\u003dFalse):"},{"line_number":363,"context_line":"                        pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2Fpnk%3D","line":360,"in_reply_to":"AAAATn%2F%2FppY%3D","updated":"2013-10-30 21:47:30.000000000","message":"The second port create needs to be nested, otherwise the first port gets torn down (by nested context managers) before the second port gets created. We need both instances to exist at the same time.","commit_id":"42bfa1ae75b78e16250c6c4739650b4970e2b2a1"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"edf02e6364dd0a176838fb381e505a446eb95868","unresolved":false,"context_lines":[{"line_number":360,"context_line":"                    with _create_port_check_vlan("},{"line_number":361,"context_line":"                        COMP_HOST_NAME_2, DEVICE_ID_2,"},{"line_number":362,"context_line":"                        vlan_creation_expected\u003dFalse):"},{"line_number":363,"context_line":"                        pass"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                    # Instance on second host is now terminated."},{"line_number":366,"context_line":"                    # Vlan should be untrunked from port, but vlan should"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2Fpo0%3D","line":363,"updated":"2013-10-30 21:11:24.000000000","message":"Instead of a with clause that just does pass, you could have a plain function, that has the whole with clause and returns T/F indication of whether the vlan is configured, and then assert here in the test function (you would not need the vlan_creation_expected arg and just test T/F):\n\ne.g.\n\nassertFalse(create_port_on_compute(COMPUT_HOST_NAME_2, DEVICE_ID_2))","commit_id":"42bfa1ae75b78e16250c6c4739650b4970e2b2a1"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"22b87a43e6c4aa2161faae9d9b2faacb44b1f1a5","unresolved":false,"context_lines":[{"line_number":360,"context_line":"                    with _create_port_check_vlan("},{"line_number":361,"context_line":"                        COMP_HOST_NAME_2, DEVICE_ID_2,"},{"line_number":362,"context_line":"                        vlan_creation_expected\u003dFalse):"},{"line_number":363,"context_line":"                        pass"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                    # Instance on second host is now terminated."},{"line_number":366,"context_line":"                    # Vlan should be untrunked from port, but vlan should"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FpkA%3D","line":363,"in_reply_to":"AAAATn%2F%2Fpo0%3D","updated":"2013-10-30 21:47:30.000000000","message":"If we\u0027re using the same helper function to create the second instance as we\u0027re using to create the first instance, then we need the \u0027with\u0027 to be used when the function gets called for the second instance. For the first instance, we must use the \u0027with\u0027 when we call the helper function in order to invoke that helper function as a context manager, so that we get the cleanup, i.e. port deletion, at the end of the with block. If we then try calling the helper function without the \u0027with\u0027 for the second instance, in spite of the helper function being defined as a context manager, then the interpreter seems to skip the (context manager) helper function entirely (I tried this.)","commit_id":"42bfa1ae75b78e16250c6c4739650b4970e2b2a1"}]}
