)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8e5ef0662900994e0e31a1688f012ddef290c13c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Omar Muhtaseb \u003comar.muhtaseb@exalt.ps\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-12-13 05:44:00 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Shut down the port on changing the admin-state to false"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On changing the port-admin-state to false, the port"},{"line_number":10,"context_line":"should go down."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"df87a7cf_accfd8ae","line":7,"updated":"2017-12-13 16:19:17.000000000","message":"please give this a prefix of OVS or ML2","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Omar Muhtaseb \u003comar.muhtaseb@exalt.ps\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-12-13 05:44:00 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Shut down the port on changing the admin-state to false"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On changing the port-admin-state to false, the port"},{"line_number":10,"context_line":"should go down."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"df87a7cf_70d995f2","line":7,"in_reply_to":"df87a7cf_40204cf8","updated":"2017-12-14 08:53:41.000000000","message":"Your patch is related only to ovs agent AFAIK so You should IMHO mention and it can be done with prefix, e.g.\n\n[OVS] Shut down the...\n\n(at least I think that it is what garyk wanted :))","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"59535849852b67312ddf2ee996eef464533a27d9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Omar Muhtaseb \u003comar.muhtaseb@exalt.ps\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-12-13 05:44:00 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Shut down the port on changing the admin-state to false"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On changing the port-admin-state to false, the port"},{"line_number":10,"context_line":"should go down."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"df87a7cf_40204cf8","line":7,"in_reply_to":"df87a7cf_accfd8ae","updated":"2017-12-13 19:42:32.000000000","message":"can you explain more please","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"aa7eb6ee3e17826d6985a562fd81a5f720026c85","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Omar Muhtaseb \u003comar.muhtaseb@exalt.ps\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-12-18 03:03:10 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[OVS] Shut down the port on changing the admin-state to false"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On changing the port-admin-state to false, the port"},{"line_number":10,"context_line":"should go down."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"df87a7cf_b7b340e9","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":5},"updated":"2017-12-18 08:26:17.000000000","message":"I\u0027m just curious but can You explain me why it is related only to OVS agent? Shouldn\u0027t we have same behavior also for Linuxbridge L2 agent?","commit_id":"aa54580218b414a7fd026e84093974b75326fb5d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Shut down the port on changing the admin-state to false"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On changing the port-admin-state to false, the port"},{"line_number":10,"context_line":"should go down."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ica46e39d8858f4235a8a1b9caeb696346a86f38b"},{"line_number":13,"context_line":"Closes-bug: #1672629"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"bf8cb3f7_11b26195","line":10,"updated":"2017-12-26 20:37:58.000000000","message":"From commit message I can understand that this change is related to all types of ports, never mind if it is router gateway port or port connected to instance or any other.\nBut in fullstack test which You propose here it looks like it is an issue only with router gateway ports.\nCan You explain what is it in fact?","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8821400bd0d7e4a64058292679bde4b6fa842e93","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Shut down the port on changing the admin-state to false"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On changing the port-admin-state to false, the port"},{"line_number":10,"context_line":"should go down."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ica46e39d8858f4235a8a1b9caeb696346a86f38b"},{"line_number":13,"context_line":"Closes-bug: #1672629"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9f91af0f_36b8dbc6","line":10,"updated":"2018-01-03 08:18:01.000000000","message":"I would say something like:\n\n\"the port should be marked as DOWN by L2 agent.\nIt was working properly in Linuxbridge agent but not in ovs.\nThis patch fixes it in ovs L2 agent.\"\n\nor something similar, what You think about it?","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"6b7e7c1bcfdc883f5b81aba468756a926918fa0f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Shut down the port on changing the admin-state to false"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On changing the port-admin-state to false, the port"},{"line_number":10,"context_line":"should go down."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ica46e39d8858f4235a8a1b9caeb696346a86f38b"},{"line_number":13,"context_line":"Closes-bug: #1672629"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9f91af0f_5904b015","line":10,"in_reply_to":"9f91af0f_36b8dbc6","updated":"2018-01-03 08:27:09.000000000","message":"Mmm, well I think I should add [OVS] at the beginning and things will be more clear. Will this be enough, or do you think I should clarify more in the message?","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b8d86db1bc7ca44c6fe532df427fbc8f73e2cbeb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Shut down the port on changing the admin-state to false"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On changing the port-admin-state to false, the port"},{"line_number":10,"context_line":"should go down."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ica46e39d8858f4235a8a1b9caeb696346a86f38b"},{"line_number":13,"context_line":"Closes-bug: #1672629"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9f91af0f_39d3ec3a","line":10,"in_reply_to":"9f91af0f_5904b015","updated":"2018-01-03 08:41:20.000000000","message":"It should be enough to add [OVS] at the beginning. Maybe also please change \"should go down\" to \"goes down\" also :)","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8e5ef0662900994e0e31a1688f012ddef290c13c","unresolved":false,"context_lines":[{"line_number":1433,"context_line":"                         \"putting on the dead VLAN\", vif_port.vif_id)"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"                self.port_dead(vif_port)"},{"line_number":1436,"context_line":"                self.plugin_rpc.update_device_down("},{"line_number":1437,"context_line":"                    self.context, port_id, self.agent_id,"},{"line_number":1438,"context_line":"                    self.conf.host)"},{"line_number":1439,"context_line":"                port_needs_binding \u003d False"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_4c72cc7e","line":1436,"updated":"2017-12-13 16:19:17.000000000","message":"i feel that you should have a unit test for this","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"1f0e77db68728eb6d08140a6ca5c223d46a3647c","unresolved":false,"context_lines":[{"line_number":1433,"context_line":"                         \"putting on the dead VLAN\", vif_port.vif_id)"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"                self.port_dead(vif_port)"},{"line_number":1436,"context_line":"                self.plugin_rpc.update_device_down("},{"line_number":1437,"context_line":"                    self.context, port_id, self.agent_id,"},{"line_number":1438,"context_line":"                    self.conf.host)"},{"line_number":1439,"context_line":"                port_needs_binding \u003d False"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_95d8cb7f","line":1436,"in_reply_to":"df87a7cf_001324ba","updated":"2017-12-14 07:24:41.000000000","message":"There is also a unit test already written for this function","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"59535849852b67312ddf2ee996eef464533a27d9","unresolved":false,"context_lines":[{"line_number":1433,"context_line":"                         \"putting on the dead VLAN\", vif_port.vif_id)"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"                self.port_dead(vif_port)"},{"line_number":1436,"context_line":"                self.plugin_rpc.update_device_down("},{"line_number":1437,"context_line":"                    self.context, port_id, self.agent_id,"},{"line_number":1438,"context_line":"                    self.conf.host)"},{"line_number":1439,"context_line":"                port_needs_binding \u003d False"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_001324ba","line":1436,"in_reply_to":"df87a7cf_4c72cc7e","updated":"2017-12-13 19:42:32.000000000","message":"Already added a fullstack test","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":1433,"context_line":"                         \"putting on the dead VLAN\", vif_port.vif_id)"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"                self.port_dead(vif_port)"},{"line_number":1436,"context_line":"                self.plugin_rpc.update_device_down("},{"line_number":1437,"context_line":"                    self.context, port_id, self.agent_id,"},{"line_number":1438,"context_line":"                    self.conf.host)"},{"line_number":1439,"context_line":"                port_needs_binding \u003d False"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_10f4c95a","line":1436,"in_reply_to":"df87a7cf_95d8cb7f","updated":"2017-12-14 08:53:41.000000000","message":"@Omar: but where is UT which tests this change?","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"}],"neutron/tests/fullstack/resources/client.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8e5ef0662900994e0e31a1688f012ddef290c13c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                        router\u003drouter_id, body\u003dbody)"},{"line_number":146,"context_line":"        return router_interface_info"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def add_router_interface_port_id(self, router_id, port_id):"},{"line_number":149,"context_line":"        body \u003d {\u0027port_id\u0027: port_id}"},{"line_number":150,"context_line":"        router_interface_info \u003d self.client.add_interface_router("},{"line_number":151,"context_line":"            router\u003drouter_id, body\u003dbody)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_ac44b81c","line":148,"updated":"2017-12-13 16:19:17.000000000","message":"how is this related to the code of setting the port status?","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"59535849852b67312ddf2ee996eef464533a27d9","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                        router\u003drouter_id, body\u003dbody)"},{"line_number":146,"context_line":"        return router_interface_info"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def add_router_interface_port_id(self, router_id, port_id):"},{"line_number":149,"context_line":"        body \u003d {\u0027port_id\u0027: port_id}"},{"line_number":150,"context_line":"        router_interface_info \u003d self.client.add_interface_router("},{"line_number":151,"context_line":"            router\u003drouter_id, body\u003dbody)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_e0eac0aa","line":148,"in_reply_to":"df87a7cf_ac44b81c","updated":"2017-12-13 19:42:32.000000000","message":"In the fullstack test, the port should be active then goes down. So, in order to make the port active it should be added to a router, and that what is done by this function.","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"}],"neutron/tests/fullstack/test_OVS_port_shut_down.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"aa7eb6ee3e17826d6985a562fd81a5f720026c85","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_17d78cf0","line":1,"updated":"2017-12-18 08:26:17.000000000","message":"Please don\u0027t use \"OVS\" in uppercase in file name","commit_id":"aa54580218b414a7fd026e84093974b75326fb5d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"aa7eb6ee3e17826d6985a562fd81a5f720026c85","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_b701006d","line":1,"range":{"start_line":1,"start_character":17,"end_line":1,"end_character":24},"updated":"2017-12-18 08:26:17.000000000","message":"is this copyright proper?","commit_id":"aa54580218b414a7fd026e84093974b75326fb5d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"aa7eb6ee3e17826d6985a562fd81a5f720026c85","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self.assertTrue(port[\u0027admin_state_up\u0027])"},{"line_number":95,"context_line":"        self.assertEqual(port[\u0027status\u0027], constants.PORT_STATUS_ACTIVE)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        # Shut down the port"},{"line_number":98,"context_line":"        self.safe_client.update_port("}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_d78fe420","line":95,"updated":"2017-12-18 08:26:17.000000000","message":"this check is not necessary as You already checking that in L90","commit_id":"aa54580218b414a7fd026e84093974b75326fb5d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"aa7eb6ee3e17826d6985a562fd81a5f720026c85","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":107,"context_line":"        # Check the final result"},{"line_number":108,"context_line":"        self.assertFalse(port[\u0027admin_state_up\u0027])"},{"line_number":109,"context_line":"        self.assertEqual(port[\u0027status\u0027], constants.PORT_STATUS_DOWN)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_57a3d49e","line":109,"updated":"2017-12-18 08:26:17.000000000","message":"same here","commit_id":"aa54580218b414a7fd026e84093974b75326fb5d"}],"neutron/tests/fullstack/test_port_shut_down.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"784aba980eeff6c94b407db38262a8768f7c7273","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        port \u003d self._create_port(tenant_id, network)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        # Attach the port to the router"},{"line_number":95,"context_line":"        self._add_port_to_router(tenant_id, router, port)"},{"line_number":96,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":97,"context_line":"        time.sleep(10)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_3211f054","line":95,"updated":"2017-12-13 09:35:40.000000000","message":"Do You need router for that? In commit message there is no info about that. Maybe creation of VM fixture would be enough?","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"30295da0e56fbbc98b5cb61f550efd11f0a05764","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        port \u003d self._create_port(tenant_id, network)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        # Attach the port to the router"},{"line_number":95,"context_line":"        self._add_port_to_router(tenant_id, router, port)"},{"line_number":96,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":97,"context_line":"        time.sleep(10)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_92aebc96","line":95,"in_reply_to":"df87a7cf_3211f054","updated":"2017-12-13 10:46:47.000000000","message":"Yes the router is necessary. The port status will be down till the port is attached to router.","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"784aba980eeff6c94b407db38262a8768f7c7273","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        # Attach the port to the router"},{"line_number":95,"context_line":"        self._add_port_to_router(tenant_id, router, port)"},{"line_number":96,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":97,"context_line":"        time.sleep(10)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_8f49b38c","line":97,"updated":"2017-12-13 09:35:40.000000000","message":"You can use \"wait_for_true\" with proper function as \"checker\". Sleep for constant amount of time is not good solution","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"30295da0e56fbbc98b5cb61f550efd11f0a05764","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        # Attach the port to the router"},{"line_number":95,"context_line":"        self._add_port_to_router(tenant_id, router, port)"},{"line_number":96,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":97,"context_line":"        time.sleep(10)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_b288a022","line":97,"in_reply_to":"df87a7cf_8f49b38c","updated":"2017-12-13 10:46:47.000000000","message":"I\u0027m on it","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"784aba980eeff6c94b407db38262a8768f7c7273","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        # Make sure the port is UP"},{"line_number":102,"context_line":"        if not port[\u0027admin_state_up\u0027] or port[\u0027status\u0027] \u003d\u003d \u0027DOWN\u0027:"},{"line_number":103,"context_line":"            self._update_port_status("},{"line_number":104,"context_line":"                port, True)"},{"line_number":105,"context_line":"        time.sleep(10)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_323a50cd","line":102,"updated":"2017-12-13 09:35:40.000000000","message":"why it can be not set to UP? IMO it should be done like that by agent, no?","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"30295da0e56fbbc98b5cb61f550efd11f0a05764","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        # Make sure the port is UP"},{"line_number":102,"context_line":"        if not port[\u0027admin_state_up\u0027] or port[\u0027status\u0027] \u003d\u003d \u0027DOWN\u0027:"},{"line_number":103,"context_line":"            self._update_port_status("},{"line_number":104,"context_line":"                port, True)"},{"line_number":105,"context_line":"        time.sleep(10)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_f29ce86b","line":102,"in_reply_to":"df87a7cf_323a50cd","updated":"2017-12-13 10:46:47.000000000","message":"Just to confirm the status","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"784aba980eeff6c94b407db38262a8768f7c7273","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        if not port[\u0027admin_state_up\u0027] or port[\u0027status\u0027] \u003d\u003d \u0027DOWN\u0027:"},{"line_number":103,"context_line":"            self._update_port_status("},{"line_number":104,"context_line":"                port, True)"},{"line_number":105,"context_line":"        time.sleep(10)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # Shut down the port"},{"line_number":108,"context_line":"        self._update_port_status(port, False)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_b24bc05d","line":105,"updated":"2017-12-13 09:35:40.000000000","message":"please don\u0027t use such sleep()","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"30295da0e56fbbc98b5cb61f550efd11f0a05764","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        if not port[\u0027admin_state_up\u0027] or port[\u0027status\u0027] \u003d\u003d \u0027DOWN\u0027:"},{"line_number":103,"context_line":"            self._update_port_status("},{"line_number":104,"context_line":"                port, True)"},{"line_number":105,"context_line":"        time.sleep(10)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # Shut down the port"},{"line_number":108,"context_line":"        self._update_port_status(port, False)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_5279142d","line":105,"in_reply_to":"df87a7cf_b24bc05d","updated":"2017-12-13 10:46:47.000000000","message":"got it","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"784aba980eeff6c94b407db38262a8768f7c7273","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        # Shut down the port"},{"line_number":108,"context_line":"        self._update_port_status(port, False)"},{"line_number":109,"context_line":"        time.sleep(10)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":112,"context_line":"        # Check the final result"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_f248685d","line":109,"updated":"2017-12-13 09:35:40.000000000","message":"ditto","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"784aba980eeff6c94b407db38262a8768f7c7273","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self._update_port_status(port, False)"},{"line_number":109,"context_line":"        time.sleep(10)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":112,"context_line":"        # Check the final result"},{"line_number":113,"context_line":"        self.assertFalse(port[\u0027admin_state_up\u0027])"},{"line_number":114,"context_line":"        self.assertEqual(port[\u0027status\u0027], \u0027DOWN\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_92731cb2","line":111,"updated":"2017-12-13 09:35:40.000000000","message":"You can use wait_for_true function to check it. Please check how other tests in fullstack are doing similar checks","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"30295da0e56fbbc98b5cb61f550efd11f0a05764","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self._update_port_status(port, False)"},{"line_number":109,"context_line":"        time.sleep(10)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":112,"context_line":"        # Check the final result"},{"line_number":113,"context_line":"        self.assertFalse(port[\u0027admin_state_up\u0027])"},{"line_number":114,"context_line":"        self.assertEqual(port[\u0027status\u0027], \u0027DOWN\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_7297783c","line":111,"in_reply_to":"df87a7cf_92731cb2","updated":"2017-12-13 10:46:47.000000000","message":"I\u0027m on it","commit_id":"672f995bdb678f1932fd2c8fa59bb9cc88476a92"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.tests.fullstack.resources import environment"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class BasePortTest(base.BaseFullStackTestCase):"},{"line_number":27,"context_line":"    of_interface \u003d None"},{"line_number":28,"context_line":"    arp_responder \u003d False"},{"line_number":29,"context_line":"    use_dhcp \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_5055711c","line":26,"updated":"2017-12-14 08:53:41.000000000","message":"what is the purpose of this base class? can\u0027t it be just done in Test class below?\nIt could be good IMHO if test would be defined also in this base class but e.g. You will have two classes which will use different l2_agent to test (linuxbridge and ovs)","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"e0af519d014e38c72c1232768e0ba79f6d4d4e43","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.tests.fullstack.resources import environment"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class BasePortTest(base.BaseFullStackTestCase):"},{"line_number":27,"context_line":"    of_interface \u003d None"},{"line_number":28,"context_line":"    arp_responder \u003d False"},{"line_number":29,"context_line":"    use_dhcp \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_f4903451","line":26,"in_reply_to":"df87a7cf_5055711c","updated":"2017-12-14 13:58:24.000000000","message":"But I think this feature is related to the OVS agent only. I\u0027m not sure that it\u0027s related to any other agent. So a linuxbridge agent won\u0027t work","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self.safe_client.create_subnet(tenant_id, network[\u0027id\u0027], cidr)"},{"line_number":53,"context_line":"        return network"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _create_router(self, tenant_id):"},{"line_number":56,"context_line":"        router \u003d self.safe_client.create_router("},{"line_number":57,"context_line":"            tenant_id, name\u003d\u0027test-name\u0027)"},{"line_number":58,"context_line":"        return router"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _create_port(self, tenant_id, network):"},{"line_number":61,"context_line":"        network_id \u003d network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_f04a8581","line":58,"range":{"start_line":55,"start_character":0,"end_line":58,"end_character":21},"updated":"2017-12-14 08:53:41.000000000","message":"I think that this helper method is not necessary, You can call client.create_router() directly in test","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            tenant_id, name\u003d\u0027test-name\u0027)"},{"line_number":58,"context_line":"        return router"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _create_port(self, tenant_id, network):"},{"line_number":61,"context_line":"        network_id \u003d network[\u0027id\u0027]"},{"line_number":62,"context_line":"        port \u003d self.safe_client.create_port("},{"line_number":63,"context_line":"            tenant_id, network_id\u003dnetwork_id)"},{"line_number":64,"context_line":"        return port"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _add_port_to_router(self, tenant_id, router, port):"},{"line_number":67,"context_line":"        port_id \u003d port[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_10504932","line":64,"range":{"start_line":60,"start_character":0,"end_line":64,"end_character":19},"updated":"2017-12-14 08:53:41.000000000","message":"same here","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return port"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _add_port_to_router(self, tenant_id, router, port):"},{"line_number":67,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":68,"context_line":"        router_id \u003d router[\u0027id\u0027]"},{"line_number":69,"context_line":"        return self.safe_client.add_router_interface_port_id("},{"line_number":70,"context_line":"            router_id\u003drouter_id, port_id\u003dport_id)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _update_port_status(self, port, admin_state_up):"},{"line_number":73,"context_line":"        port_id \u003d port[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_b044fd75","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":49},"updated":"2017-12-14 08:53:41.000000000","message":"same here","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return self.safe_client.add_router_interface_port_id("},{"line_number":70,"context_line":"            router_id\u003drouter_id, port_id\u003dport_id)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _update_port_status(self, port, admin_state_up):"},{"line_number":73,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":74,"context_line":"        return self.safe_client.update_port("},{"line_number":75,"context_line":"            port_id, admin_state_up\u003dadmin_state_up)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _is_port_active(self, port_id):"},{"line_number":78,"context_line":"        port \u003d self.client.show_port(port_id)[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_705e7546","line":75,"range":{"start_line":72,"start_character":0,"end_line":75,"end_character":51},"updated":"2017-12-14 08:53:41.000000000","message":"and here","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        self.assertTrue(port[\u0027admin_state_up\u0027])"},{"line_number":116,"context_line":"        self.assertEqual(port[\u0027status\u0027], constants.PORT_STATUS_ACTIVE)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # Shut down the port"},{"line_number":119,"context_line":"        self._update_port_status(port, False)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_b012bd61","line":116,"updated":"2017-12-14 08:53:41.000000000","message":"this is already checked in line 111 so it is not necessary here","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"44aad57729b3df33fedc3f2c034a85bf72edc055","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":127,"context_line":"        # Check the final result"},{"line_number":128,"context_line":"        self.assertFalse(port[\u0027admin_state_up\u0027])"},{"line_number":129,"context_line":"        self.assertEqual(port[\u0027status\u0027], constants.PORT_STATUS_DOWN)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df87a7cf_3006ad22","line":129,"updated":"2017-12-14 08:53:41.000000000","message":"this is already checked in line 124 so it is not necessary here","commit_id":"63442d20ad45fa543d141a7ffc886f8f44ba3c0b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1e8967d64aecb754f971ba8a5483bd6528c9c111","unresolved":false,"context_lines":[{"line_number":26,"context_line":"load_tests \u003d testlib_api.module_load_tests"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class BasePortShutDownTest(base.BaseFullStackTestCase):"},{"line_number":30,"context_line":"    # This is a test to confirm the port status"},{"line_number":31,"context_line":"    # on shutting down the port administratively."},{"line_number":32,"context_line":"    # The port status should no longer be ACTIVE"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf8cb3f7_5246bc23","line":29,"updated":"2017-12-24 22:11:54.000000000","message":"I don\u0027t think that this base class is necessary here. You are using it only once later and I don\u0027t see a point to use it somewhere else in future also.","commit_id":"97dbad6cf390ca5a3486cf0d48ad92b15ef117f7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1e8967d64aecb754f971ba8a5483bd6528c9c111","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    scenarios \u003d ["},{"line_number":115,"context_line":"        (constants.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":116,"context_line":"        {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":117,"context_line":"         \u0027firewall_driver\u0027: \u0027iptables\u0027}),"},{"line_number":118,"context_line":"        (constants.AGENT_TYPE_OVS,"},{"line_number":119,"context_line":"        {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_OVS,"},{"line_number":120,"context_line":"         \u0027firewall_driver\u0027: \u0027noop\u0027})"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf8cb3f7_f254b0cc","line":117,"updated":"2017-12-24 22:11:54.000000000","message":"Why You need this firewall driver here? and why for ovs L2 agent scenario it is \"noop\" driver?","commit_id":"97dbad6cf390ca5a3486cf0d48ad92b15ef117f7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1e8967d64aecb754f971ba8a5483bd6528c9c111","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    ]"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_port_shut_down(self):"},{"line_number":124,"context_line":"        self._test_port_shut_down()"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf8cb3f7_125034d4","line":124,"updated":"2017-12-24 22:11:54.000000000","message":"IMHO this is not necessary. It would be enough to rename _test_port_shut_down to test_port_shut_down()","commit_id":"97dbad6cf390ca5a3486cf0d48ad92b15ef117f7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":25,"context_line":"load_tests \u003d testlib_api.module_load_tests"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class PortShutDownTest_OVS_LB(base.BaseFullStackTestCase):"},{"line_number":29,"context_line":"    # This is a test to confirm the port status"},{"line_number":30,"context_line":"    # on shutting down the port administratively."},{"line_number":31,"context_line":"    # The port status should no longer be ACTIVE"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_1156e15d","line":28,"range":{"start_line":28,"start_character":22,"end_line":28,"end_character":29},"updated":"2017-12-26 20:37:58.000000000","message":"nit: IMHO it\u0027s not necessary to have agent types in name of test class - it is specified as scenario so will be in putted in test results","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":25,"context_line":"load_tests \u003d testlib_api.module_load_tests"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class PortShutDownTest_OVS_LB(base.BaseFullStackTestCase):"},{"line_number":29,"context_line":"    # This is a test to confirm the port status"},{"line_number":30,"context_line":"    # on shutting down the port administratively."},{"line_number":31,"context_line":"    # The port status should no longer be ACTIVE"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_20906d4e","line":28,"range":{"start_line":28,"start_character":22,"end_line":28,"end_character":29},"in_reply_to":"bf8cb3f7_1156e15d","updated":"2017-12-27 06:51:21.000000000","message":"This is just an indication for the test agents, no more.","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            # agent types present on machines."},{"line_number":51,"context_line":"            environment.HostDescription("},{"line_number":52,"context_line":"                l2_agent_type\u003dself.l2_agent_type,"},{"line_number":53,"context_line":"                dhcp_agent\u003dself.use_dhcp,"},{"line_number":54,"context_line":"            )"},{"line_number":55,"context_line":"            for _ in range(self.num_hosts)]"},{"line_number":56,"context_line":"        env \u003d environment.Environment("}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_715f2d72","line":53,"updated":"2017-12-26 20:37:58.000000000","message":"do we need to use DHCP agent here? It is one more \"something\" which can fail in test :)","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            # agent types present on machines."},{"line_number":51,"context_line":"            environment.HostDescription("},{"line_number":52,"context_line":"                l2_agent_type\u003dself.l2_agent_type,"},{"line_number":53,"context_line":"                dhcp_agent\u003dself.use_dhcp,"},{"line_number":54,"context_line":"            )"},{"line_number":55,"context_line":"            for _ in range(self.num_hosts)]"},{"line_number":56,"context_line":"        env \u003d environment.Environment("}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_60875511","line":53,"in_reply_to":"bf8cb3f7_715f2d72","updated":"2017-12-27 06:51:21.000000000","message":"Yes we do. BTW the test is no more failing, I\u0027ve changed the whole scenario of the test and it\u0027s now working for both agents.","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _port_created(self):"},{"line_number":70,"context_line":"        ports \u003d self.client.list_ports()[\u0027ports\u0027]"},{"line_number":71,"context_line":"        return ports !\u003d []"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _is_port_active(self, port_id):"},{"line_number":74,"context_line":"        port \u003d self.client.show_port(port_id)[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_f1dfbdd3","line":71,"updated":"2017-12-26 20:37:58.000000000","message":"I\u0027m not sure that You can assume that there will be always only one port in tested environment. If there will be any other port (e.g. from DHCP agent) then it will not check what You really want","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _port_created(self):"},{"line_number":70,"context_line":"        ports \u003d self.client.list_ports()[\u0027ports\u0027]"},{"line_number":71,"context_line":"        return ports !\u003d []"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _is_port_active(self, port_id):"},{"line_number":74,"context_line":"        port \u003d self.client.show_port(port_id)[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_609c355d","line":71,"in_reply_to":"bf8cb3f7_f1dfbdd3","updated":"2017-12-27 06:51:21.000000000","message":"The way that the scenario goes it will NOT have another port except for the DHCP port that I\u0027m counting on.","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Check if the gateway port is created"},{"line_number":87,"context_line":"        port_created \u003d functools.partial("},{"line_number":88,"context_line":"            self._port_created)"},{"line_number":89,"context_line":"        utils.wait_until_true("},{"line_number":90,"context_line":"            port_created)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_b1ca9517","line":88,"updated":"2017-12-26 20:37:58.000000000","message":"this can be probably in line above","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Check if the gateway port is created"},{"line_number":87,"context_line":"        port_created \u003d functools.partial("},{"line_number":88,"context_line":"            self._port_created)"},{"line_number":89,"context_line":"        utils.wait_until_true("},{"line_number":90,"context_line":"            port_created)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_a0bb1dc2","line":88,"in_reply_to":"bf8cb3f7_b1ca9517","updated":"2017-12-27 06:51:21.000000000","message":"I\u0027m on it","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        port_created \u003d functools.partial("},{"line_number":88,"context_line":"            self._port_created)"},{"line_number":89,"context_line":"        utils.wait_until_true("},{"line_number":90,"context_line":"            port_created)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Get the gateway port"},{"line_number":93,"context_line":"        port \u003d self.client.list_ports()[\u0027ports\u0027][0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_51d1c9cc","line":90,"updated":"2017-12-26 20:37:58.000000000","message":"two things:\n1. it can be moved to line above,\n2. why You can\u0027t just pass here \"self._port_created\"?","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            port_created)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Get the gateway port"},{"line_number":93,"context_line":"        port \u003d self.client.list_ports()[\u0027ports\u0027][0]"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":96,"context_line":"        port_status_active_predicate \u003d functools.partial("}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_91f0b169","line":93,"updated":"2017-12-26 20:37:58.000000000","message":"what about DHCP port for example? see my comment in L71","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            port_created)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Get the gateway port"},{"line_number":93,"context_line":"        port \u003d self.client.list_ports()[\u0027ports\u0027][0]"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":96,"context_line":"        port_status_active_predicate \u003d functools.partial("}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_a009dd95","line":93,"in_reply_to":"bf8cb3f7_91f0b169","updated":"2017-12-27 06:51:21.000000000","message":"That\u0027s the port that I\u0027m counting on. I didn\u0027t create any port so that the env would have only one port, which is the DHCP port.","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        port_status_active_predicate \u003d functools.partial("},{"line_number":97,"context_line":"            self._is_port_active, port[\u0027id\u0027])"},{"line_number":98,"context_line":"        utils.wait_until_true("},{"line_number":99,"context_line":"            port_status_active_predicate)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_51ea2975","line":99,"updated":"2017-12-26 20:37:58.000000000","message":"it can be moved to line above probably","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        port_status_active_predicate \u003d functools.partial("},{"line_number":97,"context_line":"            self._is_port_active, port[\u0027id\u0027])"},{"line_number":98,"context_line":"        utils.wait_until_true("},{"line_number":99,"context_line":"            port_status_active_predicate)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_6003d574","line":99,"in_reply_to":"bf8cb3f7_51ea2975","updated":"2017-12-27 06:51:21.000000000","message":"I\u0027m on it","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        # Shut down the port"},{"line_number":104,"context_line":"        self.safe_client.update_port("},{"line_number":105,"context_line":"            port[\u0027id\u0027], admin_state_up\u003dFalse)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        port_status_down_predicate \u003d functools.partial("},{"line_number":108,"context_line":"            self._is_port_down, port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_71eded89","line":105,"updated":"2017-12-26 20:37:58.000000000","message":"ditto","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        port_status_down_predicate \u003d functools.partial("},{"line_number":108,"context_line":"            self._is_port_down, port[\u0027id\u0027])"},{"line_number":109,"context_line":"        utils.wait_until_true("},{"line_number":110,"context_line":"            port_status_down_predicate)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_1104a149","line":110,"updated":"2017-12-26 20:37:58.000000000","message":"ditto","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8821400bd0d7e4a64058292679bde4b6fa842e93","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def setUp(self):"},{"line_number":47,"context_line":"        host_descriptions \u003d ["},{"line_number":48,"context_line":"            # There\u0027s value in enabling L3 agents registration when l2pop"},{"line_number":49,"context_line":"            # is enabled, because l2pop code makes assumptions about the"},{"line_number":50,"context_line":"            # agent types present on machines."},{"line_number":51,"context_line":"            environment.HostDescription("},{"line_number":52,"context_line":"                l2_agent_type\u003dself.l2_agent_type,"},{"line_number":53,"context_line":"                dhcp_agent\u003dself.use_dhcp,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_36dd3b14","line":50,"range":{"start_line":48,"start_character":12,"end_line":50,"end_character":46},"updated":"2018-01-03 08:18:01.000000000","message":"why is this comment here? There is no any info about L3 agent in Host description","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"1264e2b6240b51000e161a8437f52b67755e1012","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def setUp(self):"},{"line_number":47,"context_line":"        host_descriptions \u003d ["},{"line_number":48,"context_line":"            # There\u0027s value in enabling L3 agents registration when l2pop"},{"line_number":49,"context_line":"            # is enabled, because l2pop code makes assumptions about the"},{"line_number":50,"context_line":"            # agent types present on machines."},{"line_number":51,"context_line":"            environment.HostDescription("},{"line_number":52,"context_line":"                l2_agent_type\u003dself.l2_agent_type,"},{"line_number":53,"context_line":"                dhcp_agent\u003dself.use_dhcp,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_b9037c42","line":50,"range":{"start_line":48,"start_character":12,"end_line":50,"end_character":46},"in_reply_to":"9f91af0f_36dd3b14","updated":"2018-01-03 09:07:22.000000000","message":"I\u0027ll remove it","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8821400bd0d7e4a64058292679bde4b6fa842e93","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _create_external_network_and_subnet(self, tenant_id):"},{"line_number":64,"context_line":"        network \u003d self.safe_client.create_network("},{"line_number":65,"context_line":"            tenant_id, name\u003d\u0027test-public\u0027, external\u003dTrue, network_type\u003d\u0027local\u0027)"},{"line_number":66,"context_line":"        self.safe_client.create_subnet(tenant_id, network[\u0027id\u0027],"},{"line_number":67,"context_line":"                                       \u0027240.0.0.0/8\u0027, gateway_ip\u003d\u0027240.0.0.2\u0027)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_362bfbeb","line":65,"updated":"2018-01-03 08:18:01.000000000","message":"why it is necessary to have external network? IIUC it should work in same way for all ports in all network types so it should be fine also in tenant network, right?","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"1264e2b6240b51000e161a8437f52b67755e1012","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _create_external_network_and_subnet(self, tenant_id):"},{"line_number":64,"context_line":"        network \u003d self.safe_client.create_network("},{"line_number":65,"context_line":"            tenant_id, name\u003d\u0027test-public\u0027, external\u003dTrue, network_type\u003d\u0027local\u0027)"},{"line_number":66,"context_line":"        self.safe_client.create_subnet(tenant_id, network[\u0027id\u0027],"},{"line_number":67,"context_line":"                                       \u0027240.0.0.0/8\u0027, gateway_ip\u003d\u0027240.0.0.2\u0027)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_7992d4f8","line":65,"in_reply_to":"9f91af0f_362bfbeb","updated":"2018-01-03 09:07:22.000000000","message":"I\u0027m creating an external network since it will create a port implicitly so I don\u0027t have to create one. And yes this should work for all ports","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ec1ac5c0786e0bc2d36871da98eaaebed7d86b7c","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _create_external_network_and_subnet(self, tenant_id):"},{"line_number":64,"context_line":"        network \u003d self.safe_client.create_network("},{"line_number":65,"context_line":"            tenant_id, name\u003d\u0027test-public\u0027, external\u003dTrue, network_type\u003d\u0027local\u0027)"},{"line_number":66,"context_line":"        self.safe_client.create_subnet(tenant_id, network[\u0027id\u0027],"},{"line_number":67,"context_line":"                                       \u0027240.0.0.0/8\u0027, gateway_ip\u003d\u0027240.0.0.2\u0027)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_c0d761bf","line":65,"in_reply_to":"9f91af0f_7992d4f8","updated":"2018-01-03 13:21:13.000000000","message":"So at least some comment should be added to explain that. Otherwise it is IMO confusing for other people","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8821400bd0d7e4a64058292679bde4b6fa842e93","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.safe_client.create_subnet(tenant_id, network[\u0027id\u0027],"},{"line_number":67,"context_line":"                                       \u0027240.0.0.0/8\u0027, gateway_ip\u003d\u0027240.0.0.2\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _port_created(self):"},{"line_number":70,"context_line":"        ports \u003d self.client.list_ports()[\u0027ports\u0027]"},{"line_number":71,"context_line":"        return ports !\u003d []"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_b6038b42","line":69,"updated":"2018-01-03 08:18:01.000000000","message":"if You want to rely only on this dhcp port, please maybe name this method as \"_dhcp_port_created\" and maybe pass network_id as an argument to it. You can also filter listed ports to get only dhcp ports from server.","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"1264e2b6240b51000e161a8437f52b67755e1012","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.safe_client.create_subnet(tenant_id, network[\u0027id\u0027],"},{"line_number":67,"context_line":"                                       \u0027240.0.0.0/8\u0027, gateway_ip\u003d\u0027240.0.0.2\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _port_created(self):"},{"line_number":70,"context_line":"        ports \u003d self.client.list_ports()[\u0027ports\u0027]"},{"line_number":71,"context_line":"        return ports !\u003d []"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_194b8884","line":69,"in_reply_to":"9f91af0f_b6038b42","updated":"2018-01-03 09:07:22.000000000","message":"On it","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8821400bd0d7e4a64058292679bde4b6fa842e93","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._create_external_network_and_subnet(tenant_id)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Check if the gateway/DHCP port is created"},{"line_number":87,"context_line":"        port_created \u003d functools.partial(self._port_created)"},{"line_number":88,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # Get the gateway/DHCP port"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_b6886bc6","line":87,"updated":"2018-01-03 08:18:01.000000000","message":"in such case this functools.partial() is not necessary. You can pass self._port_created directly to utils.wait_until_true()","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"1264e2b6240b51000e161a8437f52b67755e1012","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self._create_external_network_and_subnet(tenant_id)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Check if the gateway/DHCP port is created"},{"line_number":87,"context_line":"        port_created \u003d functools.partial(self._port_created)"},{"line_number":88,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # Get the gateway/DHCP port"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_997d58b3","line":87,"in_reply_to":"9f91af0f_b6886bc6","updated":"2018-01-03 09:07:22.000000000","message":"I\u0027ll check with that","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8821400bd0d7e4a64058292679bde4b6fa842e93","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # Get the gateway/DHCP port"},{"line_number":91,"context_line":"        port \u003d self.client.list_ports()[\u0027ports\u0027][0]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":94,"context_line":"        port_status_active_predicate \u003d functools.partial("}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_f6b7d385","line":91,"updated":"2018-01-03 08:18:01.000000000","message":"it is not obvious that You will get dhcp port here - it\u0027s kind of Your assumption but IMHO it shouldn\u0027t be like that.\nIMHO You should pass id of network from which You want to get port and filter it also to get only dhcp ports - than it would be much more clear for other people who will read this code in future","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"1264e2b6240b51000e161a8437f52b67755e1012","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # Get the gateway/DHCP port"},{"line_number":91,"context_line":"        port \u003d self.client.list_ports()[\u0027ports\u0027][0]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":94,"context_line":"        port_status_active_predicate \u003d functools.partial("}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_79597458","line":91,"in_reply_to":"9f91af0f_f6b7d385","updated":"2018-01-03 09:07:22.000000000","message":"ok, I\u0027m on it","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8821400bd0d7e4a64058292679bde4b6fa842e93","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            self._is_port_active, port[\u0027id\u0027])"},{"line_number":96,"context_line":"        utils.wait_until_true(port_status_active_predicate)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # Shut down the port"},{"line_number":101,"context_line":"        self.safe_client.update_port(port[\u0027id\u0027], admin_state_up\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_d6ae4f2d","line":98,"updated":"2018-01-03 08:18:01.000000000","message":"why this is necessary?","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"1264e2b6240b51000e161a8437f52b67755e1012","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            self._is_port_active, port[\u0027id\u0027])"},{"line_number":96,"context_line":"        utils.wait_until_true(port_status_active_predicate)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        port \u003d self.client.show_port(port[\u0027id\u0027])[\u0027port\u0027]"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # Shut down the port"},{"line_number":101,"context_line":"        self.safe_client.update_port(port[\u0027id\u0027], admin_state_up\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_5936f005","line":98,"in_reply_to":"9f91af0f_d6ae4f2d","updated":"2018-01-03 09:07:22.000000000","message":"So I can get the latest update for the port.","commit_id":"7d6efe106673acd0e03b77332f975d3959408018"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ec1ac5c0786e0bc2d36871da98eaaebed7d86b7c","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _dhcp_port_created(self, network_id):"},{"line_number":68,"context_line":"        ports \u003d self.client.list_ports(network_id\u003dnetwork_id,"},{"line_number":69,"context_line":"                                       device_owner\u003d\"network:dhcp\")[\u0027ports\u0027]"},{"line_number":70,"context_line":"        return ports !\u003d []"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _is_port_active(self, port_id):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9f91af0f_20f08d67","line":69,"range":{"start_line":69,"start_character":52,"end_line":69,"end_character":66},"updated":"2018-01-03 13:21:13.000000000","message":"there is constant for that in https://github.com/openstack/neutron-lib/blob/master/neutron_lib/constants.py#L55\nPlease reuse it here","commit_id":"f9a3a83b025da297711303cf0746bedacc0ca662"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"6f97b4fc034de42883605a685ca1a5bb53e5323a","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _dhcp_port_created(self, network_id):"},{"line_number":68,"context_line":"        ports \u003d self.client.list_ports(network_id\u003dnetwork_id,"},{"line_number":69,"context_line":"                                       device_owner\u003d\"network:dhcp\")[\u0027ports\u0027]"},{"line_number":70,"context_line":"        return ports !\u003d []"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _is_port_active(self, port_id):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9f91af0f_da63c9db","line":69,"range":{"start_line":69,"start_character":52,"end_line":69,"end_character":66},"in_reply_to":"9f91af0f_20f08d67","updated":"2018-01-03 14:58:39.000000000","message":"done","commit_id":"f9a3a83b025da297711303cf0746bedacc0ca662"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ec1ac5c0786e0bc2d36871da98eaaebed7d86b7c","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # Get the gateway/DHCP port"},{"line_number":91,"context_line":"        port \u003d self.client.list_ports(network_id\u003dnetwork[\u0027id\u0027])[\u0027ports\u0027][0]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":94,"context_line":"        port_status_active_predicate \u003d functools.partial("}],"source_content_type":"text/x-python","patch_set":16,"id":"9f91af0f_c000c137","line":91,"updated":"2018-01-03 13:21:13.000000000","message":"I would suggest You to make helper method called e.g. \"get_network_dhcp_ports(network_id)\" and use it here and also in L68","commit_id":"f9a3a83b025da297711303cf0746bedacc0ca662"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"6f97b4fc034de42883605a685ca1a5bb53e5323a","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        # Get the gateway/DHCP port"},{"line_number":91,"context_line":"        port \u003d self.client.list_ports(network_id\u003dnetwork[\u0027id\u0027])[\u0027ports\u0027][0]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        # Wait till the changes are reflected to DB"},{"line_number":94,"context_line":"        port_status_active_predicate \u003d functools.partial("}],"source_content_type":"text/x-python","patch_set":16,"id":"9f91af0f_9a9b01c8","line":91,"in_reply_to":"9f91af0f_c000c137","updated":"2018-01-03 14:58:39.000000000","message":"done","commit_id":"f9a3a83b025da297711303cf0746bedacc0ca662"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f70322a0e3116ab8fe1b5df35849b7f2920dd00a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return ports !\u003d []"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _get_network_dhcp_ports(self, network_id):"},{"line_number":72,"context_line":"        return self.client.list_ports(network_id\u003dnetwork_id)[\u0027ports\u0027]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _is_port_active(self, port_id):"},{"line_number":75,"context_line":"        port \u003d self.client.show_port(port_id)[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_8c38ab3d","line":72,"updated":"2018-01-03 20:00:53.000000000","message":"why You removed this filter with specified \"device_owner\" from this function?","commit_id":"1f10711de77a99e80b64a089b9dea5eb7c716c2f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70fa50f6a4d98ff2f9fe1d7b6e303b4a7f73d6ba","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return ports !\u003d []"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _get_network_dhcp_ports(self, network_id):"},{"line_number":72,"context_line":"        return self.client.list_ports(network_id\u003dnetwork_id)[\u0027ports\u0027]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _is_port_active(self, port_id):"},{"line_number":75,"context_line":"        port \u003d self.client.show_port(port_id)[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_afb8f729","line":72,"in_reply_to":"9f91af0f_60468b24","updated":"2018-01-04 08:23:14.000000000","message":"thx","commit_id":"1f10711de77a99e80b64a089b9dea5eb7c716c2f"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"c39e582dee3d513dc3c6d94ddd6c135015d341f9","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return ports !\u003d []"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _get_network_dhcp_ports(self, network_id):"},{"line_number":72,"context_line":"        return self.client.list_ports(network_id\u003dnetwork_id)[\u0027ports\u0027]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _is_port_active(self, port_id):"},{"line_number":75,"context_line":"        port \u003d self.client.show_port(port_id)[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_60468b24","line":72,"in_reply_to":"9f91af0f_8c38ab3d","updated":"2018-01-03 20:44:33.000000000","message":"just a slip, I\u0027ve put it back","commit_id":"1f10711de77a99e80b64a089b9dea5eb7c716c2f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f70322a0e3116ab8fe1b5df35849b7f2920dd00a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        network \u003d self._create_external_network_and_subnet(tenant_id)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Check if the gateway/DHCP port is created"},{"line_number":88,"context_line":"        port_created \u003d functools.partial(self._get_network_dhcp_ports,"},{"line_number":89,"context_line":"                                         network[\u0027id\u0027])"},{"line_number":90,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_ac148fa1","line":88,"updated":"2018-01-03 20:00:53.000000000","message":"why You are not using here _dhcp_port_created() method?","commit_id":"1f10711de77a99e80b64a089b9dea5eb7c716c2f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70fa50f6a4d98ff2f9fe1d7b6e303b4a7f73d6ba","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        network \u003d self._create_external_network_and_subnet(tenant_id)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Check if the gateway/DHCP port is created"},{"line_number":88,"context_line":"        port_created \u003d functools.partial(self._get_network_dhcp_ports,"},{"line_number":89,"context_line":"                                         network[\u0027id\u0027])"},{"line_number":90,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_8f873362","line":88,"in_reply_to":"9f91af0f_606f6b92","updated":"2018-01-04 08:23:14.000000000","message":"Now it is fine as You removed _dhcp_port_created() compltetly :)","commit_id":"1f10711de77a99e80b64a089b9dea5eb7c716c2f"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"c39e582dee3d513dc3c6d94ddd6c135015d341f9","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        network \u003d self._create_external_network_and_subnet(tenant_id)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Check if the gateway/DHCP port is created"},{"line_number":88,"context_line":"        port_created \u003d functools.partial(self._get_network_dhcp_ports,"},{"line_number":89,"context_line":"                                         network[\u0027id\u0027])"},{"line_number":90,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_606f6b92","line":88,"in_reply_to":"9f91af0f_ac148fa1","updated":"2018-01-03 20:44:33.000000000","message":"Because I can do the same with the get_network_dhcp_ports method, so I don\u0027t want another one.","commit_id":"1f10711de77a99e80b64a089b9dea5eb7c716c2f"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"25ec105c436223f30992fb1f02df58a5b858fdc0","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    num_hosts \u003d 1"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    scenarios \u003d ["},{"line_number":40,"context_line":"        (constants.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":41,"context_line":"         {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_LINUXBRIDGE}),"},{"line_number":42,"context_line":"        (constants.AGENT_TYPE_OVS,"},{"line_number":43,"context_line":"         {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_OVS})"}],"source_content_type":"text/x-python","patch_set":18,"id":"9f91af0f_09c1e380","line":40,"range":{"start_line":40,"start_character":19,"end_line":40,"end_character":41},"updated":"2018-01-04 06:30:39.000000000","message":"Is it the change related to linux bridge agent?","commit_id":"81009b24f2c1771dc5bbd75f0131a6008c639af2"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"efa80bef44947ed9392cd0276ed45a4689ac3761","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    num_hosts \u003d 1"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    scenarios \u003d ["},{"line_number":40,"context_line":"        (constants.AGENT_TYPE_LINUXBRIDGE,"},{"line_number":41,"context_line":"         {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_LINUXBRIDGE}),"},{"line_number":42,"context_line":"        (constants.AGENT_TYPE_OVS,"},{"line_number":43,"context_line":"         {\u0027l2_agent_type\u0027: constants.AGENT_TYPE_OVS})"}],"source_content_type":"text/x-python","patch_set":18,"id":"9f91af0f_e9cb5f50","line":40,"range":{"start_line":40,"start_character":19,"end_line":40,"end_character":41},"in_reply_to":"9f91af0f_09c1e380","updated":"2018-01-04 06:39:24.000000000","message":"The change itself is NOT related to the LINUX_BRIDGE agent, but the behavior of the OVS and Linux_Bridge agents should be the same when it comes to shutting down the ports.","commit_id":"81009b24f2c1771dc5bbd75f0131a6008c639af2"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"25ec105c436223f30992fb1f02df58a5b858fdc0","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # Create an external network"},{"line_number":82,"context_line":"        network \u003d self._create_external_network_and_subnet(tenant_id)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        # Check if the gateway/DHCP port is created"},{"line_number":85,"context_line":"        port_created \u003d functools.partial(self._get_network_dhcp_ports,"},{"line_number":86,"context_line":"                                         network[\u0027id\u0027])"},{"line_number":87,"context_line":"        utils.wait_until_true(port_created)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9f91af0f_69050fc2","line":84,"range":{"start_line":84,"start_character":23,"end_line":84,"end_character":31},"updated":"2018-01-04 06:30:39.000000000","message":"Not see the logic here. Please remove.","commit_id":"81009b24f2c1771dc5bbd75f0131a6008c639af2"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"efa80bef44947ed9392cd0276ed45a4689ac3761","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # Create an external network"},{"line_number":82,"context_line":"        network \u003d self._create_external_network_and_subnet(tenant_id)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        # Check if the gateway/DHCP port is created"},{"line_number":85,"context_line":"        port_created \u003d functools.partial(self._get_network_dhcp_ports,"},{"line_number":86,"context_line":"                                         network[\u0027id\u0027])"},{"line_number":87,"context_line":"        utils.wait_until_true(port_created)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9f91af0f_89e093ce","line":84,"range":{"start_line":84,"start_character":23,"end_line":84,"end_character":31},"in_reply_to":"9f91af0f_69050fc2","updated":"2018-01-04 06:39:24.000000000","message":"I\u0027m on it","commit_id":"81009b24f2c1771dc5bbd75f0131a6008c639af2"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"25ec105c436223f30992fb1f02df58a5b858fdc0","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                                         network[\u0027id\u0027])"},{"line_number":87,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        # Get the gateway/DHCP port"},{"line_number":90,"context_line":"        port \u003d self._get_network_dhcp_ports(network[\u0027id\u0027])[0]"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Wait till the changes are reflected to DB"}],"source_content_type":"text/x-python","patch_set":18,"id":"9f91af0f_295aa7f2","line":89,"range":{"start_line":89,"start_character":18,"end_line":89,"end_character":26},"updated":"2018-01-04 06:30:39.000000000","message":"ditto","commit_id":"81009b24f2c1771dc5bbd75f0131a6008c639af2"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"efa80bef44947ed9392cd0276ed45a4689ac3761","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                                         network[\u0027id\u0027])"},{"line_number":87,"context_line":"        utils.wait_until_true(port_created)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        # Get the gateway/DHCP port"},{"line_number":90,"context_line":"        port \u003d self._get_network_dhcp_ports(network[\u0027id\u0027])[0]"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Wait till the changes are reflected to DB"}],"source_content_type":"text/x-python","patch_set":18,"id":"9f91af0f_29e707e7","line":89,"range":{"start_line":89,"start_character":18,"end_line":89,"end_character":26},"in_reply_to":"9f91af0f_295aa7f2","updated":"2018-01-04 06:39:24.000000000","message":"I\u0027m on it","commit_id":"81009b24f2c1771dc5bbd75f0131a6008c639af2"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cf921f974d29ad8b2859b4c6673a54f78507e66a","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _get_network_dhcp_ports(self, network_id):"},{"line_number":71,"context_line":"        return self.client.list_ports(network_id\u003dnetwork_id,"},{"line_number":72,"context_line":"                          device_owner\u003dconstants.DEVICE_OWNER_DHCP)[\u0027ports\u0027]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _is_port_active(self, port_id):"},{"line_number":75,"context_line":"        port \u003d self.client.show_port(port_id)[\u0027port\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f91af0f_e4cee62b","line":72,"updated":"2018-01-08 09:21:56.000000000","message":"nit: indentation","commit_id":"ce01b70ef86e723bc343819ceaf6aa7d96829c0c"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def test_treat_vif_port_shut_down_port(self):"},{"line_number":972,"context_line":"        details \u003d mock.MagicMock()"},{"line_number":973,"context_line":"        vif_port \u003d type(\u0027vif_port\u0027, (object,), {\"vif_id\": \"12\","},{"line_number":974,"context_line":"                    \"iface-id\": \"407a79e0-e0be-4b7d-92a6-513b2161011b\","},{"line_number":975,"context_line":"                    \"vif_mac\": \"fa:16:3e:68:46:7b\","},{"line_number":976,"context_line":"                    \"port_name\": \"qr-407a79e0-e0\","}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_b198551b","line":973,"range":{"start_line":973,"start_character":48,"end_line":973,"end_character":62},"updated":"2017-12-26 20:37:58.000000000","message":"for better readability I would prefer to move it to line below","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def test_treat_vif_port_shut_down_port(self):"},{"line_number":972,"context_line":"        details \u003d mock.MagicMock()"},{"line_number":973,"context_line":"        vif_port \u003d type(\u0027vif_port\u0027, (object,), {\"vif_id\": \"12\","},{"line_number":974,"context_line":"                    \"iface-id\": \"407a79e0-e0be-4b7d-92a6-513b2161011b\","},{"line_number":975,"context_line":"                    \"vif_mac\": \"fa:16:3e:68:46:7b\","},{"line_number":976,"context_line":"                    \"port_name\": \"qr-407a79e0-e0\","}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_802b79e9","line":973,"range":{"start_line":973,"start_character":48,"end_line":973,"end_character":62},"in_reply_to":"bf8cb3f7_b198551b","updated":"2017-12-27 06:51:21.000000000","message":"I\u0027m on it.","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":974,"context_line":"                    \"iface-id\": \"407a79e0-e0be-4b7d-92a6-513b2161011b\","},{"line_number":975,"context_line":"                    \"vif_mac\": \"fa:16:3e:68:46:7b\","},{"line_number":976,"context_line":"                    \"port_name\": \"qr-407a79e0-e0\","},{"line_number":977,"context_line":"                    \"ofport\": -1,"},{"line_number":978,"context_line":"                    \"bridge_name\": \"br-int\"})"},{"line_number":979,"context_line":"        with mock.patch.object("},{"line_number":980,"context_line":"                self.agent.plugin_rpc, \u0027update_device_down\u0027) as func:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_118901c9","line":977,"range":{"start_line":977,"start_character":30,"end_line":977,"end_character":32},"updated":"2017-12-26 20:37:58.000000000","message":"why \"-1\"? It is kind of \"special\" of port number. Is it expected in test?","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":974,"context_line":"                    \"iface-id\": \"407a79e0-e0be-4b7d-92a6-513b2161011b\","},{"line_number":975,"context_line":"                    \"vif_mac\": \"fa:16:3e:68:46:7b\","},{"line_number":976,"context_line":"                    \"port_name\": \"qr-407a79e0-e0\","},{"line_number":977,"context_line":"                    \"ofport\": -1,"},{"line_number":978,"context_line":"                    \"bridge_name\": \"br-int\"})"},{"line_number":979,"context_line":"        with mock.patch.object("},{"line_number":980,"context_line":"                self.agent.plugin_rpc, \u0027update_device_down\u0027) as func:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_40ea5175","line":977,"range":{"start_line":977,"start_character":30,"end_line":977,"end_character":32},"in_reply_to":"bf8cb3f7_118901c9","updated":"2017-12-27 06:51:21.000000000","message":"It can be any negative number to avoid a warning message in the called function. It won\u0027t affect the code flow at all.","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f7b8aa87d00b368d38329fd5269a8105c011d41a","unresolved":false,"context_lines":[{"line_number":978,"context_line":"                    \"bridge_name\": \"br-int\"})"},{"line_number":979,"context_line":"        with mock.patch.object("},{"line_number":980,"context_line":"                self.agent.plugin_rpc, \u0027update_device_down\u0027) as func:"},{"line_number":981,"context_line":"            (self.agent.treat_vif_port(vif_port, details[\u0027port_id\u0027],"},{"line_number":982,"context_line":"                                       details[\u0027network_id\u0027],"},{"line_number":983,"context_line":"                                       details[\u0027network_type\u0027],"},{"line_number":984,"context_line":"                                       details[\u0027physical_network\u0027],"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_f18d7dd3","line":981,"range":{"start_line":981,"start_character":12,"end_line":981,"end_character":13},"updated":"2017-12-26 20:37:58.000000000","message":"You don\u0027t need this bracket, no?","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":27274,"name":"Omar Muhtaseb","email":"omar.muhtaseb.ext@nokia.com","username":"OmarM"},"change_message_id":"46b5a2ef2c3d780e3d6c91ce46796bd093ce7512","unresolved":false,"context_lines":[{"line_number":978,"context_line":"                    \"bridge_name\": \"br-int\"})"},{"line_number":979,"context_line":"        with mock.patch.object("},{"line_number":980,"context_line":"                self.agent.plugin_rpc, \u0027update_device_down\u0027) as func:"},{"line_number":981,"context_line":"            (self.agent.treat_vif_port(vif_port, details[\u0027port_id\u0027],"},{"line_number":982,"context_line":"                                       details[\u0027network_id\u0027],"},{"line_number":983,"context_line":"                                       details[\u0027network_type\u0027],"},{"line_number":984,"context_line":"                                       details[\u0027physical_network\u0027],"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf8cb3f7_00044949","line":981,"range":{"start_line":981,"start_character":12,"end_line":981,"end_character":13},"in_reply_to":"bf8cb3f7_f18d7dd3","updated":"2017-12-27 06:51:21.000000000","message":"I\u0027m on it.","commit_id":"331f9090714a37d7d93f856b07af486e6ee67f95"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d8884a798fbd301174c3faa26c51d5519d829251","unresolved":false,"context_lines":[{"line_number":987,"context_line":"                                   False,"},{"line_number":988,"context_line":"                                   details[\u0027fixed_ips\u0027],"},{"line_number":989,"context_line":"                                   details[\u0027device_owner\u0027], False)"},{"line_number":990,"context_line":"            self.assertTrue(func.called)"},{"line_number":991,"context_line":""},{"line_number":992,"context_line":"    def test_bind_port_with_missing_network(self):"},{"line_number":993,"context_line":"        vif_port \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_a46fe7c3","line":990,"updated":"2018-01-02 12:48:31.000000000","message":"I checked locally why UT are failing/time outing and it looks that it\u0027s because of this new test. You forgot to mock self.agent.port_dead() method.\nI tried with test which looked like:\n\n     def test_treat_vif_port_shut_down_port(self):\n         details \u003d mock.MagicMock()\n         vif_port \u003d type(\u0027vif_port\u0027, (object,), {\n                     \"vif_id\": \"12\",\n                     \"iface-id\": \"407a79e0-e0be-4b7d-92a6-513b2161011b\",\n                     \"vif_mac\": \"fa:16:3e:68:46:7b\",\n                     \"port_name\": \"qr-407a79e0-e0\",\n                     \"ofport\": -1,\n                     \"bridge_name\": \"br-int\"})\n         with mock.patch.object(\n             self.agent.plugin_rpc, \u0027update_device_down\u0027\n         ) as update_device_down, mock.patch.object(\n             self.agent, \"port_dead\"\n         ) as port_dead:\n             port_needs_binding \u003d self.agent.treat_vif_port(\n                 vif_port, details[\u0027port_id\u0027],\n                 details[\u0027network_id\u0027],\n                 details[\u0027network_type\u0027],\n                 details[\u0027physical_network\u0027],\n                 details[\u0027segmentation_id\u0027],\n                 False,\n                 details[\u0027fixed_ips\u0027],\n                 details[\u0027device_owner\u0027], False)\n             self.assertFalse(port_needs_binding)\n             port_dead.assert_called_once_with(vif_port)\n             update_device_down.assert_called_once_with(\n                 self.agent.context, details[\u0027port_id\u0027], self.agent.agent_id,\n                 self.agent.conf.host)\n\nand it looks that it works fine then.","commit_id":"e5125421c8e5df5863258e32e8d08febd97bf16a"}]}
