)]}'
{"neutron/plugins/cisco/nexus/cisco_nexus_plugin_v2.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"de3779f1b738eb40af2e0089234d052b3dcf7705","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                        switch_dict[switch_ip] +\u003d 1"},{"line_number":229,"context_line":"                # Search for the lowest value in the dict"},{"line_number":230,"context_line":"                if switch_dict:"},{"line_number":231,"context_line":"                    switch_ip \u003d min(switch_dict, key\u003dswitch_dict.get)"},{"line_number":232,"context_line":"                    return switch_ip"},{"line_number":233,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"},{"line_number":234,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FGEc%3D","line":231,"updated":"2013-11-14 13:44:28.000000000","message":"Are you using the temp variable to make it clearer as to the the intent to return an IP? Otherwise, it can be removed.","commit_id":"9893ac8a4d3352cffefe7cdf64b26fe895da7851"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"e78cff8fe2a093342e7b8ae1bbb458d494186b1b","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                        switch_dict[switch_ip] +\u003d 1"},{"line_number":229,"context_line":"                # Search for the lowest value in the dict"},{"line_number":230,"context_line":"                if switch_dict:"},{"line_number":231,"context_line":"                    switch_ip \u003d min(switch_dict, key\u003dswitch_dict.get)"},{"line_number":232,"context_line":"                    return switch_ip"},{"line_number":233,"context_line":"            except cisco_exc.NexusPortBindingNotFound:"},{"line_number":234,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FF%2FI%3D","line":231,"in_reply_to":"AAAATn%2F%2FGEc%3D","updated":"2013-11-14 13:58:40.000000000","message":"I hadn\u0027t thought about removing the temporary variable, but I do prefer keeping it there for clarity.","commit_id":"9893ac8a4d3352cffefe7cdf64b26fe895da7851"}],"neutron/tests/unit/cisco/test_network_plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"025c0f5f9d74153fb9c7b6879791df2b82c922b3","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        nexus_patch \u003d mock.patch.dict(cisco_config.device_dictionary,"},{"line_number":115,"context_line":"                                      nexus_config)"},{"line_number":116,"context_line":"        nexus_patch.start()"},{"line_number":117,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # Set Cisco config module\u0027s first configured Nexus IP address."},{"line_number":120,"context_line":"        # Used for SVI placement when round-robin placement is disabled."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FHTg%3D","line":117,"updated":"2013-11-14 09:14:34.000000000","message":"can be removed","commit_id":"c9aba8da4d07c403bf9efe188f65ace0ff6c0659"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"194d5d3d8ca5b03c3618113aaad9c526a624a20e","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        nexus_patch \u003d mock.patch.dict(cisco_config.device_dictionary,"},{"line_number":115,"context_line":"                                      nexus_config)"},{"line_number":116,"context_line":"        nexus_patch.start()"},{"line_number":117,"context_line":"        self.addCleanup(nexus_patch.stop)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # Set Cisco config module\u0027s first configured Nexus IP address."},{"line_number":120,"context_line":"        # Used for SVI placement when round-robin placement is disabled."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FFz8%3D","line":117,"in_reply_to":"AAAATn%2F%2FHTg%3D","updated":"2013-11-14 14:34:06.000000000","message":"mock.patch.stopall() doesn\u0027t apply to mock.patch.dict() patches which have been started with start().","commit_id":"c9aba8da4d07c403bf9efe188f65ace0ff6c0659"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"025c0f5f9d74153fb9c7b6879791df2b82c922b3","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        ncclient_patch \u003d mock.patch.dict(\u0027sys.modules\u0027,"},{"line_number":128,"context_line":"                                         {\u0027ncclient\u0027: self.mock_ncclient})"},{"line_number":129,"context_line":"        ncclient_patch.start()"},{"line_number":130,"context_line":"        self.addCleanup(ncclient_patch.stop)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        # Call the parent setUp, start the core plugin"},{"line_number":133,"context_line":"        super(CiscoNetworkPluginV2TestCase, self).setUp(CORE_PLUGIN)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FHTc%3D","line":130,"updated":"2013-11-14 09:14:34.000000000","message":"can be removed","commit_id":"c9aba8da4d07c403bf9efe188f65ace0ff6c0659"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"194d5d3d8ca5b03c3618113aaad9c526a624a20e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        ncclient_patch \u003d mock.patch.dict(\u0027sys.modules\u0027,"},{"line_number":128,"context_line":"                                         {\u0027ncclient\u0027: self.mock_ncclient})"},{"line_number":129,"context_line":"        ncclient_patch.start()"},{"line_number":130,"context_line":"        self.addCleanup(ncclient_patch.stop)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        # Call the parent setUp, start the core plugin"},{"line_number":133,"context_line":"        super(CiscoNetworkPluginV2TestCase, self).setUp(CORE_PLUGIN)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FFz0%3D","line":130,"in_reply_to":"AAAATn%2F%2FHTc%3D","updated":"2013-11-14 14:34:06.000000000","message":"mock.patch.stopall() doesn\u0027t apply to mock.patch.dict() patches which have been started with start().","commit_id":"c9aba8da4d07c403bf9efe188f65ace0ff6c0659"}],"neutron/tests/unit/cisco/test_nexus_plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"025c0f5f9d74153fb9c7b6879791df2b82c922b3","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        self.patch_obj \u003d mock.patch.dict(\u0027sys.modules\u0027,"},{"line_number":148,"context_line":"                                         {\u0027ncclient\u0027: self.mock_ncclient})"},{"line_number":149,"context_line":"        self.patch_obj.start()"},{"line_number":150,"context_line":"        self.addCleanup(self.patch_obj.stop)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        with mock.patch.object(cisco_nexus_plugin_v2.NexusPlugin,"},{"line_number":153,"context_line":"                               \u0027__init__\u0027, new\u003dnew_nexus_init):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FHTA%3D","line":150,"updated":"2013-11-14 09:14:34.000000000","message":"not needed since have\n self.addCleanup(mock.patch.stopall)","commit_id":"c9aba8da4d07c403bf9efe188f65ace0ff6c0659"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"194d5d3d8ca5b03c3618113aaad9c526a624a20e","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        self.patch_obj \u003d mock.patch.dict(\u0027sys.modules\u0027,"},{"line_number":148,"context_line":"                                         {\u0027ncclient\u0027: self.mock_ncclient})"},{"line_number":149,"context_line":"        self.patch_obj.start()"},{"line_number":150,"context_line":"        self.addCleanup(self.patch_obj.stop)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        with mock.patch.object(cisco_nexus_plugin_v2.NexusPlugin,"},{"line_number":153,"context_line":"                               \u0027__init__\u0027, new\u003dnew_nexus_init):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FF0g%3D","line":150,"in_reply_to":"AAAATn%2F%2FHTA%3D","updated":"2013-11-14 14:34:06.000000000","message":"mock.patch.stopall() doesn\u0027t apply to mock.patch.dict() patches which have been started with start(). An explicit call to stop() is needed for dictionary patches. For example:\n\u003e\u003e\u003e import mock\n\u003e\u003e\u003e d \u003d {\u0027a\u0027: 1, \u0027b\u0027: 2, \u0027c\u0027: 3}\n\u003e\u003e\u003e d_patch \u003d mock.patch.dict(d, {\u0027b\u0027: 99})\n\u003e\u003e\u003e d_patch.start()\n\u003e\u003e\u003e d\n{\u0027a\u0027: 1, \u0027c\u0027: 3, \u0027b\u0027: 99}\n\u003e\u003e\u003e mock.patch.stopall()\n\u003e\u003e\u003e d\n{\u0027a\u0027: 1, \u0027c\u0027: 3, \u0027b\u0027: 99}\n\u003e\u003e\u003e d_patch.stop()\nFalse\n\u003e\u003e\u003e d\n{\u0027a\u0027: 1, \u0027c\u0027: 3, \u0027b\u0027: 2}\n\u003e\u003e\u003e","commit_id":"c9aba8da4d07c403bf9efe188f65ace0ff6c0659"}]}
