)]}'
{"rally/plugins/openstack/scenarios/neutron/utils.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"50356ad5a133a6921a4dad29914fcf924619fb2b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        param kwargs: dict, network options"},{"line_number":46,"context_line":"        returns: str, Neutron network-id"},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        # TODO(yaowei): Multiple network with same name."},{"line_number":49,"context_line":"        net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":50,"context_line":"        if net:"},{"line_number":51,"context_line":"            return net[\"id\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_9848f0b4","line":48,"updated":"2016-04-21 01:09:21.000000000","message":"NeutronClientNoUniqueMatch will be raised if multiple network matches found for the name. I think you can catch that exception and fall back to use list_networks.","commit_id":"3806afad760b5466595efc37105e48848a77d9af"},{"author":{"_account_id":17523,"name":"yaowei","email":"yaowei@unitedstack.com","username":"yaowei"},"change_message_id":"954afb395ab63f82c152e013427d9ccbc82e5b4f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        param kwargs: dict, network options"},{"line_number":46,"context_line":"        returns: str, Neutron network-id"},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        # TODO(yaowei): Multiple network with same name."},{"line_number":49,"context_line":"        net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":50,"context_line":"        if net:"},{"line_number":51,"context_line":"            return net[\"id\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_9b290a9e","line":48,"in_reply_to":"1a122d0e_9848f0b4","updated":"2016-04-21 01:50:09.000000000","message":"Is there a easy way to catch  a exception that defined in python-neutronclient?","commit_id":"3806afad760b5466595efc37105e48848a77d9af"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"0255af5c5afc25d9d356de9700f62cc2be92ee7f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        param kwargs: dict, network options"},{"line_number":46,"context_line":"        returns: str, Neutron network-id"},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        # TODO(yaowei): Multiple network with same name."},{"line_number":49,"context_line":"        net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":50,"context_line":"        if net:"},{"line_number":51,"context_line":"            return net[\"id\"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_0e113a04","line":48,"in_reply_to":"1a122d0e_9b290a9e","updated":"2016-04-21 02:00:58.000000000","message":"import neutronclient.common.exceptions","commit_id":"3806afad760b5466595efc37105e48848a77d9af"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"321e9a67f8d6a1a525544a511457f09ade0744a5","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        returns: str, Neutron network-id"},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        # TODO(yaowei): Multiple network with same name."},{"line_number":49,"context_line":"        net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":50,"context_line":"        if net:"},{"line_number":51,"context_line":"            return net[\"id\"]"},{"line_number":52,"context_line":"        msg \u003d (_(\"Network %s not found.\") % network)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_0332baa6","line":49,"updated":"2016-04-20 22:27:05.000000000","message":"Looks like it raises an exception in case of not found http://logs.openstack.org/44/308444/1/check/gate-rally-dsvm-neutron-rally/7cd7eed/rally-plot/results.html.gz#/NeutronNetworks.create_and_list_floating_ips/failures . And what is mean TODO from above? How it will work in case of multiple network with same name? Is it possible?","commit_id":"3806afad760b5466595efc37105e48848a77d9af"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"50356ad5a133a6921a4dad29914fcf924619fb2b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        if net:"},{"line_number":51,"context_line":"            return net[\"id\"]"},{"line_number":52,"context_line":"        msg \u003d (_(\"Network %s not found.\") % network)"},{"line_number":53,"context_line":"        raise exceptions.NotFoundException(message\u003dmsg)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @atomic.action_timer(\"neutron.create_network\")"},{"line_number":56,"context_line":"    def _create_network(self, network_create_args):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_58001834","line":53,"updated":"2016-04-21 01:09:21.000000000","message":"show_network will raise NotFound exception if no such network, so you need to catch that and re-raise  exceptions.NotFoundException","commit_id":"3806afad760b5466595efc37105e48848a77d9af"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"683c4cb09f77b06fc3bdbc60f1082742f48583ce","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 neutronclient.common import exceptions as ncli_exc"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import random"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_47115051","line":16,"updated":"2016-04-21 10:31:30.000000000","message":"Wrong order of imports","commit_id":"68df2885df42d32d334b53b3fa1de2a7a1e6f0fa"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"80a75d6583a08892a068bc66f24e06dd0bdde4d8","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        returns: str, Neutron network-id"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":52,"context_line":"            return net[\"id\"]"},{"line_number":53,"context_line":"        except ncli_exc.NeutronClientNoUniqueMatch as e:"},{"line_number":54,"context_line":"            LOG.warning(e.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_4375bb61","line":51,"updated":"2016-04-21 10:23:42.000000000","message":"This seem to work only for cases if network is ID, but network name is not an option for show_network()","commit_id":"68df2885df42d32d334b53b3fa1de2a7a1e6f0fa"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"683c4cb09f77b06fc3bdbc60f1082742f48583ce","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        returns: str, Neutron network-id"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":52,"context_line":"            return net[\"id\"]"},{"line_number":53,"context_line":"        except ncli_exc.NeutronClientNoUniqueMatch as e:"},{"line_number":54,"context_line":"            LOG.warning(e.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_c3626b3d","line":51,"in_reply_to":"1a122d0e_4375bb61","updated":"2016-04-21 10:31:30.000000000","message":"http://docs.openstack.org/cli-reference/neutron.htmlIn the docs wrote that its possible","commit_id":"68df2885df42d32d334b53b3fa1de2a7a1e6f0fa"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"b78a1c310a6281c7a3f7fe5c2e1005f59d2a77b9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        returns: str, Neutron network-id"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":52,"context_line":"            return net[\"id\"]"},{"line_number":53,"context_line":"        except ncli_exc.NeutronClientNoUniqueMatch as e:"},{"line_number":54,"context_line":"            LOG.warning(e.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_e3e96780","line":51,"in_reply_to":"1a122d0e_4375bb61","updated":"2016-04-21 10:33:33.000000000","message":"roman@roman:~$ neutron net-list\n+--------------------------------------+---------+----------------------------------------------------------+\n| id                                   | name    | subnets                                                  |\n+--------------------------------------+---------+----------------------------------------------------------+\n| eb06afee-5813-4390-85c6-0854abc08580 | private | 857bdf78-25e3-4773-abc0-34044b08097d fd18:bedf:3fe8::/64 |\n|                                      |         | 7c53aa91-1864-4c62-90cb-a81392fe8764 10.0.0.0/24         |\n| fda86abe-9355-4ccd-b2d8-88a6c485eae3 | public  | a8b6d615-7ac5-42f2-88db-04b22d1725cc 2001:db8::/64       |\n|                                      |         | 43dbbfcc-96fb-47d6-8ba3-5394d94cbe77 172.24.4.0/24       |\n+--------------------------------------+---------+----------------------------------------------------------+\nroman@roman:~$ neutron net-show private\n+---------------------------+--------------------------------------+\n| Field                     | Value                                |\n+---------------------------+--------------------------------------+\n| admin_state_up            | True                                 |\n| availability_zone_hints   |                                      |\n| availability_zones        | nova                                 |\n| id                        | eb06afee-5813-4390-85c6-0854abc08580 |\n| mtu                       | 0                                    |\n| name                      | private                              |\n| port_security_enabled     | True                                 |\n| provider:network_type     | vxlan                                |\n| provider:physical_network |                                      |\n| provider:segmentation_id  | 1072                                 |\n| router:external           | False                                |\n| shared                    | False                                |\n| status                    | ACTIVE                               |\n| subnets                   | 7c53aa91-1864-4c62-90cb-a81392fe8764 |\n|                           | 857bdf78-25e3-4773-abc0-34044b08097d |\n| tenant_id                 | 7c04fc3c7506493c8ef129c8ed4f76de     |\n+---------------------------+--------------------------------------+","commit_id":"68df2885df42d32d334b53b3fa1de2a7a1e6f0fa"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"f51f0e7c4bbcece79b7dbc53e54ac21149276962","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        returns: str, Neutron network-id"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":52,"context_line":"            return net[\"id\"]"},{"line_number":53,"context_line":"        except ncli_exc.NeutronClientNoUniqueMatch as e:"},{"line_number":54,"context_line":"            LOG.warning(e.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_deffde63","line":51,"in_reply_to":"1a122d0e_be9dc2bd","updated":"2016-04-21 10:47:25.000000000","message":"Agree","commit_id":"68df2885df42d32d334b53b3fa1de2a7a1e6f0fa"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"3c617a13bc72d61f560d05c0721a02dc9ad4a179","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        returns: str, Neutron network-id"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            net \u003d self.clients(\"neutron\").show_network(network)"},{"line_number":52,"context_line":"            return net[\"id\"]"},{"line_number":53,"context_line":"        except ncli_exc.NeutronClientNoUniqueMatch as e:"},{"line_number":54,"context_line":"            LOG.warning(e.message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_be9dc2bd","line":51,"in_reply_to":"1a122d0e_e3e96780","updated":"2016-04-21 10:39:04.000000000","message":"It is CLI, not neutronclient\u0027s api. Quick look at neutronclient\u0027s code:\n\nhttps://github.com/openstack/python-neutronclient/blob/4.2.0/neutronclient/neutron/v2_0/network.py#L139 -\u003e https://github.com/openstack/python-neutronclient/blob/4.2.0/neutronclient/neutron/v2_0/__init__.py#L803-L810 -\u003e https://github.com/openstack/python-neutronclient/blob/4.2.0/neutronclient/neutron/v2_0/__init__.py#L84-L90\n\nAs you can see, neutroclient\u0027s cli actually does the same as our code(just list all resources)","commit_id":"68df2885df42d32d334b53b3fa1de2a7a1e6f0fa"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"f51f0e7c4bbcece79b7dbc53e54ac21149276962","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                if (net[\"name\"] \u003d\u003d network) or (net[\"id\"] \u003d\u003d network):"},{"line_number":58,"context_line":"                    return net[\"id\"]"},{"line_number":59,"context_line":"        except ncli_exc.NotFound:"},{"line_number":60,"context_line":"            pass"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        msg \u003d (_(\"Network %s not found.\") % network)"},{"line_number":63,"context_line":"        raise exceptions.NotFoundException(message\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_230a3f26","line":60,"updated":"2016-04-21 10:47:25.000000000","message":"Lines 62-63 could be moved to 60 line","commit_id":"68df2885df42d32d334b53b3fa1de2a7a1e6f0fa"}]}
