)]}'
{"novaclient/tests/unit/v2/test_shell.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"7f1a6d9b3ac8ffa6e0efc9f78711a9e8addd639d","unresolved":false,"context_lines":[{"line_number":2075,"context_line":""},{"line_number":2076,"context_line":"    @mock.patch(\u0027novaclient.v2.shell.utils.print_dict\u0027)"},{"line_number":2077,"context_line":"    def test_print_server_with_no_flavor(self, mock_print_dict):"},{"line_number":2078,"context_line":"        self.run_command(\u0027show 9015\u0027)"},{"line_number":2079,"context_line":"        args, kwargs \u003d mock_print_dict.call_args"},{"line_number":2080,"context_line":"        parsed_server \u003d args[0]"},{"line_number":2081,"context_line":"        self.assertEqual(\u0027Flavor not found ()\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d9564a2c","line":2078,"range":{"start_line":2078,"start_character":8,"end_line":2078,"end_character":37},"updated":"2018-07-16 09:53:45.000000000","message":"Without transmitting `api_version\u003d\"2.47\"` (or another api_version that higher than 2.46) the wrong \u0027if...else\u0027 block is triggered.","commit_id":"35cfe3f59d085368c215eb89b0ca0a46a1f30492"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"7f1a6d9b3ac8ffa6e0efc9f78711a9e8addd639d","unresolved":false,"context_lines":[{"line_number":2078,"context_line":"        self.run_command(\u0027show 9015\u0027)"},{"line_number":2079,"context_line":"        args, kwargs \u003d mock_print_dict.call_args"},{"line_number":2080,"context_line":"        parsed_server \u003d args[0]"},{"line_number":2081,"context_line":"        self.assertEqual(\u0027Flavor not found ()\u0027,"},{"line_number":2082,"context_line":"                         parsed_server[\u0027flavor\u0027])"},{"line_number":2083,"context_line":""},{"line_number":2084,"context_line":"    def test_delete(self):"},{"line_number":2085,"context_line":"        self.run_command(\u0027delete 1234\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_34fbc515","line":2082,"range":{"start_line":2081,"start_character":8,"end_line":2082,"end_character":49},"updated":"2018-07-16 09:53:45.000000000","message":"This message is from line 2326 at novaclient.v2.shell . It is not what should be executed in the described issue. \u0027flavor\u0027 key should not present at all as far as I can see.","commit_id":"35cfe3f59d085368c215eb89b0ca0a46a1f30492"}],"novaclient/v2/servers.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c334274953c174cbb544d5dfcac60d139c6743f0","unresolved":false,"context_lines":[{"line_number":402,"context_line":"        \"\"\""},{"line_number":403,"context_line":"        networks \u003d {}"},{"line_number":404,"context_line":"        try:"},{"line_number":405,"context_line":"            for network_label, address_list in self.addresses.items():"},{"line_number":406,"context_line":"                networks[network_label] \u003d [a[\u0027addr\u0027] for a in address_list]"},{"line_number":407,"context_line":"            return networks"},{"line_number":408,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_f14cb175","line":405,"range":{"start_line":405,"start_character":47,"end_line":405,"end_character":61},"updated":"2018-12-13 20:27:24.000000000","message":"After looking around in the code some more, I finally understand _how_ we were getting a \"server not found\" from this access.\n\nThe Server class inherits from the base.Resource class, and since the Server class has no \u0027addresses\u0027 property or attribute, this code in base.Resource will run:\n\nhttps://github.com/openstack/python-novaclient/blob/a789bd30ae07eff636e6ea3da4d5d8f9d46e8ff1/novaclient/base.py#L170-L179\n\nwhich will do a GET for the server in order to grab the \u0027addresses\u0027 field from the response. That\u0027s where we got the \"server not found\" error.","commit_id":"b13ba0138f6ee2e10ce3b4b95aee37c6cebd1f20"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c334274953c174cbb544d5dfcac60d139c6743f0","unresolved":false,"context_lines":[{"line_number":405,"context_line":"            for network_label, address_list in self.addresses.items():"},{"line_number":406,"context_line":"                networks[network_label] \u003d [a[\u0027addr\u0027] for a in address_list]"},{"line_number":407,"context_line":"            return networks"},{"line_number":408,"context_line":"        except AttributeError:"},{"line_number":409,"context_line":"            return {}"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    @api_versions.wraps(\"2.0\", \"2.24\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_913d3dbb","line":408,"updated":"2018-12-13 20:27:24.000000000","message":"So, this makes sense now as the only exception we should catch and return an empty dict for, as base.Resource.__get_attr__ will raise AttributeError if there was a problem accessing the attribute on the server object.","commit_id":"b13ba0138f6ee2e10ce3b4b95aee37c6cebd1f20"}],"novaclient/v2/shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"31863d80029f1eaa09c32749d3fe4e164af7fbb0","unresolved":false,"context_lines":[{"line_number":2309,"context_line":"        else:"},{"line_number":2310,"context_line":"            # Replace the \"flavor\" field with individual namespaced fields."},{"line_number":2311,"context_line":"            if getattr(info, \u0027flavor\u0027, None):"},{"line_number":2312,"context_line":"                del info[\u0027flavor\u0027]"},{"line_number":2313,"context_line":"            for key in flavor.keys():"},{"line_number":2314,"context_line":"                info[\u0027flavor:\u0027 + key] \u003d flavor[key]"},{"line_number":2315,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_100ff039","line":2312,"updated":"2018-07-12 15:26:32.000000000","message":"You could also change the del to:\n\n    info.pop(\u0027flavor\u0027, None)\n\n(The None here is necessary, because otherwise pop() would raise a KeyError if \u0027flavor\u0027 wasn\u0027t present.)","commit_id":"461445cf50d255295216ae04293c3c57440d710b"}]}
