)]}'
{"patrole_tempest_plugin/tests/api/network/test_ports_rbac.py":[{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"256aa608b71f13a14d0eacbebc529c5d404c880c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class RbacPortsTest(base.BaseNetworkRbacTest):"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    def resource_setup(cls):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_2bec2729","line":34,"range":{"start_line":34,"start_character":6,"end_line":34,"end_character":19},"updated":"2017-02-08 16:06:52.000000000","message":"Not sure if we have an established standard on class names, but based on the open reviews maybe this should be named PortsRbacTest ... just an idea.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"f8af952f20299a895a4fc508d0dcce6642890175","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class RbacPortsTest(base.BaseNetworkRbacTest):"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    def resource_setup(cls):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_0bb92b15","line":34,"range":{"start_line":34,"start_character":6,"end_line":34,"end_character":19},"in_reply_to":"1a430d35_2bec2729","updated":"2017-02-08 16:22:47.000000000","message":"Agreed, thanks.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"535180feeea5148ee45210f975d886a73ba9c5b8","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                        self.ports_client.delete_port,"},{"line_number":64,"context_line":"                        port[\u0027id\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self.assertTrue(port[\u0027admin_state_up\u0027])"},{"line_number":67,"context_line":"        return port"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_c6d0ffcb","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":47},"updated":"2017-02-08 15:22:10.000000000","message":"Agreed. Not required.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":23185,"name":"Samantha Blanco","email":"samantha.blanco@att.com","username":"sblanco"},"change_message_id":"b32055bb37c27f419c778ce646ad447696d81391","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                        self.ports_client.delete_port,"},{"line_number":64,"context_line":"                        port[\u0027id\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self.assertTrue(port[\u0027admin_state_up\u0027])"},{"line_number":67,"context_line":"        return port"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_8b50c00c","line":66,"updated":"2017-02-08 14:41:32.000000000","message":"Is this necessary? The test runs fine without it","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"f8af952f20299a895a4fc508d0dcce6642890175","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                        self.ports_client.delete_port,"},{"line_number":64,"context_line":"                        port[\u0027id\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        self.assertTrue(port[\u0027admin_state_up\u0027])"},{"line_number":67,"context_line":"        return port"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_6b40ef07","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":47},"in_reply_to":"1a430d35_c6d0ffcb","updated":"2017-02-08 16:22:47.000000000","message":"Will remove this.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"535180feeea5148ee45210f975d886a73ba9c5b8","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def test_create_port_mac_address(self):"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        post_body \u003d {\u0027network_id\u0027: self.admin_network[\u0027id\u0027],"},{"line_number":111,"context_line":"                     \u0027mac_address\u0027: \u002710:01:10:01:10:01\u0027}"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":114,"context_line":"        self._create_port(**post_body)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_260b832b","line":111,"range":{"start_line":111,"start_character":37,"end_line":111,"end_character":54},"updated":"2017-02-08 15:22:10.000000000","message":"Better is to take it from data_utils.rand_mac_address.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"f8af952f20299a895a4fc508d0dcce6642890175","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def test_create_port_mac_address(self):"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        post_body \u003d {\u0027network_id\u0027: self.admin_network[\u0027id\u0027],"},{"line_number":111,"context_line":"                     \u0027mac_address\u0027: \u002710:01:10:01:10:01\u0027}"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":114,"context_line":"        self._create_port(**post_body)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_ab4e5738","line":111,"range":{"start_line":111,"start_character":37,"end_line":111,"end_character":54},"in_reply_to":"1a430d35_260b832b","updated":"2017-02-08 16:22:47.000000000","message":"agreed.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"535180feeea5148ee45210f975d886a73ba9c5b8","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        # Verify specific fields of a port"},{"line_number":203,"context_line":"        fields \u003d [\u0027binding:host_id\u0027]"},{"line_number":204,"context_line":"        post_body \u003d {\u0027network_id\u0027: self.admin_network[\u0027id\u0027],"},{"line_number":205,"context_line":"                     \u0027binding:host_id\u0027: \"rbac_test_host\"}"},{"line_number":206,"context_line":"        port \u003d self._create_port(**post_body)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_211fed08","line":205,"range":{"start_line":205,"start_character":41,"end_line":205,"end_character":56},"updated":"2017-02-08 15:22:10.000000000","message":"Better is to take it randomly generated from data_utils module.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"f8af952f20299a895a4fc508d0dcce6642890175","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        # Verify specific fields of a port"},{"line_number":203,"context_line":"        fields \u003d [\u0027binding:host_id\u0027]"},{"line_number":204,"context_line":"        post_body \u003d {\u0027network_id\u0027: self.admin_network[\u0027id\u0027],"},{"line_number":205,"context_line":"                     \u0027binding:host_id\u0027: \"rbac_test_host\"}"},{"line_number":206,"context_line":"        port \u003d self._create_port(**post_body)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_0b504bd3","line":205,"range":{"start_line":205,"start_character":41,"end_line":205,"end_character":56},"in_reply_to":"1a430d35_211fed08","updated":"2017-02-08 16:22:47.000000000","message":"agreed.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":23185,"name":"Samantha Blanco","email":"samantha.blanco@att.com","username":"sblanco"},"change_message_id":"b32055bb37c27f419c778ce646ad447696d81391","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        body \u003d self.ports_client.update_port(self.admin_port[\u0027id\u0027],"},{"line_number":249,"context_line":"                                             admin_state_up\u003dFalse)"},{"line_number":250,"context_line":"        updated_port \u003d body[\u0027port\u0027]"},{"line_number":251,"context_line":"        self.assertFalse(updated_port[\u0027admin_state_up\u0027])"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        # Revert back to previous state"},{"line_number":254,"context_line":"        self.ports_client.update_port(self.admin_port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_2b67cce9","line":251,"updated":"2017-02-08 14:41:32.000000000","message":"See L66","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"535180feeea5148ee45210f975d886a73ba9c5b8","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":248,"context_line":"        body \u003d self.ports_client.update_port(self.admin_port[\u0027id\u0027],"},{"line_number":249,"context_line":"                                             admin_state_up\u003dFalse)"},{"line_number":250,"context_line":"        updated_port \u003d body[\u0027port\u0027]"},{"line_number":251,"context_line":"        self.assertFalse(updated_port[\u0027admin_state_up\u0027])"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        # Revert back to previous state"},{"line_number":254,"context_line":"        self.ports_client.update_port(self.admin_port[\u0027id\u0027],"},{"line_number":255,"context_line":"                                      admin_state_up\u003dTrue)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","},{"line_number":258,"context_line":"                                 rule\u003d\"update_port:mac_address\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_8115019d","line":255,"range":{"start_line":250,"start_character":0,"end_line":255,"end_character":58},"updated":"2017-02-08 15:22:10.000000000","message":"To avoid any revert failure, in \"update\" kind of testcases, we generally prefer to create local resource. \nBetter is to create new port here in this method and use locally created port.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"535180feeea5148ee45210f975d886a73ba9c5b8","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    @decorators.idempotent_id(\u0027507140c8-7b14-4d63-b627-2103691d887e\u0027)"},{"line_number":260,"context_line":"    def test_update_port_mac_address(self):"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":263,"context_line":"        self.ports_client.update_port("},{"line_number":264,"context_line":"            self.admin_port[\u0027id\u0027],"},{"line_number":265,"context_line":"            mac_address\u003ddata_utils.rand_mac_address())"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","},{"line_number":268,"context_line":"                                 rule\u003d\"update_port:fixed_ips\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_611bb5ca","line":265,"range":{"start_line":262,"start_character":0,"end_line":265,"end_character":54},"updated":"2017-02-08 15:22:10.000000000","message":"Ditto: local port creating should be used.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"535180feeea5148ee45210f975d886a73ba9c5b8","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def test_update_port_fixed_ips(self):"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        # Pick an ip address within the allocation_pools range"},{"line_number":273,"context_line":"        ip_address \u003d str(netaddr.IPAddress(self.cidr) + 10)"},{"line_number":274,"context_line":"        fixed_ips \u003d [{\u0027ip_address\u0027: ip_address}]"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":277,"context_line":"        self.ports_client.update_port(self.admin_port[\u0027id\u0027],"},{"line_number":278,"context_line":"                                      fixed_ips\u003dfixed_ips)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","},{"line_number":281,"context_line":"                                 rule\u003d\"update_port:port_security_enabled\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_216c4d34","line":278,"range":{"start_line":273,"start_character":0,"end_line":278,"end_character":58},"updated":"2017-02-08 15:22:10.000000000","message":"ditto.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"535180feeea5148ee45210f975d886a73ba9c5b8","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","},{"line_number":281,"context_line":"                                 rule\u003d\"update_port:port_security_enabled\")"},{"line_number":282,"context_line":"    @decorators.idempotent_id(\u0027795541af-6652-4e35-9581-fd58224f7545\u0027)"},{"line_number":283,"context_line":"    def test_update_port_security_enabled(self):"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":286,"context_line":"        self.ports_client.update_port(self.admin_port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_01583187","line":283,"range":{"start_line":283,"start_character":8,"end_line":283,"end_character":41},"updated":"2017-02-08 15:22:10.000000000","message":"ditto: applicable to all \"update port\" tests.","commit_id":"d185c6ee97d713e42662e652c749b718bc694fc0"},{"author":{"_account_id":23625,"name":"Nicolas Helgeson","email":"nh202b@att.com","username":"nhelgeson"},"change_message_id":"10e366b52873eeaf181125308ed522e714367372","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    def resource_setup(cls):"},{"line_number":38,"context_line":"        super(PortsRbacTest, cls).resource_setup()"},{"line_number":39,"context_line":"        cls.admin_network \u003d cls.create_network()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        # Create a subnet by admin user"},{"line_number":42,"context_line":"        cls.cidr \u003d netaddr.IPNetwork(CONF.network.project_network_cidr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_ae37404b","line":39,"range":{"start_line":39,"start_character":32,"end_line":39,"end_character":46},"updated":"2017-02-08 18:28:12.000000000","message":"I don\u0027t see a cleanup for the create_network method in the base class","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"fbdea053ed882f47b04faf6c4e0e4e0b3115e9df","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    def resource_setup(cls):"},{"line_number":38,"context_line":"        super(PortsRbacTest, cls).resource_setup()"},{"line_number":39,"context_line":"        cls.admin_network \u003d cls.create_network()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        # Create a subnet by admin user"},{"line_number":42,"context_line":"        cls.cidr \u003d netaddr.IPNetwork(CONF.network.project_network_cidr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_b17ec167","line":39,"range":{"start_line":39,"start_character":32,"end_line":39,"end_character":46},"in_reply_to":"1a430d35_ae37404b","updated":"2017-02-08 18:33:39.000000000","message":"It\u0027s there.\n\nsee - https://github.com/openstack/tempest/blob/3adabdadcec315b2851e6545d1593d579ba21802/tempest/api/network/base.py#L146","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"c45ce32e852f1bfb925576f8a7443b5742ae28a9","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    def resource_setup(cls):"},{"line_number":38,"context_line":"        super(PortsRbacTest, cls).resource_setup()"},{"line_number":39,"context_line":"        cls.admin_network \u003d cls.create_network()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        # Create a subnet by admin user"},{"line_number":42,"context_line":"        cls.cidr \u003d netaddr.IPNetwork(CONF.network.project_network_cidr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_91b5457f","line":39,"range":{"start_line":39,"start_character":32,"end_line":39,"end_character":46},"in_reply_to":"1a430d35_b17ec167","updated":"2017-02-08 18:49:28.000000000","message":"For class level resources, the network base class has lists of a few resource types (networks, subnets, ports, etc.) that are then all taken care of in the base class\u0027s resource_cleanup.","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23625,"name":"Nicolas Helgeson","email":"nh202b@att.com","username":"nhelgeson"},"change_message_id":"10e366b52873eeaf181125308ed522e714367372","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # Create a subnet by admin user"},{"line_number":42,"context_line":"        cls.cidr \u003d netaddr.IPNetwork(CONF.network.project_network_cidr)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        cls.admin_subnet \u003d cls.create_subnet(cls.admin_network,"},{"line_number":45,"context_line":"                                             cidr\u003dcls.cidr,"},{"line_number":46,"context_line":"                                             mask_bits\u003d24)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_ae002067","line":44,"range":{"start_line":44,"start_character":31,"end_line":44,"end_character":44},"updated":"2017-02-08 18:28:12.000000000","message":"I don\u0027t see a cleanup for the create_subnet method in the base class","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"fbdea053ed882f47b04faf6c4e0e4e0b3115e9df","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # Create a subnet by admin user"},{"line_number":42,"context_line":"        cls.cidr \u003d netaddr.IPNetwork(CONF.network.project_network_cidr)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        cls.admin_subnet \u003d cls.create_subnet(cls.admin_network,"},{"line_number":45,"context_line":"                                             cidr\u003dcls.cidr,"},{"line_number":46,"context_line":"                                             mask_bits\u003d24)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_116235d8","line":44,"range":{"start_line":44,"start_character":31,"end_line":44,"end_character":44},"in_reply_to":"1a430d35_ae002067","updated":"2017-02-08 18:33:39.000000000","message":"It\u0027s there in base. \nsee -  https://github.com/openstack/tempest/blob/3adabdadcec315b2851e6545d1593d579ba21802/tempest/api/network/base.py#L189","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23625,"name":"Nicolas Helgeson","email":"nh202b@att.com","username":"nhelgeson"},"change_message_id":"10e366b52873eeaf181125308ed522e714367372","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                                             mask_bits\u003d24)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # Create a port by admin user"},{"line_number":49,"context_line":"        body \u003d cls.ports_client.create_port(network_id\u003dcls.admin_network[\u0027id\u0027])"},{"line_number":50,"context_line":"        cls.admin_port \u003d body[\u0027port\u0027]"},{"line_number":51,"context_line":"        cls.ports.append(cls.admin_port)"},{"line_number":52,"context_line":"        ipaddr \u003d cls.admin_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_0e03f4b8","line":49,"range":{"start_line":49,"start_character":19,"end_line":49,"end_character":42},"updated":"2017-02-08 18:28:12.000000000","message":"This is direct from the client, I dont see a clean up for it either","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"fbdea053ed882f47b04faf6c4e0e4e0b3115e9df","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # Create a port by admin user"},{"line_number":49,"context_line":"        body \u003d cls.ports_client.create_port(network_id\u003dcls.admin_network[\u0027id\u0027])"},{"line_number":50,"context_line":"        cls.admin_port \u003d body[\u0027port\u0027]"},{"line_number":51,"context_line":"        cls.ports.append(cls.admin_port)"},{"line_number":52,"context_line":"        ipaddr \u003d cls.admin_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":53,"context_line":"        cls.admin_port_ip_address \u003d ipaddr"},{"line_number":54,"context_line":"        cls.admin_port_mac_address \u003d cls.admin_port[\u0027mac_address\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_b1432112","line":51,"updated":"2017-02-08 18:33:39.000000000","message":"@Nicolas, port cleanup is done here.","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23625,"name":"Nicolas Helgeson","email":"nh202b@att.com","username":"nhelgeson"},"change_message_id":"209fb9a41488d4ca11ce3e38335e53d36af0f696","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # Create a port by admin user"},{"line_number":49,"context_line":"        body \u003d cls.ports_client.create_port(network_id\u003dcls.admin_network[\u0027id\u0027])"},{"line_number":50,"context_line":"        cls.admin_port \u003d body[\u0027port\u0027]"},{"line_number":51,"context_line":"        cls.ports.append(cls.admin_port)"},{"line_number":52,"context_line":"        ipaddr \u003d cls.admin_port[\u0027fixed_ips\u0027][0][\u0027ip_address\u0027]"},{"line_number":53,"context_line":"        cls.admin_port_ip_address \u003d ipaddr"},{"line_number":54,"context_line":"        cls.admin_port_mac_address \u003d cls.admin_port[\u0027mac_address\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_044bd559","line":51,"in_reply_to":"1a430d35_b1432112","updated":"2017-02-08 18:52:12.000000000","message":"I see and then the ports and the networks are cleaned up together in the resource_cleanup in the base.","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23625,"name":"Nicolas Helgeson","email":"nh202b@att.com","username":"nhelgeson"},"change_message_id":"10e366b52873eeaf181125308ed522e714367372","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        body \u003d self.ports_client.create_port(**post_body)"},{"line_number":59,"context_line":"        port \u003d body[\u0027port\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # Schedule port deletion with verification upon test completion"},{"line_number":62,"context_line":"        self.addCleanup(test_utils.call_and_ignore_notfound_exc,"},{"line_number":63,"context_line":"                        self.ports_client.delete_port,"},{"line_number":64,"context_line":"                        port[\u0027id\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        return port"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_4ed6dc28","line":64,"range":{"start_line":61,"start_character":8,"end_line":64,"end_character":35},"updated":"2017-02-08 18:28:12.000000000","message":"I like how this was cleaned up - I will incorporate it into some of the tests I am currently upstreaming","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"c45ce32e852f1bfb925576f8a7443b5742ae28a9","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        body \u003d self.ports_client.create_port(**post_body)"},{"line_number":59,"context_line":"        port \u003d body[\u0027port\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # Schedule port deletion with verification upon test completion"},{"line_number":62,"context_line":"        self.addCleanup(test_utils.call_and_ignore_notfound_exc,"},{"line_number":63,"context_line":"                        self.ports_client.delete_port,"},{"line_number":64,"context_line":"                        port[\u0027id\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        return port"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_b185e1cf","line":64,"range":{"start_line":61,"start_character":8,"end_line":64,"end_character":35},"in_reply_to":"1a430d35_4ed6dc28","updated":"2017-02-08 18:49:28.000000000","message":"This is the generally accepted way to cleanup test case level resources.  Try to use it where you can.","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23625,"name":"Nicolas Helgeson","email":"nh202b@att.com","username":"nhelgeson"},"change_message_id":"10e366b52873eeaf181125308ed522e714367372","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                        port[\u0027id\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        return port"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","},{"line_number":69,"context_line":"                                 rule\u003d\"create_port\")"},{"line_number":70,"context_line":"    @decorators.idempotent_id(\u00270ec8c551-625c-4864-8a52-85baa7c40f22\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_ae8580cf","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":0},"updated":"2017-02-08 18:28:12.000000000","message":"I don\u0027t see a teardown method. How are you reverting to admin after the switch rolls?","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"c45ce32e852f1bfb925576f8a7443b5742ae28a9","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                        port[\u0027id\u0027])"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        return port"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @rbac_rule_validation.action(service\u003d\"neutron\","},{"line_number":69,"context_line":"                                 rule\u003d\"create_port\")"},{"line_number":70,"context_line":"    @decorators.idempotent_id(\u00270ec8c551-625c-4864-8a52-85baa7c40f22\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_11779502","line":67,"range":{"start_line":67,"start_character":0,"end_line":67,"end_character":0},"in_reply_to":"1a430d35_ae8580cf","updated":"2017-02-08 18:49:28.000000000","message":"Oops, good catch.","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"fbdea053ed882f47b04faf6c4e0e4e0b3115e9df","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    @decorators.idempotent_id(\u00272551e10d-006a-413c-925a-8c6f834c09ac\u0027)"},{"line_number":91,"context_line":"    def test_create_port_fixed_ips(self):"},{"line_number":92,"context_line":"        # Pick an ip address within the allocation_pools range"},{"line_number":93,"context_line":"        ip_address \u003d str(netaddr.IPAddress(self.cidr) + 10)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        fixed_ips \u003d [{\u0027ip_address\u0027: ip_address},"},{"line_number":96,"context_line":"                     {\u0027subnet_id\u0027: self.admin_subnet[\u0027id\u0027]}]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_2efef0ad","line":93,"range":{"start_line":93,"start_character":25,"end_line":93,"end_character":58},"updated":"2017-02-08 18:33:39.000000000","message":"Quick questions -\n1. What if cidr specified in the conf file for a particular oepnstack deployment is such that it allows only few IPs say \u00277\u0027. In this case above IP address will in increased beyond allocation pool.\n2. How it would be randomly choosing  IP address from the subnet allocation pool  ?\n\n##################################################\n# something like (just prototyping) :\nthis should go in resource setup \n    cls.admin_allocation_pool \u003d self.admin_subnet.allocation_pool\n\n\n# Now in test case : \ntmp_allocation_pool_list \u003d self.admin_allocation_pool\nip_address \u003d pop(tmp_allocation_pool_list) \n# we can use pop or random. pop seem much better to me.","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"c45ce32e852f1bfb925576f8a7443b5742ae28a9","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    @decorators.idempotent_id(\u00272551e10d-006a-413c-925a-8c6f834c09ac\u0027)"},{"line_number":91,"context_line":"    def test_create_port_fixed_ips(self):"},{"line_number":92,"context_line":"        # Pick an ip address within the allocation_pools range"},{"line_number":93,"context_line":"        ip_address \u003d str(netaddr.IPAddress(self.cidr) + 10)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        fixed_ips \u003d [{\u0027ip_address\u0027: ip_address},"},{"line_number":96,"context_line":"                     {\u0027subnet_id\u0027: self.admin_subnet[\u0027id\u0027]}]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_d128ad9c","line":93,"range":{"start_line":93,"start_character":25,"end_line":93,"end_character":58},"in_reply_to":"1a430d35_2efef0ad","updated":"2017-02-08 18:49:28.000000000","message":"Good point, I will look into a this.  Thanks","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":23625,"name":"Nicolas Helgeson","email":"nh202b@att.com","username":"nhelgeson"},"change_message_id":"10e366b52873eeaf181125308ed522e714367372","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                 rule\u003d\"create_port:mac_address\")"},{"line_number":106,"context_line":"    @decorators.idempotent_id(\u0027aee6d0be-a7f3-452f-aefc-796b4eb9c9a8\u0027)"},{"line_number":107,"context_line":"    def test_create_port_mac_address(self):"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        post_body \u003d {\u0027network_id\u0027: self.admin_network[\u0027id\u0027],"},{"line_number":110,"context_line":"                     \u0027mac_address\u0027: data_utils.rand_mac_address()}"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_8e59a490","line":108,"updated":"2017-02-08 18:28:12.000000000","message":"Do these tests not need doc strings?","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"fbdea053ed882f47b04faf6c4e0e4e0b3115e9df","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                 rule\u003d\"create_port:mac_address\")"},{"line_number":106,"context_line":"    @decorators.idempotent_id(\u0027aee6d0be-a7f3-452f-aefc-796b4eb9c9a8\u0027)"},{"line_number":107,"context_line":"    def test_create_port_mac_address(self):"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        post_body \u003d {\u0027network_id\u0027: self.admin_network[\u0027id\u0027],"},{"line_number":110,"context_line":"                     \u0027mac_address\u0027: data_utils.rand_mac_address()}"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_f1704974","line":108,"in_reply_to":"1a430d35_8e59a490","updated":"2017-02-08 18:33:39.000000000","message":"Doc string is not mandatory.","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"fbdea053ed882f47b04faf6c4e0e4e0b3115e9df","unresolved":false,"context_lines":[{"line_number":321,"context_line":"    @decorators.idempotent_id(\u0027729c2151-bb49-4f4f-9d58-3ed8819b7582\u0027)"},{"line_number":322,"context_line":"    def test_update_port_allowed_address_pairs(self):"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        ip_address \u003d str(netaddr.IPAddress(self.cidr) + 12)"},{"line_number":325,"context_line":"        # Update allowed address pair attribute of port"},{"line_number":326,"context_line":"        address_pairs \u003d [{\u0027ip_address\u0027: ip_address,"},{"line_number":327,"context_line":"                          \u0027mac_address\u0027: data_utils.rand_mac_address()}]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a430d35_51503d0b","line":324,"range":{"start_line":324,"start_character":25,"end_line":324,"end_character":58},"updated":"2017-02-08 18:33:39.000000000","message":"ditto.","commit_id":"4fad0f4fd68930ae8374e5f179d2dbe0acb76a3d"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"6238412d0f6c493bc6f977ca280d4fe58634f36a","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        # Pick an ip address within the allocation_pools range"},{"line_number":276,"context_line":"        ip_address \u003d random.choice(list(self.admin_ip_range))"},{"line_number":277,"context_line":"        fixed_ips \u003d [{\u0027ip_address\u0027: ip_address}]"},{"line_number":278,"context_line":"        port \u003d self.create_port(self.admin_network)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":281,"context_line":"        self.ports_client.update_port(port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a430d35_b97bf6bc","line":278,"range":{"start_line":278,"start_character":8,"end_line":278,"end_character":51},"updated":"2017-02-09 04:45:20.000000000","message":"Just a suggestion, \nAs you are creating port from base class method, created resource will be deleted at class level i.e. once all the tests in this are done.\nIn this particular test, what\u0027s happening, for created port you are adding IP address. This IP is taken randomly. \nAnd this IP will remain with this created port till end of class. \nIf another testcase in same class also uses same random choice and come with same IP address during port IP update/assignment then it can cause a problem.\nSo, better is to -\na. In such cases, create/clean ports local to testcase method or\nb. use pop instead of random, so that no overlapping IPs can come but this requires smart handling.\n\nFor me for such testcases, best is to take local port create/cleanup within the testcase method.","commit_id":"5eb89e8c2efb6aa766cb07ba800b7d06b8e2fdb5"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"886201b6259cf56049a5169cf9d38dc1667de4db","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        # Pick an ip address within the allocation_pools range"},{"line_number":276,"context_line":"        ip_address \u003d random.choice(list(self.admin_ip_range))"},{"line_number":277,"context_line":"        fixed_ips \u003d [{\u0027ip_address\u0027: ip_address}]"},{"line_number":278,"context_line":"        port \u003d self.create_port(self.admin_network)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":281,"context_line":"        self.ports_client.update_port(port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a430d35_54cd5d5c","line":278,"range":{"start_line":278,"start_character":8,"end_line":278,"end_character":51},"in_reply_to":"1a430d35_65a9ca24","updated":"2017-02-09 17:01:35.000000000","message":"Thanks for considering this point.","commit_id":"5eb89e8c2efb6aa766cb07ba800b7d06b8e2fdb5"},{"author":{"_account_id":23184,"name":"DavidPurcell","email":"d.purcell222@gmail.com","username":"DavidPurcell"},"change_message_id":"2b04e6ef1e96492b27a6db22c82e84fdfa5cf0ad","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        # Pick an ip address within the allocation_pools range"},{"line_number":276,"context_line":"        ip_address \u003d random.choice(list(self.admin_ip_range))"},{"line_number":277,"context_line":"        fixed_ips \u003d [{\u0027ip_address\u0027: ip_address}]"},{"line_number":278,"context_line":"        port \u003d self.create_port(self.admin_network)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":281,"context_line":"        self.ports_client.update_port(port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a430d35_65a9ca24","line":278,"range":{"start_line":278,"start_character":8,"end_line":278,"end_character":51},"in_reply_to":"1a430d35_b97bf6bc","updated":"2017-02-09 16:26:52.000000000","message":"Ooh, this is a good point.  I definitely prefer the testcase level create and cleanup due to the limited availability of ip addresses.","commit_id":"5eb89e8c2efb6aa766cb07ba800b7d06b8e2fdb5"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ca9bbea229848360c33ec8cdbd91b3641abad716","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    def test_show_port(self):"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        try:"},{"line_number":156,"context_line":"            rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            self.ports_client.show_port(self.admin_port[\u0027id\u0027])"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa31d9ce_ad9fac4e","line":156,"range":{"start_line":156,"start_character":12,"end_line":156,"end_character":63},"updated":"2017-02-13 18:59:09.000000000","message":"switch role should be outside of try","commit_id":"ffc2100fb037a6ad7410e10e824cc7f13a13dcaa"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ca9bbea229848360c33ec8cdbd91b3641abad716","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        try:"},{"line_number":156,"context_line":"            rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            self.ports_client.show_port(self.admin_port[\u0027id\u0027])"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        except exceptions.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa31d9ce_2d93bc50","line":157,"updated":"2017-02-13 18:59:09.000000000","message":"remove blank line for consistency","commit_id":"ffc2100fb037a6ad7410e10e824cc7f13a13dcaa"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ca9bbea229848360c33ec8cdbd91b3641abad716","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        fields \u003d [\u0027binding:vif_type\u0027]"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        try:"},{"line_number":175,"context_line":"            rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":176,"context_line":"            self.ports_client.show_port(self.admin_port[\u0027id\u0027],"},{"line_number":177,"context_line":"                                        fields\u003dfields)"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa31d9ce_6db4d4d0","line":175,"range":{"start_line":175,"start_character":12,"end_line":175,"end_character":63},"updated":"2017-02-13 18:59:09.000000000","message":"move outside of try","commit_id":"ffc2100fb037a6ad7410e10e824cc7f13a13dcaa"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ca9bbea229848360c33ec8cdbd91b3641abad716","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        fields \u003d [\u0027binding:vif_details\u0027]"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        try:"},{"line_number":194,"context_line":"            rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":195,"context_line":"            self.ports_client.show_port(self.admin_port[\u0027id\u0027],"},{"line_number":196,"context_line":"                                        fields\u003dfields)"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa31d9ce_4de8f0b4","line":194,"range":{"start_line":194,"start_character":12,"end_line":194,"end_character":63},"updated":"2017-02-13 18:59:09.000000000","message":"remove outside of try","commit_id":"ffc2100fb037a6ad7410e10e824cc7f13a13dcaa"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"7996548c60ed4d056c2c9a6530d6ce3ffe71be27","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        fields \u003d [\u0027binding:vif_details\u0027]"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        try:"},{"line_number":194,"context_line":"            rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":195,"context_line":"            self.ports_client.show_port(self.admin_port[\u0027id\u0027],"},{"line_number":196,"context_line":"                                        fields\u003dfields)"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa31d9ce_680da236","line":194,"range":{"start_line":194,"start_character":12,"end_line":194,"end_character":63},"in_reply_to":"fa31d9ce_4de8f0b4","updated":"2017-02-13 19:07:14.000000000","message":"removing outside doesn\u0027t make significant impact. Can be inside of try without any problem.","commit_id":"ffc2100fb037a6ad7410e10e824cc7f13a13dcaa"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ca9bbea229848360c33ec8cdbd91b3641abad716","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        port \u003d self._create_port(**post_body)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        try:"},{"line_number":216,"context_line":"            rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":217,"context_line":"            self.ports_client.show_port(port[\u0027id\u0027],"},{"line_number":218,"context_line":"                                        fields\u003dfields)"},{"line_number":219,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa31d9ce_cddce014","line":216,"range":{"start_line":216,"start_character":12,"end_line":216,"end_character":63},"updated":"2017-02-13 18:59:09.000000000","message":"remove outside of try","commit_id":"ffc2100fb037a6ad7410e10e824cc7f13a13dcaa"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ca9bbea229848360c33ec8cdbd91b3641abad716","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        port \u003d self._create_port(**post_body)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        try:"},{"line_number":239,"context_line":"            rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":240,"context_line":"            self.ports_client.show_port(port[\u0027id\u0027],"},{"line_number":241,"context_line":"                                        fields\u003dfields)"},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa31d9ce_4dff1067","line":239,"range":{"start_line":239,"start_character":12,"end_line":239,"end_character":63},"updated":"2017-02-13 18:59:09.000000000","message":"remove outside of try","commit_id":"ffc2100fb037a6ad7410e10e824cc7f13a13dcaa"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ca9bbea229848360c33ec8cdbd91b3641abad716","unresolved":false,"context_lines":[{"line_number":347,"context_line":"    def test_delete_port(self):"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            port \u003d self._create_port(network_id\u003dself.admin_network[\u0027id\u0027])"},{"line_number":351,"context_line":"            rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":352,"context_line":"            self.ports_client.delete_port(port[\u0027id\u0027])"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        except exceptions.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa31d9ce_6d393441","line":351,"range":{"start_line":350,"start_character":12,"end_line":351,"end_character":63},"updated":"2017-02-13 18:59:09.000000000","message":"remove outside of try","commit_id":"ffc2100fb037a6ad7410e10e824cc7f13a13dcaa"}]}
