)]}'
{"rally_openstack/scenarios/nova/utils.py":[{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"2ebc82a07b5eafef5c8be93ae26ce912554a9744","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            if nic:"},{"line_number":78,"context_line":"                kwargs[\"nics\"] \u003d nic"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        if \"nics\" not in kwargs and\\"},{"line_number":81,"context_line":"                \"tenant\" in self.context and\\"},{"line_number":82,"context_line":"                \"networks\" in self.context[\"tenant\"]:"},{"line_number":83,"context_line":"            kwargs[\"nics\"] \u003d ["},{"line_number":84,"context_line":"                {\"net-id\": self.context[\"tenant\"][\"networks\"][0][\"id\"]}]"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        for nic in kwargs.get(\"nics\", []):"},{"line_number":87,"context_line":"            if nic.get(\"net-name\"):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_8c395640","line":84,"range":{"start_line":80,"start_character":0,"end_line":84,"end_character":72},"updated":"2019-10-09 00:24:36.000000000","message":"Also, I think we can use `auto_assign_nic\u003dTrue` as the default value instead of these lines. Do you think?","commit_id":"afed8ec6c39775b9e2678e1687e1c6206bdecdc1"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"bac4396c793a72748c8678e3bac30cb5a2984d3c","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        for nic in kwargs.get(\"nics\", []):"},{"line_number":87,"context_line":"            if nic.get(\"net-name\"):"},{"line_number":88,"context_line":"                neutron \u003d neutron_utils.NeutronScenario(self.context)"},{"line_number":89,"context_line":"                nic[\"net-id\"] \u003d neutron._get_network_id(nic[\"net-name\"])"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        server \u003d self.clients(\"nova\").servers.create("},{"line_number":92,"context_line":"            server_name, image, flavor, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_bc648ae6","line":89,"updated":"2019-10-08 14:50:01.000000000","message":"`_get_network_id` method lists all networks. Ideally, it would be nice to call a context for such cases, but I do not know how to implement conditions when it should be executed and when not. At least, it would be nice to implement some cache logic with _get_network_id. or it can be done here like:\n\nnetworks \u003d None\nfor ...\n   if net-name:\n       if networks is None:\n          networks \u003d neutron.list()\n       ...","commit_id":"afed8ec6c39775b9e2678e1687e1c6206bdecdc1"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"f9e24f9d7010acb78eb19c48012368ac34d88d77","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        for nic in kwargs.get(\"nics\", []):"},{"line_number":87,"context_line":"            if nic.get(\"net-name\"):"},{"line_number":88,"context_line":"                neutron \u003d neutron_utils.NeutronScenario(self.context)"},{"line_number":89,"context_line":"                nic[\"net-id\"] \u003d neutron._get_network_id(nic[\"net-name\"])"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        server \u003d self.clients(\"nova\").servers.create("},{"line_number":92,"context_line":"            server_name, image, flavor, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4ceefeb4","line":89,"in_reply_to":"3fa7e38b_bc648ae6","updated":"2019-10-09 00:20:59.000000000","message":"agree","commit_id":"afed8ec6c39775b9e2678e1687e1c6206bdecdc1"}]}
