)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":13,"context_line":"allocation failed."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I985bafb44c131d6013961eb12bdbd103b6b6469a"},{"line_number":16,"context_line":"closes-bug:1606443"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dada55a8_34d2dd00","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":18},"updated":"2016-07-26 22:37:24.000000000","message":"Let\u0027s change this to Partially-Implements: blueprint routed-networks.\n\nAlso let\u0027s keep the topic of this patchset as \u0027bp/routed-networks\u0027. I already updated it in Gerrit","commit_id":"e9ad25de869fd5590fda65555701b421152db163"}],"neutron/tests/tempest/api/base.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        cls.subnets.append(subnet)"},{"line_number":277,"context_line":"        return subnet"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    @classmethod"},{"line_number":280,"context_line":"    def list_segments(cls, **kwargs):"},{"line_number":281,"context_line":"        body \u003d cls.admin_client.list_segments(**kwargs)"},{"line_number":282,"context_line":"        return body"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @classmethod"},{"line_number":285,"context_line":"    def create_port(cls, network, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_2f9af163","line":282,"range":{"start_line":279,"start_character":0,"end_line":282,"end_character":19},"updated":"2016-08-09 09:59:08.000000000","message":"I\u0027m not sure about usefulness of this method. Why not calling cls.admin_client.list_segments() directly from the code? This wrapper doesn\u0027t add any additional value.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        cls.subnets.append(subnet)"},{"line_number":277,"context_line":"        return subnet"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    @classmethod"},{"line_number":280,"context_line":"    def list_segments(cls, **kwargs):"},{"line_number":281,"context_line":"        body \u003d cls.admin_client.list_segments(**kwargs)"},{"line_number":282,"context_line":"        return body"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @classmethod"},{"line_number":285,"context_line":"    def create_port(cls, network, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_9d2165a2","line":282,"range":{"start_line":279,"start_character":0,"end_line":282,"end_character":19},"in_reply_to":"9ad45d7e_2f9af163","updated":"2016-08-11 05:43:48.000000000","message":"I agree,Thanks:)","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"}],"neutron/tests/tempest/api/clients.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"21011bf0913ec67f0e9b346bb5a9a63bd66b8a25","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_config import cfg"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from tempest.lib.services.compute import hypervisor_client"},{"line_number":19,"context_line":"from tempest.lib.services.compute import keypairs_client"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_686277da","line":16,"updated":"2016-08-25 22:12:26.000000000","message":"You are not using it. This is why you failed the pep8 test","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"}],"neutron/tests/tempest/scenario/test_routed_networks.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":25,"context_line":"CONF \u003d config.CONF"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @classmethod"},{"line_number":31,"context_line":"    def resource_setup(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_0cbb40e6","line":28,"range":{"start_line":28,"start_character":24,"end_line":28,"end_character":53},"updated":"2016-07-26 22:37:24.000000000","message":"You should inherit from neutron.tests.tempest.scenario.base.BaseTempestTestCase. This class inherits from base_api.BaseNetworkTest, so you get the same methods from that class and you don\u0027t need to duplicate many of the methods below","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"3765c19ce4aa6bce3330975f6dd31892058275b4","unresolved":false,"context_lines":[{"line_number":25,"context_line":"CONF \u003d config.CONF"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @classmethod"},{"line_number":31,"context_line":"    def resource_setup(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_41769a06","line":28,"range":{"start_line":28,"start_character":24,"end_line":28,"end_character":53},"in_reply_to":"dada55a8_0cbb40e6","updated":"2016-07-27 02:50:06.000000000","message":"actually, I tried to inherit that when I firstly writing these codes, but I don\u0027t know why I failed to create the network with segment arguments witout admin tenant, it returns \"raise exceptions.Forbidden(resp_body, resp\u003dresp)\" I also tried create_shared_networks, it also failed with \"AttributeError: type object \u0027RoutedNetworkTest\u0027 has no attribute \u0027admin_client\u0027\"\n\nTo make it simple, I just inherit the BaseAdminNetworkTest to take admin tenant to create the network with segment information.","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":28,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @classmethod"},{"line_number":31,"context_line":"    def resource_setup(self):"},{"line_number":32,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_setup()"},{"line_number":33,"context_line":"        self.servers \u003d []"},{"line_number":34,"context_line":"        self.keypairs \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_6ccc7c89","line":31,"updated":"2016-07-26 22:37:24.000000000","message":"You don\u0027t need to duplicate this method. Please see my comment to line 28","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.keypairs \u003d []"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    def resource_cleanup(self):"},{"line_number":38,"context_line":"        for server in self.servers:"},{"line_number":39,"context_line":"            self.manager.servers_client.delete_server(server)"},{"line_number":40,"context_line":"            waiters.wait_for_server_termination(self.manager.servers_client,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_8c96104a","line":37,"updated":"2016-07-26 22:37:24.000000000","message":"You don\u0027t need to duplicate this method. Please see my comment to line 28","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_cleanup()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _create_keypair(self, client\u003dNone):"},{"line_number":50,"context_line":"        name \u003d data_utils.rand_name(\u0027keypair-test\u0027)"},{"line_number":51,"context_line":"        client \u003d client or self.manager.keypairs_client"},{"line_number":52,"context_line":"        body \u003d client.create_keypair(name\u003dname)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_cc9c886c","line":49,"updated":"2016-07-26 22:37:24.000000000","message":"You don\u0027t need to duplicate this method. Please see my comment to line 28","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.keypairs.append(body[\u0027keypair\u0027])"},{"line_number":54,"context_line":"        return body[\u0027keypair\u0027]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _create_secgroup_rules(self, rule_list, secgroup_id\u003dNone):"},{"line_number":57,"context_line":"        client \u003d self.manager.network_client"},{"line_number":58,"context_line":"        if not secgroup_id:"},{"line_number":59,"context_line":"            sgs \u003d client.list_security_groups()[\u0027security_groups\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_0c906042","line":56,"updated":"2016-07-26 22:37:24.000000000","message":"You don\u0027t need to duplicate this method. Please see my comment to line 28","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                security_group_id\u003dsecgroup_id,"},{"line_number":69,"context_line":"                **rule)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _create_loginable_secgroup_rule(self, secgroup_id\u003dNone):"},{"line_number":72,"context_line":"        \"\"\"This rule is intended to permit inbound ssh"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        Allowing ssh traffic traffic from all sources, so no group_id is"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_6ccf5c56","line":71,"updated":"2016-07-26 22:37:24.000000000","message":"For the time being, we need to re-define this one. But maybe not in the future","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                     ]"},{"line_number":89,"context_line":"        self._create_secgroup_rules(rule_list, secgroup_id\u003dsecgroup_id)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _create_server(self, flavor_ref, image_ref, key_name, networks,"},{"line_number":92,"context_line":"                       name\u003dNone):"},{"line_number":93,"context_line":"        name \u003d name or data_utils.rand_name(\u0027server-test\u0027)"},{"line_number":94,"context_line":"        server \u003d self.manager.servers_client.create_server("}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_aca794a5","line":91,"updated":"2016-07-26 22:37:24.000000000","message":"You don\u0027t need to duplicate this method. Please see my comment to line 28","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            ip \u003d fixed_ip[\u0027ip_address\u0027]"},{"line_number":105,"context_line":"            self._ping_check(ip, self.namespace)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def _ping_check(self, ip, namespace, retries\u003d10):"},{"line_number":108,"context_line":"        ret \u003d 1"},{"line_number":109,"context_line":"        for i in range(0, retries):"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_ef87be5e","line":107,"updated":"2016-07-26 22:37:24.000000000","message":"Using the namespace is smart. I like it. Let\u0027s see what other reviewers say in the future. With this, we don\u0027t need floating ips. \n\nWe need to come up with a way to do ssh from the namespace. I think you can execute the following command from the namespace (with a subprocess.call):\n\nssh -o UserKnownHostsFile\u003d/dev/null -o StrictHostKeyChecking\u003dno -o ConnectTimeout\u003d60 -i \u003cfile\u003e root@ip \u003ccommand\u003e\n\nFile is going to be a local file (in the server running the test) where you store the private key of your keypair. Investigate how to write that file. It might be as simple as:\n\nwith open(pkey_file_path, \"w\") as private_key_file:\n    private_key_file.write(self.keypair.private_key)\n\nThe \u003ccommand\u003e piece might be something as simple as \u0027pwd\u0027","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self.assertEqual(0, ret, \u0027instance is down\u0027)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _setup_network_and_server(self, phy_network\u003d\"physnet1\","},{"line_number":123,"context_line":"                                  network_type\u003d\u0027vlan\u0027, pre_poort\u003dFalse):"},{"line_number":124,"context_line":"        segment_id \u003d 2019"},{"line_number":125,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_6cc8fc55","line":123,"range":{"start_line":123,"start_character":55,"end_line":123,"end_character":64},"updated":"2016-07-26 22:37:24.000000000","message":"pre_port?","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _setup_network_and_server(self, phy_network\u003d\"physnet1\","},{"line_number":123,"context_line":"                                  network_type\u003d\u0027vlan\u0027, pre_poort\u003dFalse):"},{"line_number":124,"context_line":"        segment_id \u003d 2019"},{"line_number":125,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segment_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_2f843609","line":124,"updated":"2016-07-26 22:37:24.000000000","message":"Do we want to add a parameter to neutron.tests.tempest.config to specify this?","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"3765c19ce4aa6bce3330975f6dd31892058275b4","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _setup_network_and_server(self, phy_network\u003d\"physnet1\","},{"line_number":123,"context_line":"                                  network_type\u003d\u0027vlan\u0027, pre_poort\u003dFalse):"},{"line_number":124,"context_line":"        segment_id \u003d 2019"},{"line_number":125,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segment_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_c19d6a0b","line":124,"in_reply_to":"dada55a8_2f843609","updated":"2016-07-27 02:50:06.000000000","message":"I think we can do that, or modify the arguments like _setup_network_and_server(XXXX,XXX,segment_id\u003d2019)","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"293d57b3a3c078364a9785ae279871e9516393ba","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        # test_net_id \u003d self.client.list_networks()[\u0027networks\u0027][1][\u0027id\u0027]"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        if pre_poort is True:"},{"line_number":154,"context_line":"            self.port \u003d self.create_port(self.network)"},{"line_number":155,"context_line":"            self.server \u003d self._create_server("},{"line_number":156,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_2f5a76f2","line":153,"range":{"start_line":153,"start_character":11,"end_line":153,"end_character":20},"updated":"2016-07-26 22:37:24.000000000","message":"pre_port","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"3765c19ce4aa6bce3330975f6dd31892058275b4","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        # test_net_id \u003d self.client.list_networks()[\u0027networks\u0027][1][\u0027id\u0027]"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        if pre_poort is True:"},{"line_number":154,"context_line":"            self.port \u003d self.create_port(self.network)"},{"line_number":155,"context_line":"            self.server \u003d self._create_server("},{"line_number":156,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_218d66d3","line":153,"range":{"start_line":153,"start_character":11,"end_line":153,"end_character":20},"in_reply_to":"dada55a8_2f5a76f2","updated":"2016-07-27 02:50:06.000000000","message":"done","commit_id":"e9ad25de869fd5590fda65555701b421152db163"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"121b5639e278ae97851daac056dedbb5b66fc26a","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _setup_network_and_server(self, phy_network\u003d\"physnet1\","},{"line_number":165,"context_line":"                                  network_type\u003d\u0027vlan\u0027, pre_port\u003dFalse):"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if self.shared_networks:"},{"line_number":168,"context_line":"            self.network \u003d self.shared_networks[0]"},{"line_number":169,"context_line":"        else:"},{"line_number":170,"context_line":"            self.network \u003d self._create_routed_network(phy_network,"},{"line_number":171,"context_line":"                                                       network_type)"},{"line_number":172,"context_line":"        if self.subnets:"},{"line_number":173,"context_line":"            self.subnet \u003d self.subnets[0]"},{"line_number":174,"context_line":"        else:"},{"line_number":175,"context_line":"            self.subnet \u003d self._create_routed_subnet(phy_network, self.network)"},{"line_number":176,"context_line":"        if self.keypairs:"},{"line_number":177,"context_line":"            self.keypair \u003d self.keypairs[0]"},{"line_number":178,"context_line":"        else:"},{"line_number":179,"context_line":"            self.keypair \u003d self._create_keypair()"},{"line_number":180,"context_line":"        if not self.security_rules:"},{"line_number":181,"context_line":"            self._create_loginable_secgroup_rule()"},{"line_number":182,"context_line":"        if pre_port is True:"},{"line_number":183,"context_line":"            port \u003d self.create_port(self.network)"},{"line_number":184,"context_line":"            server \u003d self._create_server("}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_4e690abe","line":181,"range":{"start_line":166,"start_character":0,"end_line":181,"end_character":50},"updated":"2016-07-29 01:31:39.000000000","message":"I just wonder whether here exists some race conditions for this shared resources as test cases maybe run in parallel.","commit_id":"6da570e204eaa45126c385535c75f086425b5b49"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2d34fdd1853c7a7c78cac7753557bc20f1dbacb5","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":206,"context_line":"    def test_routed_network(self):"},{"line_number":207,"context_line":"        (server, port, namespace) \u003d self._setup_network_and_server("},{"line_number":208,"context_line":"            pre_port\u003dFalse)"},{"line_number":209,"context_line":"        self._check_connectivity(port, namespace)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_b8a44cb9","line":206,"updated":"2016-07-29 00:51:40.000000000","message":"Let\u0027s rename this test method. Let\u0027s call it something like test_create_server_no_precreated_port","commit_id":"6da570e204eaa45126c385535c75f086425b5b49"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"a10c02cf6e89ba7e8715816a128c41e506bc5d23","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        (server, port, namespace) \u003d self._setup_network_and_server("},{"line_number":208,"context_line":"            pre_port\u003dFalse)"},{"line_number":209,"context_line":"        self._check_connectivity(port, namespace)"},{"line_number":210,"context_line":"        servers \u003d [server]"},{"line_number":211,"context_line":"        self._server_cleanup(servers)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    @test.idempotent_id(\u002773aaeccb-82de-4cc7-81bc-a62a8cf440c0\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_8e517865","line":210,"range":{"start_line":210,"start_character":6,"end_line":210,"end_character":26},"updated":"2016-07-28 07:57:25.000000000","message":"I re-use the network,subnet,keypair resources in different test cases, as creating/release these resources take extra-times.\nThe reason why I delete VM every time after one test is to keep compute node work load low.I have tested that if I leave this VM and create another one in the following test case, my poor laptop would crash or takes extremely long time to set the second VM ready for test.","commit_id":"6da570e204eaa45126c385535c75f086425b5b49"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2d34fdd1853c7a7c78cac7753557bc20f1dbacb5","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        self._server_cleanup(servers)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    @test.idempotent_id(\u002773aaeccb-82de-4cc7-81bc-a62a8cf440c0\u0027)"},{"line_number":214,"context_line":"    def test_routed_network_pre_allocate_port(self):"},{"line_number":215,"context_line":"        (server, port, namespace) \u003d self._setup_network_and_server("},{"line_number":216,"context_line":"            pre_port\u003dTrue)"},{"line_number":217,"context_line":"        self._check_connectivity(port, namespace)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_98a068a1","line":214,"updated":"2016-07-29 00:51:40.000000000","message":"Let\u0027s rename this method to test_create_server_precreated_port","commit_id":"6da570e204eaa45126c385535c75f086425b5b49"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":26,"context_line":"CONF \u003d config.CONF"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    @classmethod"},{"line_number":32,"context_line":"    def resource_setup(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_44364ab5","line":29,"updated":"2016-08-02 22:22:19.000000000","message":"Looking at https://github.com/openstack/neutron/blob/master/neutron/tests/tempest/scenario/test_qos.py#L67, I can see that they inherit from neutron.tests.tempest.scenario.base.BaseTempestTestCase and have the following lines right underneath:\n\ncredentials \u003d [\u0027primary\u0027, \u0027admin\u0027]\nforce_tenant_isolation \u003d False\n\nCould it be that the lack of these lines is not allowing you to inherit from that class?","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"CONF \u003d config.CONF"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    @classmethod"},{"line_number":32,"context_line":"    def resource_setup(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_0b629aad","line":29,"in_reply_to":"bacf61ea_44364ab5","updated":"2016-08-03 07:44:04.000000000","message":"I had tried with that before, and the code and error message is at https://gist.github.com/froyobin/b042519ca6c125c6f4df14a585d59751\n\nAnything wrong with my code? I am interesting in why I cannot created the network with credentials\u003d[\u0027primary\u0027, \u0027admin\u0027]","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    @classmethod"},{"line_number":32,"context_line":"    def resource_setup(self):"},{"line_number":33,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_setup()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_046c529b","line":30,"updated":"2016-08-02 22:22:19.000000000","message":"Looking at https://github.com/openstack/neutron/blob/master/neutron/tests/tempest/scenario/test_qos.py#L71 I see that they have grouped a series of constants at the top of the class. Why don\u0027t we do this for things like the names of the physical nets, the segments ids, etc","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    @classmethod"},{"line_number":32,"context_line":"    def resource_setup(self):"},{"line_number":33,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_setup()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_6be6b6e9","line":30,"in_reply_to":"bacf61ea_046c529b","updated":"2016-08-03 07:44:04.000000000","message":"good idea!","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    @classmethod"},{"line_number":32,"context_line":"    def resource_setup(self):"},{"line_number":33,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_setup()"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_c64881cf","line":31,"updated":"2016-08-02 22:22:19.000000000","message":"Looking at https://github.com/openstack/neutron/blob/master/neutron/tests/tempest/scenario/test_qos.py#L81, it seems we need to add the following line:\n\n@test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    @classmethod"},{"line_number":32,"context_line":"    def resource_setup(self):"},{"line_number":33,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_setup()"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_4bebf2b0","line":31,"in_reply_to":"bacf61ea_c64881cf","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.security_rules \u003d []"},{"line_number":38,"context_line":"        self.network \u003d None"},{"line_number":39,"context_line":"        self.subnet \u003d None"},{"line_number":40,"context_line":"        self.keypair \u003d None"},{"line_number":41,"context_line":"        self.create_loginable_secgroup_rule()"},{"line_number":42,"context_line":"        self.key_file_path \u003d \u0027/tmp/testkey.dat\u0027"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_a450e65f","line":40,"updated":"2016-08-02 22:22:19.000000000","message":"We could create one keypair here for all the test methods here. This is a class method. If we do this, we could write the file with the private piece of the key once and reuse the same file.","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.security_rules \u003d []"},{"line_number":38,"context_line":"        self.network \u003d None"},{"line_number":39,"context_line":"        self.subnet \u003d None"},{"line_number":40,"context_line":"        self.keypair \u003d None"},{"line_number":41,"context_line":"        self.create_loginable_secgroup_rule()"},{"line_number":42,"context_line":"        self.key_file_path \u003d \u0027/tmp/testkey.dat\u0027"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_845af74e","line":40,"in_reply_to":"bacf61ea_a450e65f","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                        stdout\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_cleanup()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _create_keypair(self, client\u003dNone):"},{"line_number":61,"context_line":"        name \u003d data_utils.rand_name(\u0027keypair-test\u0027)"},{"line_number":62,"context_line":"        client \u003d client or self.manager.keypairs_client"},{"line_number":63,"context_line":"        body \u003d client.create_keypair(name\u003dname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_a48586ae","line":60,"updated":"2016-08-02 22:22:19.000000000","message":"If you follow up my recommendation to line 40, this may need to become a class method","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                        stdout\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_cleanup()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _create_keypair(self, client\u003dNone):"},{"line_number":61,"context_line":"        name \u003d data_utils.rand_name(\u0027keypair-test\u0027)"},{"line_number":62,"context_line":"        client \u003d client or self.manager.keypairs_client"},{"line_number":63,"context_line":"        body \u003d client.create_keypair(name\u003dname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_64af037e","line":60,"in_reply_to":"bacf61ea_a48586ae","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.key_file_path, username, ip)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        all_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":133,"context_line":"        with open(self.key_file_path, \"w\") as private_key_file:"},{"line_number":134,"context_line":"            private_key_file.write(private_key)"},{"line_number":135,"context_line":"        for i in range(0, retries):"},{"line_number":136,"context_line":"            time.sleep(5)"},{"line_number":137,"context_line":"            ret \u003d subprocess.call(all_cmd, shell\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_04e572a7","line":134,"range":{"start_line":133,"start_character":8,"end_line":134,"end_character":47},"updated":"2016-08-02 22:22:19.000000000","message":"Please see my comment to line 40","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.key_file_path, username, ip)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        all_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":133,"context_line":"        with open(self.key_file_path, \"w\") as private_key_file:"},{"line_number":134,"context_line":"            private_key_file.write(private_key)"},{"line_number":135,"context_line":"        for i in range(0, retries):"},{"line_number":136,"context_line":"            time.sleep(5)"},{"line_number":137,"context_line":"            ret \u003d subprocess.call(all_cmd, shell\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_7fb5cc7c","line":134,"range":{"start_line":133,"start_character":8,"end_line":134,"end_character":47},"in_reply_to":"bacf61ea_04e572a7","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                break"},{"line_number":142,"context_line":"        self.assertEqual(0, ret, \u0027instance is down\u0027)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _create_routed_network(self, phy_network, network_type, segment_id):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":147,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segment_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_87568404","line":144,"range":{"start_line":144,"start_character":50,"end_line":144,"end_character":62},"updated":"2016-08-02 22:22:19.000000000","message":"We can assume that network type is always vlan, so we don\u0027t need this argument","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                break"},{"line_number":142,"context_line":"        self.assertEqual(0, ret, \u0027instance is down\u0027)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _create_routed_network(self, phy_network, network_type, segment_id):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":147,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segment_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_1fc010e0","line":144,"range":{"start_line":144,"start_character":50,"end_line":144,"end_character":62},"in_reply_to":"bacf61ea_87568404","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":171,"context_line":"                \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027]"},{"line_number":172,"context_line":"            }"},{"line_number":173,"context_line":"        return self.create_subnet("},{"line_number":174,"context_line":"            self.network, client\u003dself.admin_client, ip_version\u003dip_version,"},{"line_number":175,"context_line":"            **kwargs_subnet)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_a72108b7","line":173,"updated":"2016-08-02 22:22:19.000000000","message":"You are calling this method https://github.com/openstack/neutron/blob/master/neutron/tests/tempest/api/base.py#L228, which attempts to assign you a valid cidr. Let\u0027s make sure you are getting the behavior you expect.","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":171,"context_line":"                \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027]"},{"line_number":172,"context_line":"            }"},{"line_number":173,"context_line":"        return self.create_subnet("},{"line_number":174,"context_line":"            self.network, client\u003dself.admin_client, ip_version\u003dip_version,"},{"line_number":175,"context_line":"            **kwargs_subnet)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_5fa3a84f","line":173,"in_reply_to":"bacf61ea_a72108b7","updated":"2016-08-03 07:44:04.000000000","message":"I just use the default cidr, you think is may return the subnet that beyond your expectation? When I was writing this code, I just though the default subnet meet my requirements in these two test cases, so I use the default cidr without a second thought :)\n\nIf you think I may have potential risk or conflicts, I will assign a cidr on subnet creation.","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027][0]"},{"line_number":200,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def _create_server_no_precreated_port(self, pre_port\u003dFalse):"},{"line_number":203,"context_line":"        (server, port, namespace) \u003d self._setup_server(pre_port)"},{"line_number":204,"context_line":"        self._check_connectivity(port, namespace)"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_8aa4cb08","line":202,"range":{"start_line":202,"start_character":23,"end_line":202,"end_character":36},"updated":"2016-08-02 22:22:19.000000000","message":"we are using this method for both cases, created and pre-created ports. So this name is confusing","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027][0]"},{"line_number":200,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def _create_server_no_precreated_port(self, pre_port\u003dFalse):"},{"line_number":203,"context_line":"        (server, port, namespace) \u003d self._setup_server(pre_port)"},{"line_number":204,"context_line":"        self._check_connectivity(port, namespace)"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_1f677026","line":202,"range":{"start_line":202,"start_character":23,"end_line":202,"end_character":36},"in_reply_to":"bacf61ea_8aa4cb08","updated":"2016-08-03 07:44:04.000000000","message":"sorry, I forget to update the name after merge two functions in one method :(","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        (server, port, namespace) \u003d self._setup_server(pre_port)"},{"line_number":204,"context_line":"        self._check_connectivity(port, namespace)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def _create_server_with_two_ports_and_verify(self):"},{"line_number":207,"context_line":"        failed_status \u003d False"},{"line_number":208,"context_line":"        server \u003d self._create_server("},{"line_number":209,"context_line":"            flavor_ref\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_6af7d7f5","line":206,"updated":"2016-08-02 22:22:19.000000000","message":"We have two methods to create servers. Could we re-use the code and consolidate?","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":230,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":231,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":232,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2016)"},{"line_number":233,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":234,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_0abe1bff","line":231,"updated":"2016-08-02 22:22:19.000000000","message":"Please see my comment to line 30","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":230,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":231,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":232,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2016)"},{"line_number":233,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":234,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_1f2f70f7","line":231,"in_reply_to":"bacf61ea_0abe1bff","updated":"2016-08-03 07:44:04.000000000","message":"As different test cases use different ip pool, and the ip ranges should not have overlap among different test cases. I am thinking whether it is good to make the ip pool for each test cases as a constant value for the whole class, or I write a method to maintain the ip allocation and ensure there is no overlap.","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":230,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":231,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":232,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2016)"},{"line_number":233,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":234,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":235,"context_line":"        self.keypair \u003d self._create_keypair()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_0ae73b41","line":232,"range":{"start_line":232,"start_character":51,"end_line":232,"end_character":61},"updated":"2016-08-02 22:22:19.000000000","message":"Please see my comment to line 30","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":230,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":231,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":232,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2016)"},{"line_number":233,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":234,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":235,"context_line":"        self.keypair \u003d self._create_keypair()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_8ac96baf","line":232,"range":{"start_line":232,"start_character":71,"end_line":232,"end_character":76},"updated":"2016-08-02 22:22:19.000000000","message":"Please see my comment to line 30","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":230,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":231,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":232,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2016)"},{"line_number":233,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":234,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":235,"context_line":"        self.keypair \u003d self._create_keypair()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_041607a7","line":232,"range":{"start_line":232,"start_character":51,"end_line":232,"end_character":61},"in_reply_to":"bacf61ea_0ae73b41","updated":"2016-08-03 07:44:04.000000000","message":"Same reason as handling the allocation_pool.","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":229,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":230,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":231,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":232,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2016)"},{"line_number":233,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":234,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":235,"context_line":"        self.keypair \u003d self._create_keypair()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_044e0796","line":232,"range":{"start_line":232,"start_character":71,"end_line":232,"end_character":76},"in_reply_to":"bacf61ea_8ac96baf","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":232,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2016)"},{"line_number":233,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":234,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":235,"context_line":"        self.keypair \u003d self._create_keypair()"},{"line_number":236,"context_line":"        self._create_server_no_precreated_port(pre_port\u003dFalse)"},{"line_number":237,"context_line":"        self._create_server_no_precreated_port(pre_port\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_4a3653b5","line":234,"range":{"start_line":234,"start_character":13,"end_line":234,"end_character":22},"updated":"2016-08-02 22:22:19.000000000","message":"Please see my comment to line 30","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":232,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2016)"},{"line_number":233,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":234,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":235,"context_line":"        self.keypair \u003d self._create_keypair()"},{"line_number":236,"context_line":"        self._create_server_no_precreated_port(pre_port\u003dFalse)"},{"line_number":237,"context_line":"        self._create_server_no_precreated_port(pre_port\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_c47d0fb3","line":234,"range":{"start_line":234,"start_character":13,"end_line":234,"end_character":22},"in_reply_to":"bacf61ea_4a3653b5","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    @test.idempotent_id(\u00277692efcc-d434-423b-897d-e48948928e0f\u0027)"},{"line_number":240,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":241,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.2\", \"end\": \"10.100.0.3\"}]"},{"line_number":242,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2017)"},{"line_number":243,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":244,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_0a557bc5","line":241,"updated":"2016-08-02 22:22:19.000000000","message":"Please see my comment to line 30","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    @test.idempotent_id(\u00277692efcc-d434-423b-897d-e48948928e0f\u0027)"},{"line_number":240,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":241,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.2\", \"end\": \"10.100.0.3\"}]"},{"line_number":242,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2017)"},{"line_number":243,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":244,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_7f82ecc9","line":241,"in_reply_to":"bacf61ea_0a557bc5","updated":"2016-08-03 07:44:04.000000000","message":"same reason as line 231. I am just thinking ip allocation manually to avoid overlap is a graceful way, or write a method like (start,end)\u003dget_allocaion_pool_range(cidr,number_of_ip_needed)\nfor ip allocation.\n\nAs more test cases are added, maintain it manually may become more and more  difficult.","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":239,"context_line":"    @test.idempotent_id(\u00277692efcc-d434-423b-897d-e48948928e0f\u0027)"},{"line_number":240,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":241,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.2\", \"end\": \"10.100.0.3\"}]"},{"line_number":242,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2017)"},{"line_number":243,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":244,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":245,"context_line":"        self.keypair \u003d self._create_keypair()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_8a57abc9","line":242,"updated":"2016-08-02 22:22:19.000000000","message":"Please see my comment to line 30","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":239,"context_line":"    @test.idempotent_id(\u00277692efcc-d434-423b-897d-e48948928e0f\u0027)"},{"line_number":240,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":241,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.2\", \"end\": \"10.100.0.3\"}]"},{"line_number":242,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2017)"},{"line_number":243,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":244,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":245,"context_line":"        self.keypair \u003d self._create_keypair()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_6434234a","line":242,"in_reply_to":"bacf61ea_8a57abc9","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f9a8022eee2ffbf8f8a8bd10a836d133c923b6f0","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.2\", \"end\": \"10.100.0.3\"}]"},{"line_number":242,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2017)"},{"line_number":243,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":244,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":245,"context_line":"        self.keypair \u003d self._create_keypair()"},{"line_number":246,"context_line":"        self._create_server_with_two_ports_and_verify()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_aa6eef93","line":244,"range":{"start_line":244,"start_character":12,"end_line":244,"end_character":22},"updated":"2016-08-02 22:22:19.000000000","message":"Please see my comment to line 30","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"f604ac4af27b94134d46b7221160fa2054bf8d3c","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.2\", \"end\": \"10.100.0.3\"}]"},{"line_number":242,"context_line":"        self.network \u003d self._create_routed_network(\u0027physnet1\u0027, \u0027vlan\u0027, 2017)"},{"line_number":243,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":244,"context_line":"            \u0027physnet1\u0027, self.network, allocation_pool\u003dallocation_pool)"},{"line_number":245,"context_line":"        self.keypair \u003d self._create_keypair()"},{"line_number":246,"context_line":"        self._create_server_with_two_ports_and_verify()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_c4eeafb3","line":244,"range":{"start_line":244,"start_character":12,"end_line":244,"end_character":22},"in_reply_to":"bacf61ea_aa6eef93","updated":"2016-08-03 07:44:04.000000000","message":"Done","commit_id":"63f3c8359ecb663dc4ff2fd5bef623f8c6928ab3"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"501bda22fdbcbf5b430ac30ba5f143bbd96e36b2","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        name \u003d data_utils.rand_name(\u0027keypair-test\u0027)"},{"line_number":63,"context_line":"        client \u003d client or self.manager.keypairs_client"},{"line_number":64,"context_line":"        body \u003d client.create_keypair(name\u003dname)"},{"line_number":65,"context_line":"        with open(RoutedNetworkTest.KEY_FILE_PATH, \"w\") as private_key_file:"},{"line_number":66,"context_line":"            private_key_file.write(body[\u0027keypair\u0027][\u0027private_key\u0027])"},{"line_number":67,"context_line":"        return body[\u0027keypair\u0027]"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_2ef3f6a0","line":65,"range":{"start_line":65,"start_character":18,"end_line":65,"end_character":35},"updated":"2016-08-03 22:37:00.000000000","message":"You can say \u0027self\u0027","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"501bda22fdbcbf5b430ac30ba5f143bbd96e36b2","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":227,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":228,"context_line":"        self.network \u003d self._create_routed_network("},{"line_number":229,"context_line":"            RoutedNetworkTest.PHY_NETWORK1, 2016)"},{"line_number":230,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":231,"context_line":"            RoutedNetworkTest.PHY_NETWORK1,"},{"line_number":232,"context_line":"            self.network,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_0eb0b2dc","line":229,"range":{"start_line":229,"start_character":12,"end_line":229,"end_character":29},"updated":"2016-08-03 22:37:00.000000000","message":"you can say \u0027self\u0027","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38b93c5e0d2c6cd88c29ede48808f17e72224ecf","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":227,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":228,"context_line":"        self.network \u003d self._create_routed_network("},{"line_number":229,"context_line":"            RoutedNetworkTest.PHY_NETWORK1, 2016)"},{"line_number":230,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":231,"context_line":"            RoutedNetworkTest.PHY_NETWORK1,"},{"line_number":232,"context_line":"            self.network,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_f246ca4d","line":229,"range":{"start_line":229,"start_character":12,"end_line":229,"end_character":29},"in_reply_to":"bacf61ea_0eb0b2dc","updated":"2016-08-04 09:03:34.000000000","message":"Done","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"501bda22fdbcbf5b430ac30ba5f143bbd96e36b2","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        self.network \u003d self._create_routed_network("},{"line_number":229,"context_line":"            RoutedNetworkTest.PHY_NETWORK1, 2016)"},{"line_number":230,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":231,"context_line":"            RoutedNetworkTest.PHY_NETWORK1,"},{"line_number":232,"context_line":"            self.network,"},{"line_number":233,"context_line":"            allocation_pool\u003dallocation_pool)"},{"line_number":234,"context_line":"        self._create_server_and_test(pre_port\u003dFalse, n_port\u003d1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_eee9deb8","line":231,"range":{"start_line":231,"start_character":12,"end_line":231,"end_character":29},"updated":"2016-08-03 22:37:00.000000000","message":"You can say \u0027self\u0027","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38b93c5e0d2c6cd88c29ede48808f17e72224ecf","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        self.network \u003d self._create_routed_network("},{"line_number":229,"context_line":"            RoutedNetworkTest.PHY_NETWORK1, 2016)"},{"line_number":230,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":231,"context_line":"            RoutedNetworkTest.PHY_NETWORK1,"},{"line_number":232,"context_line":"            self.network,"},{"line_number":233,"context_line":"            allocation_pool\u003dallocation_pool)"},{"line_number":234,"context_line":"        self._create_server_and_test(pre_port\u003dFalse, n_port\u003d1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_5274f69a","line":231,"range":{"start_line":231,"start_character":12,"end_line":231,"end_character":29},"in_reply_to":"bacf61ea_eee9deb8","updated":"2016-08-04 09:03:34.000000000","message":"Done","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"501bda22fdbcbf5b430ac30ba5f143bbd96e36b2","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":239,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.2\", \"end\": \"10.100.0.3\"}]"},{"line_number":240,"context_line":"        self.network \u003d self._create_routed_network("},{"line_number":241,"context_line":"            RoutedNetworkTest.PHY_NETWORK1, 2017)"},{"line_number":242,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":243,"context_line":"            RoutedNetworkTest.PHY_NETWORK1,"},{"line_number":244,"context_line":"            self.network, allocation_pool\u003dallocation_pool)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_2ecc9660","line":241,"range":{"start_line":241,"start_character":12,"end_line":241,"end_character":29},"updated":"2016-08-03 22:37:00.000000000","message":"You can say \u0027self\u0027","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38b93c5e0d2c6cd88c29ede48808f17e72224ecf","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":239,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.2\", \"end\": \"10.100.0.3\"}]"},{"line_number":240,"context_line":"        self.network \u003d self._create_routed_network("},{"line_number":241,"context_line":"            RoutedNetworkTest.PHY_NETWORK1, 2017)"},{"line_number":242,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":243,"context_line":"            RoutedNetworkTest.PHY_NETWORK1,"},{"line_number":244,"context_line":"            self.network, allocation_pool\u003dallocation_pool)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_3277c2a0","line":241,"range":{"start_line":241,"start_character":12,"end_line":241,"end_character":29},"in_reply_to":"bacf61ea_2ecc9660","updated":"2016-08-04 09:03:34.000000000","message":"Done","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"501bda22fdbcbf5b430ac30ba5f143bbd96e36b2","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self.network \u003d self._create_routed_network("},{"line_number":241,"context_line":"            RoutedNetworkTest.PHY_NETWORK1, 2017)"},{"line_number":242,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":243,"context_line":"            RoutedNetworkTest.PHY_NETWORK1,"},{"line_number":244,"context_line":"            self.network, allocation_pool\u003dallocation_pool)"},{"line_number":245,"context_line":"        self._create_server_with_two_ports_and_verify()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_ae06c682","line":243,"range":{"start_line":243,"start_character":11,"end_line":243,"end_character":29},"updated":"2016-08-03 22:37:00.000000000","message":"You can say \u0027self\u0027","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38b93c5e0d2c6cd88c29ede48808f17e72224ecf","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self.network \u003d self._create_routed_network("},{"line_number":241,"context_line":"            RoutedNetworkTest.PHY_NETWORK1, 2017)"},{"line_number":242,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":243,"context_line":"            RoutedNetworkTest.PHY_NETWORK1,"},{"line_number":244,"context_line":"            self.network, allocation_pool\u003dallocation_pool)"},{"line_number":245,"context_line":"        self._create_server_with_two_ports_and_verify()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bacf61ea_926e6ec7","line":243,"range":{"start_line":243,"start_character":11,"end_line":243,"end_character":29},"in_reply_to":"bacf61ea_ae06c682","updated":"2016-08-04 09:03:34.000000000","message":"Done","commit_id":"f40527bf4cc969d404039f3a1d3ba348ebe26872"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4a545a868d997f72828ae948716c16a017e7c2c7","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.tests.tempest.api import base as base_api"},{"line_number":19,"context_line":"from neutron.tests.tempest import config"},{"line_number":20,"context_line":"from neutron.tests.tempest.scenario import constants"},{"line_number":21,"context_line":"from tempest.common import waiters"},{"line_number":22,"context_line":"from tempest import exceptions as exceptions"},{"line_number":23,"context_line":"from tempest.lib.common.utils import data_utils"},{"line_number":24,"context_line":"from tempest import test"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"CONF \u003d config.CONF"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_d5e51edc","line":24,"range":{"start_line":21,"start_character":0,"end_line":24,"end_character":24},"updated":"2016-08-05 15:51:30.000000000","message":"These module should be between L16 and L18 as tempest is a 3rd party lib.","commit_id":"a974879751c39a06879856cfc11bbb7c7475a1ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"94b6dda3732a7d5c61c78d6101b93aea8e2f7ae9","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.tests.tempest.api import base as base_api"},{"line_number":19,"context_line":"from neutron.tests.tempest import config"},{"line_number":20,"context_line":"from neutron.tests.tempest.scenario import constants"},{"line_number":21,"context_line":"from tempest.common import waiters"},{"line_number":22,"context_line":"from tempest import exceptions as exceptions"},{"line_number":23,"context_line":"from tempest.lib.common.utils import data_utils"},{"line_number":24,"context_line":"from tempest import test"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"CONF \u003d config.CONF"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_756fe15f","line":24,"range":{"start_line":21,"start_character":0,"end_line":24,"end_character":24},"in_reply_to":"bacf61ea_d5e51edc","updated":"2016-08-08 07:04:55.000000000","message":"Done","commit_id":"a974879751c39a06879856cfc11bbb7c7475a1ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8c99d5896f841dc4869c98d75b2102d2babf0bcf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"CONF \u003d config.CONF"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":31,"context_line":"    KEY_FILE_PATH \u003d \u0027/tmp/testkey.dat\u0027"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_f5ce6258","line":29,"updated":"2016-08-05 15:41:31.000000000","message":"@Jakub,\n\nI think we need to inherit from neutron.tests.tempest.scenario.base.BaseTempestTestCase, but if we do that, we cannot execute some operations that need to be admin. What are we doing wrong?","commit_id":"a974879751c39a06879856cfc11bbb7c7475a1ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"94b6dda3732a7d5c61c78d6101b93aea8e2f7ae9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"CONF \u003d config.CONF"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":31,"context_line":"    KEY_FILE_PATH \u003d \u0027/tmp/testkey.dat\u0027"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_352289b9","line":29,"in_reply_to":"bacf61ea_07c2ed84","updated":"2016-08-08 07:04:55.000000000","message":"Thanks, I have found the right way to inherit from BaseTempestTestCase and I found that in resource_setup, if I set the admin_client as         \n\nself.admin_client \u003d self.admin_manager.network_client\n\nI can created the shared network. I wanna to re-use most of the methods that the BaseTempestTestCase offers that it will do the clean up automatically instead of maintaining/releasing these resources myself.","commit_id":"a974879751c39a06879856cfc11bbb7c7475a1ce"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4a545a868d997f72828ae948716c16a017e7c2c7","unresolved":false,"context_lines":[{"line_number":26,"context_line":"CONF \u003d config.CONF"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class RoutedNetworkTest(base_api.BaseAdminNetworkTest):"},{"line_number":30,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":31,"context_line":"    KEY_FILE_PATH \u003d \u0027/tmp/testkey.dat\u0027"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_07c2ed84","line":29,"in_reply_to":"bacf61ea_f5ce6258","updated":"2016-08-05 15:51:30.000000000","message":"Right, you should inherit from BaseTempestTestCase from Neutron tree. To add admin capabilities, try to set class attribute:\n\n credentials \u003d [\u0027primary\u0027, \u0027admin\u0027]\n\nthen later in code call:\n\n self.admin_manager.network_client","commit_id":"a974879751c39a06879856cfc11bbb7c7475a1ce"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4a545a868d997f72828ae948716c16a017e7c2c7","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_cleanup()"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @classmethod"},{"line_number":60,"context_line":"    @test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")"},{"line_number":61,"context_line":"    def create_keypair(self, client\u003dNone):"},{"line_number":62,"context_line":"        name \u003d data_utils.rand_name(\u0027keypair-test\u0027)"},{"line_number":63,"context_line":"        client \u003d client or self.manager.keypairs_client"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_f53ca230","line":60,"range":{"start_line":60,"start_character":4,"end_line":60,"end_character":42},"updated":"2016-08-05 15:51:30.000000000","message":"I\u0027d add this decorator to resource_setup() as likely all tests are gonna require this extension.","commit_id":"a974879751c39a06879856cfc11bbb7c7475a1ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"94b6dda3732a7d5c61c78d6101b93aea8e2f7ae9","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        super(base_api.BaseAdminNetworkTest, self).resource_cleanup()"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @classmethod"},{"line_number":60,"context_line":"    @test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")"},{"line_number":61,"context_line":"    def create_keypair(self, client\u003dNone):"},{"line_number":62,"context_line":"        name \u003d data_utils.rand_name(\u0027keypair-test\u0027)"},{"line_number":63,"context_line":"        client \u003d client or self.manager.keypairs_client"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_35ce095a","line":60,"range":{"start_line":60,"start_character":4,"end_line":60,"end_character":42},"in_reply_to":"bacf61ea_f53ca230","updated":"2016-08-08 07:04:55.000000000","message":"Done","commit_id":"a974879751c39a06879856cfc11bbb7c7475a1ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    @test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")"},{"line_number":38,"context_line":"    def resource_setup(self):"},{"line_number":39,"context_line":"        super(RoutedNetworkTest, self).resource_setup()"},{"line_number":40,"context_line":"        self.network \u003d None"},{"line_number":41,"context_line":"        self.subnet \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_82867db7","line":38,"range":{"start_line":38,"start_character":23,"end_line":38,"end_character":27},"updated":"2016-08-08 16:58:35.000000000","message":"This is a class method. So this should be \u0027cls\u0027. Please also fix all the references to \u0027self\u0027 in this method and replace them with \u0027cls\u0027","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    @test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")"},{"line_number":38,"context_line":"    def resource_setup(self):"},{"line_number":39,"context_line":"        super(RoutedNetworkTest, self).resource_setup()"},{"line_number":40,"context_line":"        self.network \u003d None"},{"line_number":41,"context_line":"        self.subnet \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_b53ac234","line":38,"range":{"start_line":38,"start_character":23,"end_line":38,"end_character":27},"in_reply_to":"9ad45d7e_82867db7","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.admin_client \u003d self.admin_manager.network_client"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @classmethod"},{"line_number":47,"context_line":"    def resource_cleanup(self):"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        subprocess.call(\u0027rm -f %s\u0027 % self.KEY_FILE_PATH,"},{"line_number":50,"context_line":"                        shell\u003dTrue, stdout\u003dsubprocess.PIPE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_623b89ec","line":47,"range":{"start_line":47,"start_character":25,"end_line":47,"end_character":29},"updated":"2016-08-08 16:58:35.000000000","message":"This is a class method. So this should be \u0027cls\u0027. Please also fix all the references to \u0027self\u0027 in this method and replace them with \u0027cls\u0027","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.admin_client \u003d self.admin_manager.network_client"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @classmethod"},{"line_number":47,"context_line":"    def resource_cleanup(self):"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        subprocess.call(\u0027rm -f %s\u0027 % self.KEY_FILE_PATH,"},{"line_number":50,"context_line":"                        shell\u003dTrue, stdout\u003dsubprocess.PIPE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_95121eb3","line":47,"range":{"start_line":47,"start_character":25,"end_line":47,"end_character":29},"in_reply_to":"9ad45d7e_623b89ec","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        super(RoutedNetworkTest, self).resource_cleanup()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @classmethod"},{"line_number":54,"context_line":"    def _create_keypair(self):"},{"line_number":55,"context_line":"        body \u003d self.create_keypair()"},{"line_number":56,"context_line":"        with open(self.KEY_FILE_PATH, \"w\") as private_key_file:"},{"line_number":57,"context_line":"            private_key_file.write(body[\u0027private_key\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_05045713","line":54,"range":{"start_line":54,"start_character":24,"end_line":54,"end_character":28},"updated":"2016-08-08 16:58:35.000000000","message":"This is a class method. So this should be \u0027cls\u0027. Please also fix all the references to \u0027self\u0027 in this method and replace them with \u0027cls\u0027","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        super(RoutedNetworkTest, self).resource_cleanup()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @classmethod"},{"line_number":54,"context_line":"    def _create_keypair(self):"},{"line_number":55,"context_line":"        body \u003d self.create_keypair()"},{"line_number":56,"context_line":"        with open(self.KEY_FILE_PATH, \"w\") as private_key_file:"},{"line_number":57,"context_line":"            private_key_file.write(body[\u0027private_key\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_d50c9696","line":54,"range":{"start_line":54,"start_character":24,"end_line":54,"end_character":28},"in_reply_to":"9ad45d7e_05045713","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.KEY_FILE_PATH,"},{"line_number":75,"context_line":"                                           username, ip)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        all_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":78,"context_line":"        for i in range(0, retries):"},{"line_number":79,"context_line":"            time.sleep(5)"},{"line_number":80,"context_line":"            ret \u003d subprocess.call(all_cmd, shell\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_6599d36e","line":77,"range":{"start_line":77,"start_character":8,"end_line":77,"end_character":15},"updated":"2016-08-08 16:58:35.000000000","message":"Nit: full_cmd would be better. all_cmd leads to believe you are including several commands","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.KEY_FILE_PATH,"},{"line_number":75,"context_line":"                                           username, ip)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        all_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":78,"context_line":"        for i in range(0, retries):"},{"line_number":79,"context_line":"            time.sleep(5)"},{"line_number":80,"context_line":"            ret \u003d subprocess.call(all_cmd, shell\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_55a0a69f","line":77,"range":{"start_line":77,"start_character":8,"end_line":77,"end_character":15},"in_reply_to":"9ad45d7e_6599d36e","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                  stderr\u003dsubprocess.STDOUT)"},{"line_number":83,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":84,"context_line":"                break"},{"line_number":85,"context_line":"        self.assertEqual(0, ret, \u0027instance is down\u0027)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _create_routed_network(self, phy_network, segment_id):"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_e5aae318","line":85,"range":{"start_line":85,"start_character":34,"end_line":85,"end_character":50},"updated":"2016-08-08 16:58:35.000000000","message":"Since we are testing connectivity to the instance using a routed networks, in my opinion the message should be: \u0027Unable to ssh to instance using a routed network\u0027","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                  stderr\u003dsubprocess.STDOUT)"},{"line_number":83,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":84,"context_line":"                break"},{"line_number":85,"context_line":"        self.assertEqual(0, ret, \u0027instance is down\u0027)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _create_routed_network(self, phy_network, segment_id):"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_b58802e9","line":85,"range":{"start_line":85,"start_character":34,"end_line":85,"end_character":50},"in_reply_to":"9ad45d7e_e5aae318","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                break"},{"line_number":85,"context_line":"        self.assertEqual(0, ret, \u0027instance is down\u0027)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _create_routed_network(self, phy_network, segment_id):"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":90,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segment_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_fb860064","line":87,"range":{"start_line":87,"start_character":50,"end_line":87,"end_character":60},"updated":"2016-08-08 16:58:35.000000000","message":"Let\u0027s call this \u0027segmentation_id\u0027. Within this test, \u0027segment_id\u0027 means something different","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                break"},{"line_number":85,"context_line":"        self.assertEqual(0, ret, \u0027instance is down\u0027)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _create_routed_network(self, phy_network, segment_id):"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":90,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segment_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_b55f6271","line":87,"range":{"start_line":87,"start_character":50,"end_line":87,"end_character":60},"in_reply_to":"9ad45d7e_fb860064","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    def _create_routed_network(self, phy_network, segment_id):"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":90,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segment_id,"},{"line_number":91,"context_line":"                     \"provider:physical_network\": phy_network,"},{"line_number":92,"context_line":"                     \"provider:network_type\": \u0027vlan\u0027}]"},{"line_number":93,"context_line":"        kwargs \u003d {\u0027shared\u0027: True,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_3bcff8b1","line":90,"range":{"start_line":90,"start_character":49,"end_line":90,"end_character":59},"updated":"2016-08-08 16:58:35.000000000","message":"Ditto","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    def _create_routed_network(self, phy_network, segment_id):"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":90,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segment_id,"},{"line_number":91,"context_line":"                     \"provider:physical_network\": phy_network,"},{"line_number":92,"context_line":"                     \"provider:network_type\": \u0027vlan\u0027}]"},{"line_number":93,"context_line":"        kwargs \u003d {\u0027shared\u0027: True,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_15558e4f","line":90,"range":{"start_line":90,"start_character":49,"end_line":90,"end_character":59},"in_reply_to":"9ad45d7e_3bcff8b1","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                              allocation_pool\u003dNone):"},{"line_number":102,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":103,"context_line":"                      \u0027physical_network\u0027: phy_network"},{"line_number":104,"context_line":"                      }"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"},{"line_number":106,"context_line":"        if allocation_pool:"},{"line_number":107,"context_line":"            kwargs_subnet \u003d {"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_bb69288e","line":104,"range":{"start_line":104,"start_character":22,"end_line":104,"end_character":23},"updated":"2016-08-08 16:58:35.000000000","message":"Nit: I would move this to the end of the previous line","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                              allocation_pool\u003dNone):"},{"line_number":102,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":103,"context_line":"                      \u0027physical_network\u0027: phy_network"},{"line_number":104,"context_line":"                      }"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"},{"line_number":106,"context_line":"        if allocation_pool:"},{"line_number":107,"context_line":"            kwargs_subnet \u003d {"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_f551da63","line":104,"range":{"start_line":104,"start_character":22,"end_line":104,"end_character":23},"in_reply_to":"9ad45d7e_bb69288e","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def _setup_server(self, pre_port\u003dFalse, n_port\u003d1):"},{"line_number":122,"context_line":"        network_args \u003d [{\u0027uuid\u0027: self.network[\u0027id\u0027]}] * n_port"},{"line_number":123,"context_line":"        if pre_port is True:"},{"line_number":124,"context_line":"            port \u003d self.create_port(self.network)"},{"line_number":125,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":126,"context_line":"            server \u003d self.create_server("},{"line_number":127,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_db77bc00","line":124,"updated":"2016-08-08 16:58:35.000000000","message":"We should check after creating the port that it doesn\u0027t have fixed_ips and that is has an attribute named \"ip_allocation\" and its value is \"deferred\". You can even import https://github.com/openstack/neutron/blob/master/neutron/extensions/ip_allocation.py and use the constants created for this in that module","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def _setup_server(self, pre_port\u003dFalse, n_port\u003d1):"},{"line_number":122,"context_line":"        network_args \u003d [{\u0027uuid\u0027: self.network[\u0027id\u0027]}] * n_port"},{"line_number":123,"context_line":"        if pre_port is True:"},{"line_number":124,"context_line":"            port \u003d self.create_port(self.network)"},{"line_number":125,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":126,"context_line":"            server \u003d self.create_server("},{"line_number":127,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_0496fe4b","line":124,"in_reply_to":"9ad45d7e_db77bc00","updated":"2016-08-09 06:49:06.000000000","message":"Done. Thanks","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":154,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_port\u003d1):"},{"line_number":157,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":158,"context_line":"            pre_port, n_port)"},{"line_number":159,"context_line":"        self.assertTrue(vm_status, \"server should create in active status\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_fb8c4037","line":156,"range":{"start_line":156,"start_character":54,"end_line":156,"end_character":62},"updated":"2016-08-08 16:58:35.000000000","message":"We don\u0027t need this","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":154,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_port\u003d1):"},{"line_number":157,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":158,"context_line":"            pre_port, n_port)"},{"line_number":159,"context_line":"        self.assertTrue(vm_status, \"server should create in active status\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_f8938fa1","line":156,"range":{"start_line":156,"start_character":54,"end_line":156,"end_character":62},"in_reply_to":"9ad45d7e_fb8c4037","updated":"2016-08-09 06:49:06.000000000","message":"I set this to pass the number of ports that should be used by the instances. With this argument, I can make the two test cases reuse the instance/port setup procedure. I didn\u0027t catch your idea:( you mean you have better ways to approach reuse the instance/port setup procedure? or the n_port confuses you? I have change it to n_interfaces.","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_port\u003d1):"},{"line_number":157,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":158,"context_line":"            pre_port, n_port)"},{"line_number":159,"context_line":"        self.assertTrue(vm_status, \"server should create in active status\")"},{"line_number":160,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_db769c3d","line":158,"range":{"start_line":158,"start_character":22,"end_line":158,"end_character":28},"updated":"2016-08-08 16:58:35.000000000","message":"We don\u0027t need this","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_port\u003d1):"},{"line_number":157,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":158,"context_line":"            pre_port, n_port)"},{"line_number":159,"context_line":"        self.assertTrue(vm_status, \"server should create in active status\")"},{"line_number":160,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _create_server_with_two_ports_and_verify(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_db2fbc9f","line":159,"updated":"2016-08-08 16:58:35.000000000","message":"Do we want also to check we got 1 port?","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_port\u003d1):"},{"line_number":157,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":158,"context_line":"            pre_port, n_port)"},{"line_number":159,"context_line":"        self.assertTrue(vm_status, \"server should create in active status\")"},{"line_number":160,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _create_server_with_two_ports_and_verify(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_e4480a30","line":159,"in_reply_to":"9ad45d7e_db2fbc9f","updated":"2016-08-09 06:49:06.000000000","message":"I would like to do, but I found it\u0027s not easy, the reason is the ports are created during instances creation and when I check port status after instance creation, the ports has already been cleaned. I has not  found any place to put the hook to check whether any port is created yet.\nIf we donot check that we got 1 port, people may argue that it maybe other reasons for instance BuildErrorException though this test case passed.","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    def _create_server_with_two_ports_and_verify(self):"},{"line_number":163,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":164,"context_line":"            pre_port\u003dFalse, n_port\u003d2)"},{"line_number":165,"context_line":"        self.assertEmpty(ports, msg\u003d\"port should not be created\")"},{"line_number":166,"context_line":"        self.assertFalse(vm_status, \"server should create in error status\")"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_36254fab","line":165,"range":{"start_line":165,"start_character":37,"end_line":165,"end_character":41},"updated":"2016-08-08 16:58:35.000000000","message":"s/port/ports","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    def _create_server_with_two_ports_and_verify(self):"},{"line_number":163,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":164,"context_line":"            pre_port\u003dFalse, n_port\u003d2)"},{"line_number":165,"context_line":"        self.assertEmpty(ports, msg\u003d\"port should not be created\")"},{"line_number":166,"context_line":"        self.assertFalse(vm_status, \"server should create in error status\")"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_f5d8baf1","line":165,"range":{"start_line":165,"start_character":37,"end_line":165,"end_character":41},"in_reply_to":"9ad45d7e_36254fab","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"59c451012df7bbb9a0de557754d23366fec913d5","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":169,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":170,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":171,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2016)"},{"line_number":172,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":173,"context_line":"            self.PHY_NETWORK1,"},{"line_number":174,"context_line":"            self.network, allocation_pool\u003dallocation_pool)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_f603b70b","line":171,"range":{"start_line":171,"start_character":70,"end_line":171,"end_character":74},"updated":"2016-08-08 16:58:35.000000000","message":"This is the segmentation id used by the network created automatically by the vagrant environment. Let\u0027s use another one","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"38a7ba8035260c0ee9ed276dd481cf72dc8c267e","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":169,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":170,"context_line":"        allocation_pool \u003d [{\"start\": \"10.100.0.10\", \"end\": \"10.100.0.14\"}]"},{"line_number":171,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2016)"},{"line_number":172,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":173,"context_line":"            self.PHY_NETWORK1,"},{"line_number":174,"context_line":"            self.network, allocation_pool\u003dallocation_pool)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9ad45d7e_15dc6ee3","line":171,"range":{"start_line":171,"start_character":70,"end_line":171,"end_character":74},"in_reply_to":"9ad45d7e_f603b70b","updated":"2016-08-09 06:49:06.000000000","message":"Done","commit_id":"692938c07b5b75d9fa5ca6f2e83de17fad801dfd"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_cf7cf5ed","line":1,"range":{"start_line":1,"start_character":17,"end_line":1,"end_character":24},"updated":"2016-08-09 09:59:08.000000000","message":"Oh yeah!","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_cebf65a8","line":1,"range":{"start_line":1,"start_character":17,"end_line":1,"end_character":24},"in_reply_to":"9ad45d7e_21446b48","updated":"2016-08-11 05:43:48.000000000","message":"thanks, done:)","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"98ffa0445206d2a0d521bd431d58b58dabfad050","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Red Hat, Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_21446b48","line":1,"range":{"start_line":1,"start_character":17,"end_line":1,"end_character":24},"in_reply_to":"9ad45d7e_cf7cf5ed","updated":"2016-08-10 18:41:26.000000000","message":"Since you are adding this module, this line can be: \n\n# Copyright (c) 2016 IBM\n\nAlternatively, stick to http://docs.openstack.org/developer/hacking/#openstack-licensing\n\nYour choice!","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"import subprocess"},{"line_number":16,"context_line":"from tempest.common import waiters"},{"line_number":17,"context_line":"from tempest import exceptions as exceptions"},{"line_number":18,"context_line":"from tempest.lib.common.utils import data_utils"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_83493b8e","line":15,"updated":"2016-08-09 09:59:08.000000000","message":"It should look like this:\n\n import subprocess\n import time\n\n import tempest ....\n import tempest...\n\n import neutron ...\n\nSee http://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":"import subprocess"},{"line_number":16,"context_line":"from tempest.common import waiters"},{"line_number":17,"context_line":"from tempest import exceptions as exceptions"},{"line_number":18,"context_line":"from tempest.lib.common.utils import data_utils"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_d2dc64e6","line":15,"in_reply_to":"9ad45d7e_83493b8e","updated":"2016-08-11 05:43:48.000000000","message":"Done. Thanks for sharing me the link and show me the right way to arrange these imports:)","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.tests.tempest.scenario import base"},{"line_number":24,"context_line":"from neutron.tests.tempest.scenario import constants"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"CONF \u003d config.CONF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_e32597c2","line":26,"updated":"2016-08-09 09:59:08.000000000","message":"Nit: Remove this empty line","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.tests.tempest.scenario import base"},{"line_number":24,"context_line":"from neutron.tests.tempest.scenario import constants"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"CONF \u003d config.CONF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_92e94c83","line":26,"in_reply_to":"9ad45d7e_e32597c2","updated":"2016-08-11 05:43:48.000000000","message":"Done","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    @classmethod"},{"line_number":47,"context_line":"    def resource_cleanup(cls):"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        subprocess.call(\u0027rm -f %s\u0027 % cls.KEY_FILE_PATH,"},{"line_number":50,"context_line":"                        shell\u003dTrue, stdout\u003dsubprocess.PIPE)"},{"line_number":51,"context_line":"        super(RoutedNetworkTest, cls).resource_cleanup()"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_af1ee160","line":49,"updated":"2016-08-09 09:59:08.000000000","message":"Is there a reason why not to use neutron.common.utils.execute() ?","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    @classmethod"},{"line_number":47,"context_line":"    def resource_cleanup(cls):"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        subprocess.call(\u0027rm -f %s\u0027 % cls.KEY_FILE_PATH,"},{"line_number":50,"context_line":"                        shell\u003dTrue, stdout\u003dsubprocess.PIPE)"},{"line_number":51,"context_line":"        super(RoutedNetworkTest, cls).resource_cleanup()"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_725e5877","line":49,"in_reply_to":"9ad45d7e_af1ee160","updated":"2016-08-11 05:43:48.000000000","message":"done, it is more nice to use the wrapped method offered by neutron.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _ssh_check(self, username, ip, namespace, retries\u003d5):"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        \"\"\"Though the instance is up, the network maybe not ready to response"},{"line_number":69,"context_line":"         to any request. So we should wait for its ready"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        ret \u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_8fe31d33","line":68,"range":{"start_line":68,"start_character":50,"end_line":68,"end_character":59},"updated":"2016-08-09 09:59:08.000000000","message":"may not be ?","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _ssh_check(self, username, ip, namespace, retries\u003d5):"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        \"\"\"Though the instance is up, the network maybe not ready to response"},{"line_number":69,"context_line":"         to any request. So we should wait for its ready"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        ret \u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_72ec988f","line":68,"range":{"start_line":68,"start_character":50,"end_line":68,"end_character":59},"in_reply_to":"9ad45d7e_8fe31d33","updated":"2016-08-11 05:43:48.000000000","message":"Done","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                                           username, ip)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":78,"context_line":"        for i in range(0, retries):"},{"line_number":79,"context_line":"            time.sleep(5)"},{"line_number":80,"context_line":"            ret \u003d subprocess.call(full_cmd, shell\u003dTrue,"},{"line_number":81,"context_line":"                                  stdout\u003dsubprocess.PIPE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_4f92c5a0","line":78,"range":{"start_line":78,"start_character":23,"end_line":78,"end_character":26},"updated":"2016-08-09 09:59:08.000000000","message":"Nit: 0 is implicit","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                                           username, ip)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":78,"context_line":"        for i in range(0, retries):"},{"line_number":79,"context_line":"            time.sleep(5)"},{"line_number":80,"context_line":"            ret \u003d subprocess.call(full_cmd, shell\u003dTrue,"},{"line_number":81,"context_line":"                                  stdout\u003dsubprocess.PIPE,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_df5108da","line":78,"range":{"start_line":78,"start_character":23,"end_line":78,"end_character":26},"in_reply_to":"9ad45d7e_4f92c5a0","updated":"2016-08-11 05:43:48.000000000","message":"Done","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":78,"context_line":"        for i in range(0, retries):"},{"line_number":79,"context_line":"            time.sleep(5)"},{"line_number":80,"context_line":"            ret \u003d subprocess.call(full_cmd, shell\u003dTrue,"},{"line_number":81,"context_line":"                                  stdout\u003dsubprocess.PIPE,"},{"line_number":82,"context_line":"                                  stderr\u003dsubprocess.STDOUT)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_4f6e4597","line":79,"range":{"start_line":79,"start_character":23,"end_line":79,"end_character":24},"updated":"2016-08-09 09:59:08.000000000","message":"Can we not hardcode this value?","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":78,"context_line":"        for i in range(0, retries):"},{"line_number":79,"context_line":"            time.sleep(5)"},{"line_number":80,"context_line":"            ret \u003d subprocess.call(full_cmd, shell\u003dTrue,"},{"line_number":81,"context_line":"                                  stdout\u003dsubprocess.PIPE,"},{"line_number":82,"context_line":"                                  stderr\u003dsubprocess.STDOUT)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_867d9170","line":79,"range":{"start_line":79,"start_character":23,"end_line":79,"end_character":24},"in_reply_to":"9ad45d7e_4f6e4597","updated":"2016-08-11 05:43:48.000000000","message":"Done","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                  stderr\u003dsubprocess.STDOUT)"},{"line_number":83,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":84,"context_line":"                break"},{"line_number":85,"context_line":"        self.assertEqual(0, ret,"},{"line_number":86,"context_line":"                         \u0027Unable to ssh to instance using a routed network\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def _create_routed_network(self, phy_network, segmentation_id):"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_2f103101","line":86,"range":{"start_line":85,"start_character":0,"end_line":86,"end_character":76},"updated":"2016-08-09 09:59:08.000000000","message":"else:\n    self.fail(\u0027Unable to ssh ... \u0027)","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                  stderr\u003dsubprocess.STDOUT)"},{"line_number":83,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":84,"context_line":"                break"},{"line_number":85,"context_line":"        self.assertEqual(0, ret,"},{"line_number":86,"context_line":"                         \u0027Unable to ssh to instance using a routed network\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def _create_routed_network(self, phy_network, segmentation_id):"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_ee2d09a9","line":86,"range":{"start_line":85,"start_character":0,"end_line":86,"end_character":76},"in_reply_to":"9ad45d7e_2f103101","updated":"2016-08-11 05:43:48.000000000","message":"I think the case is failed only after we have tried more than 5 times, and it we can connect to the instances, we just jump out of the loop.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"08ff8a1ca786cf3f093503799b101468874288e1","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                  stderr\u003dsubprocess.STDOUT)"},{"line_number":83,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":84,"context_line":"                break"},{"line_number":85,"context_line":"        self.assertEqual(0, ret,"},{"line_number":86,"context_line":"                         \u0027Unable to ssh to instance using a routed network\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def _create_routed_network(self, phy_network, segmentation_id):"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_e2b0068e","line":86,"range":{"start_line":85,"start_character":0,"end_line":86,"end_character":76},"in_reply_to":"9ad45d7e_ee2d09a9","updated":"2016-08-15 14:07:47.000000000","message":"I get it, I\u0027m just saying you can use \u0027else\u0027 clause here instead of double-checking ret value:\n\n for i in range(...):\n    ret \u003d ...\n    if ret \u003d\u003d 0:\n        break\n else:\n    self.fail()","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":91,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segmentation_id,"},{"line_number":92,"context_line":"                     \"provider:physical_network\": phy_network,"},{"line_number":93,"context_line":"                     \"provider:network_type\": \u0027vlan\u0027}]"},{"line_number":94,"context_line":"        kwargs \u003d {\u0027shared\u0027: True,"},{"line_number":95,"context_line":"                  \u0027name\u0027: network_name,"},{"line_number":96,"context_line":"                  \u0027segments\u0027: segments,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_4fac8535","line":93,"range":{"start_line":93,"start_character":47,"end_line":93,"end_character":52},"updated":"2016-08-09 09:59:08.000000000","message":"Noobish question as I\u0027m not really familiar with routed networks feature :) Are routed networks always vlan type?","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"98ffa0445206d2a0d521bd431d58b58dabfad050","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":91,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segmentation_id,"},{"line_number":92,"context_line":"                     \"provider:physical_network\": phy_network,"},{"line_number":93,"context_line":"                     \"provider:network_type\": \u0027vlan\u0027}]"},{"line_number":94,"context_line":"        kwargs \u003d {\u0027shared\u0027: True,"},{"line_number":95,"context_line":"                  \u0027name\u0027: network_name,"},{"line_number":96,"context_line":"                  \u0027segments\u0027: segments,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_21990bc5","line":93,"range":{"start_line":93,"start_character":47,"end_line":93,"end_character":52},"in_reply_to":"9ad45d7e_4fac8535","updated":"2016-08-10 18:41:26.000000000","message":"They can be flat or vlan type.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        return network"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _create_routed_subnet(self, phy_network, network, ip_version\u003d4,"},{"line_number":102,"context_line":"                              allocation_pool\u003dNone):"},{"line_number":103,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":104,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_6f26a9cf","line":102,"range":{"start_line":102,"start_character":30,"end_line":102,"end_character":45},"updated":"2016-08-09 09:59:08.000000000","message":"Nit: allocation_pools","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        return network"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def _create_routed_subnet(self, phy_network, network, ip_version\u003d4,"},{"line_number":102,"context_line":"                              allocation_pool\u003dNone):"},{"line_number":103,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":104,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_3f05c479","line":102,"range":{"start_line":102,"start_character":30,"end_line":102,"end_character":45},"in_reply_to":"9ad45d7e_6f26a9cf","updated":"2016-08-11 05:43:48.000000000","message":"Done","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":104,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"},{"line_number":106,"context_line":"        if allocation_pool:"},{"line_number":107,"context_line":"            kwargs_subnet \u003d {"},{"line_number":108,"context_line":"                \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":109,"context_line":"                \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_92b50233","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":26},"updated":"2016-08-09 09:59:08.000000000","message":"Is ever allocation_pool not used in this test? Appears to be YAGNI at this point.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2b4497e41a1b7d49443a92a6533280535d32cfa0","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":104,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"},{"line_number":106,"context_line":"        if allocation_pool:"},{"line_number":107,"context_line":"            kwargs_subnet \u003d {"},{"line_number":108,"context_line":"                \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":109,"context_line":"                \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_50d92b56","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":26},"in_reply_to":"9ad45d7e_38975a3b","updated":"2016-08-11 20:20:04.000000000","message":"I think Jakub has a point here","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":104,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"},{"line_number":106,"context_line":"        if allocation_pool:"},{"line_number":107,"context_line":"            kwargs_subnet \u003d {"},{"line_number":108,"context_line":"                \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":109,"context_line":"                \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_bfb1b491","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":26},"in_reply_to":"9ad45d7e_92b50233","updated":"2016-08-11 05:43:48.000000000","message":"It is used in test_create_server_failed_port_allocation, which test the instance creation in insufficient IP address pool.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"30f171de1ff565679ede591f3015728ea1dad5aa","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":104,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"},{"line_number":106,"context_line":"        if allocation_pool:"},{"line_number":107,"context_line":"            kwargs_subnet \u003d {"},{"line_number":108,"context_line":"                \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":109,"context_line":"                \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_38975a3b","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":26},"in_reply_to":"9ad45d7e_bfb1b491","updated":"2016-08-11 09:48:25.000000000","message":"But is it NOT used? :)","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":105,"context_line":"        ret_segment \u003d self.list_segments(**kwargs_net)"},{"line_number":106,"context_line":"        if allocation_pool:"},{"line_number":107,"context_line":"            kwargs_subnet \u003d {"},{"line_number":108,"context_line":"                \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":109,"context_line":"                \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"},{"line_number":110,"context_line":"                \"allocation_pools\": allocation_pool"},{"line_number":111,"context_line":"            }"},{"line_number":112,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_0f3f2dd7","line":109,"range":{"start_line":107,"start_character":0,"end_line":109,"end_character":63},"updated":"2016-08-09 09:59:08.000000000","message":"How about defining kwargs_subnet on L106 and then:\n\n if allocation_pool:\n    kwargs_subnet[\u0027allocation_pools\u0027] \u003d allocation_pool","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _setup_server(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":122,"context_line":"        network_args \u003d [{\u0027uuid\u0027: self.network[\u0027id\u0027]}] * n_interfaces"},{"line_number":123,"context_line":"        if pre_port is True:"},{"line_number":124,"context_line":"            port \u003d self.create_port(self.network)"},{"line_number":125,"context_line":"            self.assertEqual(\u0027deferred\u0027, port[\u0027ip_allocation\u0027],"},{"line_number":126,"context_line":"                             \"ip allocation should be deferred\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_2f279165","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":27},"updated":"2016-08-09 09:59:08.000000000","message":"if pre_port:","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _setup_server(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":122,"context_line":"        network_args \u003d [{\u0027uuid\u0027: self.network[\u0027id\u0027]}] * n_interfaces"},{"line_number":123,"context_line":"        if pre_port is True:"},{"line_number":124,"context_line":"            port \u003d self.create_port(self.network)"},{"line_number":125,"context_line":"            self.assertEqual(\u0027deferred\u0027, port[\u0027ip_allocation\u0027],"},{"line_number":126,"context_line":"                             \"ip allocation should be deferred\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_fa35fad9","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":27},"in_reply_to":"9ad45d7e_2f279165","updated":"2016-08-11 05:43:48.000000000","message":"Done","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            self.assertEmpty(port[\u0027fixed_ips\u0027],"},{"line_number":128,"context_line":"                             \u0027port should has blank fixed_ips\u0027)"},{"line_number":129,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":130,"context_line":"            server \u003d self.create_server("},{"line_number":131,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"},{"line_number":132,"context_line":"                image_ref\u003dCONF.compute.image_ref,"},{"line_number":133,"context_line":"                key_name\u003dself.keypair[\u0027name\u0027],"},{"line_number":134,"context_line":"                networks\u003dnetwork_args)"},{"line_number":135,"context_line":"        else:"},{"line_number":136,"context_line":"            server \u003d self.create_server("},{"line_number":137,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"},{"line_number":138,"context_line":"                image_ref\u003dCONF.compute.image_ref,"},{"line_number":139,"context_line":"                key_name\u003dself.keypair[\u0027name\u0027],"},{"line_number":140,"context_line":"                networks\u003dnetwork_args)"},{"line_number":141,"context_line":"        try:"},{"line_number":142,"context_line":"            waiters.wait_for_server_status("},{"line_number":143,"context_line":"                self.manager.servers_client,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_afc9c17a","line":140,"range":{"start_line":130,"start_character":0,"end_line":140,"end_character":38},"updated":"2016-08-09 09:59:08.000000000","message":"The else is not necessary.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"cac5f7d6ae34d567f3158b446af5a83329d3b99e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            self.assertEmpty(port[\u0027fixed_ips\u0027],"},{"line_number":128,"context_line":"                             \u0027port should has blank fixed_ips\u0027)"},{"line_number":129,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":130,"context_line":"            server \u003d self.create_server("},{"line_number":131,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"},{"line_number":132,"context_line":"                image_ref\u003dCONF.compute.image_ref,"},{"line_number":133,"context_line":"                key_name\u003dself.keypair[\u0027name\u0027],"},{"line_number":134,"context_line":"                networks\u003dnetwork_args)"},{"line_number":135,"context_line":"        else:"},{"line_number":136,"context_line":"            server \u003d self.create_server("},{"line_number":137,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"},{"line_number":138,"context_line":"                image_ref\u003dCONF.compute.image_ref,"},{"line_number":139,"context_line":"                key_name\u003dself.keypair[\u0027name\u0027],"},{"line_number":140,"context_line":"                networks\u003dnetwork_args)"},{"line_number":141,"context_line":"        try:"},{"line_number":142,"context_line":"            waiters.wait_for_server_status("},{"line_number":143,"context_line":"                self.manager.servers_client,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_3abb12e7","line":140,"range":{"start_line":130,"start_character":0,"end_line":140,"end_character":38},"in_reply_to":"9ad45d7e_afc9c17a","updated":"2016-08-11 05:43:48.000000000","message":"done, I forget to remove this unnecessary code after I have merged port pre-allocation case in this method.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                server[\u0027server\u0027][\u0027id\u0027],"},{"line_number":145,"context_line":"                constants.SERVER_STATUS_ACTIVE)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":148,"context_line":"            ports \u003d self.client.list_ports("},{"line_number":149,"context_line":"                network_id\u003dself.network[\u0027id\u0027],"},{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_0febadb1","line":147,"range":{"start_line":147,"start_character":0,"end_line":147,"end_character":45},"updated":"2016-08-09 09:59:08.000000000","message":"Why do we need to catch this exception, return False and later check the False and raise another exception? I think it makes more sense to not catch this exception and let it fail the test. Then you don\u0027t need to return some boolean and check on L162 and L169.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"98ffa0445206d2a0d521bd431d58b58dabfad050","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                server[\u0027server\u0027][\u0027id\u0027],"},{"line_number":145,"context_line":"                constants.SERVER_STATUS_ACTIVE)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":148,"context_line":"            ports \u003d self.client.list_ports("},{"line_number":149,"context_line":"                network_id\u003dself.network[\u0027id\u0027],"},{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_574afd55","line":147,"range":{"start_line":147,"start_character":0,"end_line":147,"end_character":45},"in_reply_to":"9ad45d7e_0febadb1","updated":"2016-08-10 18:41:26.000000000","message":"In this test we are testing the interaction between Neutron routed networks and Nova. We want to know that Nova raised this specific exception and furthermore, that Nova deleted the ports. That is why Bin is getting the instance\u0027s port in L148. This list in verified to be empty in L168.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"30f171de1ff565679ede591f3015728ea1dad5aa","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                server[\u0027server\u0027][\u0027id\u0027],"},{"line_number":145,"context_line":"                constants.SERVER_STATUS_ACTIVE)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":148,"context_line":"            ports \u003d self.client.list_ports("},{"line_number":149,"context_line":"                network_id\u003dself.network[\u0027id\u0027],"},{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_58da0ee9","line":147,"range":{"start_line":147,"start_character":0,"end_line":147,"end_character":45},"in_reply_to":"9ad45d7e_574afd55","updated":"2016-08-11 09:48:25.000000000","message":"But why don\u0027t we let the exception flow back to L168, where we actually test the negative scenario? You\u0027ll avoid that way returning a 4-tuple. Also you\u0027ll lost a lot of debugging information in case instance ends in error state in positive test because this except will swallow the info.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2b4497e41a1b7d49443a92a6533280535d32cfa0","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                server[\u0027server\u0027][\u0027id\u0027],"},{"line_number":145,"context_line":"                constants.SERVER_STATUS_ACTIVE)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":148,"context_line":"            ports \u003d self.client.list_ports("},{"line_number":149,"context_line":"                network_id\u003dself.network[\u0027id\u0027],"},{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_f0281f9c","line":147,"range":{"start_line":147,"start_character":0,"end_line":147,"end_character":45},"in_reply_to":"9ad45d7e_58da0ee9","updated":"2016-08-11 20:20:04.000000000","message":"@Jakub, I wanted to make clear why we need to catch this exception. But you are right in that it is better to handle the exception in _create_server_with_two_ports_and_verify","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0809b89579a1668914334ba5c8397df4eaade9a8","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":151,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":154,"context_line":"        port \u003d self.client.list_ports("},{"line_number":155,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":156,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_d29e5ab7","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":49},"updated":"2016-08-09 09:59:08.000000000","message":"dhcp namespaces are created on nodes with running dhcp agent. What if this test runs in multinode environment and your server is scheduled on a compute node?","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"0e0d2339dd70a926d21e4400c17e74440366829f","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":151,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":154,"context_line":"        port \u003d self.client.list_ports("},{"line_number":155,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":156,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_2756e405","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":49},"in_reply_to":"9ad45d7e_0ad6574e","updated":"2016-08-12 03:10:55.000000000","message":"I see, that approach could be more complicated. Now, I tend to set the variables that related with test environment as constants (As PHY_NETWORK1_IP cidr).","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"94308cbf971c69a8f550da55d7727be436fcbbc2","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":151,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":154,"context_line":"        port \u003d self.client.list_ports("},{"line_number":155,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":156,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_d92d6da9","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":49},"in_reply_to":"9ad45d7e_17b2454c","updated":"2016-08-11 06:35:51.000000000","message":"as Jakub says, it could be a problem when the test case is scheduled on a node that do not have hdcp-agent.\n\nI am thinking about when doing the ssh connection test, we firstly find the node that has the given namespace, and use ssh_lib to logon that machine, in this way, we can always doing the network test on the node that has the namespace we want.","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"98ffa0445206d2a0d521bd431d58b58dabfad050","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":151,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":154,"context_line":"        port \u003d self.client.list_ports("},{"line_number":155,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":156,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_17b2454c","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":49},"in_reply_to":"9ad45d7e_d29e5ab7","updated":"2016-08-10 18:41:26.000000000","message":"The 2 tests cases in this script can be executed in an allinone environment, as long as the segments plugin is enabled","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2b4497e41a1b7d49443a92a6533280535d32cfa0","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":151,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":154,"context_line":"        port \u003d self.client.list_ports("},{"line_number":155,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":156,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_0ad6574e","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":49},"in_reply_to":"9ad45d7e_d92d6da9","updated":"2016-08-11 20:20:04.000000000","message":"Mhhh.... That would be too convoluted and prone to failures. Let\u0027s assume these two test cases will run in a devstack with only one \"all in one\" node. I created such a configuration here: https://github.com/miguellavalle/allinonevagrant.\n\nAnd ran this script and it works just fine: http://paste.openstack.org/show/554259/\n\nFor the connectivity test, we can create a two nodes config, both with dhcp agents","commit_id":"1744253242ccb1fce7323e29aafe10de45822b63"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        return network"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _create_routed_subnet(self, phy_network, network, ip_version\u003d4,"},{"line_number":109,"context_line":"                              allocation_pools\u003dNone):"},{"line_number":110,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":111,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":112,"context_line":"        ret_segment \u003d self.admin_client.list_segments(**kwargs_net)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_d0a19b95","line":109,"range":{"start_line":109,"start_character":46,"end_line":109,"end_character":51},"updated":"2016-08-11 20:20:46.000000000","message":"Jakub is right. In all the cases we call this method, we pass allocation_pools, so we don\u0027t need this","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        return network"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _create_routed_subnet(self, phy_network, network, ip_version\u003d4,"},{"line_number":109,"context_line":"                              allocation_pools\u003dNone):"},{"line_number":110,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":111,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":112,"context_line":"        ret_segment \u003d self.admin_client.list_segments(**kwargs_net)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_3c38b7d2","line":109,"range":{"start_line":109,"start_character":46,"end_line":109,"end_character":51},"in_reply_to":"9ad45d7e_d0a19b95","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":115,"context_line":"            \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027]"},{"line_number":116,"context_line":"        }"},{"line_number":117,"context_line":"        if allocation_pools:"},{"line_number":118,"context_line":"                kwargs_subnet[\u0027allocation_pools\u0027] \u003d allocation_pools"},{"line_number":119,"context_line":"        return self.create_subnet("},{"line_number":120,"context_line":"            self.network, client\u003dself.admin_client, ip_version\u003dip_version,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_50bc8bba","line":117,"range":{"start_line":117,"start_character":1,"end_line":117,"end_character":28},"updated":"2016-08-11 20:20:46.000000000","message":"Jakub is right. In all the cases we call this method, we pass allocation_pools, we don\u0027t need this","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":115,"context_line":"            \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027]"},{"line_number":116,"context_line":"        }"},{"line_number":117,"context_line":"        if allocation_pools:"},{"line_number":118,"context_line":"                kwargs_subnet[\u0027allocation_pools\u0027] \u003d allocation_pools"},{"line_number":119,"context_line":"        return self.create_subnet("},{"line_number":120,"context_line":"            self.network, client\u003dself.admin_client, ip_version\u003dip_version,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_fc21ff9e","line":117,"range":{"start_line":117,"start_character":1,"end_line":117,"end_character":28},"in_reply_to":"9ad45d7e_50bc8bba","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027]"},{"line_number":116,"context_line":"        }"},{"line_number":117,"context_line":"        if allocation_pools:"},{"line_number":118,"context_line":"                kwargs_subnet[\u0027allocation_pools\u0027] \u003d allocation_pools"},{"line_number":119,"context_line":"        return self.create_subnet("},{"line_number":120,"context_line":"            self.network, client\u003dself.admin_client, ip_version\u003dip_version,"},{"line_number":121,"context_line":"            **kwargs_subnet)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_10edf3b6","line":118,"range":{"start_line":118,"start_character":30,"end_line":118,"end_character":68},"updated":"2016-08-11 20:20:46.000000000","message":"Let\u0027s move this to the creation of the kwargs_subnet dictionary, right below line 115","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027]"},{"line_number":116,"context_line":"        }"},{"line_number":117,"context_line":"        if allocation_pools:"},{"line_number":118,"context_line":"                kwargs_subnet[\u0027allocation_pools\u0027] \u003d allocation_pools"},{"line_number":119,"context_line":"        return self.create_subnet("},{"line_number":120,"context_line":"            self.network, client\u003dself.admin_client, ip_version\u003dip_version,"},{"line_number":121,"context_line":"            **kwargs_subnet)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_1c1fb35b","line":118,"range":{"start_line":118,"start_character":30,"end_line":118,"end_character":68},"in_reply_to":"9ad45d7e_10edf3b6","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            image_ref\u003dCONF.compute.image_ref,"},{"line_number":135,"context_line":"            key_name\u003dself.keypair[\u0027name\u0027],"},{"line_number":136,"context_line":"            networks\u003dnetwork_args)"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            waiters.wait_for_server_status("},{"line_number":139,"context_line":"                self.manager.servers_client,"},{"line_number":140,"context_line":"                server[\u0027server\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_64a471b9","line":137,"range":{"start_line":137,"start_character":8,"end_line":137,"end_character":12},"updated":"2016-08-11 20:20:46.000000000","message":"We can move this to _create_server_with_two_ports_and_verify","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            image_ref\u003dCONF.compute.image_ref,"},{"line_number":135,"context_line":"            key_name\u003dself.keypair[\u0027name\u0027],"},{"line_number":136,"context_line":"            networks\u003dnetwork_args)"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            waiters.wait_for_server_status("},{"line_number":139,"context_line":"                self.manager.servers_client,"},{"line_number":140,"context_line":"                server[\u0027server\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_dc287b88","line":137,"range":{"start_line":137,"start_character":8,"end_line":137,"end_character":12},"in_reply_to":"9ad45d7e_64a471b9","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                server[\u0027server\u0027][\u0027id\u0027],"},{"line_number":141,"context_line":"                constants.SERVER_STATUS_ACTIVE)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":144,"context_line":"            ports \u003d self.client.list_ports("},{"line_number":145,"context_line":"                network_id\u003dself.network[\u0027id\u0027],"},{"line_number":146,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":147,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_a4b30909","line":146,"range":{"start_line":143,"start_character":0,"end_line":146,"end_character":58},"updated":"2016-08-11 20:20:46.000000000","message":"We can move this to _create_server_with_two_ports_and_verify","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                server[\u0027server\u0027][\u0027id\u0027],"},{"line_number":141,"context_line":"                constants.SERVER_STATUS_ACTIVE)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":144,"context_line":"            ports \u003d self.client.list_ports("},{"line_number":145,"context_line":"                network_id\u003dself.network[\u0027id\u0027],"},{"line_number":146,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":147,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_7c17cf44","line":146,"range":{"start_line":143,"start_character":0,"end_line":146,"end_character":58},"in_reply_to":"9ad45d7e_a4b30909","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":147,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":150,"context_line":"        port \u003d self.client.list_ports("},{"line_number":151,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":152,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_64e0f1cd","line":149,"updated":"2016-08-11 20:20:46.000000000","message":"This line can be moved to _create_server_and_test and _create_server_with_two_ports_and_verify","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":147,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":150,"context_line":"        port \u003d self.client.list_ports("},{"line_number":151,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":152,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_5c164b4c","line":149,"in_reply_to":"9ad45d7e_64e0f1cd","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":150,"context_line":"        port \u003d self.client.list_ports("},{"line_number":151,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":152,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":153,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_interfaces\u003d1):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_6492b14d","line":152,"range":{"start_line":150,"start_character":8,"end_line":152,"end_character":54},"updated":"2016-08-11 20:20:46.000000000","message":"We can move this to create_server_and_test","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            return server[\u0027server\u0027][\u0027id\u0027], ports, None, False"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":150,"context_line":"        port \u003d self.client.list_ports("},{"line_number":151,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":152,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":153,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_interfaces\u003d1):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_1c085327","line":152,"range":{"start_line":150,"start_character":8,"end_line":152,"end_character":54},"in_reply_to":"9ad45d7e_6492b14d","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        port \u003d self.client.list_ports("},{"line_number":151,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":152,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":153,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":156,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_7361d9a8","line":153,"range":{"start_line":153,"start_character":37,"end_line":153,"end_character":60},"updated":"2016-08-11 20:20:46.000000000","message":"We don\u0027t need to return this","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        port \u003d self.client.list_ports("},{"line_number":151,"context_line":"            network_id\u003dself.network[\u0027id\u0027],"},{"line_number":152,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":153,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":156,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_bc04a714","line":153,"range":{"start_line":153,"start_character":37,"end_line":153,"end_character":60},"in_reply_to":"9ad45d7e_7361d9a8","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":153,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":156,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":157,"context_line":"            pre_port, n_interfaces)"},{"line_number":158,"context_line":"        self.assertTrue(vm_status, \"server should be created in active status\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_848525d0","line":155,"range":{"start_line":155,"start_character":27,"end_line":155,"end_character":31},"updated":"2016-08-11 20:20:46.000000000","message":"Nit, to be consistent with the other method, this can be \u0027verify\u0027","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            device_id\u003dserver[\u0027server\u0027][\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":153,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":156,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":157,"context_line":"            pre_port, n_interfaces)"},{"line_number":158,"context_line":"        self.assertTrue(vm_status, \"server should be created in active status\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_c11d3874","line":155,"range":{"start_line":155,"start_character":27,"end_line":155,"end_character":31},"in_reply_to":"9ad45d7e_848525d0","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":156,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":157,"context_line":"            pre_port, n_interfaces)"},{"line_number":158,"context_line":"        self.assertTrue(vm_status, \"server should be created in active status\")"},{"line_number":159,"context_line":"        self._check_connectivity(ports[0], namespace)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_04edb5b6","line":156,"range":{"start_line":156,"start_character":9,"end_line":156,"end_character":15},"updated":"2016-08-11 20:20:46.000000000","message":"server_id would be better","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        return server[\u0027server\u0027][\u0027id\u0027], port, namespace, True"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _create_server_and_test(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":156,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":157,"context_line":"            pre_port, n_interfaces)"},{"line_number":158,"context_line":"        self.assertTrue(vm_status, \"server should be created in active status\")"},{"line_number":159,"context_line":"        self._check_connectivity(ports[0], namespace)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_e1331c12","line":156,"range":{"start_line":156,"start_character":9,"end_line":156,"end_character":15},"in_reply_to":"9ad45d7e_04edb5b6","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71c2a55356e89548818d0af6c4323f7a63fe0c46","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _create_server_with_two_ports_and_verify(self):"},{"line_number":162,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":163,"context_line":"            pre_port\u003dFalse, n_interfaces\u003d2)"},{"line_number":164,"context_line":"        self.assertEmpty(ports, msg\u003d\"ports should not be created\")"},{"line_number":165,"context_line":"        self.assertFalse(vm_status, \"server should create in error status\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_e44221ad","line":162,"range":{"start_line":162,"start_character":9,"end_line":162,"end_character":15},"updated":"2016-08-11 20:20:46.000000000","message":"server_id would be better","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"624c36a22ff01116eaecd02d3a7568bc6fcc7670","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _create_server_with_two_ports_and_verify(self):"},{"line_number":162,"context_line":"        (server, ports, namespace, vm_status) \u003d self._setup_server("},{"line_number":163,"context_line":"            pre_port\u003dFalse, n_interfaces\u003d2)"},{"line_number":164,"context_line":"        self.assertEmpty(ports, msg\u003d\"ports should not be created\")"},{"line_number":165,"context_line":"        self.assertFalse(vm_status, \"server should create in error status\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_415ca84a","line":162,"range":{"start_line":162,"start_character":9,"end_line":162,"end_character":15},"in_reply_to":"9ad45d7e_e44221ad","updated":"2016-08-12 03:13:45.000000000","message":"Done","commit_id":"77d79ad3160f68404f116f58c3fa61f6ae78ad18"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from netaddr.ip import IPNetwork"},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_e3477649","line":16,"updated":"2016-08-12 17:55:48.000000000","message":"We only import modules: http://docs.openstack.org/developer/hacking/#imports\n\nSo this should be:\n\nfrom netaddr import ip","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from netaddr.ip import IPNetwork"},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_9b451fb5","line":16,"in_reply_to":"3ac371cc_a209ee2e","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"70a90be7f4002191fd8bdc180cd2399df34c6727","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from netaddr.ip import IPNetwork"},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_a209ee2e","line":16,"in_reply_to":"9ad45d7e_e3477649","updated":"2016-08-15 14:30:39.000000000","message":"Also netaddr is 3rd party lib","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from netaddr.ip import IPNetwork"},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":"import time"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_5b3ba738","line":16,"in_reply_to":"9ad45d7e_e3477649","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"70a90be7f4002191fd8bdc180cd2399df34c6727","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def resource_cleanup(cls):"},{"line_number":54,"context_line":"        cmd \u003d \u0027rm -f %s\u0027 % cls.KEY_FILE_PATH"},{"line_number":55,"context_line":"        obj \u003d common_utils.subprocess_popen(cmd, shell\u003dTrue, stdin\u003dNone,"},{"line_number":56,"context_line":"                                            stdout\u003dsubprocess.PIPE,"},{"line_number":57,"context_line":"                                            stderr\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        obj.wait()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_7d49578b","line":55,"range":{"start_line":55,"start_character":27,"end_line":55,"end_character":43},"updated":"2016-08-15 14:30:39.000000000","message":"So again, is there a reason why not to use execute() [1]? You don\u0027t do anything specific with the pipe.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/agent/linux/utils.py#L104","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def resource_cleanup(cls):"},{"line_number":54,"context_line":"        cmd \u003d \u0027rm -f %s\u0027 % cls.KEY_FILE_PATH"},{"line_number":55,"context_line":"        obj \u003d common_utils.subprocess_popen(cmd, shell\u003dTrue, stdin\u003dNone,"},{"line_number":56,"context_line":"                                            stdout\u003dsubprocess.PIPE,"},{"line_number":57,"context_line":"                                            stderr\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        obj.wait()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_86cf867e","line":55,"range":{"start_line":55,"start_character":27,"end_line":55,"end_character":43},"in_reply_to":"3ac371cc_7d49578b","updated":"2016-08-16 06:08:06.000000000","message":"to use execute() I should import neutron.agent.linux, it returns with error:\n\nERROR: Failure: ArgsAlreadyParsedError (arguments already parsed: cannot register CLI option)\nsee http://paste.openstack.org/show/557845/\nTo make it simple, I just use subprocess_popen from common_utils.","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"14ed3dfaaa9af565e5112557e74182ac0ab95c97","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def resource_cleanup(cls):"},{"line_number":54,"context_line":"        cmd \u003d \u0027rm -f %s\u0027 % cls.KEY_FILE_PATH"},{"line_number":55,"context_line":"        obj \u003d common_utils.subprocess_popen(cmd, shell\u003dTrue, stdin\u003dNone,"},{"line_number":56,"context_line":"                                            stdout\u003dsubprocess.PIPE,"},{"line_number":57,"context_line":"                                            stderr\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        obj.wait()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_a2b1c791","line":55,"range":{"start_line":55,"start_character":27,"end_line":55,"end_character":43},"in_reply_to":"3ac371cc_86cf867e","updated":"2016-08-16 07:54:12.000000000","message":"Damn, we\u0027ve already seen this in previous tests, it\u0027s a tempest bug: https://bugs.launchpad.net/tempest/+bug/1592345\n\nI sent https://review.openstack.org/#/c/355769/ that should avoid importing config with ip_lib. Can you please try to rebase this patch on top of it?","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2cf04f8147fa3b3205e7a92c95b92f6e7adf14e5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def resource_cleanup(cls):"},{"line_number":54,"context_line":"        cmd \u003d \u0027rm -f %s\u0027 % cls.KEY_FILE_PATH"},{"line_number":55,"context_line":"        obj \u003d common_utils.subprocess_popen(cmd, shell\u003dTrue, stdin\u003dNone,"},{"line_number":56,"context_line":"                                            stdout\u003dsubprocess.PIPE,"},{"line_number":57,"context_line":"                                            stderr\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        obj.wait()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_e6a27098","line":55,"range":{"start_line":55,"start_character":27,"end_line":55,"end_character":43},"in_reply_to":"3ac371cc_91565bcc","updated":"2016-08-17 08:18:27.000000000","message":"I apologize, I did that patch in a hurry, didn\u0027t test it and screwed up. I\u0027ll try to come up with some other workaround, the tempest bug doesn\u0027t seem to have any attention.","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fd13d4672952d2d97ae58523a27089a2dd8ec9ba","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def resource_cleanup(cls):"},{"line_number":54,"context_line":"        cmd \u003d \u0027rm -f %s\u0027 % cls.KEY_FILE_PATH"},{"line_number":55,"context_line":"        obj \u003d common_utils.subprocess_popen(cmd, shell\u003dTrue, stdin\u003dNone,"},{"line_number":56,"context_line":"                                            stdout\u003dsubprocess.PIPE,"},{"line_number":57,"context_line":"                                            stderr\u003dsubprocess.PIPE)"},{"line_number":58,"context_line":"        obj.wait()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_91565bcc","line":55,"range":{"start_line":55,"start_character":27,"end_line":55,"end_character":43},"in_reply_to":"3ac371cc_a2b1c791","updated":"2016-08-17 06:08:58.000000000","message":"Sure, thanks. No problem on importing ip_lib, but I found that there is no execute in neutron/common/utils, actually the execute is moved to neutron/agent/linux/agent. I have the same error as the Jenkins\u0027log http://logs.openstack.org/69/355769/1/check/gate-neutron-python27-ubuntu-xenial/bac0867/console.html\n\nBTW, I still suffer from importing neutron.agent.linux.utils in this test.","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _ssh_check(self, username, ip, namespace, retries\u003d5, timeout\u003d5):"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        \"\"\"Though the instance is up, the network may not be ready to response"},{"line_number":77,"context_line":"         to any request. So we should wait for its ready"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        ret \u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_471f6f5b","line":76,"range":{"start_line":76,"start_character":70,"end_line":76,"end_character":78},"updated":"2016-08-12 17:55:48.000000000","message":"Nit: respond","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _ssh_check(self, username, ip, namespace, retries\u003d5, timeout\u003d5):"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        \"\"\"Though the instance is up, the network may not be ready to response"},{"line_number":77,"context_line":"         to any request. So we should wait for its ready"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        ret \u003d 1"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_6691aa52","line":76,"range":{"start_line":76,"start_character":70,"end_line":76,"end_character":78},"in_reply_to":"9ad45d7e_471f6f5b","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def _ssh_check(self, username, ip, namespace, retries\u003d5, timeout\u003d5):"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        \"\"\"Though the instance is up, the network may not be ready to response"},{"line_number":77,"context_line":"         to any request. So we should wait for its ready"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        ret \u003d 1"},{"line_number":80,"context_line":"        ssh_commands \u003d \u0027ssh -o UserKnownHostsFile\u003d/dev/null -o \u0027 \\"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_c74a3f55","line":77,"range":{"start_line":77,"start_character":47,"end_line":77,"end_character":56},"updated":"2016-08-12 17:55:48.000000000","message":"Nit: it to be ready","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    def _ssh_check(self, username, ip, namespace, retries\u003d5, timeout\u003d5):"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        \"\"\"Though the instance is up, the network may not be ready to response"},{"line_number":77,"context_line":"         to any request. So we should wait for its ready"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        ret \u003d 1"},{"line_number":80,"context_line":"        ssh_commands \u003d \u0027ssh -o UserKnownHostsFile\u003d/dev/null -o \u0027 \\"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_c6a05ea2","line":77,"range":{"start_line":77,"start_character":47,"end_line":77,"end_character":56},"in_reply_to":"9ad45d7e_c74a3f55","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        \"\"\"Though the instance is up, the network may not be ready to response"},{"line_number":77,"context_line":"         to any request. So we should wait for its ready"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        ret \u003d 1"},{"line_number":80,"context_line":"        ssh_commands \u003d \u0027ssh -o UserKnownHostsFile\u003d/dev/null -o \u0027 \\"},{"line_number":81,"context_line":"                       \u0027StrictHostKeyChecking\u003dno -o ConnectTimeout\u003d40 \u0027 \\"},{"line_number":82,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.KEY_FILE_PATH,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_a772ab47","line":79,"updated":"2016-08-12 17:55:48.000000000","message":"I don\u0027t think we need this line","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        \"\"\"Though the instance is up, the network may not be ready to response"},{"line_number":77,"context_line":"         to any request. So we should wait for its ready"},{"line_number":78,"context_line":"        \"\"\""},{"line_number":79,"context_line":"        ret \u003d 1"},{"line_number":80,"context_line":"        ssh_commands \u003d \u0027ssh -o UserKnownHostsFile\u003d/dev/null -o \u0027 \\"},{"line_number":81,"context_line":"                       \u0027StrictHostKeyChecking\u003dno -o ConnectTimeout\u003d40 \u0027 \\"},{"line_number":82,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.KEY_FILE_PATH,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_a69ba271","line":79,"in_reply_to":"9ad45d7e_a772ab47","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"70a90be7f4002191fd8bdc180cd2399df34c6727","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.KEY_FILE_PATH,"},{"line_number":83,"context_line":"                                           username, ip)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":86,"context_line":"        for i in range(retries):"},{"line_number":87,"context_line":"            time.sleep(timeout)"},{"line_number":88,"context_line":"            obj \u003d common_utils.subprocess_popen(full_cmd, shell\u003dTrue,"},{"line_number":89,"context_line":"                                                stdout\u003dsubprocess.PIPE,"},{"line_number":90,"context_line":"                                                stderr\u003dsubprocess.STDOUT)"},{"line_number":91,"context_line":"            obj.wait()"},{"line_number":92,"context_line":"            ret \u003d obj.returncode"},{"line_number":93,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":94,"context_line":"                break"},{"line_number":95,"context_line":"        self.assertEqual(0, ret,"},{"line_number":96,"context_line":"                         \u0027Unable to ssh to instance using a routed network\u0027)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _create_routed_network(self, phy_network, segmentation_id):"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_cf5252dd","line":96,"range":{"start_line":85,"start_character":0,"end_line":96,"end_character":76},"updated":"2016-08-15 14:30:39.000000000","message":"I\u0027d refactor to:\n\n from neutron.agent.linux import ip_lib\n\n ...\n ssh_commands \u003d \u0027ssh -o ... \u0027\n wrapper \u003d ip_lib.IPWrapper(namespace)\n for i in range(retries):\n     try:\n         wrapper.netns.execute(ssh_commands)\n     except RuntimeError:\n         pass\n     else:\n         break\n else:\n     self.fail(\u0027Unable to ssh to instance with ip %s using routed network\u0027 % ip)","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.KEY_FILE_PATH,"},{"line_number":83,"context_line":"                                           username, ip)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":86,"context_line":"        for i in range(retries):"},{"line_number":87,"context_line":"            time.sleep(timeout)"},{"line_number":88,"context_line":"            obj \u003d common_utils.subprocess_popen(full_cmd, shell\u003dTrue,"},{"line_number":89,"context_line":"                                                stdout\u003dsubprocess.PIPE,"},{"line_number":90,"context_line":"                                                stderr\u003dsubprocess.STDOUT)"},{"line_number":91,"context_line":"            obj.wait()"},{"line_number":92,"context_line":"            ret \u003d obj.returncode"},{"line_number":93,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":94,"context_line":"                break"},{"line_number":95,"context_line":"        self.assertEqual(0, ret,"},{"line_number":96,"context_line":"                         \u0027Unable to ssh to instance using a routed network\u0027)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _create_routed_network(self, phy_network, segmentation_id):"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_46b74e86","line":96,"range":{"start_line":85,"start_character":0,"end_line":96,"end_character":76},"in_reply_to":"3ac371cc_cf5252dd","updated":"2016-08-16 06:08:06.000000000","message":"Your approach is much more simple and easy for use. But I have a problem on importing neutron.agent.linux.\nsee http://paste.openstack.org/show/557845/\ncould you figure out the reason of that import error? Thanks :)","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3a7da8a5de8e773c9106155d14a834eaa15b6150","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    def _create_routed_network(self, phy_network, segmentation_id):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":101,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segmentation_id,"},{"line_number":102,"context_line":"                     \"provider:physical_network\": phy_network,"},{"line_number":103,"context_line":"                     \"provider:network_type\": self.NETWORK_TYPE}]"},{"line_number":104,"context_line":"        kwargs \u003d {\u0027shared\u0027: True,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_c3a2329a","line":101,"updated":"2016-08-12 17:12:14.000000000","message":"You think we\u0027ll be able to get this in to a multi-node setup anytime soon? Have you looked in to it?","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    def _create_routed_network(self, phy_network, segmentation_id):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        network_name \u003d data_utils.rand_name(\"test-routed_network\")"},{"line_number":101,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segmentation_id,"},{"line_number":102,"context_line":"                     \"provider:physical_network\": phy_network,"},{"line_number":103,"context_line":"                     \"provider:network_type\": self.NETWORK_TYPE}]"},{"line_number":104,"context_line":"        kwargs \u003d {\u0027shared\u0027: True,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_41cbb8a5","line":101,"in_reply_to":"9ad45d7e_c3a2329a","updated":"2016-08-16 06:08:06.000000000","message":"I have tested this scripts in multi-node environment locally. The test_create_server_failed_port_allocation failed in multi-node environment. The deferred port that created cannot be removed when deleting the instance. I am wondering  there may exist bugs in routed network? this test case can be run successfully in allinone environment.","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3a7da8a5de8e773c9106155d14a834eaa15b6150","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segmentation_id,"},{"line_number":102,"context_line":"                     \"provider:physical_network\": phy_network,"},{"line_number":103,"context_line":"                     \"provider:network_type\": self.NETWORK_TYPE}]"},{"line_number":104,"context_line":"        kwargs \u003d {\u0027shared\u0027: True,"},{"line_number":105,"context_line":"                  \u0027name\u0027: network_name,"},{"line_number":106,"context_line":"                  \u0027segments\u0027: segments,"},{"line_number":107,"context_line":"                  \"router:external\": \"False\"}"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_237d0ee8","line":104,"range":{"start_line":104,"start_character":8,"end_line":104,"end_character":14},"updated":"2016-08-12 17:12:14.000000000","message":"nit: Why not just pass these directly. I have to say I don\u0027t understand why this is done so much.\n\n  network \u003d self.create_shared_network(shared\u003dTrue,\n                                       name\u003dnetwork_name,\n                                       segments\u003dsegments,\n                                       **{\"router:external\", \"False\"})","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        segments \u003d [{\"provider:segmentation_id\": segmentation_id,"},{"line_number":102,"context_line":"                     \"provider:physical_network\": phy_network,"},{"line_number":103,"context_line":"                     \"provider:network_type\": self.NETWORK_TYPE}]"},{"line_number":104,"context_line":"        kwargs \u003d {\u0027shared\u0027: True,"},{"line_number":105,"context_line":"                  \u0027name\u0027: network_name,"},{"line_number":106,"context_line":"                  \u0027segments\u0027: segments,"},{"line_number":107,"context_line":"                  \"router:external\": \"False\"}"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_892676cc","line":104,"range":{"start_line":104,"start_character":8,"end_line":104,"end_character":14},"in_reply_to":"9ad45d7e_237d0ee8","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3a7da8a5de8e773c9106155d14a834eaa15b6150","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def _create_routed_subnet(self, phy_network, network,"},{"line_number":112,"context_line":"                              allocation_pools, ip_version\u003d4):"},{"line_number":113,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":114,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":115,"context_line":"        ret_segment \u003d self.admin_client.list_segments(**kwargs_net)"},{"line_number":116,"context_line":"        kwargs_subnet \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_03fc4a3d","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":18},"updated":"2016-08-12 17:12:14.000000000","message":"ditto","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def _create_routed_subnet(self, phy_network, network,"},{"line_number":112,"context_line":"                              allocation_pools, ip_version\u003d4):"},{"line_number":113,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":114,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":115,"context_line":"        ret_segment \u003d self.admin_client.list_segments(**kwargs_net)"},{"line_number":116,"context_line":"        kwargs_subnet \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_2cf790f6","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":18},"in_reply_to":"9ad45d7e_03fc4a3d","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3a7da8a5de8e773c9106155d14a834eaa15b6150","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":114,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":115,"context_line":"        ret_segment \u003d self.admin_client.list_segments(**kwargs_net)"},{"line_number":116,"context_line":"        kwargs_subnet \u003d {"},{"line_number":117,"context_line":"            \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":118,"context_line":"            \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"},{"line_number":119,"context_line":"            \u0027cidr\u0027: IPNetwork(self.PHY_NETWORK1_IP),"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_e3f8164c","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":21},"updated":"2016-08-12 17:12:14.000000000","message":"ditto","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        kwargs_net \u003d {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":114,"context_line":"                      \u0027physical_network\u0027: phy_network}"},{"line_number":115,"context_line":"        ret_segment \u003d self.admin_client.list_segments(**kwargs_net)"},{"line_number":116,"context_line":"        kwargs_subnet \u003d {"},{"line_number":117,"context_line":"            \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":118,"context_line":"            \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"},{"line_number":119,"context_line":"            \u0027cidr\u0027: IPNetwork(self.PHY_NETWORK1_IP),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_8cde846b","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":21},"in_reply_to":"9ad45d7e_e3f8164c","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        kwargs_subnet \u003d {"},{"line_number":117,"context_line":"            \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":118,"context_line":"            \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"},{"line_number":119,"context_line":"            \u0027cidr\u0027: IPNetwork(self.PHY_NETWORK1_IP),"},{"line_number":120,"context_line":"            \u0027mask_bits\u0027: self.MASK_BITS,"},{"line_number":121,"context_line":"            \u0027allocation_pools\u0027: allocation_pools"},{"line_number":122,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_0cbe37ff","line":119,"range":{"start_line":119,"start_character":20,"end_line":119,"end_character":29},"updated":"2016-08-12 17:55:48.000000000","message":"This should be ip.IPNetwork","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        kwargs_subnet \u003d {"},{"line_number":117,"context_line":"            \u0027name\u0027: data_utils.rand_name(\"test-routed_subnet\"),"},{"line_number":118,"context_line":"            \u0027segment_id\u0027: ret_segment[\u0027segments\u0027][0][\u0027id\u0027],"},{"line_number":119,"context_line":"            \u0027cidr\u0027: IPNetwork(self.PHY_NETWORK1_IP),"},{"line_number":120,"context_line":"            \u0027mask_bits\u0027: self.MASK_BITS,"},{"line_number":121,"context_line":"            \u0027allocation_pools\u0027: allocation_pools"},{"line_number":122,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_132d9346","line":119,"range":{"start_line":119,"start_character":20,"end_line":119,"end_character":29},"in_reply_to":"9ad45d7e_0cbe37ff","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3a7da8a5de8e773c9106155d14a834eaa15b6150","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            self.assertEqual(\u0027deferred\u0027, port[\u0027ip_allocation\u0027],"},{"line_number":132,"context_line":"                             \"ip allocation should be deferred\")"},{"line_number":133,"context_line":"            self.assertEmpty(port[\u0027fixed_ips\u0027],"},{"line_number":134,"context_line":"                             \u0027port should has blank fixed_ips\u0027)"},{"line_number":135,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":136,"context_line":"        server \u003d self.create_server("},{"line_number":137,"context_line":"            flavor_ref\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_8725e70b","line":134,"range":{"start_line":134,"start_character":42,"end_line":134,"end_character":45},"updated":"2016-08-12 17:12:14.000000000","message":"nit: *have","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            self.assertEqual(\u0027deferred\u0027, port[\u0027ip_allocation\u0027],"},{"line_number":132,"context_line":"                             \"ip allocation should be deferred\")"},{"line_number":133,"context_line":"            self.assertEmpty(port[\u0027fixed_ips\u0027],"},{"line_number":134,"context_line":"                             \u0027port should has blank fixed_ips\u0027)"},{"line_number":135,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":136,"context_line":"        server \u003d self.create_server("},{"line_number":137,"context_line":"            flavor_ref\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_c15688d1","line":134,"range":{"start_line":134,"start_character":42,"end_line":134,"end_character":45},"in_reply_to":"9ad45d7e_8725e70b","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _create_server_and_verify(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":144,"context_line":"        server_id \u003d self._setup_server(pre_port, n_interfaces)"},{"line_number":145,"context_line":"        try:"},{"line_number":146,"context_line":"            waiters.wait_for_server_status("},{"line_number":147,"context_line":"                self.manager.servers_client,"},{"line_number":148,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_a950bd5f","line":145,"range":{"start_line":145,"start_character":8,"end_line":145,"end_character":12},"updated":"2016-08-12 17:55:48.000000000","message":"In this method, we don\u0027t need to catch any exceptions. If any occur, let the script fail","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _create_server_and_verify(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":144,"context_line":"        server_id \u003d self._setup_server(pre_port, n_interfaces)"},{"line_number":145,"context_line":"        try:"},{"line_number":146,"context_line":"            waiters.wait_for_server_status("},{"line_number":147,"context_line":"                self.manager.servers_client,"},{"line_number":148,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_93fa23bc","line":145,"range":{"start_line":145,"start_character":8,"end_line":145,"end_character":12},"in_reply_to":"3ac371cc_cfd89220","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"70a90be7f4002191fd8bdc180cd2399df34c6727","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _create_server_and_verify(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":144,"context_line":"        server_id \u003d self._setup_server(pre_port, n_interfaces)"},{"line_number":145,"context_line":"        try:"},{"line_number":146,"context_line":"            waiters.wait_for_server_status("},{"line_number":147,"context_line":"                self.manager.servers_client,"},{"line_number":148,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_cfd89220","line":145,"range":{"start_line":145,"start_character":8,"end_line":145,"end_character":12},"in_reply_to":"9ad45d7e_a950bd5f","updated":"2016-08-15 14:30:39.000000000","message":"+1","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _create_server_and_verify(self, pre_port\u003dFalse, n_interfaces\u003d1):"},{"line_number":144,"context_line":"        server_id \u003d self._setup_server(pre_port, n_interfaces)"},{"line_number":145,"context_line":"        try:"},{"line_number":146,"context_line":"            waiters.wait_for_server_status("},{"line_number":147,"context_line":"                self.manager.servers_client,"},{"line_number":148,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_d3049bc1","line":145,"range":{"start_line":145,"start_character":8,"end_line":145,"end_character":12},"in_reply_to":"9ad45d7e_a950bd5f","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            waiters.wait_for_server_status("},{"line_number":147,"context_line":"                self.manager.servers_client,"},{"line_number":148,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"},{"line_number":149,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":150,"context_line":"            self.fail(\u0027server should be created in active status\u0027)"},{"line_number":151,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":152,"context_line":"        ports \u003d self.client.list_ports(network_id\u003dself.network[\u0027id\u0027],"},{"line_number":153,"context_line":"                                       device_id\u003dserver_id)[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_e9f8f54b","line":150,"range":{"start_line":149,"start_character":8,"end_line":150,"end_character":66},"updated":"2016-08-12 17:55:48.000000000","message":"See my comment to L145","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            waiters.wait_for_server_status("},{"line_number":147,"context_line":"                self.manager.servers_client,"},{"line_number":148,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"},{"line_number":149,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":150,"context_line":"            self.fail(\u0027server should be created in active status\u0027)"},{"line_number":151,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + self.network[\u0027id\u0027]"},{"line_number":152,"context_line":"        ports \u003d self.client.list_ports(network_id\u003dself.network[\u0027id\u0027],"},{"line_number":153,"context_line":"                                       device_id\u003dserver_id)[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_d31bfb19","line":150,"range":{"start_line":149,"start_character":8,"end_line":150,"end_character":66},"in_reply_to":"9ad45d7e_e9f8f54b","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3a7da8a5de8e773c9106155d14a834eaa15b6150","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                                       device_id\u003dserver_id)[\u0027ports\u0027]"},{"line_number":154,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_server_with_two_ports_and_verify(self):"},{"line_number":157,"context_line":"        server_id \u003d self._setup_server(pre_port\u003dFalse, n_interfaces\u003d2)"},{"line_number":158,"context_line":"        try:"},{"line_number":159,"context_line":"            waiters.wait_for_server_status("}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_83f2fa04","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":48},"updated":"2016-08-12 17:12:14.000000000","message":"I think this method name should have something negative in it to indicate that it is looking for an error state.\n\nAlso, do you intend to use this method in more tests? It looks a little too specialized for me. You might consider inlining it in the test where its used.","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                                       device_id\u003dserver_id)[\u0027ports\u0027]"},{"line_number":154,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_server_with_two_ports_and_verify(self):"},{"line_number":157,"context_line":"        server_id \u003d self._setup_server(pre_port\u003dFalse, n_interfaces\u003d2)"},{"line_number":158,"context_line":"        try:"},{"line_number":159,"context_line":"            waiters.wait_for_server_status("}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_e9660a28","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":48},"in_reply_to":"9ad45d7e_83f2fa04","updated":"2016-08-16 06:08:06.000000000","message":"I prefer this method is only used in test_create_server_failed_port_allocation. So I delete this method and move the code to that test case.","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":170,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":171,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":172,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2018)"},{"line_number":173,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":174,"context_line":"            self.PHY_NETWORK1, self.network, allocation_pools)"},{"line_number":175,"context_line":"        self._create_server_and_verify(pre_port\u003dFalse, n_interfaces\u003d1)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_cc409f38","line":172,"range":{"start_line":172,"start_character":8,"end_line":172,"end_character":20},"updated":"2016-08-12 17:55:48.000000000","message":"This shouldn\u0027t be \u0027self.network\u0027. It should be just \u0027network\u0027 and then we should pass this \u0027network\u0027 to _create_routed_subnet and _create_server_and_verify methods. Keep in mind that test cases in this script potentially will run in parallel. So this variables shouldn\u0027t be shared. You are potentially over-writing data that other method stored","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":170,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":171,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":172,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2018)"},{"line_number":173,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":174,"context_line":"            self.PHY_NETWORK1, self.network, allocation_pools)"},{"line_number":175,"context_line":"        self._create_server_and_verify(pre_port\u003dFalse, n_interfaces\u003d1)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_418458d3","line":172,"range":{"start_line":172,"start_character":8,"end_line":172,"end_character":20},"in_reply_to":"9ad45d7e_cc409f38","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":171,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":172,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2018)"},{"line_number":173,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":174,"context_line":"            self.PHY_NETWORK1, self.network, allocation_pools)"},{"line_number":175,"context_line":"        self._create_server_and_verify(pre_port\u003dFalse, n_interfaces\u003d1)"},{"line_number":176,"context_line":"        self._create_server_and_verify(pre_port\u003dTrue, n_interfaces\u003d0)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_0cb9172f","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":19},"updated":"2016-08-12 17:55:48.000000000","message":"This shouldn\u0027t be \u0027self.subnet\u0027. Please see my comment to L172","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":171,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":172,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2018)"},{"line_number":173,"context_line":"        self.subnet \u003d self._create_routed_subnet("},{"line_number":174,"context_line":"            self.PHY_NETWORK1, self.network, allocation_pools)"},{"line_number":175,"context_line":"        self._create_server_and_verify(pre_port\u003dFalse, n_interfaces\u003d1)"},{"line_number":176,"context_line":"        self._create_server_and_verify(pre_port\u003dTrue, n_interfaces\u003d0)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_21879cd8","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":19},"in_reply_to":"9ad45d7e_0cb9172f","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    @test.idempotent_id(\u00277692efcc-d434-423b-897d-e48948928e0f\u0027)"},{"line_number":179,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":180,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.2\", \"end\": \"10.1.0.3\"}]"},{"line_number":181,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2017)"},{"line_number":182,"context_line":"        self.subnet \u003d self._create_routed_subnet(self.PHY_NETWORK1,"},{"line_number":183,"context_line":"                                                 self.network,"},{"line_number":184,"context_line":"                                                 allocation_pools)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_4ce82f17","line":181,"range":{"start_line":181,"start_character":8,"end_line":181,"end_character":20},"updated":"2016-08-12 17:55:48.000000000","message":"This shouldn\u0027t be \u0027self.network\u0027. Please see my comment to L172","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    @test.idempotent_id(\u00277692efcc-d434-423b-897d-e48948928e0f\u0027)"},{"line_number":179,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":180,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.2\", \"end\": \"10.1.0.3\"}]"},{"line_number":181,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2017)"},{"line_number":182,"context_line":"        self.subnet \u003d self._create_routed_subnet(self.PHY_NETWORK1,"},{"line_number":183,"context_line":"                                                 self.network,"},{"line_number":184,"context_line":"                                                 allocation_pools)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_a11c2cc2","line":181,"range":{"start_line":181,"start_character":8,"end_line":181,"end_character":20},"in_reply_to":"9ad45d7e_4ce82f17","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e381ccb977240eea84ab6c287ea1adb41a9df7e2","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":180,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.2\", \"end\": \"10.1.0.3\"}]"},{"line_number":181,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2017)"},{"line_number":182,"context_line":"        self.subnet \u003d self._create_routed_subnet(self.PHY_NETWORK1,"},{"line_number":183,"context_line":"                                                 self.network,"},{"line_number":184,"context_line":"                                                 allocation_pools)"},{"line_number":185,"context_line":"        self._create_server_with_two_ports_and_verify()"}],"source_content_type":"text/x-python","patch_set":9,"id":"9ad45d7e_6cf7f3f5","line":182,"range":{"start_line":182,"start_character":8,"end_line":182,"end_character":20},"updated":"2016-08-12 17:55:48.000000000","message":"This shouldn\u0027t be \u0027self.subnet\u0027. Please see my comment to L172","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ef611233e522141de604f9c99b6e101a5fa127a1","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    def test_create_server_failed_port_allocation(self):"},{"line_number":180,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.2\", \"end\": \"10.1.0.3\"}]"},{"line_number":181,"context_line":"        self.network \u003d self._create_routed_network(self.PHY_NETWORK1, 2017)"},{"line_number":182,"context_line":"        self.subnet \u003d self._create_routed_subnet(self.PHY_NETWORK1,"},{"line_number":183,"context_line":"                                                 self.network,"},{"line_number":184,"context_line":"                                                 allocation_pools)"},{"line_number":185,"context_line":"        self._create_server_with_two_ports_and_verify()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ac371cc_017a60f1","line":182,"range":{"start_line":182,"start_character":8,"end_line":182,"end_character":20},"in_reply_to":"9ad45d7e_6cf7f3f5","updated":"2016-08-16 06:08:06.000000000","message":"Done","commit_id":"dc1a13a4b309d3007f595dfabc55aa699fd1f3b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"fb690827ae9b378aa8d6912c5517a82e156014f0","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    @test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")"},{"line_number":43,"context_line":"    def resource_setup(cls):"},{"line_number":44,"context_line":"        super(RoutedNetworkTest, cls).resource_setup()"},{"line_number":45,"context_line":"        cls.network \u003d None"},{"line_number":46,"context_line":"        cls.subnet \u003d None"},{"line_number":47,"context_line":"        cls.keypair \u003d cls._create_keypair()"},{"line_number":48,"context_line":"        cls.create_loginable_secgroup_rule()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ac371cc_3ecde45d","line":45,"updated":"2016-08-16 11:57:02.000000000","message":"We don\u0027t use this anymore. Please remove this line","commit_id":"4b61a8477341b5446bf8610917cb73fe39059315"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"95692f6405daceda7a1993029d3bf7422d94023a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    @test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")"},{"line_number":43,"context_line":"    def resource_setup(cls):"},{"line_number":44,"context_line":"        super(RoutedNetworkTest, cls).resource_setup()"},{"line_number":45,"context_line":"        cls.network \u003d None"},{"line_number":46,"context_line":"        cls.subnet \u003d None"},{"line_number":47,"context_line":"        cls.keypair \u003d cls._create_keypair()"},{"line_number":48,"context_line":"        cls.create_loginable_secgroup_rule()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ac371cc_910dbbea","line":45,"in_reply_to":"3ac371cc_3ecde45d","updated":"2016-08-18 07:25:13.000000000","message":"Done","commit_id":"4b61a8477341b5446bf8610917cb73fe39059315"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"fb690827ae9b378aa8d6912c5517a82e156014f0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def resource_setup(cls):"},{"line_number":44,"context_line":"        super(RoutedNetworkTest, cls).resource_setup()"},{"line_number":45,"context_line":"        cls.network \u003d None"},{"line_number":46,"context_line":"        cls.subnet \u003d None"},{"line_number":47,"context_line":"        cls.keypair \u003d cls._create_keypair()"},{"line_number":48,"context_line":"        cls.create_loginable_secgroup_rule()"},{"line_number":49,"context_line":"        cls.admin_client \u003d cls.admin_manager.network_client"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ac371cc_5ef9c07f","line":46,"updated":"2016-08-16 11:57:02.000000000","message":"We don\u0027t use this anymore. Please remove this line","commit_id":"4b61a8477341b5446bf8610917cb73fe39059315"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"95692f6405daceda7a1993029d3bf7422d94023a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def resource_setup(cls):"},{"line_number":44,"context_line":"        super(RoutedNetworkTest, cls).resource_setup()"},{"line_number":45,"context_line":"        cls.network \u003d None"},{"line_number":46,"context_line":"        cls.subnet \u003d None"},{"line_number":47,"context_line":"        cls.keypair \u003d cls._create_keypair()"},{"line_number":48,"context_line":"        cls.create_loginable_secgroup_rule()"},{"line_number":49,"context_line":"        cls.admin_client \u003d cls.admin_manager.network_client"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ac371cc_7112bf0a","line":46,"in_reply_to":"3ac371cc_5ef9c07f","updated":"2016-08-18 07:25:13.000000000","message":"Done","commit_id":"4b61a8477341b5446bf8610917cb73fe39059315"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"fb690827ae9b378aa8d6912c5517a82e156014f0","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    @classmethod"},{"line_number":52,"context_line":"    def resource_cleanup(cls):"},{"line_number":53,"context_line":"        cmd \u003d \u0027rm -f %s\u0027 % cls.KEY_FILE_PATH"},{"line_number":54,"context_line":"        obj \u003d common_utils.subprocess_popen(cmd, shell\u003dTrue, stdin\u003dNone,"},{"line_number":55,"context_line":"                                            stdout\u003dsubprocess.PIPE,"},{"line_number":56,"context_line":"                                            stderr\u003dsubprocess.PIPE)"},{"line_number":57,"context_line":"        obj.wait()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ac371cc_bebf145f","line":54,"range":{"start_line":54,"start_character":27,"end_line":54,"end_character":43},"updated":"2016-08-16 11:57:02.000000000","message":"Please don\u0027t forget to replace for execute once you rebase on top of https://review.openstack.org/#/c/355769/","commit_id":"4b61a8477341b5446bf8610917cb73fe39059315"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"fb690827ae9b378aa8d6912c5517a82e156014f0","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                       \u0027-i %s %s@%s id\u0027 % (self.KEY_FILE_PATH,"},{"line_number":81,"context_line":"                                           username, ip)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace, ssh_commands)"},{"line_number":84,"context_line":"        for i in range(retries):"},{"line_number":85,"context_line":"            time.sleep(timeout)"},{"line_number":86,"context_line":"            obj \u003d common_utils.subprocess_popen(full_cmd, shell\u003dTrue,"},{"line_number":87,"context_line":"                                                stdout\u003dsubprocess.PIPE,"},{"line_number":88,"context_line":"                                                stderr\u003dsubprocess.STDOUT)"},{"line_number":89,"context_line":"            obj.wait()"},{"line_number":90,"context_line":"            ret \u003d obj.returncode"},{"line_number":91,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":92,"context_line":"                break"},{"line_number":93,"context_line":"        self.assertEqual(0, ret,"},{"line_number":94,"context_line":"                         \u0027Unable to ssh to instance using a routed network\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _create_routed_network(self, phy_network, segmentation_id):"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ac371cc_b961eeaa","line":94,"range":{"start_line":83,"start_character":0,"end_line":94,"end_character":76},"updated":"2016-08-16 11:57:02.000000000","message":"Once you rebase on top https://review.openstack.org/#/c/355769, hopefully you will be able to refactor per Jakub\u0027s comment to PS9","commit_id":"4b61a8477341b5446bf8610917cb73fe39059315"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"94790d5b0779e8cae784f296cd750cd17243a6ef","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    credentials \u003d [\u0027primary\u0027, \u0027admin\u0027]"},{"line_number":34,"context_line":"    force_tenant_isolation \u003d False"},{"line_number":35,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":36,"context_line":"    PHY_NETWORK1_IP \u003d \u002710.1.0.0/24\u0027"},{"line_number":37,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"},{"line_number":38,"context_line":"    PHY_NETWORK2_IP \u003d \u002710.1.1.0/24\u0027"},{"line_number":39,"context_line":"    MASK_BITS \u003d 28"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_c0cf717d","line":36,"range":{"start_line":36,"start_character":17,"end_line":36,"end_character":19},"updated":"2016-08-22 18:33:18.000000000","message":"Let\u0027s call this CIDR","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ab175eaabb980f7824ecb4230ded643f6f77b008","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    credentials \u003d [\u0027primary\u0027, \u0027admin\u0027]"},{"line_number":34,"context_line":"    force_tenant_isolation \u003d False"},{"line_number":35,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":36,"context_line":"    PHY_NETWORK1_IP \u003d \u002710.1.0.0/24\u0027"},{"line_number":37,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"},{"line_number":38,"context_line":"    PHY_NETWORK2_IP \u003d \u002710.1.1.0/24\u0027"},{"line_number":39,"context_line":"    MASK_BITS \u003d 28"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_39fb0549","line":36,"range":{"start_line":36,"start_character":17,"end_line":36,"end_character":19},"in_reply_to":"1ac06dbe_c0cf717d","updated":"2016-08-24 02:57:32.000000000","message":"Oh,yes, thanks.","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"94790d5b0779e8cae784f296cd750cd17243a6ef","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":36,"context_line":"    PHY_NETWORK1_IP \u003d \u002710.1.0.0/24\u0027"},{"line_number":37,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"},{"line_number":38,"context_line":"    PHY_NETWORK2_IP \u003d \u002710.1.1.0/24\u0027"},{"line_number":39,"context_line":"    MASK_BITS \u003d 28"},{"line_number":40,"context_line":"    KEY_FILE_PATH \u003d \u0027/tmp/testkey.dat\u0027"},{"line_number":41,"context_line":"    ADMIN_KEY_FILE_PATH \u003d \u0027/tmp/admin_testkey.dat\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_20a5a5b4","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":19},"updated":"2016-08-22 18:33:18.000000000","message":"Let\u0027s call this CIDR","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ab175eaabb980f7824ecb4230ded643f6f77b008","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":36,"context_line":"    PHY_NETWORK1_IP \u003d \u002710.1.0.0/24\u0027"},{"line_number":37,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"},{"line_number":38,"context_line":"    PHY_NETWORK2_IP \u003d \u002710.1.1.0/24\u0027"},{"line_number":39,"context_line":"    MASK_BITS \u003d 28"},{"line_number":40,"context_line":"    KEY_FILE_PATH \u003d \u0027/tmp/testkey.dat\u0027"},{"line_number":41,"context_line":"    ADMIN_KEY_FILE_PATH \u003d \u0027/tmp/admin_testkey.dat\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_19f8c948","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":19},"in_reply_to":"1ac06dbe_20a5a5b4","updated":"2016-08-24 02:57:32.000000000","message":"Done","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"94790d5b0779e8cae784f296cd750cd17243a6ef","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            segments.append({\"provider:segmentation_id\": segmentation_id,"},{"line_number":108,"context_line":"                             \"provider:physical_network\": phy_network,"},{"line_number":109,"context_line":"                             \"provider:network_type\": self.NETWORK_TYPE})"},{"line_number":110,"context_line":"        network \u003d self.create_shared_network(shared\u003dTrue, name\u003dnetwork_name,"},{"line_number":111,"context_line":"                                             segments\u003dsegments,"},{"line_number":112,"context_line":"                                             **{\"router:external\": \"False\"})"},{"line_number":113,"context_line":"        return network"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_c042d13d","line":110,"range":{"start_line":110,"start_character":58,"end_line":110,"end_character":75},"updated":"2016-08-22 18:33:18.000000000","message":"Looking at the create_shared_network definition you need to pass this as network_name\u003dnetwork_name. Otherwise, name gets redefined.","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ab175eaabb980f7824ecb4230ded643f6f77b008","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            segments.append({\"provider:segmentation_id\": segmentation_id,"},{"line_number":108,"context_line":"                             \"provider:physical_network\": phy_network,"},{"line_number":109,"context_line":"                             \"provider:network_type\": self.NETWORK_TYPE})"},{"line_number":110,"context_line":"        network \u003d self.create_shared_network(shared\u003dTrue, name\u003dnetwork_name,"},{"line_number":111,"context_line":"                                             segments\u003dsegments,"},{"line_number":112,"context_line":"                                             **{\"router:external\": \"False\"})"},{"line_number":113,"context_line":"        return network"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_3980258b","line":110,"range":{"start_line":110,"start_character":58,"end_line":110,"end_character":75},"in_reply_to":"1ac06dbe_c042d13d","updated":"2016-08-24 02:57:32.000000000","message":"Done","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"94790d5b0779e8cae784f296cd750cd17243a6ef","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _two_servers_connectivity_test(self, server1_info, server2_info,"},{"line_number":170,"context_line":"                                       retries\u003d5, timeout\u003d5):"},{"line_number":171,"context_line":"        server1_port \u003d server1_info[2][0]"},{"line_number":172,"context_line":"        namespace1 \u003d server1_info[1]"},{"line_number":173,"context_line":"        server1_ip \u003d server1_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":174,"context_line":"        server2_port \u003d server2_info[2][0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_b9742768","line":171,"range":{"start_line":171,"start_character":36,"end_line":171,"end_character":37},"updated":"2016-08-22 18:33:18.000000000","message":"How about creating some constants aroung L30 to make this easier to read? Same comment through L174","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ab175eaabb980f7824ecb4230ded643f6f77b008","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _two_servers_connectivity_test(self, server1_info, server2_info,"},{"line_number":170,"context_line":"                                       retries\u003d5, timeout\u003d5):"},{"line_number":171,"context_line":"        server1_port \u003d server1_info[2][0]"},{"line_number":172,"context_line":"        namespace1 \u003d server1_info[1]"},{"line_number":173,"context_line":"        server1_ip \u003d server1_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":174,"context_line":"        server2_port \u003d server2_info[2][0]"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_d4a7c6a4","line":171,"range":{"start_line":171,"start_character":36,"end_line":171,"end_character":37},"in_reply_to":"1ac06dbe_b9742768","updated":"2016-08-24 02:57:32.000000000","message":"Done","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"94790d5b0779e8cae784f296cd750cd17243a6ef","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                                                stderr\u003dsubprocess.STDOUT)"},{"line_number":189,"context_line":"            obj.wait()"},{"line_number":190,"context_line":"            ret \u003d obj.returncode"},{"line_number":191,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":192,"context_line":"                break"},{"line_number":193,"context_line":"        self.assertEqual(0, ret, \u0027two instances connectivity test failed\u0027)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_99da0be7","line":191,"updated":"2016-08-22 18:33:18.000000000","message":"Why not also check stdout and make sure we see something like \"1 packets transmitted, 1 received, 0% packet loss\"?","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ab175eaabb980f7824ecb4230ded643f6f77b008","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                                                stderr\u003dsubprocess.STDOUT)"},{"line_number":189,"context_line":"            obj.wait()"},{"line_number":190,"context_line":"            ret \u003d obj.returncode"},{"line_number":191,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":192,"context_line":"                break"},{"line_number":193,"context_line":"        self.assertEqual(0, ret, \u0027two instances connectivity test failed\u0027)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_946b8e1d","line":191,"in_reply_to":"1ac06dbe_99da0be7","updated":"2016-08-24 02:57:32.000000000","message":"Yes, I have added this check, but I think checking the returncode maybe enough to figure out where we can reach instance2 from instance1. I tested that, if ping -c IP failed, returncode should not be 0.","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"94790d5b0779e8cae784f296cd750cd17243a6ef","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        hypervisors \u003d set([hyper[\u0027hypervisor_hostname\u0027]"},{"line_number":248,"context_line":"                           for hyper in hosts[\u0027hypervisors\u0027]])"},{"line_number":249,"context_line":"        self.assertEqual(2, len(hypervisors),"},{"line_number":250,"context_line":"                         \u0027we should have at least two \u0027"},{"line_number":251,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":252,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":253,"context_line":"                      \u0027This node should in hypervisor set\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_c0277110","line":250,"range":{"start_line":250,"start_character":26,"end_line":250,"end_character":40},"updated":"2016-08-22 18:33:18.000000000","message":"\u0027There should be\u0027","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ab175eaabb980f7824ecb4230ded643f6f77b008","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        hypervisors \u003d set([hyper[\u0027hypervisor_hostname\u0027]"},{"line_number":248,"context_line":"                           for hyper in hosts[\u0027hypervisors\u0027]])"},{"line_number":249,"context_line":"        self.assertEqual(2, len(hypervisors),"},{"line_number":250,"context_line":"                         \u0027we should have at least two \u0027"},{"line_number":251,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":252,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":253,"context_line":"                      \u0027This node should in hypervisor set\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_d471860d","line":250,"range":{"start_line":250,"start_character":26,"end_line":250,"end_character":40},"in_reply_to":"1ac06dbe_c0277110","updated":"2016-08-24 02:57:32.000000000","message":"Done","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"94790d5b0779e8cae784f296cd750cd17243a6ef","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                         \u0027we should have at least two \u0027"},{"line_number":251,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":252,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":253,"context_line":"                      \u0027This node should in hypervisor set\u0027)"},{"line_number":254,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":255,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":256,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_0050695c","line":253,"range":{"start_line":253,"start_character":33,"end_line":253,"end_character":39},"updated":"2016-08-22 18:33:18.000000000","message":"\u0027should be\u0027","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ab175eaabb980f7824ecb4230ded643f6f77b008","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                         \u0027we should have at least two \u0027"},{"line_number":251,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":252,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":253,"context_line":"                      \u0027This node should in hypervisor set\u0027)"},{"line_number":254,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":255,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":256,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_3463ba43","line":253,"range":{"start_line":253,"start_character":33,"end_line":253,"end_character":39},"in_reply_to":"1ac06dbe_0050695c","updated":"2016-08-24 02:57:32.000000000","message":"Done","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"94790d5b0779e8cae784f296cd750cd17243a6ef","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":252,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":253,"context_line":"                      \u0027This node should in hypervisor set\u0027)"},{"line_number":254,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":255,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":256,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":257,"context_line":"        for each in groups:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_14d70724","line":254,"updated":"2016-08-22 18:33:18.000000000","message":"If you are testing this in the vagrant routed networks environment defined here https://github.com/miguellavalle/routednetworksvagrant, how do you know this_host and picked_node are not in the same segment / physnet?\n\nUltimately, we want to have this test running in Jenkins. We will have to create a multinode environment there. Since right now we don\u0027t know exactly what that environment looks like, I propose that for the time being we create 2 constants like the ones you have in L33-42 with the names of the hypervisors where the instances are going to run. Let\u0027s concentrate for the time being on getting the connectivity side of this test case right. Over the next few days I will talk to the Neutron team to find out how to create a multinode environment in Jenkins. Once we have the details, we can refine this test case with handling properly the hypervisors selection","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"ab175eaabb980f7824ecb4230ded643f6f77b008","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":252,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":253,"context_line":"                      \u0027This node should in hypervisor set\u0027)"},{"line_number":254,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":255,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":256,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":257,"context_line":"        for each in groups:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_b4b32a97","line":254,"in_reply_to":"1ac06dbe_14d70724","updated":"2016-08-24 02:57:32.000000000","message":"For me, I really have no idea how to make sure the picked two nodes are in two different segments in other testing environment. I agree defining constant hypervisor names make us concentrate on the test cases itself. I prefer to wait to see what the multi-node environment that jenkins offered, then, I will update the code to make it concentrate on the test case and simplified the code here.","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ba569c9b116f861ecfcb36ae0773b9324aa5d2bd","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":252,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":253,"context_line":"                      \u0027This node should in hypervisor set\u0027)"},{"line_number":254,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":255,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":256,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":257,"context_line":"        for each in groups:"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa7ab95a_57cb8e72","line":254,"in_reply_to":"1ac06dbe_b4b32a97","updated":"2016-08-25 22:10:54.000000000","message":"The problem with this is that right now we don\u0027t really know whether we are really being succesful with the connectivity test. Maybe your instances are always landing in the same segment. Why not create define now that instance 1 will run in compute1 and instance 2 will run in compute3? Then we will really know we are being successful with the connectivity test and when moving this to Jenkins, the chage will be only to adjust 2 constants in the code","commit_id":"abc0e7de6a84f7c710f9ee05e1e14ca3bcd06ee1"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"21011bf0913ec67f0e9b346bb5a9a63bd66b8a25","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class RoutedNetworkTest(base.BaseTempestTestCase):"},{"line_number":33,"context_line":"    credentials \u003d [\u0027primary\u0027, \u0027admin\u0027]"},{"line_number":34,"context_line":"    force_tenant_isolation \u003d False"},{"line_number":35,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":36,"context_line":"    PHY_NETWORK1_CIDR \u003d \u002710.1.0.0/24\u0027"},{"line_number":37,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_881dfbbf","line":34,"updated":"2016-08-25 22:12:26.000000000","message":"Have you tried to set this to True. I\u0027d feel better is we run this with tenant isolation","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class RoutedNetworkTest(base.BaseTempestTestCase):"},{"line_number":33,"context_line":"    credentials \u003d [\u0027primary\u0027, \u0027admin\u0027]"},{"line_number":34,"context_line":"    force_tenant_isolation \u003d False"},{"line_number":35,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":36,"context_line":"    PHY_NETWORK1_CIDR \u003d \u002710.1.0.0/24\u0027"},{"line_number":37,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_feb5087e","line":34,"in_reply_to":"fa7ab95a_881dfbbf","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"21011bf0913ec67f0e9b346bb5a9a63bd66b8a25","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            ret \u003d obj.returncode"},{"line_number":98,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":99,"context_line":"                break"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            self.assertEqual(0, ret, \u0027Unable to ssh to instance using a \u0027"},{"line_number":102,"context_line":"                                     \u0027routed network\u0027)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_d1516e10","line":100,"updated":"2016-08-25 22:12:26.000000000","message":"With this else, L101 is only going to execute if the loop runs through the end  of the range. So it doesn\u0027t make sense to have and assertEqual in L101, because if we get there, we know \u0027ret\u0027 was never \u003d\u003d to 0 (the break in L99 wasn\u0027t executed). So we might as well have a self.fail in line 101. \n\nYou can also remove the else and keep the assertEqual. I personally like this latter alternative better, becuase I think it is more readable. I leave it up to you","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            ret \u003d obj.returncode"},{"line_number":98,"context_line":"            if ret \u003d\u003d 0:"},{"line_number":99,"context_line":"                break"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            self.assertEqual(0, ret, \u0027Unable to ssh to instance using a \u0027"},{"line_number":102,"context_line":"                                     \u0027routed network\u0027)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_1e3e2cda","line":100,"in_reply_to":"fa7ab95a_d1516e10","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"21011bf0913ec67f0e9b346bb5a9a63bd66b8a25","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            segments.append({\"provider:segmentation_id\": segmentation_id,"},{"line_number":110,"context_line":"                             \"provider:physical_network\": phy_network,"},{"line_number":111,"context_line":"                             \"provider:network_type\": self.NETWORK_TYPE})"},{"line_number":112,"context_line":"        network \u003d self.create_shared_network(shared\u003dTrue,"},{"line_number":113,"context_line":"                                             network_name\u003dnetwork_name,"},{"line_number":114,"context_line":"                                             segments\u003dsegments,"},{"line_number":115,"context_line":"                                             **{\"router:external\": \"False\"})"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_d1a5eeb5","line":112,"range":{"start_line":112,"start_character":45,"end_line":112,"end_character":57},"updated":"2016-08-25 22:12:26.000000000","message":"Not needed. create_shared_network sets shared to True anyway","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            segments.append({\"provider:segmentation_id\": segmentation_id,"},{"line_number":110,"context_line":"                             \"provider:physical_network\": phy_network,"},{"line_number":111,"context_line":"                             \"provider:network_type\": self.NETWORK_TYPE})"},{"line_number":112,"context_line":"        network \u003d self.create_shared_network(shared\u003dTrue,"},{"line_number":113,"context_line":"                                             network_name\u003dnetwork_name,"},{"line_number":114,"context_line":"                                             segments\u003dsegments,"},{"line_number":115,"context_line":"                                             **{\"router:external\": \"False\"})"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_3e0cd041","line":112,"range":{"start_line":112,"start_character":45,"end_line":112,"end_character":57},"in_reply_to":"fa7ab95a_d1a5eeb5","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"21011bf0913ec67f0e9b346bb5a9a63bd66b8a25","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        else:"},{"line_number":148,"context_line":"            # we have to use admin tenant to create"},{"line_number":149,"context_line":"            # the instance on the designated node"},{"line_number":150,"context_line":"            name \u003d data_utils.rand_name(\u0027server-test\u0027)"},{"line_number":151,"context_line":"            availability_zone \u003d \u0027nova:%s\u0027 % host"},{"line_number":152,"context_line":"            server \u003d self.admin_manager.servers_client.create_server("},{"line_number":153,"context_line":"                name\u003dname, flavorRef\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_fc564905","line":150,"updated":"2016-08-25 22:12:26.000000000","message":"Why not move this line right after L131 and use it also in L142? Instead of passing \u0027server-test\u0027 (which is the default for create_server, let\u0027s pass \u0027routed-networks-test-server\u0027","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        else:"},{"line_number":148,"context_line":"            # we have to use admin tenant to create"},{"line_number":149,"context_line":"            # the instance on the designated node"},{"line_number":150,"context_line":"            name \u003d data_utils.rand_name(\u0027server-test\u0027)"},{"line_number":151,"context_line":"            availability_zone \u003d \u0027nova:%s\u0027 % host"},{"line_number":152,"context_line":"            server \u003d self.admin_manager.servers_client.create_server("},{"line_number":153,"context_line":"                name\u003dname, flavorRef\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_d984de5e","line":150,"in_reply_to":"fa7ab95a_fc564905","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"21011bf0913ec67f0e9b346bb5a9a63bd66b8a25","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                loss_percentage \u003d 100"},{"line_number":205,"context_line":"            if ret \u003d\u003d 0 and loss_percentage \u003d\u003d 0:"},{"line_number":206,"context_line":"                break"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            self.assertEqual(0, ret, \u0027two instances connectivity test failed\u0027)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_b1814a50","line":207,"updated":"2016-08-25 22:12:26.000000000","message":"Please see my comment to L100. Similar situation","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                loss_percentage \u003d 100"},{"line_number":205,"context_line":"            if ret \u003d\u003d 0 and loss_percentage \u003d\u003d 0:"},{"line_number":206,"context_line":"                break"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            self.assertEqual(0, ret, \u0027two instances connectivity test failed\u0027)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_d9ebfe10","line":207,"in_reply_to":"fa7ab95a_b1814a50","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c53ed96b218b2d1953c7309879e3d1c3f12074ab","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":211,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":212,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":213,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"},{"line_number":214,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2019)"},{"line_number":215,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_0cd8b4ee","line":212,"range":{"start_line":212,"start_character":30,"end_line":212,"end_character":68},"updated":"2016-08-29 00:07:01.000000000","message":"I suggest changing this to \"start\": \"10.1.2.10\", \"end\": \"10.1.2.13\" to not interfere by the range used by the routed network the vagrant environment is created with","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":211,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":212,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":213,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"},{"line_number":214,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2019)"},{"line_number":215,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_b95f1a74","line":212,"range":{"start_line":212,"start_character":30,"end_line":212,"end_character":68},"in_reply_to":"fa7ab95a_0cd8b4ee","updated":"2016-09-01 13:38:35.000000000","message":"Good idea, I have also create the network with the new segmentation ID","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c53ed96b218b2d1953c7309879e3d1c3f12074ab","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    @test.idempotent_id(\u00277692efcc-d434-423b-897d-e48948928e0f\u0027)"},{"line_number":226,"context_line":"    def test_create_server_failed_port_allocation_negative(self):"},{"line_number":227,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.2\", \"end\": \"10.1.0.3\"}]"},{"line_number":228,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"},{"line_number":229,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":230,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_0c6a741a","line":227,"range":{"start_line":227,"start_character":29,"end_line":227,"end_character":67},"updated":"2016-08-29 00:07:01.000000000","message":"This may be part of the reason you are getting a problem deleting your routed network. Please note that that this range is used in the routed network the vagrant environment is created with. I suggest changing it to \"start\": \"10.1.2.2\", \"end\": \"10.1.2.3\"","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    @test.idempotent_id(\u00277692efcc-d434-423b-897d-e48948928e0f\u0027)"},{"line_number":226,"context_line":"    def test_create_server_failed_port_allocation_negative(self):"},{"line_number":227,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.2\", \"end\": \"10.1.0.3\"}]"},{"line_number":228,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"},{"line_number":229,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":230,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_b49abfc3","line":227,"range":{"start_line":227,"start_character":29,"end_line":227,"end_character":67},"in_reply_to":"fa7ab95a_0c6a741a","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c53ed96b218b2d1953c7309879e3d1c3f12074ab","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    def test_create_server_failed_port_allocation_negative(self):"},{"line_number":227,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.2\", \"end\": \"10.1.0.3\"}]"},{"line_number":228,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"},{"line_number":229,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":230,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":231,"context_line":"                                   allocation_pools, self.PHY_NETWORK1_CIDR)"},{"line_number":232,"context_line":"        server_id, namespace, ports \u003d self._create_server("}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_2c50185d","line":229,"range":{"start_line":229,"start_character":64,"end_line":229,"end_character":68},"updated":"2016-08-29 00:07:01.000000000","message":"Definitely this is part of the reason you are getting a problem deleting your routed network. You are using the same segmentation id as the routed network that the vagrant environment is created with. I suggest changing it to 2020. This also enables you to not collide with other routed networks created by this script","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    def test_create_server_failed_port_allocation_negative(self):"},{"line_number":227,"context_line":"        allocation_pools \u003d [{\"start\": \"10.1.0.2\", \"end\": \"10.1.0.3\"}]"},{"line_number":228,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"},{"line_number":229,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":230,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":231,"context_line":"                                   allocation_pools, self.PHY_NETWORK1_CIDR)"},{"line_number":232,"context_line":"        server_id, namespace, ports \u003d self._create_server("}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_6da4d7b8","line":229,"range":{"start_line":229,"start_character":64,"end_line":229,"end_character":68},"in_reply_to":"fa7ab95a_2c50185d","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c53ed96b218b2d1953c7309879e3d1c3f12074ab","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":230,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":231,"context_line":"                                   allocation_pools, self.PHY_NETWORK1_CIDR)"},{"line_number":232,"context_line":"        server_id, namespace, ports \u003d self._create_server("},{"line_number":233,"context_line":"            network, pre_port\u003dFalse, n_interfaces\u003d2)"},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            waiters.wait_for_server_status("},{"line_number":236,"context_line":"                self.manager.servers_client,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_ec271010","line":233,"range":{"start_line":232,"start_character":8,"end_line":233,"end_character":52},"updated":"2016-08-29 00:07:01.000000000","message":"This has to go inside the try block. The other problem here is that the instance might land in a compute (\u0027compute2\u0027 or \u0027compute3\u0027) that are not touched by \u0027physnet1\u0027 and, as a consequence, not bound to your routed network\u0027s segment","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":230,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":231,"context_line":"                                   allocation_pools, self.PHY_NETWORK1_CIDR)"},{"line_number":232,"context_line":"        server_id, namespace, ports \u003d self._create_server("},{"line_number":233,"context_line":"            network, pre_port\u003dFalse, n_interfaces\u003d2)"},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            waiters.wait_for_server_status("},{"line_number":236,"context_line":"                self.manager.servers_client,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_4788d222","line":233,"range":{"start_line":232,"start_character":8,"end_line":233,"end_character":52},"in_reply_to":"fa7ab95a_ec271010","updated":"2016-09-01 13:38:35.000000000","message":"Done. Thanks for pointing it out.","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c53ed96b218b2d1953c7309879e3d1c3f12074ab","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        server_id, namespace, ports \u003d self._create_server("},{"line_number":233,"context_line":"            network, pre_port\u003dFalse, n_interfaces\u003d2)"},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            waiters.wait_for_server_status("},{"line_number":236,"context_line":"                self.manager.servers_client,"},{"line_number":237,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"},{"line_number":238,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":239,"context_line":"            ports \u003d self.client.list_ports(network_id\u003dnetwork[\u0027id\u0027],"},{"line_number":240,"context_line":"                                           device_id\u003dserver_id)[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_2c22d800","line":237,"range":{"start_line":235,"start_character":12,"end_line":237,"end_character":58},"updated":"2016-08-29 00:07:01.000000000","message":"You don\u0027t need this wait. It is being done in L164","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        server_id, namespace, ports \u003d self._create_server("},{"line_number":233,"context_line":"            network, pre_port\u003dFalse, n_interfaces\u003d2)"},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            waiters.wait_for_server_status("},{"line_number":236,"context_line":"                self.manager.servers_client,"},{"line_number":237,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"},{"line_number":238,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":239,"context_line":"            ports \u003d self.client.list_ports(network_id\u003dnetwork[\u0027id\u0027],"},{"line_number":240,"context_line":"                                           device_id\u003dserver_id)[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_79602f36","line":237,"range":{"start_line":235,"start_character":12,"end_line":237,"end_character":58},"in_reply_to":"fa7ab95a_2c22d800","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c53ed96b218b2d1953c7309879e3d1c3f12074ab","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                server_id, constants.SERVER_STATUS_ACTIVE)"},{"line_number":238,"context_line":"        except exceptions.BuildErrorException:"},{"line_number":239,"context_line":"            ports \u003d self.client.list_ports(network_id\u003dnetwork[\u0027id\u0027],"},{"line_number":240,"context_line":"                                           device_id\u003dserver_id)[\u0027ports\u0027]"},{"line_number":241,"context_line":"            self.assertEmpty(ports, msg\u003d\"ports should not be created\")"},{"line_number":242,"context_line":"            return"},{"line_number":243,"context_line":"        self.fail(\"server should create in error status\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_6c7a20f3","line":240,"range":{"start_line":240,"start_character":53,"end_line":240,"end_character":62},"updated":"2016-08-29 00:07:01.000000000","message":"You cannot reference this because you are going to get an exception in line 164. Therefore, L170 never is executed, so server_id never gets a value assigned","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c53ed96b218b2d1953c7309879e3d1c3f12074ab","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":248,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":249,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":250,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":251,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":252,"context_line":"                                   allocation_pools_phy1,"},{"line_number":253,"context_line":"                                   self.PHY_NETWORK1_CIDR)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_ace98882","line":250,"range":{"start_line":250,"start_character":64,"end_line":250,"end_character":68},"updated":"2016-08-29 00:07:01.000000000","message":"Let\u0027s change this to 2021, so don\u0027t collide with the routed network the vagrant environment is created with or other routed networks created in this script","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":248,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":249,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":250,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":251,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":252,"context_line":"                                   allocation_pools_phy1,"},{"line_number":253,"context_line":"                                   self.PHY_NETWORK1_CIDR)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_a4aefc95","line":250,"range":{"start_line":250,"start_character":64,"end_line":250,"end_character":68},"in_reply_to":"fa7ab95a_ace98882","updated":"2016-09-01 13:38:35.000000000","message":"I will update to a different id when the jenkins environment is ready. As the vlan id in iprouter uses ID 2016, I just use it here, or the data sent from  network1 cannot pass through the iprouter to network2.","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"21011bf0913ec67f0e9b346bb5a9a63bd66b8a25","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":269,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":270,"context_line":"                      \u0027This node should be in hypervisor set\u0027)"},{"line_number":271,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":272,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":273,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":274,"context_line":"        for each in groups:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_b7b5bad1","line":271,"updated":"2016-08-25 22:12:26.000000000","message":"Please see my comment in PS11 regarding this line","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                         \u0027hypervisors to run this test.\u0027)"},{"line_number":269,"context_line":"        self.assertIn(this_host, hypervisors,"},{"line_number":270,"context_line":"                      \u0027This node should be in hypervisor set\u0027)"},{"line_number":271,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":272,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":273,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":274,"context_line":"        for each in groups:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_42736315","line":271,"in_reply_to":"fa7ab95a_b7b5bad1","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"0defd4a2ef7bc3d39bff1a7db905f3bab65e037b","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                      \u0027This node should be in hypervisor set\u0027)"},{"line_number":271,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":272,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":273,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":274,"context_line":"        for each in groups:"},{"line_number":275,"context_line":"            if each[\u0027tenant_id\u0027] \u003d\u003d admin_tenenat_id:"},{"line_number":276,"context_line":"                admin_security_group \u003d each"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_8276af3c","line":273,"range":{"start_line":273,"start_character":14,"end_line":273,"end_character":21},"updated":"2016-08-26 00:18:25.000000000","message":"s/tenenat/tenant","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                      \u0027This node should be in hypervisor set\u0027)"},{"line_number":271,"context_line":"        picked_node \u003d (hypervisors - set([this_host])).pop()"},{"line_number":272,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":273,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":274,"context_line":"        for each in groups:"},{"line_number":275,"context_line":"            if each[\u0027tenant_id\u0027] \u003d\u003d admin_tenenat_id:"},{"line_number":276,"context_line":"                admin_security_group \u003d each"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_c27053df","line":273,"range":{"start_line":273,"start_character":14,"end_line":273,"end_character":21},"in_reply_to":"fa7ab95a_8276af3c","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"0defd4a2ef7bc3d39bff1a7db905f3bab65e037b","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":273,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":274,"context_line":"        for each in groups:"},{"line_number":275,"context_line":"            if each[\u0027tenant_id\u0027] \u003d\u003d admin_tenenat_id:"},{"line_number":276,"context_line":"                admin_security_group \u003d each"},{"line_number":277,"context_line":"                break"},{"line_number":278,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_a273b34c","line":275,"range":{"start_line":275,"start_character":42,"end_line":275,"end_character":49},"updated":"2016-08-26 00:18:25.000000000","message":"s/tenenat/tenant","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"e7375b577010cf09b44bb4d37bccfad5d9525852","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        groups \u003d self.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":273,"context_line":"        admin_tenenat_id \u003d self.admin_manager.tenants_client.tenant_id"},{"line_number":274,"context_line":"        for each in groups:"},{"line_number":275,"context_line":"            if each[\u0027tenant_id\u0027] \u003d\u003d admin_tenenat_id:"},{"line_number":276,"context_line":"                admin_security_group \u003d each"},{"line_number":277,"context_line":"                break"},{"line_number":278,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa7ab95a_a26d0f06","line":275,"range":{"start_line":275,"start_character":42,"end_line":275,"end_character":49},"in_reply_to":"fa7ab95a_a273b34c","updated":"2016-09-01 13:38:35.000000000","message":"Done","commit_id":"cedfdc944fbd737f8e0df05fe2693e940fe02281"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"05991e7b1eb670cb23ef6a2d610e8e36125b7b41","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    @test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")"},{"line_number":50,"context_line":"    def resource_setup(cls):"},{"line_number":51,"context_line":"        super(RoutedNetworkTest, cls).resource_setup()"},{"line_number":52,"context_line":"        cls.keypair \u003d cls._create_keypair(cls.KEY_FILE_PATH)"},{"line_number":53,"context_line":"        cls.admin_keypair \u003d cls._create_keypair("},{"line_number":54,"context_line":"            cls.ADMIN_KEY_FILE_PATH, cls.admin_manager.keypairs_client)"},{"line_number":55,"context_line":"        cls.create_loginable_secgroup_rule()"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_69eaeb10","line":52,"updated":"2016-09-01 23:44:57.000000000","message":"Given my comment to line 223, we probably don\u0027t need this anymore","commit_id":"f1d82edda6bac0e6b4e5fd035c04dcee0f78741f"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"7d1dba012a17767559c971146c05a86cc2f2a954","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    @test.requires_ext(extension\u003d\"segment\", service\u003d\"network\")"},{"line_number":50,"context_line":"    def resource_setup(cls):"},{"line_number":51,"context_line":"        super(RoutedNetworkTest, cls).resource_setup()"},{"line_number":52,"context_line":"        cls.keypair \u003d cls._create_keypair(cls.KEY_FILE_PATH)"},{"line_number":53,"context_line":"        cls.admin_keypair \u003d cls._create_keypair("},{"line_number":54,"context_line":"            cls.ADMIN_KEY_FILE_PATH, cls.admin_manager.keypairs_client)"},{"line_number":55,"context_line":"        cls.create_loginable_secgroup_rule()"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_e70b7f22","line":52,"in_reply_to":"fa7ab95a_69eaeb10","updated":"2016-09-02 12:23:20.000000000","message":"Done","commit_id":"f1d82edda6bac0e6b4e5fd035c04dcee0f78741f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"05991e7b1eb670cb23ef6a2d610e8e36125b7b41","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                             \u0027port should have blank fixed_ips\u0027)"},{"line_number":141,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        if host is None:"},{"line_number":144,"context_line":"            server \u003d self.create_server("},{"line_number":145,"context_line":"                name\u003dname,"},{"line_number":146,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"},{"line_number":147,"context_line":"                image_ref\u003dCONF.compute.image_ref,"},{"line_number":148,"context_line":"                key_name\u003dself.keypair[\u0027name\u0027],"},{"line_number":149,"context_line":"                networks\u003dnetwork_args)"},{"line_number":150,"context_line":"        else:"},{"line_number":151,"context_line":"            # we have to use admin tenant to create"},{"line_number":152,"context_line":"            # the instance on the designated node"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_c9a77709","line":149,"range":{"start_line":143,"start_character":0,"end_line":149,"end_character":38},"updated":"2016-09-01 23:44:57.000000000","message":"Given my comment to line 223, I don\u0027t think we need this anymore","commit_id":"f1d82edda6bac0e6b4e5fd035c04dcee0f78741f"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"7d1dba012a17767559c971146c05a86cc2f2a954","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                             \u0027port should have blank fixed_ips\u0027)"},{"line_number":141,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        if host is None:"},{"line_number":144,"context_line":"            server \u003d self.create_server("},{"line_number":145,"context_line":"                name\u003dname,"},{"line_number":146,"context_line":"                flavor_ref\u003dCONF.compute.flavor_ref,"},{"line_number":147,"context_line":"                image_ref\u003dCONF.compute.image_ref,"},{"line_number":148,"context_line":"                key_name\u003dself.keypair[\u0027name\u0027],"},{"line_number":149,"context_line":"                networks\u003dnetwork_args)"},{"line_number":150,"context_line":"        else:"},{"line_number":151,"context_line":"            # we have to use admin tenant to create"},{"line_number":152,"context_line":"            # the instance on the designated node"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_0715c33e","line":149,"range":{"start_line":143,"start_character":0,"end_line":149,"end_character":38},"in_reply_to":"fa7ab95a_c9a77709","updated":"2016-09-02 12:23:20.000000000","message":"Done","commit_id":"f1d82edda6bac0e6b4e5fd035c04dcee0f78741f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"05991e7b1eb670cb23ef6a2d610e8e36125b7b41","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        server_id, namespace, ports \u003d self._create_server("},{"line_number":221,"context_line":"            network, pre_port\u003dFalse, n_interfaces\u003d1)"},{"line_number":222,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":223,"context_line":"        server_id, namespace, ports \u003d self._create_server("},{"line_number":224,"context_line":"            network, pre_port\u003dTrue, n_interfaces\u003d0)"},{"line_number":225,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_2932a3f2","line":223,"updated":"2016-09-01 23:44:57.000000000","message":"You actually need this server to land in the \u0027allione\u0027 node. Otherwise you are not going to be able to perform the connectivity check in L225. So you need to pass \u0027allinone\u0027 in the host argument of this call. In all your other server creations you are specifying a host. As consequence I don\u0027t think we need to make the distinction between admin and non admin anymore and we can simplify the script. All the servers are created with admin","commit_id":"f1d82edda6bac0e6b4e5fd035c04dcee0f78741f"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"7d1dba012a17767559c971146c05a86cc2f2a954","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        server_id, namespace, ports \u003d self._create_server("},{"line_number":221,"context_line":"            network, pre_port\u003dFalse, n_interfaces\u003d1)"},{"line_number":222,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":223,"context_line":"        server_id, namespace, ports \u003d self._create_server("},{"line_number":224,"context_line":"            network, pre_port\u003dTrue, n_interfaces\u003d0)"},{"line_number":225,"context_line":"        self._check_connectivity(ports[0], namespace)"},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_471b4b73","line":223,"in_reply_to":"fa7ab95a_2932a3f2","updated":"2016-09-02 12:23:20.000000000","message":"Done","commit_id":"f1d82edda6bac0e6b4e5fd035c04dcee0f78741f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"05991e7b1eb670cb23ef6a2d610e8e36125b7b41","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            self.assertIn(\"failed to build and is in ERROR status\", e_str)"},{"line_number":243,"context_line":"            self.assertIn(\"No more IP addresses available on network\", e_str)"},{"line_number":244,"context_line":"            ports \u003d self.client.list_ports(network_id\u003dnetwork[\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":245,"context_line":"            self.assertEmpty(ports, msg\u003d\"ports should not be created\")"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    @test.idempotent_id(\u0027ce910b8e-9086-4bda-8a9b-39c2851cc84f\u0027)"},{"line_number":248,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_c65cc47f","line":245,"updated":"2016-09-01 23:44:57.000000000","message":"This assert is going to fail. You are going to get at least the DHCP port attached to the network. This is the result of a similar operation on a freshly created network: http://paste.openstack.org/show/565910/","commit_id":"f1d82edda6bac0e6b4e5fd035c04dcee0f78741f"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"7d1dba012a17767559c971146c05a86cc2f2a954","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            self.assertIn(\"failed to build and is in ERROR status\", e_str)"},{"line_number":243,"context_line":"            self.assertIn(\"No more IP addresses available on network\", e_str)"},{"line_number":244,"context_line":"            ports \u003d self.client.list_ports(network_id\u003dnetwork[\u0027id\u0027])[\u0027ports\u0027]"},{"line_number":245,"context_line":"            self.assertEmpty(ports, msg\u003d\"ports should not be created\")"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    @test.idempotent_id(\u0027ce910b8e-9086-4bda-8a9b-39c2851cc84f\u0027)"},{"line_number":248,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa7ab95a_4966eeed","line":245,"in_reply_to":"fa7ab95a_c65cc47f","updated":"2016-09-02 12:23:20.000000000","message":"Yes, you are right, there should at least has the dhcp port, the reason why I found no port when I was writing this code I think is because I use the non-admin tenant to list the ports. if I use the clint_admin.list_ports, I think I should find this error.\n\nAnyway, I have use the admin tenant to create the server, so now I check after the instance is cleaned, whether we still have the port with device_owner\u003d\"nova:compute\". could I use this key as the sign of whether we have any ports that is not be cleaned up?","commit_id":"f1d82edda6bac0e6b4e5fd035c04dcee0f78741f"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    COMPUTE_NODE2 \u003d \u0027compute2\u0027"},{"line_number":36,"context_line":"    force_tenant_isolation \u003d True"},{"line_number":37,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":38,"context_line":"    PHY_NETWORK1_CIDR \u003d \u002710.1.0.0/24\u0027"},{"line_number":39,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"},{"line_number":40,"context_line":"    PHY_NETWORK2_CIDR \u003d \u002710.1.1.0/24\u0027"},{"line_number":41,"context_line":"    MASK_BITS \u003d 28"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_0b564006","line":38,"updated":"2016-09-08 23:58:38.000000000","message":"We don\u0027t need this line anymore. See comment to line 255","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    COMPUTE_NODE2 \u003d \u0027compute2\u0027"},{"line_number":36,"context_line":"    force_tenant_isolation \u003d True"},{"line_number":37,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":38,"context_line":"    PHY_NETWORK1_CIDR \u003d \u002710.1.0.0/24\u0027"},{"line_number":39,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"},{"line_number":40,"context_line":"    PHY_NETWORK2_CIDR \u003d \u002710.1.1.0/24\u0027"},{"line_number":41,"context_line":"    MASK_BITS \u003d 28"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_94fee836","line":38,"in_reply_to":"9a89bdaa_0b564006","updated":"2016-09-09 07:33:45.000000000","message":"Done","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":38,"context_line":"    PHY_NETWORK1_CIDR \u003d \u002710.1.0.0/24\u0027"},{"line_number":39,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"},{"line_number":40,"context_line":"    PHY_NETWORK2_CIDR \u003d \u002710.1.1.0/24\u0027"},{"line_number":41,"context_line":"    MASK_BITS \u003d 28"},{"line_number":42,"context_line":"    ADMIN_KEY_FILE_PATH \u003d \u0027/tmp/admin_testkey.dat\u0027"},{"line_number":43,"context_line":"    NETWORK_TYPE \u003d \u0027vlan\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_4b404836","line":40,"updated":"2016-09-08 23:58:38.000000000","message":"Let\u0027s get rid of this. See comment to line 255","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"},{"line_number":38,"context_line":"    PHY_NETWORK1_CIDR \u003d \u002710.1.0.0/24\u0027"},{"line_number":39,"context_line":"    PHY_NETWORK2 \u003d \u0027physnet2\u0027"},{"line_number":40,"context_line":"    PHY_NETWORK2_CIDR \u003d \u002710.1.1.0/24\u0027"},{"line_number":41,"context_line":"    MASK_BITS \u003d 28"},{"line_number":42,"context_line":"    ADMIN_KEY_FILE_PATH \u003d \u0027/tmp/admin_testkey.dat\u0027"},{"line_number":43,"context_line":"    NETWORK_TYPE \u003d \u0027vlan\u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_b4fbec46","line":40,"in_reply_to":"9a89bdaa_4b404836","updated":"2016-09-09 07:33:45.000000000","message":"Done","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                                           server1_ip, ping_server2)"},{"line_number":189,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace1, ssh_commands)"},{"line_number":190,"context_line":"        for i in range(retries):"},{"line_number":191,"context_line":"            time.sleep(5)"},{"line_number":192,"context_line":"            obj \u003d common_utils.subprocess_popen(full_cmd, shell\u003dTrue,"},{"line_number":193,"context_line":"                                                stdout\u003dsubprocess.PIPE,"},{"line_number":194,"context_line":"                                                stdin\u003dsubprocess.PIPE,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_8b4a5054","line":191,"range":{"start_line":191,"start_character":23,"end_line":191,"end_character":24},"updated":"2016-09-08 23:58:38.000000000","message":"This is supposed to be timeout, right?","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                                           server1_ip, ping_server2)"},{"line_number":189,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace1, ssh_commands)"},{"line_number":190,"context_line":"        for i in range(retries):"},{"line_number":191,"context_line":"            time.sleep(5)"},{"line_number":192,"context_line":"            obj \u003d common_utils.subprocess_popen(full_cmd, shell\u003dTrue,"},{"line_number":193,"context_line":"                                                stdout\u003dsubprocess.PIPE,"},{"line_number":194,"context_line":"                                                stdin\u003dsubprocess.PIPE,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_14c018e0","line":191,"range":{"start_line":191,"start_character":23,"end_line":191,"end_character":24},"in_reply_to":"9a89bdaa_8b4a5054","updated":"2016-09-09 07:33:45.000000000","message":"done, sorry, when I finish debuging, I forget to change it back:(","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                    self.fail(\"instance ports should not be created\")"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    @test.idempotent_id(\u0027ce910b8e-9086-4bda-8a9b-39c2851cc84f\u0027)"},{"line_number":252,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"},{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_2ba944e0","line":252,"range":{"start_line":252,"start_character":8,"end_line":252,"end_character":63},"updated":"2016-09-08 23:58:38.000000000","message":"Let\u0027s rename this to test_instances_connectivity_over_routed_network. Is more descriptive of what we are trying to acomplish","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    @test.idempotent_id(\u0027ce910b8e-9086-4bda-8a9b-39c2851cc84f\u0027)"},{"line_number":252,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"},{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_8880968d","line":253,"range":{"start_line":253,"start_character":33,"end_line":253,"end_character":75},"updated":"2016-09-08 23:58:38.000000000","message":"Let\u0027s change this to {\"start\": \"10.2.1.10\", \"end\": \"10.2.1.13\"}. This way, the range doesn\u0027t collide with what the vagrant environments uses for its routed network","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    @test.idempotent_id(\u0027ce910b8e-9086-4bda-8a9b-39c2851cc84f\u0027)"},{"line_number":252,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"},{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_25c968ad","line":253,"range":{"start_line":253,"start_character":33,"end_line":253,"end_character":75},"in_reply_to":"9a89bdaa_8880968d","updated":"2016-09-09 07:33:45.000000000","message":"Done. but if you want to run this test in your vagrant environment, you should configure it in correspondence with the settings in iprouter\u0027s network settings.That is the reason why I set the segment id as 2016. and set cidr as 10.1.0.0/24 and 10.1.1.0/24 here.","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    @test.idempotent_id(\u0027ce910b8e-9086-4bda-8a9b-39c2851cc84f\u0027)"},{"line_number":252,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"},{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":257,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_485dae47","line":254,"range":{"start_line":254,"start_character":33,"end_line":254,"end_character":75},"updated":"2016-09-08 23:58:38.000000000","message":"Let\u0027s change this to {\"start\": \"10.2.2.10\", \"end\": \"10.2.2.13\"}. Same explanation as comment to L253","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    @test.idempotent_id(\u0027ce910b8e-9086-4bda-8a9b-39c2851cc84f\u0027)"},{"line_number":252,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"},{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":257,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_e5cea0b6","line":254,"range":{"start_line":254,"start_character":33,"end_line":254,"end_character":75},"in_reply_to":"9a89bdaa_485dae47","updated":"2016-09-09 07:33:45.000000000","message":"Done see the reply in line 253","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"},{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":257,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":258,"context_line":"                                   allocation_pools_phy1,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_e81be27e","line":255,"updated":"2016-09-08 23:58:38.000000000","message":"Lets add two lines:\n\nPHY_NETWORK1_CIDR \u003d \u002710.2.1.0/24\u0027\nPHY_NETWORK2_CIDR \u003d \u002710.2.2.0/24\u0027\n\nThis way, each test case is independent","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    def test_create_server_on_different_segments_routed_network(self):"},{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":257,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":258,"context_line":"                                   allocation_pools_phy1,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_141c9876","line":255,"in_reply_to":"9a89bdaa_e81be27e","updated":"2016-09-09 07:33:45.000000000","message":"Done see the reply in line 253","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":257,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":258,"context_line":"                                   allocation_pools_phy1,"},{"line_number":259,"context_line":"                                   self.PHY_NETWORK1_CIDR)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_889256f5","line":256,"range":{"start_line":256,"start_character":64,"end_line":256,"end_character":68},"updated":"2016-09-08 23:58:38.000000000","message":"I suggest changing this to 2019","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        allocation_pools_phy1 \u003d [{\"start\": \"10.1.0.10\", \"end\": \"10.1.0.13\"}]"},{"line_number":254,"context_line":"        allocation_pools_phy2 \u003d [{\"start\": \"10.1.1.10\", \"end\": \"10.1.1.13\"}]"},{"line_number":255,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1, self.PHY_NETWORK2]"},{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":257,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":258,"context_line":"                                   allocation_pools_phy1,"},{"line_number":259,"context_line":"                                   self.PHY_NETWORK1_CIDR)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_5aeba7b0","line":256,"range":{"start_line":256,"start_character":64,"end_line":256,"end_character":68},"in_reply_to":"9a89bdaa_889256f5","updated":"2016-09-09 07:33:45.000000000","message":"Done","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":257,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":258,"context_line":"                                   allocation_pools_phy1,"},{"line_number":259,"context_line":"                                   self.PHY_NETWORK1_CIDR)"},{"line_number":260,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK2, network,"},{"line_number":261,"context_line":"                                   allocation_pools_phy2,"},{"line_number":262,"context_line":"                                   self.PHY_NETWORK2_CIDR)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_8805f615","line":259,"range":{"start_line":259,"start_character":35,"end_line":259,"end_character":40},"updated":"2016-09-08 23:58:38.000000000","message":"Let\u0027s get rid of this. See comment to line 255","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        network \u003d self._create_routed_network(phy_network_list, 2016)"},{"line_number":257,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK1, network,"},{"line_number":258,"context_line":"                                   allocation_pools_phy1,"},{"line_number":259,"context_line":"                                   self.PHY_NETWORK1_CIDR)"},{"line_number":260,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK2, network,"},{"line_number":261,"context_line":"                                   allocation_pools_phy2,"},{"line_number":262,"context_line":"                                   self.PHY_NETWORK2_CIDR)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_5448e087","line":259,"range":{"start_line":259,"start_character":35,"end_line":259,"end_character":40},"in_reply_to":"9a89bdaa_8805f615","updated":"2016-09-09 07:33:45.000000000","message":"Done","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"91442bd54cb2159474a4d587624060ad41715231","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                                   self.PHY_NETWORK1_CIDR)"},{"line_number":260,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK2, network,"},{"line_number":261,"context_line":"                                   allocation_pools_phy2,"},{"line_number":262,"context_line":"                                   self.PHY_NETWORK2_CIDR)"},{"line_number":263,"context_line":"        server1_info \u003d self._create_server(network, self.COMPUTE_NODE1)"},{"line_number":264,"context_line":"        server2_info \u003d self._create_server(network, self.COMPUTE_NODE2)"},{"line_number":265,"context_line":"        self._two_servers_connectivity_test(server1_info, server2_info)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_cb4b785e","line":262,"range":{"start_line":262,"start_character":35,"end_line":262,"end_character":40},"updated":"2016-09-08 23:58:38.000000000","message":"Let\u0027s get rid of this. See comment to line 255","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"fcda0e40355fbfc9ef418340b5b04dbb0a9894ea","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                                   self.PHY_NETWORK1_CIDR)"},{"line_number":260,"context_line":"        self._create_routed_subnet(self.PHY_NETWORK2, network,"},{"line_number":261,"context_line":"                                   allocation_pools_phy2,"},{"line_number":262,"context_line":"                                   self.PHY_NETWORK2_CIDR)"},{"line_number":263,"context_line":"        server1_info \u003d self._create_server(network, self.COMPUTE_NODE1)"},{"line_number":264,"context_line":"        server2_info \u003d self._create_server(network, self.COMPUTE_NODE2)"},{"line_number":265,"context_line":"        self._two_servers_connectivity_test(server1_info, server2_info)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a89bdaa_745de447","line":262,"range":{"start_line":262,"start_character":35,"end_line":262,"end_character":40},"in_reply_to":"9a89bdaa_cb4b785e","updated":"2016-09-09 07:33:45.000000000","message":"Done","commit_id":"060436dbf2409131e2a6069c99103857125b22ce"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"b2afb70378a3f36dbe460c06f7d5ff07f62a988a","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class RoutedNetworkTest(base.BaseTempestTestCase):"},{"line_number":33,"context_line":"    credentials \u003d [\u0027primary\u0027, \u0027admin\u0027]"},{"line_number":34,"context_line":"    COMPUTE_NODE1 \u003d \u0027allinone\u0027"},{"line_number":35,"context_line":"    COMPUTE_NODE2 \u003d \u0027compute2\u0027"},{"line_number":36,"context_line":"    force_tenant_isolation \u003d True"},{"line_number":37,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_49356bd9","line":34,"updated":"2016-09-10 16:47:43.000000000","message":"I\u0027m at a loss - How is this expected to pass on deployments that have a different number of nodes, or that have nodes named differently?","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3708e18520006c69509c7ee4252690cbe3608077","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class RoutedNetworkTest(base.BaseTempestTestCase):"},{"line_number":33,"context_line":"    credentials \u003d [\u0027primary\u0027, \u0027admin\u0027]"},{"line_number":34,"context_line":"    COMPUTE_NODE1 \u003d \u0027allinone\u0027"},{"line_number":35,"context_line":"    COMPUTE_NODE2 \u003d \u0027compute2\u0027"},{"line_number":36,"context_line":"    force_tenant_isolation \u003d True"},{"line_number":37,"context_line":"    PHY_NETWORK1 \u003d \u0027physnet1\u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_4a4439b6","line":34,"in_reply_to":"9a89bdaa_49356bd9","updated":"2016-09-12 20:17:18.000000000","message":"@Assaf,\n\nBin has concentrated on getting the scenario running in the test environment that we are using. You are right, we need to work on this further to make it applicable in other environments. What do you suggest?\n\n1) Should we add configuration parameters to tempest.conf? I am think of parameters for the noes and the physical nets\n2) How do we go about adding options to tempest.conf? Do you have an example that we can follow?","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b72c8b1bac8b707ec9491ec940dedef676e75a05","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    @classmethod"},{"line_number":55,"context_line":"    def resource_cleanup(cls):"},{"line_number":56,"context_line":"        key_paths \u003d [cls.ADMIN_KEY_FILE_PATH]"},{"line_number":57,"context_line":"        for key_path in key_paths:"},{"line_number":58,"context_line":"            cmd \u003d \u0027rm -f %s\u0027 % key_path"},{"line_number":59,"context_line":"            obj \u003d common_utils.subprocess_popen(cmd, shell\u003dTrue, stdin\u003dNone,"},{"line_number":60,"context_line":"                                                stdout\u003dsubprocess.PIPE,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_cfe19200","line":57,"updated":"2016-09-09 21:20:22.000000000","message":"I don\u0027t think we need this for loop. We are creating just one key pair file","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"8a2f7565d9f85e8204519fbf8b3637cb0a7c86cd","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    @classmethod"},{"line_number":55,"context_line":"    def resource_cleanup(cls):"},{"line_number":56,"context_line":"        key_paths \u003d [cls.ADMIN_KEY_FILE_PATH]"},{"line_number":57,"context_line":"        for key_path in key_paths:"},{"line_number":58,"context_line":"            cmd \u003d \u0027rm -f %s\u0027 % key_path"},{"line_number":59,"context_line":"            obj \u003d common_utils.subprocess_popen(cmd, shell\u003dTrue, stdin\u003dNone,"},{"line_number":60,"context_line":"                                                stdout\u003dsubprocess.PIPE,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_6fa34b9f","line":57,"in_reply_to":"9a89bdaa_cfe19200","updated":"2016-09-14 03:30:11.000000000","message":"Done","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b72c8b1bac8b707ec9491ec940dedef676e75a05","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def _create_loginable_secgroup_rule(cls):"},{"line_number":67,"context_line":"        groups \u003d cls.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":68,"context_line":"        admin_tenant_id \u003d cls.admin_manager.tenants_client.tenant_id"},{"line_number":69,"context_line":"        for each in groups:"},{"line_number":70,"context_line":"            if each[\u0027tenant_id\u0027] \u003d\u003d admin_tenant_id:"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_009349a4","line":67,"updated":"2016-09-09 21:20:22.000000000","message":"We can simplify this method by adding a filter to this list operation. This is what I suggest: https://gist.github.com/miguellavalle/f71a1621edafbd8191d93215d9fb91db","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"8a2f7565d9f85e8204519fbf8b3637cb0a7c86cd","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def _create_loginable_secgroup_rule(cls):"},{"line_number":67,"context_line":"        groups \u003d cls.admin_client.list_security_groups()[\u0027security_groups\u0027]"},{"line_number":68,"context_line":"        admin_tenant_id \u003d cls.admin_manager.tenants_client.tenant_id"},{"line_number":69,"context_line":"        for each in groups:"},{"line_number":70,"context_line":"            if each[\u0027tenant_id\u0027] \u003d\u003d admin_tenant_id:"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_9510a850","line":67,"in_reply_to":"9a89bdaa_009349a4","updated":"2016-09-14 03:30:11.000000000","message":"Done","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b72c8b1bac8b707ec9491ec940dedef676e75a05","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _setup_server(self, network, pre_port, n_interfaces, host):"},{"line_number":142,"context_line":"        network_args \u003d [{\u0027uuid\u0027: network[\u0027id\u0027]}] * n_interfaces"},{"line_number":143,"context_line":"        name \u003d data_utils.rand_name(\u0027routed-networks-test-serve\u0027)"},{"line_number":144,"context_line":"        if pre_port:"},{"line_number":145,"context_line":"            port \u003d self.create_port(network, is_admin\u003dTrue)"},{"line_number":146,"context_line":"            self.assertEqual(\u0027deferred\u0027, port[\u0027ip_allocation\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_fddfe709","line":143,"range":{"start_line":143,"start_character":58,"end_line":143,"end_character":63},"updated":"2016-09-09 21:20:22.000000000","message":"Nit: server","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"8a2f7565d9f85e8204519fbf8b3637cb0a7c86cd","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _setup_server(self, network, pre_port, n_interfaces, host):"},{"line_number":142,"context_line":"        network_args \u003d [{\u0027uuid\u0027: network[\u0027id\u0027]}] * n_interfaces"},{"line_number":143,"context_line":"        name \u003d data_utils.rand_name(\u0027routed-networks-test-serve\u0027)"},{"line_number":144,"context_line":"        if pre_port:"},{"line_number":145,"context_line":"            port \u003d self.create_port(network, is_admin\u003dTrue)"},{"line_number":146,"context_line":"            self.assertEqual(\u0027deferred\u0027, port[\u0027ip_allocation\u0027],"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_4feccfc7","line":143,"range":{"start_line":143,"start_character":58,"end_line":143,"end_character":63},"in_reply_to":"9a89bdaa_fddfe709","updated":"2016-09-14 03:30:11.000000000","message":"Done","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b72c8b1bac8b707ec9491ec940dedef676e75a05","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            self.assertEqual(\u0027deferred\u0027, port[\u0027ip_allocation\u0027],"},{"line_number":147,"context_line":"                             \"ip allocation should be deferred\")"},{"line_number":148,"context_line":"            self.assertEmpty(port[\u0027fixed_ips\u0027],"},{"line_number":149,"context_line":"                             \u0027port should have blank fixed_ips\u0027)"},{"line_number":150,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            # we have to use admin tenant to create"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_9d497bd3","line":149,"range":{"start_line":149,"start_character":47,"end_line":149,"end_character":52},"updated":"2016-09-09 21:20:22.000000000","message":"Nit: empty","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"8a2f7565d9f85e8204519fbf8b3637cb0a7c86cd","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            self.assertEqual(\u0027deferred\u0027, port[\u0027ip_allocation\u0027],"},{"line_number":147,"context_line":"                             \"ip allocation should be deferred\")"},{"line_number":148,"context_line":"            self.assertEmpty(port[\u0027fixed_ips\u0027],"},{"line_number":149,"context_line":"                             \u0027port should have blank fixed_ips\u0027)"},{"line_number":150,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"            # we have to use admin tenant to create"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_2fe783e5","line":149,"range":{"start_line":149,"start_character":47,"end_line":149,"end_character":52},"in_reply_to":"9a89bdaa_9d497bd3","updated":"2016-09-14 03:30:11.000000000","message":"Done","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b72c8b1bac8b707ec9491ec940dedef676e75a05","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        server1_ip \u003d server1_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":179,"context_line":"        server2_port \u003d server2_info[self.PORT_POS][0]"},{"line_number":180,"context_line":"        server2_ip \u003d server2_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":181,"context_line":"        ping_server2 \u003d \"ping -c 1 %s\" % server2_ip"},{"line_number":182,"context_line":"        ssh_commands \u003d \u0027ssh  -o UserKnownHostsFile\u003d/dev/null -o \u0027 \\"},{"line_number":183,"context_line":"                       \u0027StrictHostKeyChecking\u003dno -o ConnectTimeout\u003d40 \u0027 \\"},{"line_number":184,"context_line":"                       \u0027-i %s %s@%s %s\u0027 % (self.ADMIN_KEY_FILE_PATH,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_7dd677c4","line":181,"range":{"start_line":181,"start_character":8,"end_line":181,"end_character":20},"updated":"2016-09-09 21:20:22.000000000","message":"nit: ping_server2_cmd","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"8a2f7565d9f85e8204519fbf8b3637cb0a7c86cd","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        server1_ip \u003d server1_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":179,"context_line":"        server2_port \u003d server2_info[self.PORT_POS][0]"},{"line_number":180,"context_line":"        server2_ip \u003d server2_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":181,"context_line":"        ping_server2 \u003d \"ping -c 1 %s\" % server2_ip"},{"line_number":182,"context_line":"        ssh_commands \u003d \u0027ssh  -o UserKnownHostsFile\u003d/dev/null -o \u0027 \\"},{"line_number":183,"context_line":"                       \u0027StrictHostKeyChecking\u003dno -o ConnectTimeout\u003d40 \u0027 \\"},{"line_number":184,"context_line":"                       \u0027-i %s %s@%s %s\u0027 % (self.ADMIN_KEY_FILE_PATH,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_efdcbb1a","line":181,"range":{"start_line":181,"start_character":8,"end_line":181,"end_character":20},"in_reply_to":"9a89bdaa_7dd677c4","updated":"2016-09-14 03:30:11.000000000","message":"Done","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b72c8b1bac8b707ec9491ec940dedef676e75a05","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                       \u0027StrictHostKeyChecking\u003dno -o ConnectTimeout\u003d40 \u0027 \\"},{"line_number":184,"context_line":"                       \u0027-i %s %s@%s %s\u0027 % (self.ADMIN_KEY_FILE_PATH,"},{"line_number":185,"context_line":"                                           CONF.validation.image_ssh_user,"},{"line_number":186,"context_line":"                                           server1_ip, ping_server2)"},{"line_number":187,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace1, ssh_commands)"},{"line_number":188,"context_line":"        for i in range(retries):"},{"line_number":189,"context_line":"            time.sleep(timeout)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_ddedc38f","line":186,"range":{"start_line":186,"start_character":55,"end_line":186,"end_character":67},"updated":"2016-09-09 21:20:22.000000000","message":"see comment to L181","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"8a2f7565d9f85e8204519fbf8b3637cb0a7c86cd","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                       \u0027StrictHostKeyChecking\u003dno -o ConnectTimeout\u003d40 \u0027 \\"},{"line_number":184,"context_line":"                       \u0027-i %s %s@%s %s\u0027 % (self.ADMIN_KEY_FILE_PATH,"},{"line_number":185,"context_line":"                                           CONF.validation.image_ssh_user,"},{"line_number":186,"context_line":"                                           server1_ip, ping_server2)"},{"line_number":187,"context_line":"        full_cmd \u003d \u0027sudo ip net exec %s %s\u0027 % (namespace1, ssh_commands)"},{"line_number":188,"context_line":"        for i in range(retries):"},{"line_number":189,"context_line":"            time.sleep(timeout)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_0fe2c7d5","line":186,"range":{"start_line":186,"start_character":55,"end_line":186,"end_character":67},"in_reply_to":"9a89bdaa_ddedc38f","updated":"2016-09-14 03:30:11.000000000","message":"Done","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b72c8b1bac8b707ec9491ec940dedef676e75a05","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        self.assertEqual(0, ret, \u0027two instances connectivity test failed\u0027)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":213,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":214,"context_line":"        allocation_pools \u003d [{\"start\": \"10.2.0.10\", \"end\": \"10.2.0.14\"}]"},{"line_number":215,"context_line":"        CIDR \u003d \u002710.2.0.0/24\u0027"},{"line_number":216,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_0092644b","line":213,"updated":"2016-09-09 21:20:22.000000000","message":"We have two test cases embedded here. Therefore, I think we should re-factor this method in 3:\n\ntest_create_server_on_routed_network\ntest_create_server_on_routed_network_pre_created_port\n_test_create_server_on_routed_network\n\nThe third method should contain the common code for the other 2.\n\nThis way, in case of a failure, it much easier to see which of the 2 test cases failed","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"bcbbc21df4b790d4ea0acd9811d8571957d9baba","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        self.assertEqual(0, ret, \u0027two instances connectivity test failed\u0027)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":213,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":214,"context_line":"        allocation_pools \u003d [{\"start\": \"10.2.0.10\", \"end\": \"10.2.0.14\"}]"},{"line_number":215,"context_line":"        CIDR \u003d \u002710.2.0.0/24\u0027"},{"line_number":216,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_4bb72df5","line":213,"in_reply_to":"9a89bdaa_0092644b","updated":"2016-09-09 21:57:29.000000000","message":"How about naming the re-factored methods as follows:\n\ntest_create_server_on_routed_network_nova_created_port\ntest_create_server_on_routed_network_user_created_port\n_test_create_server_on_routed_network","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"8a2f7565d9f85e8204519fbf8b3637cb0a7c86cd","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        self.assertEqual(0, ret, \u0027two instances connectivity test failed\u0027)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @test.idempotent_id(\u0027953d4048-0388-4fb5-beca-f85e07ba8b1e\u0027)"},{"line_number":213,"context_line":"    def test_create_server_on_routed_network(self):"},{"line_number":214,"context_line":"        allocation_pools \u003d [{\"start\": \"10.2.0.10\", \"end\": \"10.2.0.14\"}]"},{"line_number":215,"context_line":"        CIDR \u003d \u002710.2.0.0/24\u0027"},{"line_number":216,"context_line":"        phy_network_list \u003d [self.PHY_NETWORK1]"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a8ec9b2_753f9c25","line":213,"in_reply_to":"9a89bdaa_4bb72df5","updated":"2016-09-14 03:30:11.000000000","message":"that should be a good idea, do you mean, we separate the test cases into nova_create_port/user_create_port? Considering the test cases maybe run in parallel, so, I create the seperated network for these two test cases to make it simple.","commit_id":"e021d9c3108f3f34b589440507d9d48854450429"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"71591466b8910d46fd73fb83c7f6b22c5e8bd478","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                             \u0027port should have empty fixed_ips\u0027)"},{"line_number":143,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"            # we have to use admin tenant to create"},{"line_number":146,"context_line":"            # the instance on the designated node"},{"line_number":147,"context_line":"        availability_zone \u003d \u0027nova:%s\u0027 % host"},{"line_number":148,"context_line":"        server \u003d self.admin_manager.servers_client.create_server("},{"line_number":149,"context_line":"            name\u003dname, flavorRef\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_d80f87df","line":146,"range":{"start_line":145,"start_character":12,"end_line":146,"end_character":49},"updated":"2016-09-14 22:03:23.000000000","message":"I think these lines are not needed anymore","commit_id":"7d73aec32fedbf192b8a81a1c0557f681a530bab"},{"author":{"_account_id":20671,"name":"bin","email":"froyo.bin@gmail.com","username":"binyu"},"change_message_id":"3e5e7f6a999c6fec182e415675f918103bc2cd4a","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                             \u0027port should have empty fixed_ips\u0027)"},{"line_number":143,"context_line":"            network_args.append({\u0027port\u0027: port[\u0027id\u0027]})"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"            # we have to use admin tenant to create"},{"line_number":146,"context_line":"            # the instance on the designated node"},{"line_number":147,"context_line":"        availability_zone \u003d \u0027nova:%s\u0027 % host"},{"line_number":148,"context_line":"        server \u003d self.admin_manager.servers_client.create_server("},{"line_number":149,"context_line":"            name\u003dname, flavorRef\u003dCONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a8ec9b2_7fbad224","line":146,"range":{"start_line":145,"start_character":12,"end_line":146,"end_character":49},"in_reply_to":"7a8ec9b2_d80f87df","updated":"2016-09-15 02:55:35.000000000","message":"Done","commit_id":"7d73aec32fedbf192b8a81a1c0557f681a530bab"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"152471dac0663d6c16cd5e9a66f7386a0508392e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        server_id \u003d self._setup_server(network, pre_port, n_interfaces, host)"},{"line_number":157,"context_line":"        waiters.wait_for_server_status(self.admin_manager.servers_client,"},{"line_number":158,"context_line":"                                       server_id,"},{"line_number":159,"context_line":"                                       constants.SERVER_STATUS_ACTIVE)"},{"line_number":160,"context_line":"        namespace \u003d \u0027qdhcp-\u0027 + network[\u0027id\u0027]"},{"line_number":161,"context_line":"        ports \u003d self.admin_client.list_ports(network_id\u003dnetwork[\u0027id\u0027],"},{"line_number":162,"context_line":"                                             device_id\u003dserver_id)[\u0027ports\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a8ec9b2_ce3b2fea","line":159,"updated":"2016-09-20 22:46:26.000000000","message":"If pre_port is True, how about adding assertions to check that after the server is created and the port is bound as a consequence, we got a fixed ip and ip_allocation is \u0027immediate\u0027. This is the complement of what you do in L139-142","commit_id":"003a3fdf384d20fbf9175f166c344a14cef42542"}]}
