)]}'
{"nova/api/openstack/compute/contrib/extended_availability_zone.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b074337e28a048de5783fc0ad35d9748a0ce500e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        if not az:"},{"line_number":34,"context_line":"            # Either not assigned in the first place,"},{"line_number":35,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":36,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":37,"context_line":"        server[key] \u003d az"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdKM%3D","line":36,"updated":"2013-05-09 01:41:20.000000000","message":"Why not set it to the default from nova.conf?","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e69aa3d111a31c7e44df450d2f584c051a1e5f3d","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        if not az:"},{"line_number":34,"context_line":"            # Either not assigned in the first place,"},{"line_number":35,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":36,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":37,"context_line":"        server[key] \u003d az"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdFc%3D","line":36,"in_reply_to":"AAAAOn%2F%2FdG8%3D","updated":"2013-05-09 02:42:58.000000000","message":"OK, I read the bug so knew about the confusion, but wasn\u0027t sure if that\u0027s how it was being addressed (with \u0027Unknown\u0027), maybe that should be a comment in the code or in the commit message?","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"285b8b2af238b6be1462b09fb932eab5917ee5cc","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        if not az:"},{"line_number":34,"context_line":"            # Either not assigned in the first place,"},{"line_number":35,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":36,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":37,"context_line":"        server[key] \u003d az"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdG8%3D","line":36,"in_reply_to":"AAAAOn%2F%2FdKM%3D","updated":"2013-05-09 02:18:53.000000000","message":"Can be done, although the bug this is fixing was saying that setting it to that value was causing confusion, using the wording \u0027unknown\u0027 is likely not to be a valid AZ, so that should help avoid said confusion. Using a valid AZ though seems like it could be confusing (especially if it changes later).","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":1678,"name":"Tiantian Gao","email":"gtt116@gmail.com","username":"gtt116"},"change_message_id":"e2f86c7047f209f0230f32967acec8c899939c6c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            # Either not assigned in the first place,"},{"line_number":35,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":36,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":37,"context_line":"        server[key] \u003d az"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @wsgi.extends"},{"line_number":40,"context_line":"    def show(self, req, resp_obj, id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdEI%3D","line":37,"updated":"2013-05-09 02:59:54.000000000","message":"Hi joshua,\n\nI think we should still get AZ from host and aggregate rather than instance.\n\nOtherwise, when admin change a host\u0027s AZ through API, then the user will get a legacy AZ name.\n\nAnd if we get AZ from host, even if instance was migrated, we can still get the right AZ name, and don\u0027t need to update the availability_zone of instance.\n\nRight?","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":1678,"name":"Tiantian Gao","email":"gtt116@gmail.com","username":"gtt116"},"change_message_id":"33e83b202724c0bf75cef0e940ee8c5e7823cdc7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            # Either not assigned in the first place,"},{"line_number":35,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":36,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":37,"context_line":"        server[key] \u003d az"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @wsgi.extends"},{"line_number":40,"context_line":"    def show(self, req, resp_obj, id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FczY%3D","line":37,"in_reply_to":"AAAAOn%2F%2Fc9A%3D","updated":"2013-05-09 07:32:51.000000000","message":"OK, got it.\n\nIs that means the AZ in instance table is like a cache of AZ of host. when some modification(migration, etc.) happened, alter the cache?\n\nSounds good :-). Just a little worry about altering the cache may appears in different methods.","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"8c26fdcfa6e9fa2c9ea7a0cef14fb4a5f555b098","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            # Either not assigned in the first place,"},{"line_number":35,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":36,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":37,"context_line":"        server[key] \u003d az"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @wsgi.extends"},{"line_number":40,"context_line":"    def show(self, req, resp_obj, id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2Fb6w%3D","line":37,"in_reply_to":"AAAAOn%2F%2FczY%3D","updated":"2013-05-09 18:16:33.000000000","message":"100% agreed, i am going to bring this up during the nova meeting since it seems like there are about 3 ways to associate an instance with something like an AZ, via the host that its on, via the aggregate that its in, via the instance field availability_zone.","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"1dfc0ae166f570c1eac6b5a1eb1d401e2ec2aade","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            # Either not assigned in the first place,"},{"line_number":35,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":36,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":37,"context_line":"        server[key] \u003d az"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @wsgi.extends"},{"line_number":40,"context_line":"    def show(self, req, resp_obj, id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2Fc9A%3D","line":37,"in_reply_to":"AAAAOn%2F%2FdEI%3D","updated":"2013-05-09 05:12:51.000000000","message":"I guess it depends on where we draw the line of what is an AZ, is an AZ a direct 1:1 mapping to a host. If so then yes it would appear we should use the host\u0027s AZ. But if a host can have many AZ\u0027s in it then the 1:1 mapping breaks down (it appears a host right now can have many AZ\u0027s on it). \n\nSo then the question is where can the source of truth for what AZ an instance is in, there seems to be many options here for where the truth could be :-) I would have thought the instance would have been updated if it moved to reflect a new AZ, or that if an admin changes a host then the instances on that host get altered. But maybe thats not the case.","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":5371,"name":"Mathew Odden","email":"locke105@gmail.com","username":"locke105"},"change_message_id":"a37f71191d872ef7e3d6c9298ce54ee71a05720a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        if not az:"},{"line_number":33,"context_line":"            # Either not assigned in the first place,"},{"line_number":34,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":35,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":36,"context_line":"        server[key] \u003d az"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FcCM%3D","line":35,"updated":"2013-05-09 17:29:04.000000000","message":"I really don\u0027t think its appropriate to run a data value, even if temporary, through translation (the _() function.)","commit_id":"2794a83de80f0c662db4a9bc12662eda44dda82e"},{"author":{"_account_id":5371,"name":"Mathew Odden","email":"locke105@gmail.com","username":"locke105"},"change_message_id":"43880a6c28035c13132bde6b1e1a63d1d429e8a4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        if not az:"},{"line_number":33,"context_line":"            # Either not assigned in the first place,"},{"line_number":34,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":35,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":36,"context_line":"        server[key] \u003d az"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FbyM%3D","line":35,"in_reply_to":"AAAAOn%2F%2Fb6Y%3D","updated":"2013-05-09 19:14:24.000000000","message":"I also had the same thought Chris did later after I posted my comment. Do we have some kind of concept of a default AZ that could be used?","commit_id":"2794a83de80f0c662db4a9bc12662eda44dda82e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1b1c58b011665bbf2a4191b69e60acf252ccd954","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        if not az:"},{"line_number":33,"context_line":"            # Either not assigned in the first place,"},{"line_number":34,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":35,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":36,"context_line":"        server[key] \u003d az"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fbgk%3D","line":35,"in_reply_to":"AAAAOn%2F%2FbyM%3D","updated":"2013-05-09 21:46:33.000000000","message":"The default in nova.conf is \u0027nova\u0027:\n\nhttps://github.com/openstack/nova/blob/master/etc/nova/nova.conf.sample#L12","commit_id":"2794a83de80f0c662db4a9bc12662eda44dda82e"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"417f1570b504abdbae836c4c4398092838d147ca","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        if not az:"},{"line_number":33,"context_line":"            # Either not assigned in the first place,"},{"line_number":34,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":35,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":36,"context_line":"        server[key] \u003d az"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fb6Y%3D","line":35,"in_reply_to":"AAAAOn%2F%2FcCM%3D","updated":"2013-05-09 18:22:38.000000000","message":"Also don\u0027t agree with \u0027Unknown\u0027 because that theoretically could be a real AZ name. :)  It may be best to not set the key at all?","commit_id":"2794a83de80f0c662db4a9bc12662eda44dda82e"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"73b157b63aed9f8431cc9416ae87db11910a9e39","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        if not az:"},{"line_number":33,"context_line":"            # Either not assigned in the first place,"},{"line_number":34,"context_line":"            # or hasn\u0027t reached the phase where it is assigned yet."},{"line_number":35,"context_line":"            az \u003d _(\u0027Unknown\u0027)"},{"line_number":36,"context_line":"        server[key] \u003d az"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fb6U%3D","line":35,"in_reply_to":"AAAAOn%2F%2FcCM%3D","updated":"2013-05-09 18:21:17.000000000","message":"Ok, I can make it be fixed, but I thought \u0027Unknown\u0027 might be different in varying languages, since this will show up on the nova client and be printed i thought it was useful to run it through gettext.","commit_id":"2794a83de80f0c662db4a9bc12662eda44dda82e"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"15d79bd8d7fef43fbf2c5ec53fa5b8acaa56ef02","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            # iff not in the building state."},{"line_number":37,"context_line":"            if (instance.get(\u0027vm_state\u0027) and"},{"line_number":38,"context_line":"                instance[\u0027vm_state\u0027] !\u003d vm_states.BUILDING):"},{"line_number":39,"context_line":"                az \u003d instance.get(\u0027availability_zone\u0027)"},{"line_number":40,"context_line":"        server[key] \u003d az"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPX%2F%2F79w%3D","line":39,"updated":"2013-06-05 18:12:24.000000000","message":"Not sure we need the test here for !\u003d Building, \n\nSurely its during the building state that we want to report what\u0027s in the instance (i.e. what the user requested if anything)","commit_id":"162787a9af531cd510f48f9842827da69083cfed"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"96cadd7a13812250d4caedf328103fa2e6491123","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        az \u003d avail_zone.get_instance_availability_zone(context, instance)"},{"line_number":33,"context_line":"        if not az and instance.get(\u0027availability_zone\u0027):"},{"line_number":34,"context_line":"            # Likely hasn\u0027t reached a viable compute node yet so give back the"},{"line_number":35,"context_line":"            # desired availability_zone that *may* exist in the instance"},{"line_number":36,"context_line":"            # record itself."},{"line_number":37,"context_line":"            az \u003d instance[\u0027availability_zone\u0027]"},{"line_number":38,"context_line":"        server[key] \u003d az"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPX%2F%2F1d0%3D","line":35,"updated":"2013-06-07 23:17:10.000000000","message":"When will this be in the instance record itself? Only when the user specifies the AZ from the REST API?  It would be nice to include that in this comment","commit_id":"d499b6684d7a29e8370e1786853304d1766e498a"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"0d57d672c23662808ea6c5740817ba2f7785e3d4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        az \u003d avail_zone.get_instance_availability_zone(context, instance)"},{"line_number":33,"context_line":"        if not az and instance.get(\u0027availability_zone\u0027):"},{"line_number":34,"context_line":"            # Likely hasn\u0027t reached a viable compute node yet so give back the"},{"line_number":35,"context_line":"            # desired availability_zone that *may* exist in the instance"},{"line_number":36,"context_line":"            # record itself."},{"line_number":37,"context_line":"            az \u003d instance[\u0027availability_zone\u0027]"},{"line_number":38,"context_line":"        server[key] \u003d az"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPX%2F%2Ftpc%3D","line":35,"in_reply_to":"AAAAPX%2F%2F1d0%3D","updated":"2013-06-12 05:57:09.000000000","message":"Yes, its only when the user specifies it afaik. Can update the comment.","commit_id":"d499b6684d7a29e8370e1786853304d1766e498a"}],"nova/availability_zones.py":[{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"f39193017ca2d7ddc4a8b0b3548a8f467f6acc54","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def get_host_availability_zone(context, host, conductor_api\u003dNone):"},{"line_number":75,"context_line":"    if conductor_api:"},{"line_number":76,"context_line":"        metadata \u003d conductor_api.aggregate_metadata_get_by_host("},{"line_number":77,"context_line":"            context, host, key\u003d\u0027availability_zone\u0027)"},{"line_number":78,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPX%2F%2FsIk%3D","line":75,"updated":"2013-06-12 18:45:52.000000000","message":"If this was the method that did the caching instead of get_instance_availability_zone() then it would mean that both of the public methods could use the cache.","commit_id":"d499b6684d7a29e8370e1786853304d1766e498a"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b074337e28a048de5783fc0ad35d9748a0ce500e","unresolved":false,"context_lines":[{"line_number":835,"context_line":""},{"line_number":836,"context_line":"        return [_decode(f) for f in injected_files]"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"    def _update_availability_zone(self, context, instance, overwrite\u003dFalse):"},{"line_number":839,"context_line":"        if instance.get(\u0027availability_zone\u0027) and not overwrite:"},{"line_number":840,"context_line":"            return"},{"line_number":841,"context_line":"        if self._availability_zone is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdKE%3D","line":838,"updated":"2013-05-09 01:41:20.000000000","message":"Is there a need for the overwrite argument?","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e69aa3d111a31c7e44df450d2f584c051a1e5f3d","unresolved":false,"context_lines":[{"line_number":835,"context_line":""},{"line_number":836,"context_line":"        return [_decode(f) for f in injected_files]"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"    def _update_availability_zone(self, context, instance, overwrite\u003dFalse):"},{"line_number":839,"context_line":"        if instance.get(\u0027availability_zone\u0027) and not overwrite:"},{"line_number":840,"context_line":"            return"},{"line_number":841,"context_line":"        if self._availability_zone is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdFY%3D","line":838,"in_reply_to":"AAAAOn%2F%2FdHI%3D","updated":"2013-05-09 02:42:58.000000000","message":"Yeah, I\u0027d remove it since it only adds conditionals - add it if/when you need it on another commit.","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"285b8b2af238b6be1462b09fb932eab5917ee5cc","unresolved":false,"context_lines":[{"line_number":835,"context_line":""},{"line_number":836,"context_line":"        return [_decode(f) for f in injected_files]"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"    def _update_availability_zone(self, context, instance, overwrite\u003dFalse):"},{"line_number":839,"context_line":"        if instance.get(\u0027availability_zone\u0027) and not overwrite:"},{"line_number":840,"context_line":"            return"},{"line_number":841,"context_line":"        if self._availability_zone is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdHI%3D","line":838,"in_reply_to":"AAAAOn%2F%2FdKE%3D","updated":"2013-05-09 02:18:53.000000000","message":"I was thinking that this will likely be needed if we need to adjust the availabilty_zone for things that happen say after a migrate. Maybe I can leave it out for now.","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b074337e28a048de5783fc0ad35d9748a0ce500e","unresolved":false,"context_lines":[{"line_number":843,"context_line":"            self._availability_zone \u003d az.get_host_availability_zone(context,"},{"line_number":844,"context_line":"                                                                    CONF.host,"},{"line_number":845,"context_line":"                                                                    capi)"},{"line_number":846,"context_line":"        self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":847,"context_line":"                              availability_zone\u003dself._availability_zone)"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"    def _run_instance(self, context, request_spec,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdJ8%3D","line":846,"updated":"2013-05-09 01:41:20.000000000","message":"If overwrite is true but instance.get(\u0027availability_zone\u0027) returns a value, is it worth checking if that existing value is the same as what you retrieved from az.get_host_availability_zone and not doing the update if they are equal?","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"285b8b2af238b6be1462b09fb932eab5917ee5cc","unresolved":false,"context_lines":[{"line_number":843,"context_line":"            self._availability_zone \u003d az.get_host_availability_zone(context,"},{"line_number":844,"context_line":"                                                                    CONF.host,"},{"line_number":845,"context_line":"                                                                    capi)"},{"line_number":846,"context_line":"        self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":847,"context_line":"                              availability_zone\u003dself._availability_zone)"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"    def _run_instance(self, context, request_spec,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FdHE%3D","line":846,"in_reply_to":"AAAAOn%2F%2FdJ8%3D","updated":"2013-05-09 02:18:53.000000000","message":"Makes sense to me.","commit_id":"2e34dc1f392c7f107666d4f0e74e64436d0e2f45"},{"author":{"_account_id":5371,"name":"Mathew Odden","email":"locke105@gmail.com","username":"locke105"},"change_message_id":"a37f71191d872ef7e3d6c9298ce54ee71a05720a","unresolved":false,"context_lines":[{"line_number":841,"context_line":"            self._availability_zone \u003d az.get_host_availability_zone(context,"},{"line_number":842,"context_line":"                                                                    CONF.host,"},{"line_number":843,"context_line":"                                                                    capi)"},{"line_number":844,"context_line":"        if instance.get(\u0027availability_zone\u0027) \u003d\u003d self._availability_zone:"},{"line_number":845,"context_line":"            return"},{"line_number":846,"context_line":"        self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":847,"context_line":"                              availability_zone\u003dself._availability_zone)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2FcCE%3D","line":844,"updated":"2013-05-09 17:29:04.000000000","message":"nit: rather than an ugly early return, it might be more readable if you just flip this with a \u0027not\u0027 and do the update","commit_id":"2794a83de80f0c662db4a9bc12662eda44dda82e"},{"author":{"_account_id":5371,"name":"Mathew Odden","email":"locke105@gmail.com","username":"locke105"},"change_message_id":"43880a6c28035c13132bde6b1e1a63d1d429e8a4","unresolved":false,"context_lines":[{"line_number":841,"context_line":"            self._availability_zone \u003d az.get_host_availability_zone(context,"},{"line_number":842,"context_line":"                                                                    CONF.host,"},{"line_number":843,"context_line":"                                                                    capi)"},{"line_number":844,"context_line":"        if instance.get(\u0027availability_zone\u0027) \u003d\u003d self._availability_zone:"},{"line_number":845,"context_line":"            return"},{"line_number":846,"context_line":"        self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":847,"context_line":"                              availability_zone\u003dself._availability_zone)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fbys%3D","line":844,"in_reply_to":"AAAAOn%2F%2Fb%2F0%3D","updated":"2013-05-09 19:14:24.000000000","message":"Yes, my comment was more on the code flow, I understand the not updating if not necessary. I was suggesting:\n\nif not instance.get(\u0027availability_zone\u0027) \u003d\u003d self._availability_zone:\n    # do update\n    self._instance_update(context, instance[\u0027uuid\u0027], availability_zone\u003dself._availability_zone)\n\n # return at end of function\n\nrather than tucking an early return inside of an if. The code paths will remain the same, but it would read better.","commit_id":"2794a83de80f0c662db4a9bc12662eda44dda82e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b92735fecd2cb0924f6721f691b73c51203fb0e4","unresolved":false,"context_lines":[{"line_number":841,"context_line":"            self._availability_zone \u003d az.get_host_availability_zone(context,"},{"line_number":842,"context_line":"                                                                    CONF.host,"},{"line_number":843,"context_line":"                                                                    capi)"},{"line_number":844,"context_line":"        if instance.get(\u0027availability_zone\u0027) \u003d\u003d self._availability_zone:"},{"line_number":845,"context_line":"            return"},{"line_number":846,"context_line":"        self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":847,"context_line":"                              availability_zone\u003dself._availability_zone)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAOn%2F%2Fb%2F0%3D","line":844,"in_reply_to":"AAAAOn%2F%2FcCE%3D","updated":"2013-05-09 17:42:06.000000000","message":"Matt, see comments in earlier patch sets, the point of this was to avoid doing the update if the values didn\u0027t change, not just if it wasn\u0027t already set.  Maybe that\u0027s unnecessary checking though, I\u0027m not sure how expensive these update operations are.","commit_id":"2794a83de80f0c662db4a9bc12662eda44dda82e"}],"nova/tests/api/openstack/compute/contrib/test_extended_availability_zone.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"07ec9d30c985103bfe0361f00e89047fff6417ac","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def fake_get_no_host_availability_zone(context, host):"},{"line_number":66,"context_line":"    return None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class ExtendedServerAttributesTest(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPn%2F%2F%2FQc%3D","line":66,"updated":"2013-06-15 06:27:26.000000000","message":"This is unused.  I think you just have a copy/paste error in your test.","commit_id":"d499b6684d7a29e8370e1786853304d1766e498a"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"92b8443e2fb9746e1cc7a882f44c4f89a8c712ef","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def fake_get_no_host_availability_zone(context, host):"},{"line_number":66,"context_line":"    return None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class ExtendedServerAttributesTest(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPn%2F%2F1uQ%3D","line":66,"in_reply_to":"AAAAPn%2F%2F%2FQc%3D","updated":"2013-06-20 01:49:36.000000000","message":"Seems used at line 105/117?","commit_id":"d499b6684d7a29e8370e1786853304d1766e498a"}]}
