)]}'
{"doc/notification_samples/instance-resize_confirm-end.json":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95b5763009d048fb5ea65889061ffd15a21e2bfc","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        },"},{"line_number":68,"context_line":"        \"nova_object.name\":\"InstanceActionPayload\","},{"line_number":69,"context_line":"        \"nova_object.namespace\":\"nova\","},{"line_number":70,"context_line":"        \"nova_object.version\":\"1.3\""},{"line_number":71,"context_line":"    },"},{"line_number":72,"context_line":"    \"priority\":\"INFO\","},{"line_number":73,"context_line":"    \"publisher_id\":\"nova-compute:compute\""}],"source_content_type":"application/json","patch_set":1,"id":"1f1a1f67_5637374e","line":70,"updated":"2017-07-18 13:32:19.000000000","message":"Patch needs to be rebased as InstanceActionPayload already at version 1.4 (which adds block_devices key)","commit_id":"fc84457ea880b1ae4877c02b1568f69b9d47e8c8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"680e597a2a2dd7220d0c63d608bc654b992bdff2","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"$ref\": \"common_payloads/InstanceActionPayload.json#\","},{"line_number":5,"context_line":"        \"nova_object.data\": {"},{"line_number":6,"context_line":"            \"block_devices\": [],"},{"line_number":7,"context_line":"            \"flavor\": {"},{"line_number":8,"context_line":"                \"nova_object.data\": {"},{"line_number":9,"context_line":"                    \"extra_specs\": {},"}],"source_content_type":"application/json","patch_set":8,"id":"7f96bb07_5aac7633","line":6,"updated":"2018-01-15 14:09:04.000000000","message":"You can avoid this override. See my comment in the test_instance.py","commit_id":"47c4d8058afd8ea88a8b76bda10a3405ffe05812"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"bb8e088af992b0a49774b938f24f7dbad1acc904","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \"payload\": {"},{"line_number":4,"context_line":"        \"$ref\": \"common_payloads/InstanceActionPayload.json#\","},{"line_number":5,"context_line":"        \"nova_object.data\": {"},{"line_number":6,"context_line":"            \"block_devices\": [],"},{"line_number":7,"context_line":"            \"flavor\": {"},{"line_number":8,"context_line":"                \"nova_object.data\": {"},{"line_number":9,"context_line":"                    \"extra_specs\": {},"}],"source_content_type":"application/json","patch_set":8,"id":"7f96bb07_95f8737b","line":6,"in_reply_to":"7f96bb07_5aac7633","updated":"2018-01-16 07:47:41.000000000","message":"Done","commit_id":"47c4d8058afd8ea88a8b76bda10a3405ffe05812"}],"nova/tests/functional/api/client.py":[{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"275020f36d0e6daf5e8ce59a55424d1e53617281","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    def put_server(self, server_id, server):"},{"line_number":272,"context_line":"        return self.api_put(\u0027/servers/%s\u0027 % server_id, server).body"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def post_server_action(self, server_id, data, **kwarg):"},{"line_number":275,"context_line":"        return self.api_post(\u0027/servers/%s/action\u0027 % server_id, data,"},{"line_number":276,"context_line":"                             **kwarg).body"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_8b879862","line":274,"range":{"start_line":274,"start_character":50,"end_line":274,"end_character":57},"updated":"2017-07-20 11:38:19.000000000","message":"Unneccessary.\nSee in test_instance.py L936","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"275020f36d0e6daf5e8ce59a55424d1e53617281","unresolved":false,"context_lines":[{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def post_server_action(self, server_id, data, **kwarg):"},{"line_number":275,"context_line":"        return self.api_post(\u0027/servers/%s/action\u0027 % server_id, data,"},{"line_number":276,"context_line":"                             **kwarg).body"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def delete_server(self, server_id):"},{"line_number":279,"context_line":"        return self.api_delete(\u0027/servers/%s\u0027 % server_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_2b964496","line":276,"range":{"start_line":276,"start_character":29,"end_line":276,"end_character":36},"updated":"2017-07-20 11:38:19.000000000","message":"Ditto","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"}],"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":"95b5763009d048fb5ea65889061ffd15a21e2bfc","unresolved":false,"context_lines":[{"line_number":859,"context_line":"            replacements\u003d{"},{"line_number":860,"context_line":"                \u0027reservation_id\u0027: server[\u0027reservation_id\u0027],"},{"line_number":861,"context_line":"                \u0027uuid\u0027: server[\u0027id\u0027]},"},{"line_number":862,"context_line":"            actual\u003dfake_notifier.VERSIONED_NOTIFICATIONS[7])"},{"line_number":863,"context_line":"        self._verify_notification("},{"line_number":864,"context_line":"            \u0027instance-resize_confirm-end\u0027,"},{"line_number":865,"context_line":"            replacements\u003d{"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_368a7bbe","line":862,"range":{"start_line":862,"start_character":57,"end_line":862,"end_character":58},"updated":"2017-07-18 13:32:19.000000000","message":"If you reset the fake_notifier before teh confirmResize action then you will have less notifications to consider therefore less chance that later a new notification appears in the sequence and breaks the test","commit_id":"fc84457ea880b1ae4877c02b1568f69b9d47e8c8"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"275020f36d0e6daf5e8ce59a55424d1e53617281","unresolved":false,"context_lines":[{"line_number":927,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":928,"context_line":"        self.flags(allow_resize_to_same_host\u003dTrue)"},{"line_number":929,"context_line":"        post \u003d {\u0027resize\u0027: {\u0027flavorRef\u0027: \u00272\u0027}}"},{"line_number":930,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"},{"line_number":931,"context_line":"        self._wait_for_state_change(self.api, server, \u0027VERIFY_RESIZE\u0027)"},{"line_number":932,"context_line":"        fake_notifier.reset()"},{"line_number":933,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_7039c9f0","line":930,"range":{"start_line":930,"start_character":8,"end_line":930,"end_character":55},"updated":"2017-07-20 11:38:19.000000000","message":"U can see, in the related reference[1], that the resize api call require admin privileges. The \"self.api\" grant normal user privilege. Use instead self.admin_api, to have be admin privilege. \n\n[1]: https://developer.openstack.org/api-ref/compute/?expanded\u003dstop-server-os-stop-action-detail,evacuate-server-evacuate-action-detail,update-forced-down-detail,resize-server-resize-action-detail#resize-server-resize-action","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"2ffb2cd40c22dc35d95c4da23e08c75460323186","unresolved":false,"context_lines":[{"line_number":927,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":928,"context_line":"        self.flags(allow_resize_to_same_host\u003dTrue)"},{"line_number":929,"context_line":"        post \u003d {\u0027resize\u0027: {\u0027flavorRef\u0027: \u00272\u0027}}"},{"line_number":930,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"},{"line_number":931,"context_line":"        self._wait_for_state_change(self.api, server, \u0027VERIFY_RESIZE\u0027)"},{"line_number":932,"context_line":"        fake_notifier.reset()"},{"line_number":933,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff346bd7_f155c91e","line":930,"range":{"start_line":930,"start_character":8,"end_line":930,"end_character":55},"in_reply_to":"1f1a1f67_7039c9f0","updated":"2017-07-24 05:28:33.000000000","message":"This is not admin privilege (e.g.: https://github.com/openstack/nova/blob/master/nova/tests/functional/notification_sample_tests/test_instance.py#L632) because the server doesn\u0027t locked (in docs: \"If the server is locked, you must have administrator privileges to resize the server.\")","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"6a10967c35afded67e89a0e06faf4c5a5718024c","unresolved":false,"context_lines":[{"line_number":927,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":928,"context_line":"        self.flags(allow_resize_to_same_host\u003dTrue)"},{"line_number":929,"context_line":"        post \u003d {\u0027resize\u0027: {\u0027flavorRef\u0027: \u00272\u0027}}"},{"line_number":930,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"},{"line_number":931,"context_line":"        self._wait_for_state_change(self.api, server, \u0027VERIFY_RESIZE\u0027)"},{"line_number":932,"context_line":"        fake_notifier.reset()"},{"line_number":933,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff346bd7_3da9df7a","line":930,"range":{"start_line":930,"start_character":8,"end_line":930,"end_character":55},"in_reply_to":"ff346bd7_f155c91e","updated":"2017-07-24 10:19:03.000000000","message":"True, you\u0027re right.","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"275020f36d0e6daf5e8ce59a55424d1e53617281","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        fake_notifier.reset()"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"        post \u003d {\u0027confirmResize\u0027: None}"},{"line_number":935,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post,"},{"line_number":936,"context_line":"                                    check_response_status\u003d[204])"},{"line_number":937,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_7012e964","line":935,"range":{"start_line":935,"start_character":8,"end_line":935,"end_character":16},"updated":"2017-07-20 11:38:19.000000000","message":"Privileges problems. (See more up)","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"2ffb2cd40c22dc35d95c4da23e08c75460323186","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        fake_notifier.reset()"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"        post \u003d {\u0027confirmResize\u0027: None}"},{"line_number":935,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post,"},{"line_number":936,"context_line":"                                    check_response_status\u003d[204])"},{"line_number":937,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff346bd7_512495c6","line":935,"range":{"start_line":935,"start_character":8,"end_line":935,"end_character":16},"in_reply_to":"1f1a1f67_7012e964","updated":"2017-07-24 05:28:33.000000000","message":"Ditto","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"275020f36d0e6daf5e8ce59a55424d1e53617281","unresolved":false,"context_lines":[{"line_number":933,"context_line":""},{"line_number":934,"context_line":"        post \u003d {\u0027confirmResize\u0027: None}"},{"line_number":935,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post,"},{"line_number":936,"context_line":"                                    check_response_status\u003d[204])"},{"line_number":937,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"        self.assertEqual(2, len(fake_notifier.VERSIONED_NOTIFICATIONS))"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_4b73c0b2","line":936,"range":{"start_line":936,"start_character":36,"end_line":936,"end_character":63},"updated":"2017-07-20 11:38:19.000000000","message":"This unneccessary, because with appropriate call in the test be always \"Normal response\", so 204 response status. Maybe solve this problem, the already mentioned \"self.admin_api\" call(?)","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"2ffb2cd40c22dc35d95c4da23e08c75460323186","unresolved":false,"context_lines":[{"line_number":933,"context_line":""},{"line_number":934,"context_line":"        post \u003d {\u0027confirmResize\u0027: None}"},{"line_number":935,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post,"},{"line_number":936,"context_line":"                                    check_response_status\u003d[204])"},{"line_number":937,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"        self.assertEqual(2, len(fake_notifier.VERSIONED_NOTIFICATIONS))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff346bd7_ccfeaa04","line":936,"range":{"start_line":936,"start_character":36,"end_line":936,"end_character":63},"in_reply_to":"1f1a1f67_4b73c0b2","updated":"2017-07-24 05:28:33.000000000","message":"This is necessary because the normal response values are  200, 201 and 202 (https://github.com/openstack/nova/blob/master/nova/tests/functional/api/client.py#L223)","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"6a10967c35afded67e89a0e06faf4c5a5718024c","unresolved":false,"context_lines":[{"line_number":933,"context_line":""},{"line_number":934,"context_line":"        post \u003d {\u0027confirmResize\u0027: None}"},{"line_number":935,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post,"},{"line_number":936,"context_line":"                                    check_response_status\u003d[204])"},{"line_number":937,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"        self.assertEqual(2, len(fake_notifier.VERSIONED_NOTIFICATIONS))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff346bd7_bdd5cfbb","line":936,"range":{"start_line":936,"start_character":36,"end_line":936,"end_character":63},"in_reply_to":"ff346bd7_ccfeaa04","updated":"2017-07-24 10:19:03.000000000","message":"Yes, but the response will be automatically \"Ok\", which \"204\". I think so, that not require implement a checker for response_status, because if the request is good, then come with 204. Or I think bad?","commit_id":"9488ba6a2f1a6f7d85eb629dd6a3fab5df287fd7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"680e597a2a2dd7220d0c63d608bc654b992bdff2","unresolved":false,"context_lines":[{"line_number":1157,"context_line":""},{"line_number":1158,"context_line":"    def test_resize_confirm_server(self):"},{"line_number":1159,"context_line":"        server \u003d self._boot_a_server("},{"line_number":1160,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":1161,"context_line":"        self.flags(allow_resize_to_same_host\u003dTrue)"},{"line_number":1162,"context_line":"        post \u003d {\u0027resize\u0027: {\u0027flavorRef\u0027: \u00272\u0027}}"},{"line_number":1163,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_1abfce61","line":1160,"updated":"2018-01-15 14:09:04.000000000","message":"You can attach a volume to the server like in every other instance action tests to make the samples the same and test that the bdm is loaded properly:\n\n    self._attach_volume_to_server(server, self.cinder.SWAP_OLD_VOL)\n\nThis way you don\u0027t need the json_ref modification either in this patch.","commit_id":"47c4d8058afd8ea88a8b76bda10a3405ffe05812"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"bb8e088af992b0a49774b938f24f7dbad1acc904","unresolved":false,"context_lines":[{"line_number":1157,"context_line":""},{"line_number":1158,"context_line":"    def test_resize_confirm_server(self):"},{"line_number":1159,"context_line":"        server \u003d self._boot_a_server("},{"line_number":1160,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":1161,"context_line":"        self.flags(allow_resize_to_same_host\u003dTrue)"},{"line_number":1162,"context_line":"        post \u003d {\u0027resize\u0027: {\u0027flavorRef\u0027: \u00272\u0027}}"},{"line_number":1163,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_35f15f96","line":1160,"in_reply_to":"7f96bb07_1abfce61","updated":"2018-01-16 07:47:41.000000000","message":"Done","commit_id":"47c4d8058afd8ea88a8b76bda10a3405ffe05812"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6160fe0ec54e8485091f2229d307a1f22fdaac27","unresolved":false,"context_lines":[{"line_number":1154,"context_line":"                \u0027uuid\u0027: server[\u0027id\u0027]},"},{"line_number":1155,"context_line":"            actual\u003dfake_notifier.VERSIONED_NOTIFICATIONS[6])"},{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"    def test_resize_confirm_server(self):"},{"line_number":1158,"context_line":"        server \u003d self._boot_a_server("},{"line_number":1159,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":1160,"context_line":"        self._attach_volume_to_server(server, self.cinder.SWAP_OLD_VOL)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_8a62e1d7","line":1157,"updated":"2018-01-22 12:14:49.000000000","message":"+1, make sense to make it a separate test as it changes the state of the instance permanently","commit_id":"8ec0b4390401ce62cab0ea9b3786dc487e26c9f7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e7ccc196374315530a24c2c122d855497082764","unresolved":false,"context_lines":[{"line_number":1154,"context_line":"                \u0027uuid\u0027: server[\u0027id\u0027]},"},{"line_number":1155,"context_line":"            actual\u003dfake_notifier.VERSIONED_NOTIFICATIONS[6])"},{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"    def test_resize_confirm_server(self):"},{"line_number":1158,"context_line":"        server \u003d self._boot_a_server("},{"line_number":1159,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":1160,"context_line":"        self._attach_volume_to_server(server, self.cinder.SWAP_OLD_VOL)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_a8d52db9","line":1157,"in_reply_to":"7f96bb07_8a62e1d7","updated":"2018-01-23 22:45:02.000000000","message":"Changes the state, or changes the flavor, which messes up the common payload in the samples?","commit_id":"8ec0b4390401ce62cab0ea9b3786dc487e26c9f7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e7ccc196374315530a24c2c122d855497082764","unresolved":false,"context_lines":[{"line_number":1157,"context_line":"    def test_resize_confirm_server(self):"},{"line_number":1158,"context_line":"        server \u003d self._boot_a_server("},{"line_number":1159,"context_line":"            extra_params\u003d{\u0027networks\u0027: [{\u0027port\u0027: self.neutron.port_1[\u0027id\u0027]}]})"},{"line_number":1160,"context_line":"        self._attach_volume_to_server(server, self.cinder.SWAP_OLD_VOL)"},{"line_number":1161,"context_line":"        self.admin_api.post_extra_spec("},{"line_number":1162,"context_line":"            \u00272\u0027, {\"extra_specs\": {\"hw:watchdog_action\": \"disabled\"}})"},{"line_number":1163,"context_line":"        self.flags(allow_resize_to_same_host\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_48e4a9ac","line":1160,"range":{"start_line":1160,"start_character":8,"end_line":1160,"end_character":71},"updated":"2018-01-23 22:45:02.000000000","message":"Not sure why we need this. I guess for the BDM in the common InstanceActionPayload sample.","commit_id":"8ec0b4390401ce62cab0ea9b3786dc487e26c9f7"}],"nova/tests/json_ref.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"680e597a2a2dd7220d0c63d608bc654b992bdff2","unresolved":false,"context_lines":[{"line_number":57,"context_line":"def _update_dict_recursively(d, update):"},{"line_number":58,"context_line":"    \"\"\"Update dict d recursively with data from dict update\"\"\""},{"line_number":59,"context_line":"    for k, v in update.items():"},{"line_number":60,"context_line":"        # If the value is an empty dict, replace an original value"},{"line_number":61,"context_line":"        # with an empty dict."},{"line_number":62,"context_line":"        if (k in d and isinstance(d[k], dict) and isinstance(v, dict)"},{"line_number":63,"context_line":"                and len(v) !\u003d 0):"},{"line_number":64,"context_line":"            _update_dict_recursively(d[k], v)"},{"line_number":65,"context_line":"        else:"},{"line_number":66,"context_line":"            d[k] \u003d v"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_1a4d8e99","line":63,"range":{"start_line":60,"start_character":1,"end_line":63,"end_character":33},"updated":"2018-01-15 14:09:04.000000000","message":"This might be a good addition separately, with unit test coverage. But you can easily avoid this in the current patch. See my comment in the test_instance.py","commit_id":"47c4d8058afd8ea88a8b76bda10a3405ffe05812"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"bb8e088af992b0a49774b938f24f7dbad1acc904","unresolved":false,"context_lines":[{"line_number":57,"context_line":"def _update_dict_recursively(d, update):"},{"line_number":58,"context_line":"    \"\"\"Update dict d recursively with data from dict update\"\"\""},{"line_number":59,"context_line":"    for k, v in update.items():"},{"line_number":60,"context_line":"        # If the value is an empty dict, replace an original value"},{"line_number":61,"context_line":"        # with an empty dict."},{"line_number":62,"context_line":"        if (k in d and isinstance(d[k], dict) and isinstance(v, dict)"},{"line_number":63,"context_line":"                and len(v) !\u003d 0):"},{"line_number":64,"context_line":"            _update_dict_recursively(d[k], v)"},{"line_number":65,"context_line":"        else:"},{"line_number":66,"context_line":"            d[k] \u003d v"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_d5d35bd4","line":63,"range":{"start_line":60,"start_character":1,"end_line":63,"end_character":33},"in_reply_to":"7f96bb07_1a4d8e99","updated":"2018-01-16 07:47:41.000000000","message":"It is still required in order to replace\n\n* \"extra_specs\": {hw:watchdog_action\": \"disabled\"}\n\nwith\n\n* \"extra_specs\": {}\n\n.","commit_id":"47c4d8058afd8ea88a8b76bda10a3405ffe05812"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a63e03ab238ed5b87af0ce62e781545c6c59fd58","unresolved":false,"context_lines":[{"line_number":57,"context_line":"def _update_dict_recursively(d, update):"},{"line_number":58,"context_line":"    \"\"\"Update dict d recursively with data from dict update\"\"\""},{"line_number":59,"context_line":"    for k, v in update.items():"},{"line_number":60,"context_line":"        # If the value is an empty dict, replace an original value"},{"line_number":61,"context_line":"        # with an empty dict."},{"line_number":62,"context_line":"        if (k in d and isinstance(d[k], dict) and isinstance(v, dict)"},{"line_number":63,"context_line":"                and len(v) !\u003d 0):"},{"line_number":64,"context_line":"            _update_dict_recursively(d[k], v)"},{"line_number":65,"context_line":"        else:"},{"line_number":66,"context_line":"            d[k] \u003d v"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_01270166","line":63,"range":{"start_line":60,"start_character":1,"end_line":63,"end_character":33},"in_reply_to":"7f96bb07_80855dd1","updated":"2018-01-17 23:02:45.000000000","message":"Done","commit_id":"47c4d8058afd8ea88a8b76bda10a3405ffe05812"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b7e00e1d4f885adfaa3c160eef5465ba3763142c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"def _update_dict_recursively(d, update):"},{"line_number":58,"context_line":"    \"\"\"Update dict d recursively with data from dict update\"\"\""},{"line_number":59,"context_line":"    for k, v in update.items():"},{"line_number":60,"context_line":"        # If the value is an empty dict, replace an original value"},{"line_number":61,"context_line":"        # with an empty dict."},{"line_number":62,"context_line":"        if (k in d and isinstance(d[k], dict) and isinstance(v, dict)"},{"line_number":63,"context_line":"                and len(v) !\u003d 0):"},{"line_number":64,"context_line":"            _update_dict_recursively(d[k], v)"},{"line_number":65,"context_line":"        else:"},{"line_number":66,"context_line":"            d[k] \u003d v"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_80855dd1","line":63,"range":{"start_line":60,"start_character":1,"end_line":63,"end_character":33},"in_reply_to":"7f96bb07_d5d35bd4","updated":"2018-01-17 13:53:39.000000000","message":"I put more thought into this. The update_dict_recursively() never removes anything from \u0027d\u0027 this is why it does not removes the hw:watchdog_action key either. So supporting the empty dict case only solves the current particular problem but not a generic solution for a need to remove keys during override. \n\nMaybe we can say that if both d[k] and v are dict but they have different lengths then it means that it is not a simple override scenario but it means that the keys of d[k] also needs be modified according to what is in v. Still it sounds complicated and edgy. So I would like to avoid it in this patch if possible.\n\nOne way to avoid it (but still able to use the common fragments) is to add hw:watchdog_action key to the flavor that is used in the test as the target of the resize. \n\n  extra_specs \u003d {\n    \"extra_specs\": {\n      \"hw:watchdog_action\": \"reset\"}}\n  \n  self.admin_api.post_extra_spec(\u003cflavor_id\u003e, extra_specs)\n\nThen we can discuss the extension of the json_ref with key removals during override separately in another patch.","commit_id":"47c4d8058afd8ea88a8b76bda10a3405ffe05812"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"95b5763009d048fb5ea65889061ffd15a21e2bfc","unresolved":false,"context_lines":[{"line_number":5430,"context_line":"        self.assertEqual(self.rt.compute_nodes[NODENAME].memory_mb_used,"},{"line_number":5431,"context_line":"                         memory_mb_used + new_instance_type_ref.memory_mb)"},{"line_number":5432,"context_line":""},{"line_number":5433,"context_line":"        class InstanceUuidMatcher(object):"},{"line_number":5434,"context_line":"            def __init__(self, uuid):"},{"line_number":5435,"context_line":"                self.uuid \u003d uuid"},{"line_number":5436,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_7611135d","line":5433,"updated":"2017-07-18 13:32:19.000000000","message":"Something even more generic is already available here\nhttps://github.com/openstack/nova/blob/master/nova/tests/unit/utils.py#L297","commit_id":"fc84457ea880b1ae4877c02b1568f69b9d47e8c8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e7ccc196374315530a24c2c122d855497082764","unresolved":false,"context_lines":[{"line_number":5473,"context_line":"    def test_resize_instance_forced_shutdown(self):"},{"line_number":5474,"context_line":"        self._test_resize_instance(clean_shutdown\u003dFalse)"},{"line_number":5475,"context_line":""},{"line_number":5476,"context_line":"    @mock.patch.object(objects.BlockDeviceMappingList, \u0027get_by_instance_uuid\u0027)"},{"line_number":5477,"context_line":"    @mock.patch.object(nova.compute.utils, \u0027notify_about_instance_action\u0027)"},{"line_number":5478,"context_line":"    def _test_confirm_resize(self, mock_notify, mock_get_by_instance_uuid,"},{"line_number":5479,"context_line":"                             power_on, numa_topology\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_e86fb5f9","line":5476,"updated":"2018-01-23 22:45:02.000000000","message":"Why is this needed if we load up the BDMs via the instance payload and we\u0027ve already mocked out notify_about_instance_action? Oh I guess this is needed because this test isn\u0027t just running confirm_resize, it\u0027s hitting all of the resize methods so it\u0027s also running the other notifications.","commit_id":"8ec0b4390401ce62cab0ea9b3786dc487e26c9f7"}]}
