)]}'
{"doc/notification_samples/instance-resume-end.json":[{"author":{"_account_id":21111,"name":"STEW TY","email":"punsoca@gmail.com","username":"stewie925"},"change_message_id":"61fe34a070781ca97c71ac5e5baed291073f23f3","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            \"reservation_id\":\"r-npxv0e40\","},{"line_number":36,"context_line":"            \"state\":\"active\","},{"line_number":37,"context_line":"            \"task_state\":null,"},{"line_number":38,"context_line":"            \"power_state\":\"pending\","},{"line_number":39,"context_line":"            \"tenant_id\":\"6f70656e737461636b20342065766572\","},{"line_number":40,"context_line":"            \"terminated_at\":null,"},{"line_number":41,"context_line":"            \"flavor\": {"}],"source_content_type":"application/json","patch_set":5,"id":"1a95cdbc_f6c65415","line":38,"range":{"start_line":38,"start_character":27,"end_line":38,"end_character":34},"updated":"2016-10-04 21:32:21.000000000","message":"changed to match the instance-resume-end.json generated by the test_instance, although I believe the power_state should be \"running\".  Please advise.","commit_id":"ebb79a56db2e2920cff4fdfcf5f0f0cc71c4fd35"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d2bccf39674f47642ef779d1c433f5481d01226d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            \"reservation_id\":\"r-npxv0e40\","},{"line_number":36,"context_line":"            \"state\":\"active\","},{"line_number":37,"context_line":"            \"task_state\":null,"},{"line_number":38,"context_line":"            \"power_state\":\"pending\","},{"line_number":39,"context_line":"            \"tenant_id\":\"6f70656e737461636b20342065766572\","},{"line_number":40,"context_line":"            \"terminated_at\":null,"},{"line_number":41,"context_line":"            \"flavor\": {"}],"source_content_type":"application/json","patch_set":5,"id":"1a95cdbc_55013037","line":38,"range":{"start_line":38,"start_character":27,"end_line":38,"end_character":34},"in_reply_to":"1a95cdbc_3fa9e824","updated":"2016-10-07 12:52:48.000000000","message":"I was not able to reproduce the problem in devstack. So I think this behavior is caused by the fake virt driver the functional test environment is using.","commit_id":"ebb79a56db2e2920cff4fdfcf5f0f0cc71c4fd35"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0170896a257b47f4b1b464b15a9456c909868f0f","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            \"reservation_id\":\"r-npxv0e40\","},{"line_number":36,"context_line":"            \"state\":\"active\","},{"line_number":37,"context_line":"            \"task_state\":null,"},{"line_number":38,"context_line":"            \"power_state\":\"pending\","},{"line_number":39,"context_line":"            \"tenant_id\":\"6f70656e737461636b20342065766572\","},{"line_number":40,"context_line":"            \"terminated_at\":null,"},{"line_number":41,"context_line":"            \"flavor\": {"}],"source_content_type":"application/json","patch_set":5,"id":"1a95cdbc_3fa9e824","line":38,"range":{"start_line":38,"start_character":27,"end_line":38,"end_character":34},"in_reply_to":"1a95cdbc_f6c65415","updated":"2016-10-07 10:26:12.000000000","message":"It seems that the first suspend-restore brings the instance to running state but the second suspend-restore only brings to pending.\n\nI removed the restore from the suspend function, then I removed the suspend from your restore function then I moved your restore function right after to the restore function in the action list and now the restore notification shows \u0027running\u0027 power state.\n\nThen I put another suspend and restore function call to the end of the action list and in that the suspend end brought the instance to pending only.\n\nI suggest to put your restore test after the suspend test in the list and remove the restore action from the suspend and remove the suspend action from the restore. This way the power state will be running as expected.\n\nCould you please try what happens in a devstack if you suspend / restore an instance twice? If the pending power state is reproducible there as well then please file a bug.","commit_id":"ebb79a56db2e2920cff4fdfcf5f0f0cc71c4fd35"}],"nova/compute/manager.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"beed8c20724ab66ff269e4402bc1b08ee330085f","unresolved":false,"context_lines":[{"line_number":4132,"context_line":""},{"line_number":4133,"context_line":"        self._notify_about_instance_usage(context, instance, \u0027resume.start\u0027)"},{"line_number":4134,"context_line":"        compute_utils.notify_about_instance_action(context, instance,"},{"line_number":4135,"context_line":"                self.host, action\u003dfields.NotificationAction.RESUME,"},{"line_number":4136,"context_line":"                phase\u003dfields.NotificationPhase.START)"},{"line_number":4137,"context_line":""},{"line_number":4138,"context_line":"        network_info \u003d self.network_api.get_instance_nw_info(context, instance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_9a33eaaa","line":4135,"updated":"2016-10-07 10:26:04.000000000","message":"One less indent is enough","commit_id":"9327383a92cc9c4b715892cc999ded0a2ed53e61"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"beed8c20724ab66ff269e4402bc1b08ee330085f","unresolved":false,"context_lines":[{"line_number":4154,"context_line":"        instance.save(expected_task_state\u003dtask_states.RESUMING)"},{"line_number":4155,"context_line":"        self._notify_about_instance_usage(context, instance, \u0027resume.end\u0027)"},{"line_number":4156,"context_line":"        compute_utils.notify_about_instance_action(context, instance,"},{"line_number":4157,"context_line":"                self.host, action\u003dfields.NotificationAction.RESUME,"},{"line_number":4158,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":4159,"context_line":""},{"line_number":4160,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a95cdbc_ba242660","line":4157,"updated":"2016-10-07 10:26:04.000000000","message":"One less indent is enough","commit_id":"9327383a92cc9c4b715892cc999ded0a2ed53e61"}],"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":"eab809ec5108191aa73e2ed2367f3358f7e903a5","unresolved":false,"context_lines":[{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        self.flags(reclaim_instance_interval\u003d0)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _test_resume_server(self, server):"},{"line_number":355,"context_line":"        self.flags(reclaim_instance_interval\u003d30)"},{"line_number":356,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"},{"line_number":357,"context_line":"        self._wait_for_state_change(self.api, server, \u0027SUSPENDED\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_3f81b88f","line":354,"range":{"start_line":354,"start_character":8,"end_line":354,"end_character":27},"updated":"2016-10-03 11:50:20.000000000","message":"You have to include this test to the list of steps in line 41 to make sure that this test runs.","commit_id":"64e2b8da3c3b06996cba95733e3af5fd0b58791d"},{"author":{"_account_id":21111,"name":"STEW TY","email":"punsoca@gmail.com","username":"stewie925"},"change_message_id":"d6f6976af6b8c637f7d292c0fad864a5af85ad04","unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def _test_resume_server(self, server):"},{"line_number":356,"context_line":"        self.flags(reclaim_instance_interval\u003d30)"},{"line_number":357,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"},{"line_number":358,"context_line":"        self._wait_for_state_change(self.api, server, \u0027SUSPENDED\u0027)"},{"line_number":359,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], {\u0027resume\u0027: {}})"},{"line_number":360,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a95cdbc_70f2569c","line":357,"range":{"start_line":357,"start_character":0,"end_line":357,"end_character":44},"updated":"2016-10-04 17:16:50.000000000","message":"leaving this code as is, I got the following error:\n\nAssertionError: Wait for state change failed, expected_status\u003dSUSPENDED, actual_status\u003dSOFT_DELETED\n\nso I changed that line of code to the following to put the instance in suspend mode:\n\n self.api.post_server_action(server[\u0027id\u0027], {\u0027suspend\u0027: {}})\n\n(note: changes made locally - not yet committed)","commit_id":"93636fa2831b72c1904faeeb53059899dd8226d5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2fbb4f513bbadd3d70117a0c2d2c5f99a6641200","unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def _test_resume_server(self, server):"},{"line_number":356,"context_line":"        self.flags(reclaim_instance_interval\u003d30)"},{"line_number":357,"context_line":"        self.api.delete_server(server[\u0027id\u0027])"},{"line_number":358,"context_line":"        self._wait_for_state_change(self.api, server, \u0027SUSPENDED\u0027)"},{"line_number":359,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], {\u0027resume\u0027: {}})"},{"line_number":360,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a95cdbc_0e200e9b","line":357,"range":{"start_line":357,"start_character":0,"end_line":357,"end_character":44},"in_reply_to":"1a95cdbc_70f2569c","updated":"2016-10-04 17:28:25.000000000","message":"For me the following works nicely:\n\npost \u003d {\u0027suspend\u0027: {}}\nself.api.post_server_action(server[\u0027id\u0027], post)\nself._wait_for_state_change(self.admin_api, server, \u0027SUSPENDED\u0027)\n\nself.api.post_server_action(server[\u0027id\u0027], {\u0027resume\u0027: {}})\nself._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)\n\nself.assertEqual(4, len(fake_notifier.VERSIONED_NOTIFICATIONS))\n\nAnd then the first two notifications are due to the suspend action and then the third and forth notifications are the resume notifications you want to assert.","commit_id":"93636fa2831b72c1904faeeb53059899dd8226d5"},{"author":{"_account_id":21111,"name":"STEW TY","email":"punsoca@gmail.com","username":"stewie925"},"change_message_id":"d6f6976af6b8c637f7d292c0fad864a5af85ad04","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], {\u0027resume\u0027: {}})"},{"line_number":360,"context_line":"        self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        self.assertEqual(2, len(fake_notifier.VERSIONED_NOTIFICATIONS))"},{"line_number":363,"context_line":"        self._verify_notification("},{"line_number":364,"context_line":"            \u0027instance-resume-start\u0027,"},{"line_number":365,"context_line":"            replacements\u003d{"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a95cdbc_ddd41e49","line":362,"range":{"start_line":362,"start_character":0,"end_line":362,"end_character":71},"updated":"2016-10-04 17:16:50.000000000","message":"after making the change in line 357 to post server action \u003d \u0027suspend\u0027, encountered error in Line 362 where i got the assertion failure  2!\u003d4.\n\nexpecting two VERSIONED_NOTIFICATIONS but actual is 4.\n\nchanges made locally not yet committed.  still figuring it out.","commit_id":"93636fa2831b72c1904faeeb53059899dd8226d5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4bb91666dbc15dbfc258d827bf362341909a7f21","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                \u0027uuid\u0027: server[\u0027id\u0027]},"},{"line_number":398,"context_line":"            actual\u003dfake_notifier.VERSIONED_NOTIFICATIONS[1])"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"    def _test_resume_server(self, server):"},{"line_number":401,"context_line":"        post \u003d {\u0027resume\u0027: None}"},{"line_number":402,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"},{"line_number":403,"context_line":"        self._wait_for_state_change(self.admin_api, server, \u0027ACTIVE\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_d6879510","line":400,"updated":"2016-10-21 01:39:44.000000000","message":"Let\u0027s move this test right after _test_suspend_server please because these tests go in order and are sharing the same server and performing actions on them. It looks odd to have the tests go from suspend to pause.","commit_id":"822919dd2ed1348b4d81f9c9b2e6c781d3a320fe"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4bb91666dbc15dbfc258d827bf362341909a7f21","unresolved":false,"context_lines":[{"line_number":2541,"context_line":"        self.assertEqual(msg.event_type,"},{"line_number":2542,"context_line":"                         \u0027compute.instance.resume.end\u0027)"},{"line_number":2543,"context_line":"        mock_notify.assert_has_calls(["},{"line_number":2544,"context_line":"        mock.call(context, instance, \u0027fake-mini\u0027,"},{"line_number":2545,"context_line":"                  action\u003d\u0027resume\u0027, phase\u003d\u0027start\u0027),"},{"line_number":2546,"context_line":"        mock.call(context, instance, \u0027fake-mini\u0027,"},{"line_number":2547,"context_line":"                  action\u003d\u0027resume\u0027, phase\u003d\u0027end\u0027)])"},{"line_number":2548,"context_line":"        self.compute.terminate_instance(self.context, instance, [], [])"},{"line_number":2549,"context_line":""},{"line_number":2550,"context_line":"    def test_resume_no_old_state(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_9676fd3c","line":2547,"range":{"start_line":2544,"start_character":8,"end_line":2547,"end_character":49},"updated":"2016-10-21 01:39:44.000000000","message":"nit: please indent this one tab.","commit_id":"822919dd2ed1348b4d81f9c9b2e6c781d3a320fe"}]}
