)]}'
{"nova/api/openstack/compute/aggregates.py":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"65f43dc21777a5ebafdc722a557bdf122ff74e97","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def _marshall_aggregate(self, aggregate):"},{"line_number":201,"context_line":"        _aggregate \u003d {}"},{"line_number":202,"context_line":"        for key, value in aggregate.items():"},{"line_number":203,"context_line":"            # NOTE(danms): The original API specified non-TZ-aware timestamps"},{"line_number":204,"context_line":"            if isinstance(value, datetime.datetime):"},{"line_number":205,"context_line":"                value \u003d value.replace(tzinfo\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_bc03afb7","side":"PARENT","line":202,"updated":"2016-01-08 18:46:13.000000000","message":"so in ye olden days, .items() would go through all fields and obj_extra_fields to get the keys it needs to retrieve. Since availabilty_zone was in obj_extra_fields, it knew to do a get on that, even though it was sometimes None.","commit_id":"4c78c2346e254ac0d3cf8e12647c9c1b80fd9c9d"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"65f43dc21777a5ebafdc722a557bdf122ff74e97","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def _marshall_aggregate(self, aggregate):"},{"line_number":201,"context_line":"        _aggregate \u003d {}"},{"line_number":202,"context_line":"        agg_data \u003d aggregate.obj_to_primitive()[\u0027nova_object.data\u0027]"},{"line_number":203,"context_line":"        for key, value in agg_data.items():"},{"line_number":204,"context_line":"            # NOTE(danms): The original API specified non-TZ-aware timestamps"},{"line_number":205,"context_line":"            if isinstance(value, datetime.datetime):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_bcdbaf1a","line":202,"updated":"2016-01-08 18:46:13.000000000","message":"And now that I\u0027m using obj_to_primitive, that doesn\u0027t have availability_zone in there if it\u0027s None, which puts nothing on the response. Also, following the _marshall_aggregate() call in create, it deletes the metadata part of the dict to maintain compat, so the availability zone will go away. So maybe I need to manually do a get on set(fields.keys() + obj_extra_fields)","commit_id":"6d3a787e3c7e498e289179765546374a482691b4"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"868fa550e2e00f65c32da4af0a4caa26d5a703cd","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        keys \u003d aggregate.obj_fields"},{"line_number":211,"context_line":"        for key in keys:"},{"line_number":212,"context_line":"            if (aggregate.obj_attr_is_set(key)"},{"line_number":213,"context_line":"                    or key in aggregate.obj_extra_fields):"},{"line_number":214,"context_line":"                yield key, getattr(aggregate, key)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_b6a515b6","line":213,"updated":"2016-01-13 14:28:33.000000000","message":"Is this safe to do here?  If \u0027metadata\u0027 isn\u0027t set on the aggregate this will cause a lazy load or failure.","commit_id":"5831d4f89a2a045e821943ccfc0c02f690c407fa"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f024d3c6cc0005c38afa3d0ac7c17b460974cb95","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        keys \u003d aggregate.obj_fields"},{"line_number":211,"context_line":"        for key in keys:"},{"line_number":212,"context_line":"            if (aggregate.obj_attr_is_set(key)"},{"line_number":213,"context_line":"                    or key in aggregate.obj_extra_fields):"},{"line_number":214,"context_line":"                yield key, getattr(aggregate, key)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_cfaee884","line":213,"in_reply_to":"da6ed579_4fcbd8a5","updated":"2016-01-13 15:12:38.000000000","message":"Okay, thanks.  I would recommend commenting that, but it could be done in a followup.","commit_id":"5831d4f89a2a045e821943ccfc0c02f690c407fa"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"3f086a16869ac74733c01eaecc6b3af7bb2bbf53","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        keys \u003d aggregate.obj_fields"},{"line_number":211,"context_line":"        for key in keys:"},{"line_number":212,"context_line":"            if (aggregate.obj_attr_is_set(key)"},{"line_number":213,"context_line":"                    or key in aggregate.obj_extra_fields):"},{"line_number":214,"context_line":"                yield key, getattr(aggregate, key)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_4fcbd8a5","line":213,"in_reply_to":"da6ed579_b6a515b6","updated":"2016-01-13 15:07:52.000000000","message":"This discussion is part of what caused I0cf469875b9d3f3b7a5e74aa169964793dc7d6ba to happen. Looking at things, the compute api will never not set metadata (err... it will *always* set metadata to, at least, {}). So yes, if metadata isn\u0027t set, it will cause a failure when trying to lazy load, but we determined that was an invalid case.","commit_id":"5831d4f89a2a045e821943ccfc0c02f690c407fa"}],"nova/api/openstack/compute/legacy_v2/contrib/aggregates.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"868fa550e2e00f65c32da4af0a4caa26d5a703cd","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        keys \u003d aggregate.obj_fields"},{"line_number":280,"context_line":"        for key in keys:"},{"line_number":281,"context_line":"            if (aggregate.obj_attr_is_set(key)"},{"line_number":282,"context_line":"                    or key in aggregate.obj_extra_fields):"},{"line_number":283,"context_line":"                yield key, getattr(aggregate, key)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_76af9d94","line":282,"updated":"2016-01-13 14:28:33.000000000","message":"Same question.","commit_id":"5831d4f89a2a045e821943ccfc0c02f690c407fa"}],"nova/tests/unit/api/openstack/compute/test_aggregates.py":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"7ec4bb1da63c66e3f9a7d58dba09ac1af273f833","unresolved":false,"context_lines":[{"line_number":713,"context_line":"    def _assert_agg_data(self, expected, actual):"},{"line_number":714,"context_line":"        expected_data \u003d expected.obj_to_primitive()[\u0027nova_object.data\u0027]"},{"line_number":715,"context_line":"        actual_data \u003d expected.obj_to_primitive()[\u0027nova_object.data\u0027]"},{"line_number":716,"context_line":"        self.assertEqual(expected_data, actual_data)"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":""},{"line_number":719,"context_line":"class AggregateTestCaseV2(AggregateTestCaseV21):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_836434b9","line":716,"updated":"2016-01-09 06:21:50.000000000","message":"There\u0027s an obj_equal_prims in ovo that I can use here.","commit_id":"5831d4f89a2a045e821943ccfc0c02f690c407fa"}]}
