)]}'
{"nova/availability_zones.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e597c9b8595a6de1a1f88bc4c6a7870dbcb9e5d2","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"def get_instance_availability_zone(context, instance):"},{"line_number":166,"context_line":"    \"\"\"Return availability zone of specified instance.\"\"\""},{"line_number":167,"context_line":"    host \u003d instance.host if \u0027host\u0027 in instance else None"},{"line_number":168,"context_line":"    if not host:"},{"line_number":169,"context_line":"        # Likely hasn\u0027t reached a viable compute node yet so give back the"},{"line_number":170,"context_line":"        # desired availability_zone in the instance record if the boot request"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_17684bb8","line":167,"updated":"2017-05-25 20:19:38.000000000","message":"Wouldn\u0027t hurt my feelings if there was a comment here explaining that deliberately don\u0027t use instance.get(\u0027host\u0027) because that lazy-loads the whatever and that\u0027s bad because whatever.","commit_id":"91bd79058abf79978335010a325952f17729d7a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8f875202829298a984bff24284a8a6c5631f92f4","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"def get_instance_availability_zone(context, instance):"},{"line_number":166,"context_line":"    \"\"\"Return availability zone of specified instance.\"\"\""},{"line_number":167,"context_line":"    host \u003d instance.host if \u0027host\u0027 in instance else None"},{"line_number":168,"context_line":"    if not host:"},{"line_number":169,"context_line":"        # Likely hasn\u0027t reached a viable compute node yet so give back the"},{"line_number":170,"context_line":"        # desired availability_zone in the instance record if the boot request"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_abbff3ce","line":167,"in_reply_to":"ff0f0b1f_17684bb8","updated":"2017-05-26 01:20:30.000000000","message":"I thought about leaving a note, but figured it would only be confusing in a year from now, and this would just be more clear. And figured it someone really needed to know why we\u0027re doing it this way, they have git blame.","commit_id":"91bd79058abf79978335010a325952f17729d7a5"}],"nova/tests/unit/test_availability_zones.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bbada82d9ca53d483b23c358c130e5e7d553c6ee","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        self.assertEqual(\u0027inst-az\u0027, result)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def test_get_instance_availability_zone_no_host_set(self):"},{"line_number":277,"context_line":"        \"\"\"Test get availability zone from instance if host not set."},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        This is testing the case in the compute API where the Instance object"},{"line_number":280,"context_line":"        does not have the host attribute set because it\u0027s just the object that"},{"line_number":281,"context_line":"        goes into the BuildRequest, it wasn\u0027t actually pulled from the DB. The"},{"line_number":282,"context_line":"        instance in this case doesn\u0027t actually get inserted into the DB until"},{"line_number":283,"context_line":"        it reaches conductor. So the host attribute may not be set but we"},{"line_number":284,"context_line":"        expect availability_zone always will in the API because of"},{"line_number":285,"context_line":"        _validate_and_build_base_options setting a default value which goes"},{"line_number":286,"context_line":"        into the object."},{"line_number":287,"context_line":"        \"\"\""},{"line_number":288,"context_line":"        fake_inst \u003d objects.Instance(availability_zone\u003d\u0027inst-az\u0027)"},{"line_number":289,"context_line":"        result \u003d az.get_instance_availability_zone(self.context, fake_inst)"},{"line_number":290,"context_line":"        self.assertEqual(\u0027inst-az\u0027, result)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_d5f3a69d","line":287,"range":{"start_line":277,"start_character":0,"end_line":287,"end_character":11},"updated":"2017-05-31 13:18:38.000000000","message":"++","commit_id":"91bd79058abf79978335010a325952f17729d7a5"}]}
