)]}'
{"quantum/plugins/openvswitch/ovs_quantum_plugin.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6c6681e873c548589adfccf69ddda7c54d67e74f","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                                      binding.physical_network)"},{"line_number":543,"context_line":"            # Set the status as DOWN if necessary"},{"line_number":544,"context_line":"            if not port[\u0027admin_state_up\u0027]:"},{"line_number":545,"context_line":"                ovs_db_v2.set_port_status(port[\u0027id\u0027], q_const.PORT_STATUS_DOWN)"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        return self._extend_port_dict_binding(context, port)"},{"line_number":548,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FlFE%3D","line":545,"updated":"2013-01-15 07:20:57.000000000","message":"The port status should be changed by agent?\nThe step as below: \n\n1.update port with \u0027admin_state_up \u003d False\u0027, plugin notify port update.\n\n2.agent exec \u0027port_dead\u0027 in port_update, then invoke rpc call \u0027update_device_down\u0027\n\n3. plugin exec rpc callback \u0027update_device_down\u0027 and set the port status as down","commit_id":"834fb8a6c8a4bdab9859f7ec4c0e6d8482028987"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"unresolved":false,"context_lines":[{"line_number":542,"context_line":"                                      binding.physical_network)"},{"line_number":543,"context_line":"            # Set the status as DOWN if necessary"},{"line_number":544,"context_line":"            if not port[\u0027admin_state_up\u0027]:"},{"line_number":545,"context_line":"                ovs_db_v2.set_port_status(port[\u0027id\u0027], q_const.PORT_STATUS_DOWN)"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        return self._extend_port_dict_binding(context, port)"},{"line_number":548,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FjXI%3D","line":545,"in_reply_to":"AAAAM3%2F%2FlCM%3D","updated":"2013-01-16 09:10:36.000000000","message":"I suppose it causes race condition between agent calling update_device_up and this in theory.","commit_id":"834fb8a6c8a4bdab9859f7ec4c0e6d8482028987"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":542,"context_line":"                                      binding.physical_network)"},{"line_number":543,"context_line":"            # Set the status as DOWN if necessary"},{"line_number":544,"context_line":"            if not port[\u0027admin_state_up\u0027]:"},{"line_number":545,"context_line":"                ovs_db_v2.set_port_status(port[\u0027id\u0027], q_const.PORT_STATUS_DOWN)"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        return self._extend_port_dict_binding(context, port)"},{"line_number":548,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FlCM%3D","line":545,"in_reply_to":"AAAAM3%2F%2FlFE%3D","updated":"2013-01-15 08:08:30.000000000","message":"The agent ensures that the port is removed from the integration bridge. This essentially sets the port as \u0027down\u0027. In order to save a RPC message from the agent to the plugin the database status is update here.\nWhen the admin state is set as up the agent indeed sends a message so that the plugin will know that the port is now up.","commit_id":"834fb8a6c8a4bdab9859f7ec4c0e6d8482028987"},{"author":{"_account_id":6282,"name":"Wu Wenxiang","email":"wu.wenxiang@algoblu.com","username":"wu-wenxiang"},"change_message_id":"ae3fc4bfbe4f3cf987c9f66b361bca84aa2f09ba","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        LOG.debug(_(\"Device %(device)s up on %(agent_id)s\"),"},{"line_number":118,"context_line":"                  locals())"},{"line_number":119,"context_line":"        port \u003d ovs_db_v2.get_port(device)"},{"line_number":120,"context_line":"        if port and port[\u0027status\u0027] !\u003d q_const.PORT_STATUS_ACTIVE:"},{"line_number":121,"context_line":"            ovs_db_v2.set_port_status(port[\u0027id\u0027], q_const.PORT_STATUS_ACTIVE)"},{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            LOG.debug(_(\"%s can not be found in database\"), device)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FjWg%3D","line":120,"updated":"2013-01-16 09:19:38.000000000","message":"If port[\u0027status\u0027] \u003d\u003d q_const.PORT_STATUS_ACTIVE, the debug information in else branch not correct?","commit_id":"37b23d6bd7f938e48adea976dc435b60e92de541"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"unresolved":false,"context_lines":[{"line_number":535,"context_line":"        # Update the port status if necessary"},{"line_number":536,"context_line":"        if not port[\u0027port\u0027].get(\u0027admin_state_up\u0027, True):"},{"line_number":537,"context_line":"            port[\u0027port\u0027][\u0027status\u0027] \u003d q_const.PORT_STATUS_DOWN"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        port \u003d super(OVSQuantumPluginV2, self).update_port(context, id, port)"},{"line_number":540,"context_line":"        if original_port[\u0027admin_state_up\u0027] !\u003d port[\u0027admin_state_up\u0027]:"},{"line_number":541,"context_line":"            binding \u003d ovs_db_v2.get_network_binding(None,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FjWw%3D","line":538,"updated":"2013-01-16 09:22:20.000000000","message":"Doesn\u0027t this cause race condition between agent update_device_up?","commit_id":"37b23d6bd7f938e48adea976dc435b60e92de541"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":535,"context_line":"        # Update the port status if necessary"},{"line_number":536,"context_line":"        if not port[\u0027port\u0027].get(\u0027admin_state_up\u0027, True):"},{"line_number":537,"context_line":"            port[\u0027port\u0027][\u0027status\u0027] \u003d q_const.PORT_STATUS_DOWN"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        port \u003d super(OVSQuantumPluginV2, self).update_port(context, id, port)"},{"line_number":540,"context_line":"        if original_port[\u0027admin_state_up\u0027] !\u003d port[\u0027admin_state_up\u0027]:"},{"line_number":541,"context_line":"            binding \u003d ovs_db_v2.get_network_binding(None,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Fhgk%3D","line":538,"in_reply_to":"AAAAM3%2F%2FjWw%3D","updated":"2013-01-17 12:59:46.000000000","message":"i will treat this in the same fashion as the linux bridge - just need to wait for that patch set to gets through","commit_id":"37b23d6bd7f938e48adea976dc435b60e92de541"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":120,"context_line":"        if port and port[\u0027status\u0027] !\u003d q_const.PORT_STATUS_ACTIVE:"},{"line_number":121,"context_line":"            ovs_db_v2.set_port_status(port[\u0027id\u0027], q_const.PORT_STATUS_ACTIVE)"},{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            LOG.debug(_(\"%s can not be found in database\"), device)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def tunnel_sync(self, rpc_context, **kwargs):"},{"line_number":126,"context_line":"        \"\"\"Update new tunnel."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FXmg%3D","line":123,"updated":"2013-01-25 05:35:57.000000000","message":"I don\u0027t believe this log message is correct in the case that  port and port[\u0027status\u0027] \u003d\u003d q_cost.PORT_STATUS_ACTIVE:","commit_id":"dfd77478aae03068778e76d837e2792dc8b6c678"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":120,"context_line":"        if port and port[\u0027status\u0027] !\u003d q_const.PORT_STATUS_ACTIVE:"},{"line_number":121,"context_line":"            ovs_db_v2.set_port_status(port[\u0027id\u0027], q_const.PORT_STATUS_ACTIVE)"},{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            LOG.debug(_(\"%s can not be found in database\"), device)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def tunnel_sync(self, rpc_context, **kwargs):"},{"line_number":126,"context_line":"        \"\"\"Update new tunnel."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FXdU%3D","line":123,"in_reply_to":"AAAAM3%2F%2FXmg%3D","updated":"2013-01-25 11:01:12.000000000","message":"Done","commit_id":"dfd77478aae03068778e76d837e2792dc8b6c678"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":537,"context_line":"        original_port \u003d super(OVSQuantumPluginV2, self).get_port(context,"},{"line_number":538,"context_line":"                                                                 id)"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        # Update the port status if necessary"},{"line_number":541,"context_line":"        if not port[\u0027port\u0027].get(\u0027admin_state_up\u0027, True):"},{"line_number":542,"context_line":"            port[\u0027port\u0027][\u0027status\u0027] \u003d q_const.PORT_STATUS_DOWN"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FXmc%3D","line":540,"updated":"2013-01-25 05:35:57.000000000","message":"You don\u0027t need ,True) since the API will raise if it cannot convert  this to a bool.. https://github.com/openstack/quantum/blob/master/quantum/api/v2/attributes.py#L416\n\ni.e): if not port[\u0027port\u0027].get(\u0027admin_state_up\u0027) should be fine. \n\nAlso, should this be set here? If one changes the admin status on a port  doesn\u0027t the agent then call \n\n self.plugin_rpc.update_device_up(self.context, port[\u0027id\u0027], self.agent_id) which you added in this patch?","commit_id":"dfd77478aae03068778e76d837e2792dc8b6c678"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":537,"context_line":"        original_port \u003d super(OVSQuantumPluginV2, self).get_port(context,"},{"line_number":538,"context_line":"                                                                 id)"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        # Update the port status if necessary"},{"line_number":541,"context_line":"        if not port[\u0027port\u0027].get(\u0027admin_state_up\u0027, True):"},{"line_number":542,"context_line":"            port[\u0027port\u0027][\u0027status\u0027] \u003d q_const.PORT_STATUS_DOWN"},{"line_number":543,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FXdY%3D","line":540,"in_reply_to":"AAAAM3%2F%2FXmc%3D","updated":"2013-01-25 11:01:12.000000000","message":"Good catch. This code should have been dropped. Sorry my bad.","commit_id":"dfd77478aae03068778e76d837e2792dc8b6c678"}],"quantum/tests/unit/cisco/test_network_plugin.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":38,"context_line":"        with mock.patch.object(network_db_v2,"},{"line_number":39,"context_line":"                               \u0027initialize\u0027, new\u003dnew_init):"},{"line_number":40,"context_line":"            super(CiscoNetworkPluginV2TestCase, self).setUp(self._plugin_name)"},{"line_number":41,"context_line":"        self.port_create_status \u003d \u0027DOWN\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _get_plugin_ref(self):"},{"line_number":44,"context_line":"        plugin_obj \u003d QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FW1w%3D","line":41,"updated":"2013-01-25 18:47:55.000000000","message":"Sorry, can you tell me why this line here is needed? I understand that the default status should be down but why here?","commit_id":"9dd553e12a07a6f5a8616f188f543be3d788cd01"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":38,"context_line":"        with mock.patch.object(network_db_v2,"},{"line_number":39,"context_line":"                               \u0027initialize\u0027, new\u003dnew_init):"},{"line_number":40,"context_line":"            super(CiscoNetworkPluginV2TestCase, self).setUp(self._plugin_name)"},{"line_number":41,"context_line":"        self.port_create_status \u003d \u0027DOWN\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _get_plugin_ref(self):"},{"line_number":44,"context_line":"        plugin_obj \u003d QuantumManager.get_plugin()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FWY4%3D","line":41,"in_reply_to":"AAAAM3%2F%2FW1w%3D","updated":"2013-01-26 05:22:10.000000000","message":"The cisco etwork plgin has an option of using multiple plugins. I these tests the OVS plugin is used. This requires that the test status ofr ports neds to be DOWN. \nHope that it make sense.","commit_id":"9dd553e12a07a6f5a8616f188f543be3d788cd01"}],"quantum/tests/unit/openvswitch/test_openvswitch_plugin.py":[{"author":{"_account_id":6282,"name":"Wu Wenxiang","email":"wu.wenxiang@algoblu.com","username":"wu-wenxiang"},"change_message_id":"ae3fc4bfbe4f3cf987c9f66b361bca84aa2f09ba","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            res \u003d self.deserialize(\u0027json\u0027, req.get_response(self.api))"},{"line_number":94,"context_line":"            self.assertEqual(res[\u0027port\u0027][\u0027admin_state_up\u0027],"},{"line_number":95,"context_line":"                             data[\u0027port\u0027][\u0027admin_state_up\u0027])"},{"line_number":96,"context_line":"            # The status is still down - this is updated via a RPC from thei"},{"line_number":97,"context_line":"            # agent"},{"line_number":98,"context_line":"            self.assertEqual(res[\u0027port\u0027][\u0027status\u0027], \u0027DOWN\u0027)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FjWc%3D","line":96,"updated":"2013-01-16 09:19:38.000000000","message":"thei? mis-spelling? :)","commit_id":"37b23d6bd7f938e48adea976dc435b60e92de541"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":93,"context_line":"            res \u003d self.deserialize(\u0027json\u0027, req.get_response(self.api))"},{"line_number":94,"context_line":"            self.assertEqual(res[\u0027port\u0027][\u0027admin_state_up\u0027],"},{"line_number":95,"context_line":"                             data[\u0027port\u0027][\u0027admin_state_up\u0027])"},{"line_number":96,"context_line":"            # The status is still down - this is updated via a RPC from thei"},{"line_number":97,"context_line":"            # agent"},{"line_number":98,"context_line":"            self.assertEqual(res[\u0027port\u0027][\u0027status\u0027], \u0027DOWN\u0027)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Fhgg%3D","line":96,"in_reply_to":"AAAAM3%2F%2FjWc%3D","updated":"2013-01-17 12:59:46.000000000","message":"Done","commit_id":"37b23d6bd7f938e48adea976dc435b60e92de541"}]}
