)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93ec9fb15bd0032b9f475bad223d4b9d4efe5752","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add tags to instance.create Notification"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch added a new InstanceCreatePayload inherent from"},{"line_number":10,"context_line":"InstanceActionPayload for with tag field added to it. It is used for"},{"line_number":11,"context_line":"instance creation notification."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1f1a1f67_d29841c1","line":9,"range":{"start_line":9,"start_character":19,"end_line":9,"end_character":44},"updated":"2017-07-14 20:07:10.000000000","message":"The InstanceCreatePayload is no longer new.","commit_id":"a75d92bea2808c9c4f35c762284d286a3b35bc66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d1ca2667f8308cc884bf37a271a5ab656e5882e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add tags to instance.create Notification"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch added a new InstanceCreatePayload inherent from"},{"line_number":10,"context_line":"InstanceActionPayload for with tag field added to it. It is used for"},{"line_number":11,"context_line":"instance creation notification."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1f1a1f67_ce8d9432","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":44},"updated":"2017-07-20 16:01:31.000000000","message":"As noted before, this patch doesn\u0027t add the new InstanceCreatePayload, it updates it to add the tags field.","commit_id":"d2bf4192712bdf7cea07ee46757f02e8f4334bac"}],"doc/notification_samples/instance-create-start.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9e07426fca2a2c5c42e5142da568402beab5e03","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            \"state\":\"building\","},{"line_number":40,"context_line":"            \"task_state\":null,"},{"line_number":41,"context_line":"            \"power_state\":\"pending\","},{"line_number":42,"context_line":"            \"tags\":[\"tag\"],"},{"line_number":43,"context_line":"            \"tenant_id\":\"6f70656e737461636b20342065766572\","},{"line_number":44,"context_line":"            \"terminated_at\":null,"},{"line_number":45,"context_line":"            \"auto_disk_config\":\"MANUAL\","}],"source_content_type":"application/json","patch_set":6,"id":"1f1a1f67_72ef2db0","line":42,"range":{"start_line":42,"start_character":12,"end_line":42,"end_character":27},"updated":"2017-07-14 20:15:28.000000000","message":"This isn\u0027t going to work because you\u0027re not creating an instance with tags in the notification tests:\n\nhttp://logs.openstack.org/93/459493/5/check/gate-nova-tox-functional-ubuntu-xenial/4c844a6/console.html#_2017-07-14_14_38_36_342701","commit_id":"d61957b1de0253f5d13550e76fec8ba92015014b"}],"nova/compute/utils.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c412cc289f5e6bc4041e44c312667154144a0e4f","unresolved":false,"context_lines":[{"line_number":391,"context_line":"            phase\u003dphase),"},{"line_number":392,"context_line":"        payload\u003dpayload)"},{"line_number":393,"context_line":"    notification.emit(context)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"def notify_about_volume_swap(context, instance, host, action, phase,"},{"line_number":397,"context_line":"                             old_volume_id, new_volume_id, exception\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_7b1e28bb","line":394,"updated":"2017-04-25 07:48:54.000000000","message":"It is tempting to factor out commonalities between notigy_about_* functions but I guess that is better to be done separately","commit_id":"55178bcc63b508346f6c94f4fb0ebe311c878a31"}],"nova/conductor/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c43d43a67ad35f98a6c6eaf6da6f6dd7a4df8c34","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"                    cell, instance.flavor, instance.uuid, block_device_mapping)"},{"line_number":1012,"context_line":"                instance_tags \u003d self._create_tags(cctxt, instance.uuid, tags)"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"            # TODO(Kevin Zheng): clean this up once instance.create() handles"},{"line_number":1015,"context_line":"            # tags"},{"line_number":1016,"context_line":"            instance.tags \u003d instance_tags if instance_tags \\"},{"line_number":1017,"context_line":"                else objects.TagList(objects\u003d[])"},{"line_number":1018,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_7c6d1497","line":1015,"range":{"start_line":1014,"start_character":12,"end_line":1015,"end_character":18},"updated":"2017-07-24 21:31:02.000000000","message":"We should give a bit more detail about why we have to do this here.","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f07021b7a304c6b7f2d0bc6e1fed45dd3d886c89","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"            # TODO(Kevin Zheng): clean this up once instance.create() handles"},{"line_number":1015,"context_line":"            # tags"},{"line_number":1016,"context_line":"            instance.tags \u003d instance_tags if instance_tags \\"},{"line_number":1017,"context_line":"                else objects.TagList(objects\u003d[])"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"            # Update mapping for instance. Normally this check is guarded by"},{"line_number":1020,"context_line":"            # a try/except but if we\u0027re here we know that a newer nova-api"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_d9a3f24e","line":1017,"range":{"start_line":1017,"start_character":37,"end_line":1017,"end_character":47},"updated":"2017-07-24 21:19:31.000000000","message":"nit: this is redundant:\n\nhttps://github.com/openstack/oslo.versionedobjects/blob/master/oslo_versionedobjects/base.py#L801","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"37c84fb0601c6cea1784e80f6d61e77f11d22943","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"            # tags; we do this so the instance.create notification in"},{"line_number":1016,"context_line":"            # build_and_run_instance in nova-compute doesn\u0027t lazy-load tags"},{"line_number":1017,"context_line":"            instance.tags \u003d instance_tags if instance_tags \\"},{"line_number":1018,"context_line":"                else objects.TagList()"},{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"            # Update mapping for instance. Normally this check is guarded by"},{"line_number":1021,"context_line":"            # a try/except but if we\u0027re here we know that a newer nova-api"}],"source_content_type":"text/x-python","patch_set":14,"id":"ff346bd7_92389fd3","line":1018,"updated":"2017-07-24 22:10:25.000000000","message":"nit: could have done:\n\n instance.tags \u003d instance_tags or objects.TagList()","commit_id":"f665565d694a1e362c0e2fa6c40ee9849b68e777"}],"nova/notifications/objects/instance.py":[{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"e1c8fefd50dba1eeb543008dc3e33b90cf63dbeb","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    VERSION \u003d \u00271.5\u0027"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    fields \u003d {"},{"line_number":180,"context_line":"        \u0027keypairs\u0027: fields.ListOfObjectsField(\u0027KeypairPayload\u0027)"},{"line_number":181,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(),"},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_30d5061d","line":180,"range":{"start_line":180,"start_character":61,"end_line":180,"end_character":63},"updated":"2017-07-05 03:20:07.000000000","message":"miss \u0027,\u0027 here, so The test run didn\u0027t actually run any tests.","commit_id":"436bdf371d1750822c57aad4f5e02c461b72c730"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93ec9fb15bd0032b9f475bad223d4b9d4efe5752","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    fields \u003d {"},{"line_number":194,"context_line":"        \u0027keypairs\u0027: fields.ListOfObjectsField(\u0027KeypairPayload\u0027),"},{"line_number":195,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(nullable\u003dTrue),"},{"line_number":196,"context_line":"    }"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def __init__(self, instance, fault):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f1a1f67_52855159","line":195,"range":{"start_line":195,"start_character":42,"end_line":195,"end_character":55},"updated":"2017-07-14 20:07:10.000000000","message":"This won\u0027t ever be nullable because __init__ always sets it to at least an empty list.","commit_id":"a75d92bea2808c9c4f35c762284d286a3b35bc66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93ec9fb15bd0032b9f475bad223d4b9d4efe5752","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.keypairs \u003d [keypair_payload.KeypairPayload(keypair\u003dkeypair)"},{"line_number":203,"context_line":"                         for keypair in instance.keypairs]"},{"line_number":204,"context_line":"        self.tags \u003d [instance_tag.tag"},{"line_number":205,"context_line":"                     for instance_tag in instance.tags.objects]"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"@nova_base.NovaObjectRegistry.register_notification"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f1a1f67_b2d8257f","line":205,"range":{"start_line":205,"start_character":41,"end_line":205,"end_character":54},"updated":"2017-07-14 20:07:10.000000000","message":"The tests are failing because you\u0027re lazy-loading this in the compute manager\u0027s _build_and_run_instance method, which isn\u0027t fun since we\u0027re now going back to the database to get the tags just for the notification. Which reminds me of this:\n\nhttps://github.com/openstack/nova/blob/771dd5b1217f8fb8109c782fb7f3a7658e0a4ad4/nova/objects/build_request.py#L248-L251\n\nWhy aren\u0027t you dealing with that in the change below this for the API stuff?\n\nhttps://github.com/openstack/nova/blob/771dd5b1217f8fb8109c782fb7f3a7658e0a4ad4/nova/conductor/manager.py#L932\n\nThe instance object we get in the conductor manager doesn\u0027t have the tags set on it from the build request.\n\nI guess because we\u0027re passing the tags to conductor and using those rather than the ones in the build request:\n\nhttps://github.com/openstack/nova/blob/771dd5b1217f8fb8109c782fb7f3a7658e0a4ad4/nova/conductor/manager.py#L985\n\nBut we should also be setting the instance.tags before conductor does the rpc cast to compute otherwise we have this lazy-load penalty:\n\nhttps://github.com/openstack/nova/blob/771dd5b1217f8fb8109c782fb7f3a7658e0a4ad4/nova/conductor/manager.py#L1010","commit_id":"a75d92bea2808c9c4f35c762284d286a3b35bc66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93ec9fb15bd0032b9f475bad223d4b9d4efe5752","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.keypairs \u003d [keypair_payload.KeypairPayload(keypair\u003dkeypair)"},{"line_number":203,"context_line":"                         for keypair in instance.keypairs]"},{"line_number":204,"context_line":"        self.tags \u003d [instance_tag.tag"},{"line_number":205,"context_line":"                     for instance_tag in instance.tags.objects]"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"@nova_base.NovaObjectRegistry.register_notification"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f1a1f67_d2af21e1","line":205,"range":{"start_line":205,"start_character":55,"end_line":205,"end_character":62},"updated":"2017-07-14 20:07:10.000000000","message":"You shouldn\u0027t have to do this, as TagList is iterable on it\u0027s own.","commit_id":"a75d92bea2808c9c4f35c762284d286a3b35bc66"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1c0de6b519b2abe4c148eca7fd84b0a918844e5e","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    fields \u003d {"},{"line_number":194,"context_line":"        \u0027keypairs\u0027: fields.ListOfObjectsField(\u0027KeypairPayload\u0027),"},{"line_number":195,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(nullable\u003dTrue),"},{"line_number":196,"context_line":"    }"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def __init__(self, instance, fault):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f1a1f67_322599ac","line":195,"updated":"2017-07-20 10:05:35.000000000","message":"In the InstanceUpdatePayload it is not nullable and also I think here we are aiming for having the tags always available in the instance.create. I guess this is why you added the workaround to the build_and_run_instances. So this field does not need to be nullable here.","commit_id":"d2bf4192712bdf7cea07ee46757f02e8f4334bac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d1ca2667f8308cc884bf37a271a5ab656e5882e","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    fields \u003d {"},{"line_number":194,"context_line":"        \u0027keypairs\u0027: fields.ListOfObjectsField(\u0027KeypairPayload\u0027),"},{"line_number":195,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(nullable\u003dTrue),"},{"line_number":196,"context_line":"    }"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def __init__(self, instance, fault):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f1a1f67_ee35f0a9","line":195,"in_reply_to":"1f1a1f67_322599ac","updated":"2017-07-20 16:01:31.000000000","message":"Right I pointed this out before too.","commit_id":"d2bf4192712bdf7cea07ee46757f02e8f4334bac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d1ca2667f8308cc884bf37a271a5ab656e5882e","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.keypairs \u003d [keypair_payload.KeypairPayload(keypair\u003dkeypair)"},{"line_number":203,"context_line":"                         for keypair in instance.keypairs]"},{"line_number":204,"context_line":"        self.tags \u003d [instance_tag.tag"},{"line_number":205,"context_line":"                     for instance_tag in instance.tags.objects]"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"@nova_base.NovaObjectRegistry.register_notification"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f1a1f67_ce6354b1","line":205,"range":{"start_line":205,"start_character":54,"end_line":205,"end_character":62},"updated":"2017-07-20 16:01:31.000000000","message":"This is redundant, you can iterate over a TagList.","commit_id":"d2bf4192712bdf7cea07ee46757f02e8f4334bac"}],"nova/tests/functional/notification_sample_tests/test_instance.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1c0de6b519b2abe4c148eca7fd84b0a918844e5e","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    def test_create_delete_server(self):"},{"line_number":158,"context_line":"        server \u003d self._boot_a_server("},{"line_number":159,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}],"},{"line_number":160,"context_line":"                          \u0027tags\u0027: \u0027tag\u0027})"},{"line_number":161,"context_line":"        self._attach_volume_to_server(server, self.cinder.SWAP_OLD_VOL)"},{"line_number":162,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"},{"line_number":163,"context_line":"        self._wait_until_deleted(server)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f1a1f67_1f7506cd","line":160,"range":{"start_line":160,"start_character":34,"end_line":160,"end_character":39},"updated":"2017-07-20 10:05:35.000000000","message":"I think this needs to be a list e.g.\n\u0027tags\u0027: [\u0027tag\u0027]","commit_id":"d2bf4192712bdf7cea07ee46757f02e8f4334bac"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1c0de6b519b2abe4c148eca7fd84b0a918844e5e","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        self.assertEqual(2, len(fake_notifier.VERSIONED_NOTIFICATIONS))"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        self._verify_notification("},{"line_number":200,"context_line":"            \u0027instance-create-start\u0027,"},{"line_number":201,"context_line":"            replacements\u003d{"},{"line_number":202,"context_line":"                \u0027reservation_id\u0027: server[\u0027reservation_id\u0027],"},{"line_number":203,"context_line":"                \u0027uuid\u0027: server[\u0027id\u0027]},"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f1a1f67_df90aef0","line":200,"updated":"2017-07-20 10:05:35.000000000","message":"If you want to use the same create.start sample file as in test_create_delete_server() then you have to add the \u0027tags\u0027 key to the extra_params in this test case as well","commit_id":"d2bf4192712bdf7cea07ee46757f02e8f4334bac"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f07021b7a304c6b7f2d0bc6e1fed45dd3d886c89","unresolved":false,"context_lines":[{"line_number":5265,"context_line":"                    mock.ANY, \u0027expected_task_state\u0027: \u0027spawning\u0027}"},{"line_number":5266,"context_line":"            expected_call \u003d mock.call(self.context, self.instance.uuid,"},{"line_number":5267,"context_line":"                    updates, columns_to_join\u003d[\u0027metadata\u0027, \u0027system_metadata\u0027,"},{"line_number":5268,"context_line":"                        \u0027info_cache\u0027, \u0027tags\u0027])"},{"line_number":5269,"context_line":"            last_update_call \u003d mock_db_update.call_args_list["},{"line_number":5270,"context_line":"                mock_db_update.call_count - 1]"},{"line_number":5271,"context_line":"            self.assertEqual(expected_call, last_update_call)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_f9459671","line":5268,"range":{"start_line":5268,"start_character":38,"end_line":5268,"end_character":44},"updated":"2017-07-24 21:19:31.000000000","message":"I\u0027m not sure why this needed to change in here, what about this test is making the tags get loaded when the instance.save() method is called?\n\nOh I suppose because you changed this globally:\n\nhttps://review.openstack.org/#/c/459493/13/nova/tests/unit/fake_instance.py@125","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c43d43a67ad35f98a6c6eaf6da6f6dd7a4df8c34","unresolved":false,"context_lines":[{"line_number":5265,"context_line":"                    mock.ANY, \u0027expected_task_state\u0027: \u0027spawning\u0027}"},{"line_number":5266,"context_line":"            expected_call \u003d mock.call(self.context, self.instance.uuid,"},{"line_number":5267,"context_line":"                    updates, columns_to_join\u003d[\u0027metadata\u0027, \u0027system_metadata\u0027,"},{"line_number":5268,"context_line":"                        \u0027info_cache\u0027, \u0027tags\u0027])"},{"line_number":5269,"context_line":"            last_update_call \u003d mock_db_update.call_args_list["},{"line_number":5270,"context_line":"                mock_db_update.call_count - 1]"},{"line_number":5271,"context_line":"            self.assertEqual(expected_call, last_update_call)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_bce6dc15","line":5268,"range":{"start_line":5268,"start_character":38,"end_line":5268,"end_character":44},"in_reply_to":"ff346bd7_f9459671","updated":"2017-07-24 21:31:02.000000000","message":"Looks like removing it from fake_instance makes a bunch of other tests fail...","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"}],"nova/tests/unit/compute/test_compute_utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d1ca2667f8308cc884bf37a271a5ab656e5882e","unresolved":false,"context_lines":[{"line_number":606,"context_line":"    def test_notify_about_instance_create_with_tags(self):"},{"line_number":607,"context_line":"        instance \u003d create_instance(self.context)"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"        # TODO(Kevin Zheng): clean this up to pass tags as prams to"},{"line_number":610,"context_line":"        # create_instance() once instance.create() handles tags."},{"line_number":611,"context_line":"        instance.tags \u003d objects.TagList("},{"line_number":612,"context_line":"            objects\u003d[objects.Tag(self.context, tag\u003d\u0027tag1\u0027)])"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f1a1f67_ae0db8e9","line":609,"range":{"start_line":609,"start_character":59,"end_line":609,"end_character":64},"updated":"2017-07-20 16:01:31.000000000","message":"params","commit_id":"d2bf4192712bdf7cea07ee46757f02e8f4334bac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f07021b7a304c6b7f2d0bc6e1fed45dd3d886c89","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        payload \u003d notification[\u0027payload\u0027][\u0027nova_object.data\u0027]"},{"line_number":629,"context_line":"        self.assertEqual(\u0027fake\u0027, payload[\u0027tenant_id\u0027])"},{"line_number":630,"context_line":"        self.assertEqual(\u0027fake\u0027, payload[\u0027user_id\u0027])"},{"line_number":631,"context_line":"        self.assertEqual(instance[\u0027uuid\u0027], payload[\u0027uuid\u0027])"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        flavorid \u003d flavors.get_flavor_by_name(\u0027m1.tiny\u0027)[\u0027flavorid\u0027]"},{"line_number":634,"context_line":"        flavor \u003d payload[\u0027flavor\u0027][\u0027nova_object.data\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_9c38b8d3","line":631,"range":{"start_line":631,"start_character":25,"end_line":631,"end_character":41},"updated":"2017-07-24 21:19:31.000000000","message":"nit: instance.uuid would be better since it\u0027s an object and we want to remove the dict compat mixin from the instance object over time.","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f07021b7a304c6b7f2d0bc6e1fed45dd3d886c89","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        self.assertEqual(flavorid, str(flavor[\u0027flavorid\u0027]))"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"        self.assertEqual(0, len(payload[\u0027keypairs\u0027]))"},{"line_number":638,"context_line":"        self.assertEqual(\u0027tag1\u0027, payload[\u0027tags\u0027][0])"},{"line_number":639,"context_line":"        for attr in (\u0027display_name\u0027, \u0027created_at\u0027, \u0027launched_at\u0027,"},{"line_number":640,"context_line":"                     \u0027state\u0027, \u0027task_state\u0027, \u0027display_description\u0027, \u0027locked\u0027,"},{"line_number":641,"context_line":"                     \u0027auto_disk_config\u0027):"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_7c4ab455","line":638,"range":{"start_line":638,"start_character":8,"end_line":638,"end_character":52},"updated":"2017-07-24 21:19:31.000000000","message":"Seems safer to assert that \u0027tags\u0027 is in payload and that len(payload[\u0027tags\u0027]) is 1 to avoid a KeyError or IndexError.","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"}],"nova/tests/unit/fake_instance.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f07021b7a304c6b7f2d0bc6e1fed45dd3d886c89","unresolved":false,"context_lines":[{"line_number":122,"context_line":"               obj_instance_class(), fake_db_instance(**updates),"},{"line_number":123,"context_line":"               expected_attrs\u003dexpected_attrs)"},{"line_number":124,"context_line":"    inst.keypairs \u003d objects.KeyPairList(objects\u003d[])"},{"line_number":125,"context_line":"    inst.tags \u003d objects.TagList(objects\u003d[])"},{"line_number":126,"context_line":"    if flavor:"},{"line_number":127,"context_line":"        inst.flavor \u003d flavor"},{"line_number":128,"context_line":"        # This is needed for instance quota counting until we have the"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_9c6678ed","line":125,"range":{"start_line":125,"start_character":32,"end_line":125,"end_character":42},"updated":"2017-07-24 21:19:31.000000000","message":"this is redundant","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"}],"nova/tests/unit/objects/test_build_request.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2612dff6233506a66df97dace5d68d7af6fd4ba3","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        # on build_request"},{"line_number":141,"context_line":"        fake_req \u003d fake_build_request.fake_db_req()"},{"line_number":142,"context_line":"        fields \u003d jsonutils.loads(fake_req[\u0027instance\u0027])[\u0027nova_object.data\u0027]"},{"line_number":143,"context_line":"        # TODO(Kevin Zheng): clean up this walk around once"},{"line_number":144,"context_line":"        # build_request.get_new_instance() can handle tags."},{"line_number":145,"context_line":"        del fields[\u0027tags\u0027]"},{"line_number":146,"context_line":"        build_request \u003d objects.BuildRequest._from_db_object("}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_f17ca9b6","line":143,"range":{"start_line":143,"start_character":43,"end_line":143,"end_character":54},"updated":"2017-07-24 05:20:23.000000000","message":"nit:workaround","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f07021b7a304c6b7f2d0bc6e1fed45dd3d886c89","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        fields \u003d jsonutils.loads(fake_req[\u0027instance\u0027])[\u0027nova_object.data\u0027]"},{"line_number":143,"context_line":"        # TODO(Kevin Zheng): clean up this walk around once"},{"line_number":144,"context_line":"        # build_request.get_new_instance() can handle tags."},{"line_number":145,"context_line":"        del fields[\u0027tags\u0027]"},{"line_number":146,"context_line":"        build_request \u003d objects.BuildRequest._from_db_object("},{"line_number":147,"context_line":"            self.context, objects.BuildRequest(), fake_req)"},{"line_number":148,"context_line":"        self.assertEqual(0, len(build_request.instance.obj_what_changed()))"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_3ce9cc19","line":145,"updated":"2017-07-24 21:19:31.000000000","message":"I\u0027m not sure why this is needed. Is it because of this?\n\nhttps://review.openstack.org/#/c/459493/13/nova/tests/unit/fake_instance.py@125\n\nIn general we should avoid changing global helpers like this since it changes unrelated tests in unexpected ways.","commit_id":"12bb1281824f6b8f0c08927b12620793f2480c92"}]}
