)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4f307c5f73b81f00ca25f92ddcec66f9ca405861","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     David Rabel \u003crabel@b1-systems.de\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-16 19:18:17 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adds support for gracefull shutdown for VMware instances"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I40643e9d358be89c87a0311b1c1fd7718ec75361"},{"line_number":10,"context_line":"Closes-Bug: #1377781"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f287b81_215aad4e","line":7,"range":{"start_line":7,"start_character":17,"end_line":7,"end_character":26},"updated":"2017-08-24 13:41:51.000000000","message":"nit: graceful","commit_id":"6a1d7d1c6edfe8e583dbac7a68bb812019650eab"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"42209538c4d5f679700a9b8ae3a57d3a1954722f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     David Rabel \u003crabel@b1-systems.de\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-16 19:18:17 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adds support for gracefull shutdown for VMware instances"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I40643e9d358be89c87a0311b1c1fd7718ec75361"},{"line_number":10,"context_line":"Closes-Bug: #1377781"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f287b81_77ff5401","line":7,"range":{"start_line":7,"start_character":17,"end_line":7,"end_character":26},"in_reply_to":"7f287b81_215aad4e","updated":"2017-08-24 15:02:21.000000000","message":"Done","commit_id":"6a1d7d1c6edfe8e583dbac7a68bb812019650eab"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"5c087898ad81460d1acff3e90051e1bc74797b90","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     David Rabel \u003crabel@b1-systems.de\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-09-01 07:32:16 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adds support for graceful shutdown for VMware instances"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I40643e9d358be89c87a0311b1c1fd7718ec75361"},{"line_number":10,"context_line":"Closes-Bug: #1377781"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7f287b81_7cdbfb4e","line":7,"updated":"2017-09-01 07:42:45.000000000","message":"nit: \"VMware: add support for graceful shutdown of instances\"","commit_id":"c59563c38fb99cc069b1bb3a44356768c379bb07"}],"nova/tests/unit/virt/vmwareapi/test_vmops.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"cacf75940d04aa95181fec57baaa04b43db3ff77","unresolved":false,"context_lines":[{"line_number":520,"context_line":"    @mock.patch.object(time, \u0027sleep\u0027)"},{"line_number":521,"context_line":"    def _test_clean_shutdown(self, mock_sleep,"},{"line_number":522,"context_line":"                             timeout, retry_interval,"},{"line_number":523,"context_line":"                             returnsOn, returnsOff,"},{"line_number":524,"context_line":"                             vmware_tools_status,"},{"line_number":525,"context_line":"                             succeeds):"},{"line_number":526,"context_line":"        \"\"\"Test the _clean_shutdown method"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_5aaf1394","line":523,"updated":"2017-09-20 11:29:00.000000000","message":"camelCase isn\u0027t the norm in python in general, nor openstack code, but you\u0027ve used it throughout this test","commit_id":"5084b0159d0dee68cf0e64a53bca80c9a653cf22"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"cacf75940d04aa95181fec57baaa04b43db3ff77","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        :param timeout: timeout before soft shutdown is considered a fail"},{"line_number":529,"context_line":"        :param retry_interval: time between rechecking instance power state"},{"line_number":530,"context_line":"        :param retunrsOn: how often the instance is reported as poweredOn"},{"line_number":531,"context_line":"        :param returnsOff: how often the instance is reported as poweredOff"},{"line_number":532,"context_line":"        :param vmware_tools_status: Status of vmware tools"},{"line_number":533,"context_line":"        :param succeeds: the expected result"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_3a945f44","line":530,"range":{"start_line":530,"start_character":15,"end_line":530,"end_character":24},"updated":"2017-09-20 11:29:00.000000000","message":"returnsOn","commit_id":"5084b0159d0dee68cf0e64a53bca80c9a653cf22"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b46c54b23fbf4782b89c04690f22b985e66de3f1","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from oslo_vmware.objects import datastore as ds_obj"},{"line_number":22,"context_line":"from oslo_vmware import vim_util as vutil"},{"line_number":23,"context_line":"import six"},{"line_number":24,"context_line":"import time"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from nova.compute import power_state"},{"line_number":27,"context_line":"from nova import context"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f4e5783_212bd030","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":11},"updated":"2017-10-12 04:56:58.000000000","message":"It should be just after line 14.\n\nhttps://docs.openstack.org/hacking/latest/user/hacking.html#import-order-template","commit_id":"cc4ce0bbe503de3f5d5a69eb622269447b7ee0f4"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"679eae2bd56b09cab545c600a331f9674fe31b76","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from oslo_vmware.objects import datastore as ds_obj"},{"line_number":22,"context_line":"from oslo_vmware import vim_util as vutil"},{"line_number":23,"context_line":"import six"},{"line_number":24,"context_line":"import time"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from nova.compute import power_state"},{"line_number":27,"context_line":"from nova import context"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f4e5783_7da4c4b9","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":11},"in_reply_to":"5f4e5783_212bd030","updated":"2017-10-12 11:11:53.000000000","message":"Seems that the tests have a different opinion on this: http://logs.openstack.org/69/494169/10/check/openstack-tox-pep8/fd41419/job-output.txt.gz#_2017-10-12_06_39_12_169928\nSo what do we do here?","commit_id":"cc4ce0bbe503de3f5d5a69eb622269447b7ee0f4"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b46c54b23fbf4782b89c04690f22b985e66de3f1","unresolved":false,"context_lines":[{"line_number":580,"context_line":"                                                self._instance)"},{"line_number":581,"context_line":"        return"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def test_clean_shutdown_first_time(self):"},{"line_number":584,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":585,"context_line":"                                  retry_interval\u003d3,"},{"line_number":586,"context_line":"                                  returnsOn\u003d1,"},{"line_number":587,"context_line":"                                  returnsOff\u003d1,"},{"line_number":588,"context_line":"                                  vmware_tools_status\u003d\"toolsOk\","},{"line_number":589,"context_line":"                                  succeeds\u003dTrue)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def test_clean_shutdown_second_time(self):"},{"line_number":592,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":593,"context_line":"                                  retry_interval\u003d3,"},{"line_number":594,"context_line":"                                  returnsOn\u003d2,"},{"line_number":595,"context_line":"                                  returnsOff\u003d1,"},{"line_number":596,"context_line":"                                  vmware_tools_status\u003d\"toolsOk\","},{"line_number":597,"context_line":"                                  succeeds\u003dTrue)"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def test_clean_shutdown_timeout(self):"},{"line_number":600,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":601,"context_line":"                                  retry_interval\u003d3,"},{"line_number":602,"context_line":"                                  returnsOn\u003d4,"},{"line_number":603,"context_line":"                                  returnsOff\u003d0,"},{"line_number":604,"context_line":"                                  vmware_tools_status\u003d\"toolsOk\","},{"line_number":605,"context_line":"                                  succeeds\u003dFalse)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def test_clean_shutdown_already_off(self):"},{"line_number":608,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":609,"context_line":"                                  retry_interval\u003d3,"},{"line_number":610,"context_line":"                                  returnsOn\u003d0,"},{"line_number":611,"context_line":"                                  returnsOff\u003d1,"},{"line_number":612,"context_line":"                                  vmware_tools_status\u003d\"toolsOk\","},{"line_number":613,"context_line":"                                  succeeds\u003dFalse)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def test_clean_shutdown_no_vwaretools(self):"},{"line_number":616,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":617,"context_line":"                                  retry_interval\u003d3,"},{"line_number":618,"context_line":"                                  returnsOn\u003d1,"},{"line_number":619,"context_line":"                                  returnsOff\u003d0,"},{"line_number":620,"context_line":"                                  vmware_tools_status\u003d\"toolsNotOk\","},{"line_number":621,"context_line":"                                  succeeds\u003dFalse)"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    def _test_finish_migration(self, power_on\u003dTrue, resize_instance\u003dFalse):"},{"line_number":624,"context_line":"        with test.nested("}],"source_content_type":"text/x-python","patch_set":9,"id":"5f4e5783_e1f378e6","line":621,"range":{"start_line":583,"start_character":0,"end_line":621,"end_character":49},"updated":"2017-10-12 04:56:58.000000000","message":"You had better use ddt like:\n\nhttps://github.com/openstack/nova/blob/64635ad4a5f60a79e1ec2d5369a8f84bfeccb7e4/nova/tests/unit/virt/libvirt/test_driver.py#L11039-L11046","commit_id":"cc4ce0bbe503de3f5d5a69eb622269447b7ee0f4"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"f3b028b90eaaeef8a676271a78e1f5089cd66b0a","unresolved":false,"context_lines":[{"line_number":580,"context_line":"                                                self._instance)"},{"line_number":581,"context_line":"        return"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def test_clean_shutdown_first_time(self):"},{"line_number":584,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":585,"context_line":"                                  retry_interval\u003d3,"},{"line_number":586,"context_line":"                                  returnsOn\u003d1,"},{"line_number":587,"context_line":"                                  returnsOff\u003d1,"},{"line_number":588,"context_line":"                                  vmware_tools_status\u003d\"toolsOk\","},{"line_number":589,"context_line":"                                  succeeds\u003dTrue)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def test_clean_shutdown_second_time(self):"},{"line_number":592,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":593,"context_line":"                                  retry_interval\u003d3,"},{"line_number":594,"context_line":"                                  returnsOn\u003d2,"},{"line_number":595,"context_line":"                                  returnsOff\u003d1,"},{"line_number":596,"context_line":"                                  vmware_tools_status\u003d\"toolsOk\","},{"line_number":597,"context_line":"                                  succeeds\u003dTrue)"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    def test_clean_shutdown_timeout(self):"},{"line_number":600,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":601,"context_line":"                                  retry_interval\u003d3,"},{"line_number":602,"context_line":"                                  returnsOn\u003d4,"},{"line_number":603,"context_line":"                                  returnsOff\u003d0,"},{"line_number":604,"context_line":"                                  vmware_tools_status\u003d\"toolsOk\","},{"line_number":605,"context_line":"                                  succeeds\u003dFalse)"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def test_clean_shutdown_already_off(self):"},{"line_number":608,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":609,"context_line":"                                  retry_interval\u003d3,"},{"line_number":610,"context_line":"                                  returnsOn\u003d0,"},{"line_number":611,"context_line":"                                  returnsOff\u003d1,"},{"line_number":612,"context_line":"                                  vmware_tools_status\u003d\"toolsOk\","},{"line_number":613,"context_line":"                                  succeeds\u003dFalse)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def test_clean_shutdown_no_vwaretools(self):"},{"line_number":616,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"},{"line_number":617,"context_line":"                                  retry_interval\u003d3,"},{"line_number":618,"context_line":"                                  returnsOn\u003d1,"},{"line_number":619,"context_line":"                                  returnsOff\u003d0,"},{"line_number":620,"context_line":"                                  vmware_tools_status\u003d\"toolsNotOk\","},{"line_number":621,"context_line":"                                  succeeds\u003dFalse)"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    def _test_finish_migration(self, power_on\u003dTrue, resize_instance\u003dFalse):"},{"line_number":624,"context_line":"        with test.nested("}],"source_content_type":"text/x-python","patch_set":9,"id":"5f4e5783_0428e2df","line":621,"range":{"start_line":583,"start_character":0,"end_line":621,"end_character":49},"in_reply_to":"5f4e5783_e1f378e6","updated":"2017-10-12 06:27:18.000000000","message":"Thanks for the hint. But can we just leave it as it is for now?","commit_id":"cc4ce0bbe503de3f5d5a69eb622269447b7ee0f4"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"fa462548a9bcba31e824951a29746aa4b5edf735","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from oslo_vmware.objects import datastore as ds_obj"},{"line_number":22,"context_line":"from oslo_vmware import vim_util as vutil"},{"line_number":23,"context_line":"import six"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from nova.compute import power_state"},{"line_number":26,"context_line":"from nova import context"},{"line_number":27,"context_line":"from nova import exception"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f4e5783_ce1bfc18","side":"PARENT","line":24,"updated":"2017-10-12 13:02:01.000000000","message":"you must not delete this empty line, it separates openstack lib modules from nova modules","commit_id":"fefff942ef5f8b3b8b209be1554daba28865d73a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d8257b7631d1a0b35d1007db46c9a8dab07cbcdd","unresolved":false,"context_lines":[{"line_number":521,"context_line":"    @mock.patch.object(time, \u0027sleep\u0027)"},{"line_number":522,"context_line":"    def _test_clean_shutdown(self, mock_sleep,"},{"line_number":523,"context_line":"                             timeout, retry_interval,"},{"line_number":524,"context_line":"                             returnsOn, returnsOff,"},{"line_number":525,"context_line":"                             vmware_tools_status,"},{"line_number":526,"context_line":"                             succeeds):"},{"line_number":527,"context_line":"        \"\"\"Test the _clean_shutdown method"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f4b6375_27f1f402","line":524,"range":{"start_line":524,"start_character":29,"end_line":524,"end_character":38},"updated":"2017-10-27 15:59:22.000000000","message":"please use underscore_separated variable naming, not camelCase.","commit_id":"3bb9db9eb2ffe8fac1127384b416dbff103dcd34"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d8257b7631d1a0b35d1007db46c9a8dab07cbcdd","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        vm_ref \u003d mock.Mock()"},{"line_number":538,"context_line":"        return_props \u003d []"},{"line_number":539,"context_line":"        expected_methods \u003d [\u0027get_object_properties_dict\u0027]"},{"line_number":540,"context_line":"        propsOn \u003d {\u0027runtime.powerState\u0027: \u0027poweredOn\u0027,"},{"line_number":541,"context_line":"                  \u0027summary.guest.toolsStatus\u0027: vmware_tools_status,"},{"line_number":542,"context_line":"                  \u0027summary.guest.toolsRunningStatus\u0027: \u0027guestToolsRunning\u0027}"},{"line_number":543,"context_line":"        propsOff \u003d {\u0027runtime.powerState\u0027: \u0027poweredOff\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f4b6375_47d51043","line":540,"range":{"start_line":540,"start_character":8,"end_line":540,"end_character":15},"updated":"2017-10-27 15:59:22.000000000","message":"ditto about the camelCasing used for various variables here.","commit_id":"3bb9db9eb2ffe8fac1127384b416dbff103dcd34"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d8257b7631d1a0b35d1007db46c9a8dab07cbcdd","unresolved":false,"context_lines":[{"line_number":544,"context_line":"                   \u0027summary.guest.toolsStatus\u0027: vmware_tools_status,"},{"line_number":545,"context_line":"                   \u0027summary.guest.toolsRunningStatus\u0027: \u0027guestToolsRunning\u0027}"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"        # initialize expected instance methods and returned properties"},{"line_number":548,"context_line":"        if vmware_tools_status \u003d\u003d \"toolsOk\":"},{"line_number":549,"context_line":"            if returnsOn \u003e 0:"},{"line_number":550,"context_line":"                expected_methods.append(\u0027ShutdownGuest\u0027)"},{"line_number":551,"context_line":"                for On in range(returnsOn + 1):"},{"line_number":552,"context_line":"                    return_props.append(propsOn)"},{"line_number":553,"context_line":"                for On in range(returnsOn):"},{"line_number":554,"context_line":"                    expected_methods.append(\u0027get_object_properties_dict\u0027)"},{"line_number":555,"context_line":"            for Off in range(returnsOff):"},{"line_number":556,"context_line":"                return_props.append(propsOff)"},{"line_number":557,"context_line":"                if returnsOn \u003e 0:"},{"line_number":558,"context_line":"                    expected_methods.append(\u0027get_object_properties_dict\u0027)"},{"line_number":559,"context_line":"        else:"},{"line_number":560,"context_line":"            return_props.append(propsOff)"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"        def fake_call_method(module, method, *args, **kwargs):"},{"line_number":563,"context_line":"            expected_method \u003d expected_methods.pop(0)"},{"line_number":564,"context_line":"            self.assertEqual(expected_method, method)"},{"line_number":565,"context_line":"            if expected_method \u003d\u003d \u0027get_object_properties_dict\u0027:"},{"line_number":566,"context_line":"                props \u003d return_props.pop(0)"},{"line_number":567,"context_line":"                return props"},{"line_number":568,"context_line":"            elif expected_method \u003d\u003d \u0027ShutdownGuest\u0027:"},{"line_number":569,"context_line":"                return"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        with test.nested("},{"line_number":572,"context_line":"                mock.patch.object(vm_util, \u0027get_vm_ref\u0027, return_value\u003dvm_ref),"},{"line_number":573,"context_line":"                mock.patch.object(self._session, \u0027_call_method\u0027,"},{"line_number":574,"context_line":"                                  side_effect\u003dfake_call_method)"},{"line_number":575,"context_line":"        ) as (mock_get_vm_ref, mock_call_method):"},{"line_number":576,"context_line":"            result \u003d self._vmops._clean_shutdown(instance, timeout,"},{"line_number":577,"context_line":"                                                 retry_interval)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"        self.assertEqual(succeeds, result)"},{"line_number":580,"context_line":"        mock_get_vm_ref.assert_called_once_with(self._session,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f4b6375_67ba4ce2","line":577,"range":{"start_line":547,"start_character":0,"end_line":577,"end_character":64},"updated":"2017-10-27 15:59:22.000000000","message":"I know this is how many of the tests in the vmops module are structured, but by doing this kind of stuff, it makes the test very difficult to read and understand. Instead, in the future, consider writing separate test methods with explicit mock assertions instead of a test utility method that has a bunch of conditionals in it like this.\n\nHiding implementation details in test utility methods in this way may reduce the total lines of code and seem to \"DRY\" the test code up, but in actuality, all this does is make the review of the tests more difficult and introduce a greater surface area for bugs to creep in (because there\u0027s a greater surface area of code branches and conditionals in the test utility method itself).","commit_id":"3bb9db9eb2ffe8fac1127384b416dbff103dcd34"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d8257b7631d1a0b35d1007db46c9a8dab07cbcdd","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        self.assertEqual(succeeds, result)"},{"line_number":580,"context_line":"        mock_get_vm_ref.assert_called_once_with(self._session,"},{"line_number":581,"context_line":"                                                self._instance)"},{"line_number":582,"context_line":"        return"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"    def test_clean_shutdown_first_time(self):"},{"line_number":585,"context_line":"        self._test_clean_shutdown(timeout\u003d10,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f4b6375_a76ba483","line":582,"range":{"start_line":582,"start_character":8,"end_line":582,"end_character":14},"updated":"2017-10-27 15:59:22.000000000","message":"this return statement isn\u0027t necessary...","commit_id":"3bb9db9eb2ffe8fac1127384b416dbff103dcd34"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"170235a3cc4355728accac32f4abdbd10cb881f1","unresolved":false,"context_lines":[{"line_number":548,"context_line":"        if vmware_tools_status \u003d\u003d \"toolsOk\":"},{"line_number":549,"context_line":"            if returns_on \u003e 0:"},{"line_number":550,"context_line":"                expected_methods.append(\u0027ShutdownGuest\u0027)"},{"line_number":551,"context_line":"                for On in range(returns_on + 1):"},{"line_number":552,"context_line":"                    return_props.append(props_on)"},{"line_number":553,"context_line":"                for On in range(returns_on):"},{"line_number":554,"context_line":"                    expected_methods.append(\u0027get_object_properties_dict\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f4b6375_cd9da158","line":551,"range":{"start_line":551,"start_character":20,"end_line":551,"end_character":22},"updated":"2017-10-27 17:22:15.000000000","message":"just call the variable x since you\u0027re just using it as an index/enumerator.","commit_id":"eafdf797d064d37b47383e27513512b371390499"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"170235a3cc4355728accac32f4abdbd10cb881f1","unresolved":false,"context_lines":[{"line_number":550,"context_line":"                expected_methods.append(\u0027ShutdownGuest\u0027)"},{"line_number":551,"context_line":"                for On in range(returns_on + 1):"},{"line_number":552,"context_line":"                    return_props.append(props_on)"},{"line_number":553,"context_line":"                for On in range(returns_on):"},{"line_number":554,"context_line":"                    expected_methods.append(\u0027get_object_properties_dict\u0027)"},{"line_number":555,"context_line":"            for Off in range(returns_off):"},{"line_number":556,"context_line":"                return_props.append(props_off)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f4b6375_adaa656e","line":553,"range":{"start_line":553,"start_character":20,"end_line":553,"end_character":22},"updated":"2017-10-27 17:22:15.000000000","message":"ditto","commit_id":"eafdf797d064d37b47383e27513512b371390499"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"170235a3cc4355728accac32f4abdbd10cb881f1","unresolved":false,"context_lines":[{"line_number":552,"context_line":"                    return_props.append(props_on)"},{"line_number":553,"context_line":"                for On in range(returns_on):"},{"line_number":554,"context_line":"                    expected_methods.append(\u0027get_object_properties_dict\u0027)"},{"line_number":555,"context_line":"            for Off in range(returns_off):"},{"line_number":556,"context_line":"                return_props.append(props_off)"},{"line_number":557,"context_line":"                if returns_on \u003e 0:"},{"line_number":558,"context_line":"                    expected_methods.append(\u0027get_object_properties_dict\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f4b6375_8da7a9a8","line":555,"range":{"start_line":555,"start_character":16,"end_line":555,"end_character":19},"updated":"2017-10-27 17:22:15.000000000","message":"ditto","commit_id":"eafdf797d064d37b47383e27513512b371390499"}],"nova/virt/vmwareapi/driver.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"630df361231cedc1abdc51e3ec9f6c5c39a6a42d","unresolved":false,"context_lines":[{"line_number":427,"context_line":""},{"line_number":428,"context_line":"    def power_off(self, instance, timeout\u003d0, retry_interval\u003d0):"},{"line_number":429,"context_line":"        \"\"\"Power off the specified instance.\"\"\""},{"line_number":430,"context_line":"        self._vmops.power_off(instance, timeout, retry_interval)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def power_on(self, context, instance, network_info,"},{"line_number":433,"context_line":"                 block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_f3c4ba94","line":430,"updated":"2017-10-18 09:06:58.000000000","message":"Not sure I see this bit unit tested anywhere.","commit_id":"5ed819c40214d8baccedeaf2a7558e426bdc3b82"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"0950f4fd76370d9230db1330a29ce09c304ec7f5","unresolved":false,"context_lines":[{"line_number":1254,"context_line":"                                            retry_interval):"},{"line_number":1255,"context_line":"            return"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        LOG.info(\"Performing Hard shutdown on instance\","},{"line_number":1258,"context_line":"                 instance\u003dinstance)"},{"line_number":1259,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1260,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_eaa58005","line":1257,"updated":"2017-08-25 09:45:34.000000000","message":"there is a debug log statement in power_off_instance which has to be removed if we have this info message","commit_id":"067aedaeb7f526392f26694740a2f4160f60a067"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"17f2f8a5a21e5b41499ce0fc5e3fe88c127a519a","unresolved":false,"context_lines":[{"line_number":1254,"context_line":"                                            retry_interval):"},{"line_number":1255,"context_line":"            return"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        LOG.info(\"Performing Hard shutdown on instance\","},{"line_number":1258,"context_line":"                 instance\u003dinstance)"},{"line_number":1259,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1260,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_76b9792c","line":1257,"in_reply_to":"7f287b81_eaa58005","updated":"2017-08-25 12:23:45.000000000","message":"But power_off_instance is also called further down.\n\nIt\u0027s a little difficult here, because we wanted to have a different log message for hard and soft shutdown process. Mainly because initiating soft shutdown does not mean an instant shutdown. But then again in the hard shutdown scenario there is just the shutdown and two log messages. I\u0027m not sure how to handle this.","commit_id":"067aedaeb7f526392f26694740a2f4160f60a067"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"0950f4fd76370d9230db1330a29ce09c304ec7f5","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                wait_time \u003d min(retry_interval, timeout)"},{"line_number":1287,"context_line":"                props \u003d self._get_instance_props(vm_ref)"},{"line_number":1288,"context_line":"                try:"},{"line_number":1289,"context_line":"                    if props.get(\"runtime.powerState\") in [\"poweredOff\"]:"},{"line_number":1290,"context_line":"                        LOG.info(\"Soft shutdown succeeded.\","},{"line_number":1291,"context_line":"                                 instance\u003dinstance)"},{"line_number":1292,"context_line":"                        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_6a1d1065","line":1289,"updated":"2017-08-25 09:45:34.000000000","message":"why this is in a try-except block? maybe you\u0027d like to move _get_instance_props here","commit_id":"067aedaeb7f526392f26694740a2f4160f60a067"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"17f2f8a5a21e5b41499ce0fc5e3fe88c127a519a","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                wait_time \u003d min(retry_interval, timeout)"},{"line_number":1287,"context_line":"                props \u003d self._get_instance_props(vm_ref)"},{"line_number":1288,"context_line":"                try:"},{"line_number":1289,"context_line":"                    if props.get(\"runtime.powerState\") in [\"poweredOff\"]:"},{"line_number":1290,"context_line":"                        LOG.info(\"Soft shutdown succeeded.\","},{"line_number":1291,"context_line":"                                 instance\u003dinstance)"},{"line_number":1292,"context_line":"                        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_d6f6edf9","line":1289,"in_reply_to":"7f287b81_6a1d1065","updated":"2017-08-25 12:23:45.000000000","message":"Ah, I think this is just because we used [] instead of .get() in the old version of the patch. Now with .get() we won\u0027t catch any exception here.\nThanks for that hint.","commit_id":"067aedaeb7f526392f26694740a2f4160f60a067"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ced18c92c85c43841bf61cf1991837835b07c6bb","unresolved":false,"context_lines":[{"line_number":1254,"context_line":"                                            retry_interval):"},{"line_number":1255,"context_line":"            return"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        LOG.info(\"Performing Hard shutdown on instance\","},{"line_number":1258,"context_line":"                 instance\u003dinstance)"},{"line_number":1259,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1260,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_4f30ff9f","line":1257,"updated":"2017-08-28 06:50:11.000000000","message":"remove this message and change the one in power_off_instance to say that it is doing a hard shutdown","commit_id":"07f11b701afb1cbe2846e9b691449f08bd81ffcf"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"624b64dc8f005d94b61153d557cd85cc8a17dfae","unresolved":false,"context_lines":[{"line_number":1254,"context_line":"                                            retry_interval):"},{"line_number":1255,"context_line":"            return"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        LOG.info(\"Performing Hard shutdown on instance\","},{"line_number":1258,"context_line":"                 instance\u003dinstance)"},{"line_number":1259,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1260,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_bc35e3aa","line":1257,"in_reply_to":"7f287b81_4f30ff9f","updated":"2017-09-01 07:36:44.000000000","message":"Removing this message sounds reasonable. But after all I would leave the messages in power_off_instance as they are now.","commit_id":"07f11b701afb1cbe2846e9b691449f08bd81ffcf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ced18c92c85c43841bf61cf1991837835b07c6bb","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1264,"context_line":"           False otherwise."},{"line_number":1265,"context_line":"        \"\"\""},{"line_number":1266,"context_line":"        LOG.info(\"Performing Soft shutdown on instance\","},{"line_number":1267,"context_line":"                 instance\u003dinstance)"},{"line_number":1268,"context_line":"        vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":1269,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_0f267769","line":1266,"updated":"2017-08-28 06:50:11.000000000","message":"According to the logging standards this should be a debug, not info: https://wiki.openstack.org/wiki/LoggingStandards","commit_id":"07f11b701afb1cbe2846e9b691449f08bd81ffcf"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"624b64dc8f005d94b61153d557cd85cc8a17dfae","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1264,"context_line":"           False otherwise."},{"line_number":1265,"context_line":"        \"\"\""},{"line_number":1266,"context_line":"        LOG.info(\"Performing Soft shutdown on instance\","},{"line_number":1267,"context_line":"                 instance\u003dinstance)"},{"line_number":1268,"context_line":"        vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":1269,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_5c44bf1b","line":1266,"in_reply_to":"7f287b81_0f267769","updated":"2017-09-01 07:36:44.000000000","message":"Done","commit_id":"07f11b701afb1cbe2846e9b691449f08bd81ffcf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ced18c92c85c43841bf61cf1991837835b07c6bb","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"            (props.get(\"summary.guest.toolsRunningStatus\") \u003d\u003d"},{"line_number":1277,"context_line":"             \"guestToolsRunning\")):"},{"line_number":1278,"context_line":""},{"line_number":1279,"context_line":"            LOG.info(\"Soft shutdown instance, timeout: %d\","},{"line_number":1280,"context_line":"                     timeout, instance\u003dinstance)"},{"line_number":1281,"context_line":"            self._session._call_method(self._session.vim,"},{"line_number":1282,"context_line":"                                       \"ShutdownGuest\","}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_2fda534b","line":1279,"updated":"2017-08-28 06:50:11.000000000","message":"should be debug","commit_id":"07f11b701afb1cbe2846e9b691449f08bd81ffcf"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"624b64dc8f005d94b61153d557cd85cc8a17dfae","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"            (props.get(\"summary.guest.toolsRunningStatus\") \u003d\u003d"},{"line_number":1277,"context_line":"             \"guestToolsRunning\")):"},{"line_number":1278,"context_line":""},{"line_number":1279,"context_line":"            LOG.info(\"Soft shutdown instance, timeout: %d\","},{"line_number":1280,"context_line":"                     timeout, instance\u003dinstance)"},{"line_number":1281,"context_line":"            self._session._call_method(self._session.vim,"},{"line_number":1282,"context_line":"                                       \"ShutdownGuest\","}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_1c463723","line":1279,"in_reply_to":"7f287b81_2fda534b","updated":"2017-09-01 07:36:44.000000000","message":"Done","commit_id":"07f11b701afb1cbe2846e9b691449f08bd81ffcf"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ced18c92c85c43841bf61cf1991837835b07c6bb","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"            LOG.warning(\"Timed out while waiting for soft shutdown.\","},{"line_number":1298,"context_line":"                        instance\u003dinstance)"},{"line_number":1299,"context_line":"        else:"},{"line_number":1300,"context_line":"            LOG.info(\"VMware Tools not running\", instance\u003dinstance)"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"        return False"},{"line_number":1303,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_6f161bf4","line":1300,"updated":"2017-08-28 06:50:11.000000000","message":"should be debug","commit_id":"07f11b701afb1cbe2846e9b691449f08bd81ffcf"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"624b64dc8f005d94b61153d557cd85cc8a17dfae","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"            LOG.warning(\"Timed out while waiting for soft shutdown.\","},{"line_number":1298,"context_line":"                        instance\u003dinstance)"},{"line_number":1299,"context_line":"        else:"},{"line_number":1300,"context_line":"            LOG.info(\"VMware Tools not running\", instance\u003dinstance)"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"        return False"},{"line_number":1303,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_fc524bde","line":1300,"in_reply_to":"7f287b81_6f161bf4","updated":"2017-09-01 07:36:44.000000000","message":"Done","commit_id":"07f11b701afb1cbe2846e9b691449f08bd81ffcf"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"2219b08bdcab694505eafcfa8240974ba93d057e","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"    def power_off(self, instance, timeout\u003d0, retry_interval\u003d0):"},{"line_number":1248,"context_line":"        \"\"\"Power off the specified instance."},{"line_number":1249,"context_line":""},{"line_number":1250,"context_line":"        :param instance: nova.objects.instance.Instance"},{"line_number":1251,"context_line":"        \"\"\""},{"line_number":1252,"context_line":"        if timeout and self._clean_shutdown(instance,"},{"line_number":1253,"context_line":"                                            timeout,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_81752a9b","line":1250,"range":{"start_line":1250,"start_character":8,"end_line":1250,"end_character":55},"updated":"2017-09-08 17:10:51.000000000","message":"It would be necessary to add timeout and retry_interval here","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"dec40847433e8b2967b428ea22df8af0d14796f8","unresolved":false,"context_lines":[{"line_number":1247,"context_line":"    def power_off(self, instance, timeout\u003d0, retry_interval\u003d0):"},{"line_number":1248,"context_line":"        \"\"\"Power off the specified instance."},{"line_number":1249,"context_line":""},{"line_number":1250,"context_line":"        :param instance: nova.objects.instance.Instance"},{"line_number":1251,"context_line":"        \"\"\""},{"line_number":1252,"context_line":"        if timeout and self._clean_shutdown(instance,"},{"line_number":1253,"context_line":"                                            timeout,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_faa599b6","line":1250,"range":{"start_line":1250,"start_character":8,"end_line":1250,"end_character":55},"in_reply_to":"5f2577a7_81752a9b","updated":"2017-09-11 12:52:16.000000000","message":"Done","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"2219b08bdcab694505eafcfa8240974ba93d057e","unresolved":false,"context_lines":[{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"    def _clean_shutdown(self, instance, timeout, retry_interval):"},{"line_number":1260,"context_line":"        \"\"\"Perform a soft shutdown on the VM."},{"line_number":1261,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1262,"context_line":"           False otherwise."}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_619fdeb4","line":1259,"range":{"start_line":1259,"start_character":8,"end_line":1259,"end_character":24},"updated":"2017-09-08 17:10:51.000000000","message":"How about _soft_shutdown() or _graceful_shutdown() as the method name?","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"dec40847433e8b2967b428ea22df8af0d14796f8","unresolved":false,"context_lines":[{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1258,"context_line":""},{"line_number":1259,"context_line":"    def _clean_shutdown(self, instance, timeout, retry_interval):"},{"line_number":1260,"context_line":"        \"\"\"Perform a soft shutdown on the VM."},{"line_number":1261,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1262,"context_line":"           False otherwise."}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_9af8d5c4","line":1259,"range":{"start_line":1259,"start_character":8,"end_line":1259,"end_character":24},"in_reply_to":"5f2577a7_619fdeb4","updated":"2017-09-11 12:52:16.000000000","message":"We tried to be consistent with the libvirt driver. See for example: https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L2624","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f5d1df539ec32638fee9e54ca0b6f99627bfb03","unresolved":false,"context_lines":[{"line_number":1261,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1262,"context_line":"           False otherwise."},{"line_number":1263,"context_line":"        \"\"\""},{"line_number":1264,"context_line":"        LOG.debug(\"Performing Soft shutdown on instance\","},{"line_number":1265,"context_line":"                 instance\u003dinstance)"},{"line_number":1266,"context_line":"        vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":1267,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_dc9f8463","line":1264,"updated":"2017-09-01 15:26:09.000000000","message":"This could be confusing if you don\u0027t actually do the soft shutdown, so I\u0027d probably move this closer to where you actually attempt it.","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"5360f6edd3061283fb7e3cf8f3bbdbb0328b9125","unresolved":false,"context_lines":[{"line_number":1261,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1262,"context_line":"           False otherwise."},{"line_number":1263,"context_line":"        \"\"\""},{"line_number":1264,"context_line":"        LOG.debug(\"Performing Soft shutdown on instance\","},{"line_number":1265,"context_line":"                 instance\u003dinstance)"},{"line_number":1266,"context_line":"        vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":1267,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_dcdb041f","line":1264,"in_reply_to":"7f287b81_dc9f8463","updated":"2017-09-01 15:32:40.000000000","message":"Actually I like this message here. Maybe we could change it to \"Trying to perform Soft shutdown on instance\" ?\n\nOtherwise I\u0027d rather delete it, because there is already a similar message in line 1277.\n\nWhat do you think?","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"2219b08bdcab694505eafcfa8240974ba93d057e","unresolved":false,"context_lines":[{"line_number":1267,"context_line":""},{"line_number":1268,"context_line":"        props \u003d self._get_instance_props(vm_ref)"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        if props.get(\"runtime.powerState\") not in [\"poweredOn\"]:"},{"line_number":1271,"context_line":"            return False"},{"line_number":1272,"context_line":""},{"line_number":1273,"context_line":"        if ((props.get(\"summary.guest.toolsStatus\") \u003d\u003d \"toolsOk\") and"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_c1b7b23a","line":1270,"range":{"start_line":1270,"start_character":8,"end_line":1270,"end_character":63},"updated":"2017-09-08 17:10:51.000000000","message":"nit: why not\n\n if props.get(\"runtime.powerState\") !\u003d \"poweredOn\":\n\n?","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"dec40847433e8b2967b428ea22df8af0d14796f8","unresolved":false,"context_lines":[{"line_number":1267,"context_line":""},{"line_number":1268,"context_line":"        props \u003d self._get_instance_props(vm_ref)"},{"line_number":1269,"context_line":""},{"line_number":1270,"context_line":"        if props.get(\"runtime.powerState\") not in [\"poweredOn\"]:"},{"line_number":1271,"context_line":"            return False"},{"line_number":1272,"context_line":""},{"line_number":1273,"context_line":"        if ((props.get(\"summary.guest.toolsStatus\") \u003d\u003d \"toolsOk\") and"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_9a21f550","line":1270,"range":{"start_line":1270,"start_character":8,"end_line":1270,"end_character":63},"in_reply_to":"5f2577a7_c1b7b23a","updated":"2017-09-11 12:52:16.000000000","message":"Done","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bfdb9cb8dd8660f48e08cdbafe2211f057f9a3ef","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"            LOG.debug(\"Soft shutdown instance, timeout: %d\","},{"line_number":1278,"context_line":"                     timeout, instance\u003dinstance)"},{"line_number":1279,"context_line":"            self._session._call_method(self._session.vim,"},{"line_number":1280,"context_line":"                                       \"ShutdownGuest\","},{"line_number":1281,"context_line":"                                       vm_ref)"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"            while timeout \u003e 0:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_792542ab","line":1280,"range":{"start_line":1280,"start_character":40,"end_line":1280,"end_character":53},"updated":"2017-09-01 14:40:49.000000000","message":"Is there a minimum version of vsphere needed for this?","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"d3fb418d9de47435d06629f712dd6284f9930685","unresolved":false,"context_lines":[{"line_number":1277,"context_line":"            LOG.debug(\"Soft shutdown instance, timeout: %d\","},{"line_number":1278,"context_line":"                     timeout, instance\u003dinstance)"},{"line_number":1279,"context_line":"            self._session._call_method(self._session.vim,"},{"line_number":1280,"context_line":"                                       \"ShutdownGuest\","},{"line_number":1281,"context_line":"                                       vm_ref)"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"            while timeout \u003e 0:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_1c9d0c66","line":1280,"range":{"start_line":1280,"start_character":40,"end_line":1280,"end_character":53},"in_reply_to":"7f287b81_792542ab","updated":"2017-09-01 15:26:11.000000000","message":"No. According to https://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.VirtualMachine.html#shutdownGuest it was already part of VSphere 4.0","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"2219b08bdcab694505eafcfa8240974ba93d057e","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"                wait_time \u003d min(retry_interval, timeout)"},{"line_number":1285,"context_line":"                props \u003d self._get_instance_props(vm_ref)"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"                if props.get(\"runtime.powerState\") in [\"poweredOff\"]:"},{"line_number":1288,"context_line":"                    LOG.info(\"Soft shutdown succeeded.\","},{"line_number":1289,"context_line":"                             instance\u003dinstance)"},{"line_number":1290,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_2182f650","line":1287,"range":{"start_line":1287,"start_character":16,"end_line":1287,"end_character":68},"updated":"2017-09-08 17:10:51.000000000","message":"nit: ditto\n\n if props.get(\"runtime.powerState\") \u003d\u003d \"poweredOff\":","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"dec40847433e8b2967b428ea22df8af0d14796f8","unresolved":false,"context_lines":[{"line_number":1284,"context_line":"                wait_time \u003d min(retry_interval, timeout)"},{"line_number":1285,"context_line":"                props \u003d self._get_instance_props(vm_ref)"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"                if props.get(\"runtime.powerState\") in [\"poweredOff\"]:"},{"line_number":1288,"context_line":"                    LOG.info(\"Soft shutdown succeeded.\","},{"line_number":1289,"context_line":"                             instance\u003dinstance)"},{"line_number":1290,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f2577a7_5a1b8d1a","line":1287,"range":{"start_line":1287,"start_character":16,"end_line":1287,"end_character":68},"in_reply_to":"5f2577a7_2182f650","updated":"2017-09-11 12:52:16.000000000","message":"Done","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f5d1df539ec32638fee9e54ca0b6f99627bfb03","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"                time.sleep(wait_time)"},{"line_number":1293,"context_line":"                timeout -\u003d retry_interval"},{"line_number":1294,"context_line":""},{"line_number":1295,"context_line":"            LOG.warning(\"Timed out while waiting for soft shutdown.\","},{"line_number":1296,"context_line":"                        instance\u003dinstance)"},{"line_number":1297,"context_line":"        else:"},{"line_number":1298,"context_line":"            LOG.debug(\"VMware Tools not running\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_5ce5d409","line":1295,"updated":"2017-09-01 15:26:09.000000000","message":"Maybe add something like, \"Performing hard shutdown.\" to this message.","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":23913,"name":"David Rabel","email":"rabel@b1-systems.de","username":"rabel"},"change_message_id":"5360f6edd3061283fb7e3cf8f3bbdbb0328b9125","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"                time.sleep(wait_time)"},{"line_number":1293,"context_line":"                timeout -\u003d retry_interval"},{"line_number":1294,"context_line":""},{"line_number":1295,"context_line":"            LOG.warning(\"Timed out while waiting for soft shutdown.\","},{"line_number":1296,"context_line":"                        instance\u003dinstance)"},{"line_number":1297,"context_line":"        else:"},{"line_number":1298,"context_line":"            LOG.debug(\"VMware Tools not running\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_3ccc4860","line":1295,"in_reply_to":"7f287b81_5ce5d409","updated":"2017-09-01 15:32:40.000000000","message":"When power_off_instance is called afterwards, there is a similar message. That should be sufficient in my opinion.","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f5d1df539ec32638fee9e54ca0b6f99627bfb03","unresolved":false,"context_lines":[{"line_number":1295,"context_line":"            LOG.warning(\"Timed out while waiting for soft shutdown.\","},{"line_number":1296,"context_line":"                        instance\u003dinstance)"},{"line_number":1297,"context_line":"        else:"},{"line_number":1298,"context_line":"            LOG.debug(\"VMware Tools not running\", instance\u003dinstance)"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        return False"},{"line_number":1301,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_fceb60d9","line":1298,"updated":"2017-09-01 15:26:09.000000000","message":"ditto","commit_id":"ea485c93e9378c165cf0e2fd16b220f3c8851aed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"630df361231cedc1abdc51e3ec9f6c5c39a6a42d","unresolved":false,"context_lines":[{"line_number":1244,"context_line":"        if power_on:"},{"line_number":1245,"context_line":"            vm_util.power_on_instance(self._session, instance, vm_ref\u003dvm_ref)"},{"line_number":1246,"context_line":""},{"line_number":1247,"context_line":"    def power_off(self, instance, timeout\u003d0, retry_interval\u003d0):"},{"line_number":1248,"context_line":"        \"\"\"Power off the specified instance."},{"line_number":1249,"context_line":""},{"line_number":1250,"context_line":"        :param instance: nova.objects.instance.Instance"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_938d867d","line":1247,"range":{"start_line":1247,"start_character":34,"end_line":1247,"end_character":61},"updated":"2017-10-18 09:06:58.000000000","message":"Nit: no need for defaults here.","commit_id":"5ed819c40214d8baccedeaf2a7558e426bdc3b82"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"630df361231cedc1abdc51e3ec9f6c5c39a6a42d","unresolved":false,"context_lines":[{"line_number":1253,"context_line":"        :param retry_interval: Interval to check if instance is already"},{"line_number":1254,"context_line":"                               shutdown in seconds."},{"line_number":1255,"context_line":"        \"\"\""},{"line_number":1256,"context_line":"        if timeout and self._clean_shutdown(instance,"},{"line_number":1257,"context_line":"                                            timeout,"},{"line_number":1258,"context_line":"                                            retry_interval):"},{"line_number":1259,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_33f25208","line":1256,"updated":"2017-10-18 09:06:58.000000000","message":"I don\u0027t see any test for the timeout\u003d0 case to make sure that triggers a hard shutdown. Maybe an existing test covers that because of the default arguments? Not sure.","commit_id":"5ed819c40214d8baccedeaf2a7558e426bdc3b82"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"630df361231cedc1abdc51e3ec9f6c5c39a6a42d","unresolved":false,"context_lines":[{"line_number":1260,"context_line":""},{"line_number":1261,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1262,"context_line":""},{"line_number":1263,"context_line":"    def _clean_shutdown(self, instance, timeout, retry_interval):"},{"line_number":1264,"context_line":"        \"\"\"Perform a soft shutdown on the VM."},{"line_number":1265,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1266,"context_line":"           False otherwise."}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_9855a520","line":1263,"updated":"2017-10-18 09:06:58.000000000","message":"Nit: I think this code should really be in vm_util to follow the local patterns here. Although if you do that move, I would move the handing of timeout\u003d\u003d0 into this method.","commit_id":"5ed819c40214d8baccedeaf2a7558e426bdc3b82"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"630df361231cedc1abdc51e3ec9f6c5c39a6a42d","unresolved":false,"context_lines":[{"line_number":1262,"context_line":""},{"line_number":1263,"context_line":"    def _clean_shutdown(self, instance, timeout, retry_interval):"},{"line_number":1264,"context_line":"        \"\"\"Perform a soft shutdown on the VM."},{"line_number":1265,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1266,"context_line":"           False otherwise."},{"line_number":1267,"context_line":"        \"\"\""},{"line_number":1268,"context_line":"        LOG.debug(\"Performing Soft shutdown on instance\","}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_f33f1ab3","line":1265,"updated":"2017-10-18 09:06:58.000000000","message":"Nit: bad intent in this doc string, although it passed pep8, so will not block on that.","commit_id":"5ed819c40214d8baccedeaf2a7558e426bdc3b82"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"01cec719eb39e8927806fca2530bbc5b27cc96c3","unresolved":false,"context_lines":[{"line_number":1260,"context_line":""},{"line_number":1261,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1262,"context_line":""},{"line_number":1263,"context_line":"    def _clean_shutdown(self, instance, timeout, retry_interval):"},{"line_number":1264,"context_line":"        \"\"\"Perform a soft shutdown on the VM."},{"line_number":1265,"context_line":"           :return: True if the instance was shutdown within time limit,"},{"line_number":1266,"context_line":"                    False otherwise."}],"source_content_type":"text/x-python","patch_set":15,"id":"3f4b6375_cb820d01","line":1263,"range":{"start_line":1263,"start_character":30,"end_line":1263,"end_character":63},"updated":"2017-10-30 08:21:02.000000000","message":"as we are developing new function,how about add them as param list as well?","commit_id":"d9e42b362fa12b96680624f6eb4e447f8d4d1dd9"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"01cec719eb39e8927806fca2530bbc5b27cc96c3","unresolved":false,"context_lines":[{"line_number":1271,"context_line":""},{"line_number":1272,"context_line":"        props \u003d self._get_instance_props(vm_ref)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"        if props.get(\"runtime.powerState\") !\u003d \"poweredOn\":"},{"line_number":1275,"context_line":"            return False"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"        if ((props.get(\"summary.guest.toolsStatus\") \u003d\u003d \"toolsOk\") and"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f4b6375_2bec01f2","line":1274,"range":{"start_line":1274,"start_character":7,"end_line":1274,"end_character":58},"updated":"2017-10-30 08:21:02.000000000","message":"a debug message can be added here ...","commit_id":"d9e42b362fa12b96680624f6eb4e447f8d4d1dd9"}],"releasenotes/notes/bug-1377781-c91d5319862bb9d8.yaml":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d8257b7631d1a0b35d1007db46c9a8dab07cbcdd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add support for graceful shutdown of VMware instances."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"3f4b6375_079cb85b","line":4,"updated":"2017-10-27 15:59:22.000000000","message":"might be good to add a little more detail to this. For instance, users might not understand that what is meant by \"graceful shutdown\" isn\u0027t a different shutdown command but rather just a retry with a timeout of the existing shutdown command...","commit_id":"3bb9db9eb2ffe8fac1127384b416dbff103dcd34"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ae27ca1dbdc754ab2311c6090d713368bd7e5dee","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Add support for graceful shutdown of VMware instances. The timeout parameter of the power_off"},{"line_number":5,"context_line":"    method is now considered by the VMware driver. If you specify a timeout greater than 0, the"},{"line_number":6,"context_line":"    driver calls the appropriate soft shutdown method of the VMware API and only forces a hard"},{"line_number":7,"context_line":"    shutdown if the soft shutdown did not succeed before the timeout is reached."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f4b6375_0db5f9cd","line":7,"updated":"2017-10-27 17:22:54.000000000","message":"++ good description now.","commit_id":"eafdf797d064d37b47383e27513512b371390499"}]}
