)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"d910b820345c6f42a98f191093c877d56ae2a53f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     javeme \u003cjavaloveme@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-09 20:51:10 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[VMware] Using ShutdownGuest instead of PowerOffVM_Task, if vmtools was installed."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PowerOffVM_Task is a dangerous operation, while ShutdownGuest are more secure."},{"line_number":10,"context_line":"Using ShutdownGuest instead of PowerOffVM_Task, if vmtools was installed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1aca2d91_f53266f1","line":7,"updated":"2015-05-09 15:16:47.000000000","message":"This commit message title is too long.  \n\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"f1f3020e592efc9acf11aed72d5f495279aca75c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     javeme \u003cjavaloveme@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-09 20:51:10 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[VMware] Using ShutdownGuest instead of PowerOffVM_Task, if vmtools was installed."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PowerOffVM_Task is a dangerous operation, while ShutdownGuest are more secure."},{"line_number":10,"context_line":"Using ShutdownGuest instead of PowerOffVM_Task, if vmtools was installed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1aca2d91_950b328e","line":7,"in_reply_to":"1aca2d91_f53266f1","updated":"2015-05-09 16:59:37.000000000","message":"OK, I will fix it","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"e18643af66f3716c90d7be19d9805bdfc7d3cdbc","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     javeme \u003cjavaloveme@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-10 16:02:23 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using ShutdownGuest instead of PowerOffVM_Task."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PowerOffVM_Task is a dangerous operation, while ShutdownGuest are"},{"line_number":10,"context_line":"more secure. so we use ShutdownGuest instead of PowerOffVM_Task,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9af37de9_98ecf990","line":7,"updated":"2015-05-10 11:37:00.000000000","message":"Please add prefix \u0027VMware:\u0027 and remove the period.","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"f8720e9f52faa7dc649ec312875b74ec3590dcc4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     javeme \u003cjavaloveme@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-10 16:02:23 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using ShutdownGuest instead of PowerOffVM_Task."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PowerOffVM_Task is a dangerous operation, while ShutdownGuest are"},{"line_number":10,"context_line":"more secure. so we use ShutdownGuest instead of PowerOffVM_Task,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9af37de9_71ff2b35","line":7,"in_reply_to":"9af37de9_71928b59","updated":"2015-05-11 03:08:25.000000000","message":"VMware: Prefer ShutdownGuest to PowerOffVM_Task","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"9db5ce859edcd55bf89cfa84d58c5cb7ee02d183","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     javeme \u003cjavaloveme@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-10 16:02:23 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using ShutdownGuest instead of PowerOffVM_Task."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PowerOffVM_Task is a dangerous operation, while ShutdownGuest are"},{"line_number":10,"context_line":"more secure. so we use ShutdownGuest instead of PowerOffVM_Task,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9af37de9_8a036c0f","line":7,"in_reply_to":"9af37de9_71ff2b35","updated":"2015-05-11 14:49:24.000000000","message":"ok","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"25c6aeac5baf768b9a151d2c044f023997c77134","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     javeme \u003cjavaloveme@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-10 16:02:23 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using ShutdownGuest instead of PowerOffVM_Task."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PowerOffVM_Task is a dangerous operation, while ShutdownGuest are"},{"line_number":10,"context_line":"more secure. so we use ShutdownGuest instead of PowerOffVM_Task,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9af37de9_71928b59","line":7,"in_reply_to":"9af37de9_98ecf990","updated":"2015-05-11 02:58:26.000000000","message":"\"VMware: Using ShutdownGuest instead of PowerOffVM_Task\", Like this, right?","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"e18643af66f3716c90d7be19d9805bdfc7d3cdbc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using ShutdownGuest instead of PowerOffVM_Task."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PowerOffVM_Task is a dangerous operation, while ShutdownGuest are"},{"line_number":10,"context_line":"more secure. so we use ShutdownGuest instead of PowerOffVM_Task,"},{"line_number":11,"context_line":"if vmtools was installed."},{"line_number":12,"context_line":"Closes-Bug: #1445858"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9af37de9_18f9294e","line":9,"updated":"2015-05-10 11:37:00.000000000","message":"s/are/is ?","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"25c6aeac5baf768b9a151d2c044f023997c77134","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Using ShutdownGuest instead of PowerOffVM_Task."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"PowerOffVM_Task is a dangerous operation, while ShutdownGuest are"},{"line_number":10,"context_line":"more secure. so we use ShutdownGuest instead of PowerOffVM_Task,"},{"line_number":11,"context_line":"if vmtools was installed."},{"line_number":12,"context_line":"Closes-Bug: #1445858"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9af37de9_1188df21","line":9,"in_reply_to":"9af37de9_18f9294e","updated":"2015-05-11 02:58:26.000000000","message":"Is this right? \"PowerOffVM_Task is a dangerous operation, while ShutdownGuest is\nmore secure. so we use ShutdownGuest instead of PowerOffVM_Task,\nif vmtools has been installed.\"","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"}],"nova/tests/unit/virt/vmwareapi/fake.py":[{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"4c41f0961d5eb0fe6018ab31bc6e123604c9b6d8","unresolved":false,"context_lines":[{"line_number":1576,"context_line":"        else:"},{"line_number":1577,"context_line":"            iscsi_hba.configuredSendTarget \u003d send_targets"},{"line_number":1578,"context_line":""},{"line_number":1579,"context_line":"    def __getattr__(self, attr_name):  # noqa"},{"line_number":1580,"context_line":"        if attr_name !\u003d \"Login\":"},{"line_number":1581,"context_line":"            self._check_session()"},{"line_number":1582,"context_line":"        if attr_name \u003d\u003d \"Login\":"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_43480d2e","line":1579,"range":{"start_line":1579,"start_character":39,"end_line":1579,"end_character":45},"updated":"2016-02-14 15:54:41.000000000","message":"Nova has set max-complexity\u003d35","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"2b46b33e5b024c9babe5be2db0dfe707b53ae41d","unresolved":false,"context_lines":[{"line_number":1576,"context_line":"        else:"},{"line_number":1577,"context_line":"            iscsi_hba.configuredSendTarget \u003d send_targets"},{"line_number":1578,"context_line":""},{"line_number":1579,"context_line":"    def __getattr__(self, attr_name):  # noqa"},{"line_number":1580,"context_line":"        if attr_name !\u003d \"Login\":"},{"line_number":1581,"context_line":"            self._check_session()"},{"line_number":1582,"context_line":"        if attr_name \u003d\u003d \"Login\":"}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_dc15ed9b","line":1579,"range":{"start_line":1579,"start_character":39,"end_line":1579,"end_character":45},"in_reply_to":"7af24918_10973f91","updated":"2016-03-03 08:57:27.000000000","message":"Yes, you\u0027re right~","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0cb241372500e94ea9490f05be9865a56e042dd4","unresolved":false,"context_lines":[{"line_number":1576,"context_line":"        else:"},{"line_number":1577,"context_line":"            iscsi_hba.configuredSendTarget \u003d send_targets"},{"line_number":1578,"context_line":""},{"line_number":1579,"context_line":"    def __getattr__(self, attr_name):  # noqa"},{"line_number":1580,"context_line":"        if attr_name !\u003d \"Login\":"},{"line_number":1581,"context_line":"            self._check_session()"},{"line_number":1582,"context_line":"        if attr_name \u003d\u003d \"Login\":"}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_10973f91","line":1579,"range":{"start_line":1579,"start_character":39,"end_line":1579,"end_character":45},"in_reply_to":"dae33548_43480d2e","updated":"2016-03-02 02:40:58.000000000","message":"This fails pep8 max-complexity checks because of too many elifs?","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cf18e3ee93c4a271076dc4ce960657f350106cee","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"        else:"},{"line_number":1578,"context_line":"            iscsi_hba.configuredSendTarget \u003d send_targets"},{"line_number":1579,"context_line":""},{"line_number":1580,"context_line":"    def __getattr__(self, attr_name):  # noqa"},{"line_number":1581,"context_line":"        if attr_name !\u003d \"Login\":"},{"line_number":1582,"context_line":"            self._check_session()"},{"line_number":1583,"context_line":"        if attr_name \u003d\u003d \"Login\":"}],"source_content_type":"text/x-python","patch_set":28,"id":"bab6814e_3a70c5a3","line":1580,"updated":"2016-05-23 11:01:19.000000000","message":"why do we need the noqa here?","commit_id":"8044a022f4c18752ad5acfc8c346f3fb2d69a79e"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"513db551990421401289c40c91d3d95b6de5131b","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"        else:"},{"line_number":1578,"context_line":"            iscsi_hba.configuredSendTarget \u003d send_targets"},{"line_number":1579,"context_line":""},{"line_number":1580,"context_line":"    def __getattr__(self, attr_name):  # noqa"},{"line_number":1581,"context_line":"        if attr_name !\u003d \"Login\":"},{"line_number":1582,"context_line":"            self._check_session()"},{"line_number":1583,"context_line":"        if attr_name \u003d\u003d \"Login\":"}],"source_content_type":"text/x-python","patch_set":28,"id":"bab6814e_fe8aaa19","line":1580,"in_reply_to":"bab6814e_3a70c5a3","updated":"2016-05-23 12:58:01.000000000","message":"Nova has set max-complexity\u003d35, this fails pep8 max-complexity checks because of too many elifs.","commit_id":"8044a022f4c18752ad5acfc8c346f3fb2d69a79e"}],"nova/tests/unit/virt/vmwareapi/test_vm_util.py":[{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"d910b820345c6f42a98f191093c877d56ae2a53f","unresolved":false,"context_lines":[{"line_number":1077,"context_line":"              fake_wait_for_task):"},{"line_number":1078,"context_line":"            vm_util.power_off_instance(session, self._instance, vm_ref)"},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":""},{"line_number":1081,"context_line":"            fake_has_installed_vmtools.assert_called_once_with(session,"},{"line_number":1082,"context_line":"                                                               self._instance,"},{"line_number":1083,"context_line":"                                                               \u0027fake-vm-ref\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_b54f4e6a","line":1080,"updated":"2015-05-09 15:16:47.000000000","message":"Remove blank line.  This is your pep8 failure.\n\n/nova/tests/unit/virt/vmwareapi/test_vm_util.py:1081:13: E303 too many blank lines (2)","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"f1f3020e592efc9acf11aed72d5f495279aca75c","unresolved":false,"context_lines":[{"line_number":1077,"context_line":"              fake_wait_for_task):"},{"line_number":1078,"context_line":"            vm_util.power_off_instance(session, self._instance, vm_ref)"},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":""},{"line_number":1081,"context_line":"            fake_has_installed_vmtools.assert_called_once_with(session,"},{"line_number":1082,"context_line":"                                                               self._instance,"},{"line_number":1083,"context_line":"                                                               \u0027fake-vm-ref\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_f5c26633","line":1080,"in_reply_to":"1aca2d91_b54f4e6a","updated":"2015-05-09 16:59:37.000000000","message":"Ok, thanks.","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"bfeed68831bde15f6bff829e1488fe418b0ff88f","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        vm_ref \u003d None if vm_ref_none else \u0027fake-vm-ref\u0027"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"        with contextlib.nested("},{"line_number":1070,"context_line":"            mock.patch.object(vm_util, \"has_installed_vmtools\","},{"line_number":1071,"context_line":"                              return_value\u003dinstalled_vmtools),"},{"line_number":1072,"context_line":"            mock.patch.object(session, \u0027_call_method\u0027,"},{"line_number":1073,"context_line":"                              return_value\u003d\u0027fake-task\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_8a802b48","line":1070,"updated":"2015-05-12 01:25:31.000000000","message":"\"has_installed_vmtools\" doesn\u0027t exist anymore.","commit_id":"a84765b66012a8058c8bd037e45d8a2d9c6caf9f"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"84098b5bfd6877233c209d8bbea798de57448077","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        vm_ref \u003d None if vm_ref_none else \u0027fake-vm-ref\u0027"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"        with contextlib.nested("},{"line_number":1070,"context_line":"            mock.patch.object(vm_util, \"has_installed_vmtools\","},{"line_number":1071,"context_line":"                              return_value\u003dinstalled_vmtools),"},{"line_number":1072,"context_line":"            mock.patch.object(session, \u0027_call_method\u0027,"},{"line_number":1073,"context_line":"                              return_value\u003d\u0027fake-task\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_e54b432a","line":1070,"in_reply_to":"9a0c5dc1_8a802b48","updated":"2015-05-12 15:05:41.000000000","message":"Oh yes","commit_id":"a84765b66012a8058c8bd037e45d8a2d9c6caf9f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"017460c3d9f7e7f63563aa337bd2b4363f514a3e","unresolved":false,"context_lines":[{"line_number":1123,"context_line":""},{"line_number":1124,"context_line":"        def fake_get_power_state(session, vm_ref):"},{"line_number":1125,"context_line":"            self.assertEqual(\u0027fake-vm-ref\u0027, vm_ref)"},{"line_number":1126,"context_line":"            power_stat \u003d None"},{"line_number":1127,"context_line":"            if retry_count[0] \u003e\u003d return_count:"},{"line_number":1128,"context_line":"                power_stat \u003d power_state.SHUTDOWN"},{"line_number":1129,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_a5cfd527","line":1126,"range":{"start_line":1126,"start_character":12,"end_line":1126,"end_character":22},"updated":"2015-05-31 12:58:41.000000000","message":"power_stat \u003d\u003e power_state","commit_id":"22788efd0f932f38ce2f9e1de4f9a00e1b29fdf5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"193237bf8e7e7e8c2fe8b9d1877e8ffc695258cd","unresolved":false,"context_lines":[{"line_number":1348,"context_line":"    def _test_graceful_shutdown(self, timeout, retry_interval,"},{"line_number":1349,"context_line":"                                return_count, tools_unavailable\u003dFalse):"},{"line_number":1350,"context_line":"        session \u003d fake.FakeSession()"},{"line_number":1351,"context_line":"        retry_count \u003d [0]"},{"line_number":1352,"context_line":""},{"line_number":1353,"context_line":"        expected_result \u003d True"},{"line_number":1354,"context_line":"        if tools_unavailable:"}],"source_content_type":"text/x-python","patch_set":29,"id":"bacf61ea_1fe742e5","line":1351,"updated":"2016-08-03 20:09:48.000000000","message":"Just use:\n\n retry_count \u003d 0","commit_id":"63684eec47f843de2c06e4d4f397e6fd1c859be1"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"e4acf4f41b23c62412b20505ec85697a5456f9c5","unresolved":false,"context_lines":[{"line_number":1348,"context_line":"    def _test_graceful_shutdown(self, timeout, retry_interval,"},{"line_number":1349,"context_line":"                                return_count, tools_unavailable\u003dFalse):"},{"line_number":1350,"context_line":"        session \u003d fake.FakeSession()"},{"line_number":1351,"context_line":"        retry_count \u003d [0]"},{"line_number":1352,"context_line":""},{"line_number":1353,"context_line":"        expected_result \u003d True"},{"line_number":1354,"context_line":"        if tools_unavailable:"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_2619147a","line":1351,"in_reply_to":"bacf61ea_1fe742e5","updated":"2016-10-19 20:26:58.000000000","message":"Done","commit_id":"63684eec47f843de2c06e4d4f397e6fd1c859be1"}],"nova/virt/vmwareapi/constants.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f4aa76c57da424e70018ac7aa4780319f3811b3c","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    \u0027winXPProGuest\u0027,"},{"line_number":191,"context_line":"])"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"VMWARE_POWER_STATES \u003d {\u0027poweredOff\u0027: power_state.SHUTDOWN,"},{"line_number":194,"context_line":"                       \u0027poweredOn\u0027: power_state.RUNNING,"},{"line_number":195,"context_line":"                       \u0027suspended\u0027: power_state.SUSPENDED}"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_c81e686f","line":193,"updated":"2015-05-21 21:52:38.000000000","message":"Thanks!","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"d910b820345c6f42a98f191093c877d56ae2a53f","unresolved":false,"context_lines":[{"line_number":1482,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"        else:"},{"line_number":1488,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_d5b40a36","line":1485,"updated":"2015-05-09 15:16:47.000000000","message":"Rather than having this method, you could always call shutdown and catch the ToolsUnavailable exception, then use power off as a backup.  I mention this, because vCenter probably already does a check for VMware tools anyway which you are recreating here.","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"f1f3020e592efc9acf11aed72d5f495279aca75c","unresolved":false,"context_lines":[{"line_number":1482,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"        else:"},{"line_number":1488,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae975fb_71417839","line":1485,"in_reply_to":"1aca2d91_d5b40a36","updated":"2015-05-09 16:59:37.000000000","message":"Yes, The way you said is good and very concise, but I think this way may be better understood, because the logic is clear.\nMay I maintain this approach?","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"d910b820345c6f42a98f191093c877d56ae2a53f","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"        else:"},{"line_number":1488,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1489,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_15af22e3","line":1486,"updated":"2015-05-09 15:16:47.000000000","message":"Because this call returns immediately and provides no monitor of the completion, this will make it so Nova\u0027s record of the power state is different than vSphere\u0027s for a short while.  But I see no way to fix that.","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"f1f3020e592efc9acf11aed72d5f495279aca75c","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"        else:"},{"line_number":1488,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1489,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_7533f662","line":1486,"in_reply_to":"1aca2d91_15af22e3","updated":"2015-05-09 16:59:37.000000000","message":"Yes, you\u0027re right.","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"d910b820345c6f42a98f191093c877d56ae2a53f","unresolved":false,"context_lines":[{"line_number":1488,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1489,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"},{"line_number":1490,"context_line":"            session._wait_for_task(poweroff_task)"},{"line_number":1491,"context_line":"        LOG.debug(\"Powered off the VM\", instance\u003dinstance)"},{"line_number":1492,"context_line":"    except vexc.InvalidPowerStateException:"},{"line_number":1493,"context_line":"        LOG.debug(\"VM already powered off\", instance\u003dinstance)"},{"line_number":1494,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_35445e48","line":1491,"updated":"2015-05-09 15:16:47.000000000","message":"Might be nicer to indicate powered off versus shutdown in the debug message.","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"f1f3020e592efc9acf11aed72d5f495279aca75c","unresolved":false,"context_lines":[{"line_number":1488,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1489,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"},{"line_number":1490,"context_line":"            session._wait_for_task(poweroff_task)"},{"line_number":1491,"context_line":"        LOG.debug(\"Powered off the VM\", instance\u003dinstance)"},{"line_number":1492,"context_line":"    except vexc.InvalidPowerStateException:"},{"line_number":1493,"context_line":"        LOG.debug(\"VM already powered off\", instance\u003dinstance)"},{"line_number":1494,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_153f2225","line":1491,"in_reply_to":"1aca2d91_35445e48","updated":"2015-05-09 16:59:37.000000000","message":"OK, I\u0027ll add the log for ShutdownGuest.","commit_id":"4bead317b9504556eda39f549437a25f22628e77"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"f8720e9f52faa7dc649ec312875b74ec3590dcc4","unresolved":false,"context_lines":[{"line_number":1481,"context_line":""},{"line_number":1482,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9af37de9_91896fcd","line":1484,"updated":"2015-05-11 03:08:25.000000000","message":"The comment probably isn\u0027t needed.  But if you leave it s/Using/Use and get rid of the comma.","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"9db5ce859edcd55bf89cfa84d58c5cb7ee02d183","unresolved":false,"context_lines":[{"line_number":1481,"context_line":""},{"line_number":1482,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9af37de9_ed3a12cd","line":1484,"in_reply_to":"9af37de9_91896fcd","updated":"2015-05-11 14:49:24.000000000","message":"ok, I will remove it.","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"f8720e9f52faa7dc649ec312875b74ec3590dcc4","unresolved":false,"context_lines":[{"line_number":1482,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1488,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9af37de9_91b04f8d","line":1485,"updated":"2015-05-11 03:08:25.000000000","message":"I still think it might be better to just always call shutdown and catch the ToolsUnavailable exception, then run power off.  Just let vCenter do the work.","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"948fdbc10d8027e82861a5609eee033b731cf4c7","unresolved":false,"context_lines":[{"line_number":1482,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1488,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9af37de9_b6133c5c","line":1485,"in_reply_to":"9af37de9_91b04f8d","updated":"2015-05-11 11:55:45.000000000","message":"+1 for catching ToolsUnavailable","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"9db5ce859edcd55bf89cfa84d58c5cb7ee02d183","unresolved":false,"context_lines":[{"line_number":1482,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1488,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9af37de9_8de4a63b","line":1485,"in_reply_to":"9af37de9_91b04f8d","updated":"2015-05-11 14:49:24.000000000","message":"ok, I decide to follow your practice.","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"9db5ce859edcd55bf89cfa84d58c5cb7ee02d183","unresolved":false,"context_lines":[{"line_number":1482,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1483,"context_line":"    try:"},{"line_number":1484,"context_line":"        # Using ShutdownGuest, if vmtools was installed."},{"line_number":1485,"context_line":"        if has_installed_vmtools(session, instance, vm_ref):"},{"line_number":1486,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1487,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1488,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9af37de9_cd3e2eb8","line":1485,"in_reply_to":"9af37de9_b6133c5c","updated":"2015-05-11 14:49:24.000000000","message":"ok, thanks.","commit_id":"2dae8240df88362e1caddfd570b0955a913d1488"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"bfeed68831bde15f6bff829e1488fe418b0ff88f","unresolved":false,"context_lines":[{"line_number":1458,"context_line":"    if vm_ref is None:"},{"line_number":1459,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1462,"context_line":"    try:"},{"line_number":1463,"context_line":"        try:"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_0a5f9b0f","line":1461,"updated":"2015-05-12 01:25:31.000000000","message":"This should probably move to the exception block.","commit_id":"a84765b66012a8058c8bd037e45d8a2d9c6caf9f"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"84098b5bfd6877233c209d8bbea798de57448077","unresolved":false,"context_lines":[{"line_number":1458,"context_line":"    if vm_ref is None:"},{"line_number":1459,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1462,"context_line":"    try:"},{"line_number":1463,"context_line":"        try:"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_c274b5d0","line":1461,"in_reply_to":"9a0c5dc1_0a5f9b0f","updated":"2015-05-12 15:05:41.000000000","message":"Done","commit_id":"a84765b66012a8058c8bd037e45d8a2d9c6caf9f"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"bfeed68831bde15f6bff829e1488fe418b0ff88f","unresolved":false,"context_lines":[{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1462,"context_line":"    try:"},{"line_number":1463,"context_line":"        try:"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1465,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1466,"context_line":"        except vexc.ToolsUnavailableException:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_8aa94be2","line":1463,"updated":"2015-05-12 01:25:31.000000000","message":"LOG.debug(\"Attempting to shut down the VM\", instance\u003dinstance)","commit_id":"a84765b66012a8058c8bd037e45d8a2d9c6caf9f"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"84098b5bfd6877233c209d8bbea798de57448077","unresolved":false,"context_lines":[{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1462,"context_line":"    try:"},{"line_number":1463,"context_line":"        try:"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1465,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1466,"context_line":"        except vexc.ToolsUnavailableException:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_a281c191","line":1463,"in_reply_to":"9a0c5dc1_8aa94be2","updated":"2015-05-12 15:05:41.000000000","message":"Done","commit_id":"a84765b66012a8058c8bd037e45d8a2d9c6caf9f"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"932ce174573dab0d973c72507ca4bf5a764ec04f","unresolved":false,"context_lines":[{"line_number":1452,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1453,"context_line":""},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"def power_off_instance(session, instance, vm_ref\u003dNone):"},{"line_number":1456,"context_line":"    \"\"\"Power off the specified instance.\"\"\""},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"    if vm_ref is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_340deb3e","line":1455,"updated":"2015-05-13 06:52:38.000000000","message":"Since this patch adds support for shutdown, it also needs to honor the shutdown timeout.  See nova/virt/vmwareapi/driver.py\n\ndef power_off(self, instance, timeout\u003d0, retry_interval\u003d0):","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"6e1464fe644a38388fcfa2ea420e887d6f3a2a0b","unresolved":false,"context_lines":[{"line_number":1452,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1453,"context_line":""},{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"def power_off_instance(session, instance, vm_ref\u003dNone):"},{"line_number":1456,"context_line":"    \"\"\"Power off the specified instance.\"\"\""},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"    if vm_ref is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_7578e6c4","line":1455,"in_reply_to":"9a0c5dc1_340deb3e","updated":"2015-05-13 16:48:53.000000000","message":"ok, I will add a FixedIntervalLoopingCall to do that.","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2a3bf95429ea8a78ff07c4f3d1f5878f2a217744","unresolved":false,"context_lines":[{"line_number":1458,"context_line":"    if vm_ref is None:"},{"line_number":1459,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    try:"},{"line_number":1462,"context_line":"        try:"},{"line_number":1463,"context_line":"            LOG.debug(\"Attempting to shut down the VM\", instance\u003dinstance)"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_518d1b30","line":1461,"updated":"2015-05-12 21:38:54.000000000","message":"i do not think that this is the correct way to go. We should have a method that indicates if VMware Tools is installed","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"4135f26f98479d5c4b217b6dcaece1f9bb04e06c","unresolved":false,"context_lines":[{"line_number":1458,"context_line":"    if vm_ref is None:"},{"line_number":1459,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    try:"},{"line_number":1462,"context_line":"        try:"},{"line_number":1463,"context_line":"            LOG.debug(\"Attempting to shut down the VM\", instance\u003dinstance)"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_d89b6bc8","line":1461,"in_reply_to":"9a0c5dc1_518d1b30","updated":"2015-05-12 22:33:22.000000000","message":"Rado and I asked to remove it.  I think it is better to attempt shutdown first and failover to power off simply because the VC has the most current information about VM tools and it will make this check anyway.","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2a3bf95429ea8a78ff07c4f3d1f5878f2a217744","unresolved":false,"context_lines":[{"line_number":1463,"context_line":"            LOG.debug(\"Attempting to shut down the VM\", instance\u003dinstance)"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1465,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1466,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1467,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1468,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1469,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_11b0c3f3","line":1466,"updated":"2015-05-12 21:38:54.000000000","message":"where is this exception defined?\nit is not defined in https://github.com/openstack/oslo.vmware/blob/master/oslo_vmware/exceptions.py","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"49adb83cde1ffec19e5a5c4f5c35787c3959aee4","unresolved":false,"context_lines":[{"line_number":1463,"context_line":"            LOG.debug(\"Attempting to shut down the VM\", instance\u003dinstance)"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1465,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1466,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1467,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1468,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1469,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_34b16b90","line":1466,"in_reply_to":"9a0c5dc1_0a59a55a","updated":"2015-05-13 07:04:12.000000000","message":"Great. Thank you very much.","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"49adb83cde1ffec19e5a5c4f5c35787c3959aee4","unresolved":false,"context_lines":[{"line_number":1463,"context_line":"            LOG.debug(\"Attempting to shut down the VM\", instance\u003dinstance)"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1465,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1466,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1467,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1468,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1469,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_374ccd41","line":1466,"in_reply_to":"9a0c5dc1_11b0c3f3","updated":"2015-05-13 07:04:12.000000000","message":"Sorry, I thought it existed before. thank you.","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"4135f26f98479d5c4b217b6dcaece1f9bb04e06c","unresolved":false,"context_lines":[{"line_number":1463,"context_line":"            LOG.debug(\"Attempting to shut down the VM\", instance\u003dinstance)"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1465,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1466,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1467,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1468,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1469,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_b89af712","line":1466,"in_reply_to":"9a0c5dc1_11b0c3f3","updated":"2015-05-12 22:33:22.000000000","message":"Yep, ToolsUnavailable will have to be added to oslo_vmware first.","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"d31c08330366e1098ea0ee5c69f2ec3c3f990dda","unresolved":false,"context_lines":[{"line_number":1463,"context_line":"            LOG.debug(\"Attempting to shut down the VM\", instance\u003dinstance)"},{"line_number":1464,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1465,"context_line":"            LOG.debug(\"Shutdown the VM\", instance\u003dinstance)"},{"line_number":1466,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1467,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1468,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1469,"context_line":"                                             \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_0a59a55a","line":1466,"in_reply_to":"9a0c5dc1_b89af712","updated":"2015-05-13 03:39:47.000000000","message":"I created patch: https://review.openstack.org/182527 in oslo_vmware to add this new exception.\n\nAdd this to your commit message:\nDepends-On: Ibe132e54dd84e12d01e32528824e6db8ec785b52","commit_id":"f899e8d9eebac5a2981f6a7cc6fb54844390e42d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46d9402b7528f8935f748f6040ef0880d1814bdb","unresolved":false,"context_lines":[{"line_number":63,"context_line":"# unnecessary communication with the backend."},{"line_number":64,"context_line":"_VM_REFS_CACHE \u003d {}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"VMWARE_POWER_STATES \u003d {\u0027poweredOff\u0027: power_state.SHUTDOWN,"},{"line_number":67,"context_line":"                       \u0027poweredOn\u0027: power_state.RUNNING,"},{"line_number":68,"context_line":"                       \u0027suspended\u0027: power_state.SUSPENDED}"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_b186a9b7","line":66,"updated":"2015-05-14 15:03:54.000000000","message":"this should be moved to constants.py","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"143ec63ff788e33e56f35b3ce8b56c2569ad3b79","unresolved":false,"context_lines":[{"line_number":63,"context_line":"# unnecessary communication with the backend."},{"line_number":64,"context_line":"_VM_REFS_CACHE \u003d {}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"VMWARE_POWER_STATES \u003d {\u0027poweredOff\u0027: power_state.SHUTDOWN,"},{"line_number":67,"context_line":"                       \u0027poweredOn\u0027: power_state.RUNNING,"},{"line_number":68,"context_line":"                       \u0027suspended\u0027: power_state.SUSPENDED}"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_664f15be","line":66,"in_reply_to":"7a016987_b186a9b7","updated":"2015-05-16 16:09:15.000000000","message":"ok","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"0bc7e4dbf33ec466161d95032a5339cd2c0119be","unresolved":false,"context_lines":[{"line_number":1458,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1459,"context_line":""},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"def get_power_state(session, vm_ref):"},{"line_number":1462,"context_line":"    lst_properties \u003d [\"runtime.powerState\"]"},{"line_number":1463,"context_line":"    vm_props \u003d session._call_method(vim_util,"},{"line_number":1464,"context_line":"                \"get_object_properties\", None, vm_ref, \"VirtualMachine\","}],"source_content_type":"text/x-python","patch_set":9,"id":"9a0c5dc1_0abe24d4","line":1461,"updated":"2015-05-13 18:26:14.000000000","message":"This is a local only function, so prefix with _","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"b3fcd63b68b750b1cdced8356f2b7782e0201243","unresolved":false,"context_lines":[{"line_number":1458,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1459,"context_line":""},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"def get_power_state(session, vm_ref):"},{"line_number":1462,"context_line":"    lst_properties \u003d [\"runtime.powerState\"]"},{"line_number":1463,"context_line":"    vm_props \u003d session._call_method(vim_util,"},{"line_number":1464,"context_line":"                \"get_object_properties\", None, vm_ref, \"VirtualMachine\","}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_51bad5e2","line":1461,"in_reply_to":"9a0c5dc1_0abe24d4","updated":"2015-05-14 14:45:14.000000000","message":"ok","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46d9402b7528f8935f748f6040ef0880d1814bdb","unresolved":false,"context_lines":[{"line_number":1468,"context_line":"    return state"},{"line_number":1469,"context_line":""},{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"def _clean_shutdown(session, instance, vm_ref, timeout, retry_interval):"},{"line_number":1472,"context_line":"    \"\"\"Attempt to shutdown the instance gracefully."},{"line_number":1473,"context_line":""},{"line_number":1474,"context_line":"    :param instance: The instance to be shutdown"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_34d50743","line":1471,"updated":"2015-05-14 15:03:54.000000000","message":"suggest changing _clean_shutdown to _graceful_shutdown","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"143ec63ff788e33e56f35b3ce8b56c2569ad3b79","unresolved":false,"context_lines":[{"line_number":1468,"context_line":"    return state"},{"line_number":1469,"context_line":""},{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"def _clean_shutdown(session, instance, vm_ref, timeout, retry_interval):"},{"line_number":1472,"context_line":"    \"\"\"Attempt to shutdown the instance gracefully."},{"line_number":1473,"context_line":""},{"line_number":1474,"context_line":"    :param instance: The instance to be shutdown"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_86221100","line":1471,"in_reply_to":"7a016987_34d50743","updated":"2015-05-16 16:09:15.000000000","message":"ok","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46d9402b7528f8935f748f6040ef0880d1814bdb","unresolved":false,"context_lines":[{"line_number":1480,"context_line":""},{"line_number":1481,"context_line":"    :returns: True if the shutdown succeeded else False"},{"line_number":1482,"context_line":"    \"\"\""},{"line_number":1483,"context_line":"    if vm_ref is None:"},{"line_number":1484,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1485,"context_line":""},{"line_number":1486,"context_line":"    retry_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_74693f8b","line":1483,"updated":"2015-05-14 15:03:54.000000000","message":"we do not need line 1483-1484\nthe calling method should pass vm_ref","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"143ec63ff788e33e56f35b3ce8b56c2569ad3b79","unresolved":false,"context_lines":[{"line_number":1480,"context_line":""},{"line_number":1481,"context_line":"    :returns: True if the shutdown succeeded else False"},{"line_number":1482,"context_line":"    \"\"\""},{"line_number":1483,"context_line":"    if vm_ref is None:"},{"line_number":1484,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1485,"context_line":""},{"line_number":1486,"context_line":"    retry_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_66f3959f","line":1483,"in_reply_to":"7a016987_74693f8b","updated":"2015-05-16 16:09:15.000000000","message":"Done","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46d9402b7528f8935f748f6040ef0880d1814bdb","unresolved":false,"context_lines":[{"line_number":1485,"context_line":""},{"line_number":1486,"context_line":"    retry_count \u003d 0"},{"line_number":1487,"context_line":""},{"line_number":1488,"context_line":"    def _shutdown(session, vm_ref):"},{"line_number":1489,"context_line":"        try:"},{"line_number":1490,"context_line":"            LOG.debug(\"Attempting to shutdown the VM\", instance\u003dinstance)"},{"line_number":1491,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_94627bd7","line":1488,"updated":"2015-05-14 15:03:54.000000000","message":"why does this need to be a nested method?","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"143ec63ff788e33e56f35b3ce8b56c2569ad3b79","unresolved":false,"context_lines":[{"line_number":1485,"context_line":""},{"line_number":1486,"context_line":"    retry_count \u003d 0"},{"line_number":1487,"context_line":""},{"line_number":1488,"context_line":"    def _shutdown(session, vm_ref):"},{"line_number":1489,"context_line":"        try:"},{"line_number":1490,"context_line":"            LOG.debug(\"Attempting to shutdown the VM\", instance\u003dinstance)"},{"line_number":1491,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_e60c2596","line":1488,"in_reply_to":"7a016987_94627bd7","updated":"2015-05-16 16:09:15.000000000","message":"becuase the timer FixedIntervalLoopingCall needs it.","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46d9402b7528f8935f748f6040ef0880d1814bdb","unresolved":false,"context_lines":[{"line_number":1487,"context_line":""},{"line_number":1488,"context_line":"    def _shutdown(session, vm_ref):"},{"line_number":1489,"context_line":"        try:"},{"line_number":1490,"context_line":"            LOG.debug(\"Attempting to shutdown the VM\", instance\u003dinstance)"},{"line_number":1491,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1492,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1493,"context_line":"            raise loopingcall.LoopingCallDone(False)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_14dd6b42","line":1490,"updated":"2015-05-14 15:03:54.000000000","message":"Attempting to shutdown \u003d\u003e Attempting to do a graceful shutdown","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"143ec63ff788e33e56f35b3ce8b56c2569ad3b79","unresolved":false,"context_lines":[{"line_number":1487,"context_line":""},{"line_number":1488,"context_line":"    def _shutdown(session, vm_ref):"},{"line_number":1489,"context_line":"        try:"},{"line_number":1490,"context_line":"            LOG.debug(\"Attempting to shutdown the VM\", instance\u003dinstance)"},{"line_number":1491,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1492,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1493,"context_line":"            raise loopingcall.LoopingCallDone(False)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_c60fe986","line":1490,"in_reply_to":"7a016987_14dd6b42","updated":"2015-05-16 16:09:15.000000000","message":"Done","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46d9402b7528f8935f748f6040ef0880d1814bdb","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"        try:"},{"line_number":1490,"context_line":"            LOG.debug(\"Attempting to shutdown the VM\", instance\u003dinstance)"},{"line_number":1491,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1492,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1493,"context_line":"            raise loopingcall.LoopingCallDone(False)"},{"line_number":1494,"context_line":""},{"line_number":1495,"context_line":"        power_state \u003d get_power_state(session, vm_ref)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_7155d11b","line":1492,"updated":"2015-05-14 15:03:54.000000000","message":"this exception does not exist. you can work around this by doing the following:\n1. declaring the exception in nova\n2. binding that exception to oslo VMware (https://github.com/openstack/oslo.vmware/blob/master/oslo_vmware/exceptions.py#L266)","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"143ec63ff788e33e56f35b3ce8b56c2569ad3b79","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"        try:"},{"line_number":1490,"context_line":"            LOG.debug(\"Attempting to shutdown the VM\", instance\u003dinstance)"},{"line_number":1491,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1492,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1493,"context_line":"            raise loopingcall.LoopingCallDone(False)"},{"line_number":1494,"context_line":""},{"line_number":1495,"context_line":"        power_state \u003d get_power_state(session, vm_ref)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_c6d489be","line":1492,"in_reply_to":"7a016987_7155d11b","updated":"2015-05-16 16:09:15.000000000","message":"ok, thanks.\nbut, could you tell me how to bind that exception to oslo VMware?","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"9f11a1395ee90c4a724d2f44ee127cfde69dde96","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"        try:"},{"line_number":1490,"context_line":"            LOG.debug(\"Attempting to shutdown the VM\", instance\u003dinstance)"},{"line_number":1491,"context_line":"            session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1492,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1493,"context_line":"            raise loopingcall.LoopingCallDone(False)"},{"line_number":1494,"context_line":""},{"line_number":1495,"context_line":"        power_state \u003d get_power_state(session, vm_ref)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_c87c9274","line":1492,"in_reply_to":"7a016987_c6d489be","updated":"2015-05-16 17:14:49.000000000","message":"So oslo.vmware already has this exception with my patch, but you have to wait until a new version of oslo.vmware is pushed up to PyPi.  Shouldn\u0027t be that long though.","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46d9402b7528f8935f748f6040ef0880d1814bdb","unresolved":false,"context_lines":[{"line_number":1492,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1493,"context_line":"            raise loopingcall.LoopingCallDone(False)"},{"line_number":1494,"context_line":""},{"line_number":1495,"context_line":"        power_state \u003d get_power_state(session, vm_ref)"},{"line_number":1496,"context_line":"        if power_state is power_state.SHUTDOWN:"},{"line_number":1497,"context_line":"            LOG.debug(\"Shutdown the VM successfully\", instance\u003dinstance)"},{"line_number":1498,"context_line":"            raise loopingcall.LoopingCallDone(True)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_f4b40fd2","line":1495,"updated":"2015-05-14 15:03:54.000000000","message":"lines 1495-1505 should be done int he loop. Not sure why we call ShutdownGuest with each iteration - that should only be called once","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"143ec63ff788e33e56f35b3ce8b56c2569ad3b79","unresolved":false,"context_lines":[{"line_number":1492,"context_line":"        except vexc.ToolsUnavailableException:"},{"line_number":1493,"context_line":"            raise loopingcall.LoopingCallDone(False)"},{"line_number":1494,"context_line":""},{"line_number":1495,"context_line":"        power_state \u003d get_power_state(session, vm_ref)"},{"line_number":1496,"context_line":"        if power_state is power_state.SHUTDOWN:"},{"line_number":1497,"context_line":"            LOG.debug(\"Shutdown the VM successfully\", instance\u003dinstance)"},{"line_number":1498,"context_line":"            raise loopingcall.LoopingCallDone(True)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_662155fb","line":1495,"in_reply_to":"7a016987_f4b40fd2","updated":"2015-05-16 16:09:15.000000000","message":"ok, I will move the ShutdownGuest outside","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"0bc7e4dbf33ec466161d95032a5339cd2c0119be","unresolved":false,"context_lines":[{"line_number":1511,"context_line":""},{"line_number":1512,"context_line":""},{"line_number":1513,"context_line":"def power_off_instance(session, instance, timeout\u003d0,"},{"line_number":1514,"context_line":"                       retry_interval\u003d0, vm_ref\u003dNone):"},{"line_number":1515,"context_line":"    \"\"\"Power off the specified instance.\"\"\""},{"line_number":1516,"context_line":""},{"line_number":1517,"context_line":"    if vm_ref is None:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a0c5dc1_ca012c6c","line":1514,"updated":"2015-05-13 18:26:14.000000000","message":"Can you please move retry_interval\u003d0, up on same line as power_off_instance?","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"b3fcd63b68b750b1cdced8356f2b7782e0201243","unresolved":false,"context_lines":[{"line_number":1511,"context_line":""},{"line_number":1512,"context_line":""},{"line_number":1513,"context_line":"def power_off_instance(session, instance, timeout\u003d0,"},{"line_number":1514,"context_line":"                       retry_interval\u003d0, vm_ref\u003dNone):"},{"line_number":1515,"context_line":"    \"\"\"Power off the specified instance.\"\"\""},{"line_number":1516,"context_line":""},{"line_number":1517,"context_line":"    if vm_ref is None:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_f1b8a1e7","line":1514,"in_reply_to":"9a0c5dc1_ca012c6c","updated":"2015-05-14 14:45:14.000000000","message":"ok","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"46d9402b7528f8935f748f6040ef0880d1814bdb","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1519,"context_line":""},{"line_number":1520,"context_line":"    try:"},{"line_number":1521,"context_line":"        if not _clean_shutdown(session, instance, vm_ref,"},{"line_number":1522,"context_line":"                               timeout, retry_interval):"},{"line_number":1523,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1524,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_d413535b","line":1521,"updated":"2015-05-14 15:03:54.000000000","message":"i am a little concerned about these timeouts. how are we sure that the compute manager passes in the correct values.","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"9f11a1395ee90c4a724d2f44ee127cfde69dde96","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1519,"context_line":""},{"line_number":1520,"context_line":"    try:"},{"line_number":1521,"context_line":"        if not _clean_shutdown(session, instance, vm_ref,"},{"line_number":1522,"context_line":"                               timeout, retry_interval):"},{"line_number":1523,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1524,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_4891c298","line":1521,"in_reply_to":"7a016987_a6550d51","updated":"2015-05-16 17:14:49.000000000","message":"Agree, I think any validation of the timeout values should be higher in nova/compute/manager since any nova driver can make use of it.","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"143ec63ff788e33e56f35b3ce8b56c2569ad3b79","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1519,"context_line":""},{"line_number":1520,"context_line":"    try:"},{"line_number":1521,"context_line":"        if not _clean_shutdown(session, instance, vm_ref,"},{"line_number":1522,"context_line":"                               timeout, retry_interval):"},{"line_number":1523,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1524,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_a6550d51","line":1521,"in_reply_to":"7a016987_d413535b","updated":"2015-05-16 16:09:15.000000000","message":"Yes, I think we should validate the parameters in nova. \nHere, even if the parameters are illegal, we can wait for the shutdown until completion.","commit_id":"4ef3371c295c5553b953e2791486ad1084d369bf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f4aa76c57da424e70018ac7aa4780319f3811b3c","unresolved":false,"context_lines":[{"line_number":1478,"context_line":"    try:"},{"line_number":1479,"context_line":"        LOG.debug(\"Attempting to do a graceful shutdown\", instance\u003dinstance)"},{"line_number":1480,"context_line":"        session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1481,"context_line":"    except vexc.ToolsUnavailableException as e:"},{"line_number":1482,"context_line":"        LOG.debug(\"Failed to shutdown the VM: %s\", e, instance\u003dinstance)"},{"line_number":1483,"context_line":"        return False"},{"line_number":1484,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_7bf500eb","line":1481,"updated":"2015-05-21 21:52:38.000000000","message":"There are two options for this:\n1. wait for us to cut oslo vmware\n2. you could register the exception - https://github.com/openstack/oslo.vmware/blob/master/oslo_vmware/exceptions.py#L266\nIf you want I can wrte you a pacth on how to use this","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"7b1e910c71cc75779a8ffcbd407997964b9006a1","unresolved":false,"context_lines":[{"line_number":1478,"context_line":"    try:"},{"line_number":1479,"context_line":"        LOG.debug(\"Attempting to do a graceful shutdown\", instance\u003dinstance)"},{"line_number":1480,"context_line":"        session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1481,"context_line":"    except vexc.ToolsUnavailableException as e:"},{"line_number":1482,"context_line":"        LOG.debug(\"Failed to shutdown the VM: %s\", e, instance\u003dinstance)"},{"line_number":1483,"context_line":"        return False"},{"line_number":1484,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_988f7e74","line":1481,"in_reply_to":"7a016987_7bf500eb","updated":"2015-05-23 16:01:22.000000000","message":"thank you very much","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"4512e0838482956e407a93ebdc6d1537a11a4c0f","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"        return False"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"    # nonlocal in Python3.x"},{"line_number":1486,"context_line":"    retry_count \u003d [0]"},{"line_number":1487,"context_line":"    if retry_interval \u003c 1:"},{"line_number":1488,"context_line":"        retry_interval \u003d 1"},{"line_number":1489,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_4d060d53","line":1486,"updated":"2015-05-21 18:36:59.000000000","message":"i feel like i am missing something - but i am not sure why retry_count is an array rather than an integer...","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"e764a3617e82abad097b12023a0193131d08725d","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"        return False"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"    # nonlocal in Python3.x"},{"line_number":1486,"context_line":"    retry_count \u003d [0]"},{"line_number":1487,"context_line":"    if retry_interval \u003c 1:"},{"line_number":1488,"context_line":"        retry_interval \u003d 1"},{"line_number":1489,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_85d3b9d4","line":1486,"in_reply_to":"7a016987_4d060d53","updated":"2015-05-21 21:24:56.000000000","message":"i understand why now - but why not just pass it in as a variable instead of doing it this way?","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"7b1e910c71cc75779a8ffcbd407997964b9006a1","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"        return False"},{"line_number":1484,"context_line":""},{"line_number":1485,"context_line":"    # nonlocal in Python3.x"},{"line_number":1486,"context_line":"    retry_count \u003d [0]"},{"line_number":1487,"context_line":"    if retry_interval \u003c 1:"},{"line_number":1488,"context_line":"        retry_interval \u003d 1"},{"line_number":1489,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_38a1aaf8","line":1486,"in_reply_to":"7a016987_85d3b9d4","updated":"2015-05-23 16:01:22.000000000","message":"I\u0027ve thought about that way you said, but as we all know, the int variable passed in can not been really changed when next time.\n\nmaybe we can add a wrapper:\nclass IntWrapper,  use it like this: retry_count \u003d IntWrapper(0) retry_count.value +\u003d 1.\n\nAfter all, I think its the easiest way to use the array.","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"4512e0838482956e407a93ebdc6d1537a11a4c0f","unresolved":false,"context_lines":[{"line_number":1507,"context_line":"    return evt.wait()"},{"line_number":1508,"context_line":""},{"line_number":1509,"context_line":""},{"line_number":1510,"context_line":"def power_off_instance(session, instance, timeout\u003d0, retry_interval\u003d0,"},{"line_number":1511,"context_line":"                       vm_ref\u003dNone):"},{"line_number":1512,"context_line":"    \"\"\"Power off the specified instance.\"\"\""},{"line_number":1513,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_ad6901fb","line":1510,"updated":"2015-05-21 18:36:59.000000000","message":"it feels like retry_interval should be non-zero.  If they give a timeout value  \u003e 0 and don\u0027t specify a retry_interval then we actually will not timeout since 0 is never greater than timeout and this will be unexpected behavior","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"7b1e910c71cc75779a8ffcbd407997964b9006a1","unresolved":false,"context_lines":[{"line_number":1507,"context_line":"    return evt.wait()"},{"line_number":1508,"context_line":""},{"line_number":1509,"context_line":""},{"line_number":1510,"context_line":"def power_off_instance(session, instance, timeout\u003d0, retry_interval\u003d0,"},{"line_number":1511,"context_line":"                       vm_ref\u003dNone):"},{"line_number":1512,"context_line":"    \"\"\"Power off the specified instance.\"\"\""},{"line_number":1513,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_b8111a54","line":1510,"in_reply_to":"7a016987_ad6901fb","updated":"2015-05-23 16:01:22.000000000","message":"yes, retry_interval should be non-zero.\ntherefore, if retry_interval \u003c 1, we set retry_interval  \u003d 1 (line 1487).","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"4512e0838482956e407a93ebdc6d1537a11a4c0f","unresolved":false,"context_lines":[{"line_number":1516,"context_line":""},{"line_number":1517,"context_line":"    try:"},{"line_number":1518,"context_line":"        if not _graceful_shutdown(session, instance, vm_ref,"},{"line_number":1519,"context_line":"                                  timeout, retry_interval):"},{"line_number":1520,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1521,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1522,"context_line":"                                        \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_eddff9d3","line":1519,"updated":"2015-05-21 18:36:59.000000000","message":"it seems like we should try to do the graceful shutdown and regardless of the outcome we should do the power off.  It\u0027s the intent of the user presumably to end up with a powered off vm.","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"7b1e910c71cc75779a8ffcbd407997964b9006a1","unresolved":false,"context_lines":[{"line_number":1516,"context_line":""},{"line_number":1517,"context_line":"    try:"},{"line_number":1518,"context_line":"        if not _graceful_shutdown(session, instance, vm_ref,"},{"line_number":1519,"context_line":"                                  timeout, retry_interval):"},{"line_number":1520,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1521,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"},{"line_number":1522,"context_line":"                                        \"PowerOffVM_Task\", vm_ref)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_9861bed5","line":1519,"in_reply_to":"7a016987_eddff9d3","updated":"2015-05-23 16:01:22.000000000","message":"thanks.\n\nif the graceful shutdown is failed, possible causes are: vmtools is not installed or its timeout, so we should do the power off as a backup.","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6aee2e8d7d5f218f58fac896d340e291cb5cda2b","unresolved":false,"context_lines":[{"line_number":1455,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1456,"context_line":""},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"def _register_tools_unavailable_exception():"},{"line_number":1459,"context_line":"    \"\"\"VMware: add support for ToolsUnavailableException"},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    Provide a stop gap for this exception until the next oslo.vmware"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a016987_7fadc1e7","line":1458,"updated":"2015-05-25 04:00:26.000000000","message":"why not base this on https://review.openstack.org/185108?\n\ninvoking this code at each shutdown is not good and the exception need only be registered once","commit_id":"edb2453c9130873521768e13de81f08f6d824175"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"1bef3b01dd64d6aadb7e2c63e9c96f87094c7dbf","unresolved":false,"context_lines":[{"line_number":1455,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1456,"context_line":""},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"def _register_tools_unavailable_exception():"},{"line_number":1459,"context_line":"    \"\"\"VMware: add support for ToolsUnavailableException"},{"line_number":1460,"context_line":""},{"line_number":1461,"context_line":"    Provide a stop gap for this exception until the next oslo.vmware"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a016987_955baef6","line":1458,"in_reply_to":"7a016987_7fadc1e7","updated":"2015-05-25 17:41:17.000000000","message":"Agreed, just rebase on I0c2ab3107e5f4752ab77cb5ab24568fc6e27be89 until a new oslo.vmware is available.","commit_id":"edb2453c9130873521768e13de81f08f6d824175"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6aee2e8d7d5f218f58fac896d340e291cb5cda2b","unresolved":false,"context_lines":[{"line_number":1501,"context_line":"        LOG.debug(\"Attempting to do a graceful shutdown\", instance\u003dinstance)"},{"line_number":1502,"context_line":"        session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1503,"context_line":"    except vexc.ToolsUnavailableException as e:"},{"line_number":1504,"context_line":"        LOG.debug(\"Failed to shutdown the VM: %s\", e, instance\u003dinstance)"},{"line_number":1505,"context_line":"        return False"},{"line_number":1506,"context_line":""},{"line_number":1507,"context_line":"    # nonlocal in Python3.x"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a016987_df7a7576","line":1504,"updated":"2015-05-25 04:00:26.000000000","message":"not sure why we need to tpint the exception here - we know the tools are not supported by the exception raised","commit_id":"edb2453c9130873521768e13de81f08f6d824175"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"2a048969475791ec5cf70dbc12401a72fe31a12c","unresolved":false,"context_lines":[{"line_number":1501,"context_line":"        LOG.debug(\"Attempting to do a graceful shutdown\", instance\u003dinstance)"},{"line_number":1502,"context_line":"        session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1503,"context_line":"    except vexc.ToolsUnavailableException as e:"},{"line_number":1504,"context_line":"        LOG.debug(\"Failed to shutdown the VM: %s\", e, instance\u003dinstance)"},{"line_number":1505,"context_line":"        return False"},{"line_number":1506,"context_line":""},{"line_number":1507,"context_line":"    # nonlocal in Python3.x"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a016987_186bb586","line":1504,"in_reply_to":"7a016987_df7a7576","updated":"2015-05-31 02:42:05.000000000","message":"Done","commit_id":"edb2453c9130873521768e13de81f08f6d824175"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"017460c3d9f7e7f63563aa337bd2b4363f514a3e","unresolved":false,"context_lines":[{"line_number":1473,"context_line":"def _graceful_shutdown(session, instance, vm_ref, timeout, retry_interval):"},{"line_number":1474,"context_line":"    \"\"\"Attempt to shutdown the instance gracefully."},{"line_number":1475,"context_line":""},{"line_number":1476,"context_line":"    :param instance: The instance to be shutdown"},{"line_number":1477,"context_line":"    :param vm_ref: VirtualMachine reference object"},{"line_number":1478,"context_line":"    :param timeout: How long to wait in seconds for the instance to shutdown"},{"line_number":1479,"context_line":"                    if timeout \u003c\u003d 0, waiting for shutdown forever"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_45d941f2","line":1476,"updated":"2015-05-31 12:58:41.000000000","message":"This should also be:\n:param instance: nova.objects.instance.Instance","commit_id":"22788efd0f932f38ce2f9e1de4f9a00e1b29fdf5"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"842515ea8890b8e449532e211e001565f1f4301a","unresolved":false,"context_lines":[{"line_number":1473,"context_line":"def _graceful_shutdown(session, instance, vm_ref, timeout, retry_interval):"},{"line_number":1474,"context_line":"    \"\"\"Attempt to shutdown the instance gracefully."},{"line_number":1475,"context_line":""},{"line_number":1476,"context_line":"    :param instance: The instance to be shutdown"},{"line_number":1477,"context_line":"    :param vm_ref: VirtualMachine reference object"},{"line_number":1478,"context_line":"    :param timeout: How long to wait in seconds for the instance to shutdown"},{"line_number":1479,"context_line":"                    if timeout \u003c\u003d 0, waiting for shutdown forever"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_d88e2478","line":1476,"in_reply_to":"7a016987_45d941f2","updated":"2015-06-03 14:29:23.000000000","message":"Done","commit_id":"22788efd0f932f38ce2f9e1de4f9a00e1b29fdf5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"017460c3d9f7e7f63563aa337bd2b4363f514a3e","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"    :returns: True if the shutdown succeeded else False"},{"line_number":1484,"context_line":"    \"\"\""},{"line_number":1485,"context_line":"    try:"},{"line_number":1486,"context_line":"        LOG.debug(\"Attempting to do a graceful shutdown\", instance\u003dinstance)"},{"line_number":1487,"context_line":"        session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1488,"context_line":"    except vexc.ToolsUnavailableException:"},{"line_number":1489,"context_line":"        LOG.debug(\"Failed to shutdown the VM(Tools Unavailable)\","}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_2592c5f6","line":1486,"updated":"2015-05-31 12:58:41.000000000","message":"minor nit - this does not need to be in the try","commit_id":"22788efd0f932f38ce2f9e1de4f9a00e1b29fdf5"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"842515ea8890b8e449532e211e001565f1f4301a","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"    :returns: True if the shutdown succeeded else False"},{"line_number":1484,"context_line":"    \"\"\""},{"line_number":1485,"context_line":"    try:"},{"line_number":1486,"context_line":"        LOG.debug(\"Attempting to do a graceful shutdown\", instance\u003dinstance)"},{"line_number":1487,"context_line":"        session._call_method(session.vim, \"ShutdownGuest\", vm_ref)"},{"line_number":1488,"context_line":"    except vexc.ToolsUnavailableException:"},{"line_number":1489,"context_line":"        LOG.debug(\"Failed to shutdown the VM(Tools Unavailable)\","}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_386f78c5","line":1486,"in_reply_to":"7a016987_2592c5f6","updated":"2015-06-03 14:29:23.000000000","message":"Done","commit_id":"22788efd0f932f38ce2f9e1de4f9a00e1b29fdf5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"017460c3d9f7e7f63563aa337bd2b4363f514a3e","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        retry_interval \u003d 1"},{"line_number":1497,"context_line":""},{"line_number":1498,"context_line":"    def _wait_for_shutdown(session, vm_ref):"},{"line_number":1499,"context_line":"        power_stat \u003d _get_power_state(session, vm_ref)"},{"line_number":1500,"context_line":"        if power_stat is power_state.SHUTDOWN:"},{"line_number":1501,"context_line":"            LOG.debug(\"Shutdown the VM successfully\", instance\u003dinstance)"},{"line_number":1502,"context_line":"            raise loopingcall.LoopingCallDone(True)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_45002134","line":1499,"range":{"start_line":1499,"start_character":8,"end_line":1499,"end_character":18},"updated":"2015-05-31 12:58:41.000000000","message":"power_stat \u003d\u003e power_state","commit_id":"22788efd0f932f38ce2f9e1de4f9a00e1b29fdf5"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"842515ea8890b8e449532e211e001565f1f4301a","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        retry_interval \u003d 1"},{"line_number":1497,"context_line":""},{"line_number":1498,"context_line":"    def _wait_for_shutdown(session, vm_ref):"},{"line_number":1499,"context_line":"        power_stat \u003d _get_power_state(session, vm_ref)"},{"line_number":1500,"context_line":"        if power_stat is power_state.SHUTDOWN:"},{"line_number":1501,"context_line":"            LOG.debug(\"Shutdown the VM successfully\", instance\u003dinstance)"},{"line_number":1502,"context_line":"            raise loopingcall.LoopingCallDone(True)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_78361004","line":1499,"in_reply_to":"7a016987_45002134","updated":"2015-06-03 14:29:23.000000000","message":"If I use the variable name \"power_state\", it will throw the following exception in the 1500th line:\nAttributeError: \u0027int\u0027 object has no attribute \u0027SHUTDOWN\u0027.\n\nSo I use \"power_stat\" instead.","commit_id":"22788efd0f932f38ce2f9e1de4f9a00e1b29fdf5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e55122c43b5fb1e8a8b284c61aa30e4423e85573","unresolved":false,"context_lines":[{"line_number":1460,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1461,"context_line":""},{"line_number":1462,"context_line":""},{"line_number":1463,"context_line":"def _get_power_state(session, vm_ref):"},{"line_number":1464,"context_line":"    lst_properties \u003d [\"runtime.powerState\"]"},{"line_number":1465,"context_line":"    vm_props \u003d session._call_method(vim_util,"},{"line_number":1466,"context_line":"                \"get_object_properties\", None, vm_ref, \"VirtualMachine\","}],"source_content_type":"text/x-python","patch_set":17,"id":"1af86dd1_257e05af","line":1463,"updated":"2015-06-12 05:16:15.000000000","message":"we do not need this method there is already one - in vm_util get_vm_state","commit_id":"d373d26a3203556a331e9d1143ff5dafc0dc42fa"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"125a40d556dfcff946d9c9929e699dc5a5977d8a","unresolved":false,"context_lines":[{"line_number":1460,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1461,"context_line":""},{"line_number":1462,"context_line":""},{"line_number":1463,"context_line":"def _get_power_state(session, vm_ref):"},{"line_number":1464,"context_line":"    lst_properties \u003d [\"runtime.powerState\"]"},{"line_number":1465,"context_line":"    vm_props \u003d session._call_method(vim_util,"},{"line_number":1466,"context_line":"                \"get_object_properties\", None, vm_ref, \"VirtualMachine\","}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_3f9a9515","line":1463,"in_reply_to":"1af86dd1_257e05af","updated":"2015-06-19 06:45:21.000000000","message":"ok","commit_id":"d373d26a3203556a331e9d1143ff5dafc0dc42fa"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"6a95f97859c370ae26dafa1747f7fbf228b86c3c","unresolved":false,"context_lines":[{"line_number":1495,"context_line":"    if retry_interval \u003c 1:"},{"line_number":1496,"context_line":"        retry_interval \u003d 1"},{"line_number":1497,"context_line":""},{"line_number":1498,"context_line":"    def _wait_for_shutdown(session, vm_ref):"},{"line_number":1499,"context_line":"        power_stat \u003d _get_power_state(session, vm_ref)"},{"line_number":1500,"context_line":"        if power_stat is power_state.SHUTDOWN:"},{"line_number":1501,"context_line":"            LOG.debug(\"Shutdown the VM successfully\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1af86dd1_4ce5aea6","line":1498,"updated":"2015-06-12 02:36:09.000000000","message":"An alternative, which is probably more efficient would be to use vsphere API WaitForUpdatesEx.  You can construct a property collector that only monitors power state.","commit_id":"d373d26a3203556a331e9d1143ff5dafc0dc42fa"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"125a40d556dfcff946d9c9929e699dc5a5977d8a","unresolved":false,"context_lines":[{"line_number":1495,"context_line":"    if retry_interval \u003c 1:"},{"line_number":1496,"context_line":"        retry_interval \u003d 1"},{"line_number":1497,"context_line":""},{"line_number":1498,"context_line":"    def _wait_for_shutdown(session, vm_ref):"},{"line_number":1499,"context_line":"        power_stat \u003d _get_power_state(session, vm_ref)"},{"line_number":1500,"context_line":"        if power_stat is power_state.SHUTDOWN:"},{"line_number":1501,"context_line":"            LOG.debug(\"Shutdown the VM successfully\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_b4d263cf","line":1498,"in_reply_to":"1af86dd1_4ce5aea6","updated":"2015-06-19 06:45:21.000000000","message":"Yes, it looks better.  \nbut, if we use api WaitForUpdatesEx, perhaps we need to add code as below in vim_util.py[1].\n\nAnd I have not found any place to call this API (including _wait_for_task).\n\nits simple to use get_dynamic_property, so can I keep using api get_dynamic_property? thanks very much.\n\n[1]:\ndef get_object_properties(vim, collector, mobj, type, properties):\n    \"\"\"Gets the properties of the Managed object specified.\"\"\"\n    client_factory \u003d vim.client.factory\n    if mobj is None:\n        return None\n    usecoll \u003d collector\n    if usecoll is None:\n        usecoll \u003d vim.get_service_content().propertyCollector\n    property_filter_spec \u003d client_factory.create(\u0027ns0:PropertyFilterSpec\u0027)\n    property_spec \u003d client_factory.create(\u0027ns0:PropertySpec\u0027)\n    property_spec.all \u003d (properties is None or len(properties) \u003d\u003d 0)\n    property_spec.pathSet \u003d properties\n    property_spec.type \u003d type\n    object_spec \u003d client_factory.create(\u0027ns0:ObjectSpec\u0027)\n    object_spec.obj \u003d mobj\n    object_spec.skip \u003d False\n    property_filter_spec.propSet \u003d [property_spec]\n    property_filter_spec.objectSet \u003d [object_spec]\n    options \u003d client_factory.create(\u0027ns0:RetrieveOptions\u0027)\n    options.maxObjects \u003d CONF.vmware.maximum_objects\n    return vim.RetrievePropertiesEx(usecoll, specSet\u003d[property_filter_spec],\n                                    options\u003doptions)\n\n\ndef get_dynamic_property(vim, mobj, type, property_name):\n    \"\"\"Gets a particular property of the Managed Object.\"\"\"\n    property_dict \u003d get_dynamic_properties(vim, mobj, type, [property_name])\n    return property_dict.get(property_name)\n\n\ndef get_dynamic_properties(vim, mobj, type, property_names):\n    \"\"\"Gets the specified properties of the Managed Object.\"\"\"\n    obj_content \u003d get_object_properties(vim, None, mobj, type, property_names)\n    if obj_content is None:\n        return {}\n    if hasattr(obj_content, \u0027token\u0027):\n        cancel_retrieve(vim, obj_content.token)\n    property_dict \u003d {}\n    if obj_content.objects:\n        if hasattr(obj_content.objects[0], \u0027propSet\u0027):\n            dynamic_properties \u003d obj_content.objects[0].propSet\n            if dynamic_properties:\n                for prop in dynamic_properties:\n                    property_dict[prop.name] \u003d prop.val\n        # The object may have information useful for logging\n        if hasattr(obj_content.objects[0], \u0027missingSet\u0027):\n            for m in obj_content.objects[0].missingSet:\n                LOG.warning(_(\"Unable to retrieve value for %(path)s \"\n                              \"Reason: %(reason)s\"),\n                            {\u0027path\u0027: m.path,\n                             \u0027reason\u0027: m.fault.localizedMessage})\n    return property_dict","commit_id":"d373d26a3203556a331e9d1143ff5dafc0dc42fa"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"1e0ae4d5c2cc56098225b095c39f658866b94e02","unresolved":false,"context_lines":[{"line_number":1500,"context_line":""},{"line_number":1501,"context_line":"    def _wait_for_shutdown():"},{"line_number":1502,"context_line":"        power_stat \u003d get_vm_state(session, instance)"},{"line_number":1503,"context_line":"        if power_stat is power_state.SHUTDOWN:"},{"line_number":1504,"context_line":"            LOG.debug(\"Shutdown the VM successfully\", instance\u003dinstance)"},{"line_number":1505,"context_line":"            raise loopingcall.LoopingCallDone(True)"},{"line_number":1506,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_6d6285da","line":1503,"updated":"2015-07-07 00:42:07.000000000","message":"at this point shouldn\u0027t you also power down the VM since that is the action the user is expecting?","commit_id":"831400b176006a6282930676f7f5e8d218b6a6b1"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"df989b77b43a56214ffe6d5147396ab59ec1d43e","unresolved":false,"context_lines":[{"line_number":1500,"context_line":""},{"line_number":1501,"context_line":"    def _wait_for_shutdown():"},{"line_number":1502,"context_line":"        power_stat \u003d get_vm_state(session, instance)"},{"line_number":1503,"context_line":"        if power_stat is power_state.SHUTDOWN:"},{"line_number":1504,"context_line":"            LOG.debug(\"Shutdown the VM successfully\", instance\u003dinstance)"},{"line_number":1505,"context_line":"            raise loopingcall.LoopingCallDone(True)"},{"line_number":1506,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_26da17e9","line":1503,"in_reply_to":"ba3cc151_6d6285da","updated":"2015-07-08 08:43:56.000000000","message":"if the power_stat is \"power_state.SHUTDOWN\", it means that the VM has been shut down successfully and is in ‘poweredOff\u0027’ state, so I think there is no need to call PowerOffVM_Task after that.","commit_id":"831400b176006a6282930676f7f5e8d218b6a6b1"},{"author":{"_account_id":17187,"name":"Kaustubh Phatak","email":"phatakkaustubh@gmail.com","username":"kaustubhvp"},"change_message_id":"23837bd5c25996bec90531472390db2bf8ab0a51","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1526,"context_line":""},{"line_number":1527,"context_line":"    try:"},{"line_number":1528,"context_line":"        if not _graceful_shutdown(session, instance, vm_ref,"},{"line_number":1529,"context_line":"                                  timeout, retry_interval):"},{"line_number":1530,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1531,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a41bdd9_045eea11","line":1528,"updated":"2015-07-14 18:37:36.000000000","message":"\"if\" statement can be taken out of \"try\" block as it will not raise any exception (also it is already handled in the _graceful_shutdown function)","commit_id":"a364391bd47f8f128b765d1f182a9c8575586bb4"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"8a4638b989f453ebd6116ecdba96c4dc9f16c149","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"        vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1526,"context_line":""},{"line_number":1527,"context_line":"    try:"},{"line_number":1528,"context_line":"        if not _graceful_shutdown(session, instance, vm_ref,"},{"line_number":1529,"context_line":"                                  timeout, retry_interval):"},{"line_number":1530,"context_line":"            LOG.debug(\"Powering off the VM\", instance\u003dinstance)"},{"line_number":1531,"context_line":"            poweroff_task \u003d session._call_method(session.vim,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a41bdd9_1a8f0d2b","line":1528,"in_reply_to":"9a41bdd9_045eea11","updated":"2015-07-19 10:32:43.000000000","message":"ok, thanks","commit_id":"a364391bd47f8f128b765d1f182a9c8575586bb4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a193afae73c1fd110ec22fa76d0fbb75f94c412e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_log import log as logging"},{"line_number":27,"context_line":"from oslo_utils import excutils"},{"line_number":28,"context_line":"from oslo_utils import units"},{"line_number":29,"context_line":"from oslo_vmware.common import loopingcall"},{"line_number":30,"context_line":"from oslo_vmware import exceptions as vexc"},{"line_number":31,"context_line":"from oslo_vmware.objects import datastore as ds_obj"},{"line_number":32,"context_line":"from oslo_vmware import pbm"}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_501ee763","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":42},"updated":"2016-03-02 02:38:33.000000000","message":"I\u0027m not crazy about using more loopingcall stuff from oslo.vmware when it\u0027s basically duplicated in oslo.service and we\u0027re using other things from oslo.service for retries, like in the libvirt driver:\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/libvirt/guest.py#L329\n\nIt\u0027s not a huge issue, I kind of just wish the stuff in oslo.vmware was deprecated so everything was using the same utilities.","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"2b46b33e5b024c9babe5be2db0dfe707b53ae41d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_log import log as logging"},{"line_number":27,"context_line":"from oslo_utils import excutils"},{"line_number":28,"context_line":"from oslo_utils import units"},{"line_number":29,"context_line":"from oslo_vmware.common import loopingcall"},{"line_number":30,"context_line":"from oslo_vmware import exceptions as vexc"},{"line_number":31,"context_line":"from oslo_vmware.objects import datastore as ds_obj"},{"line_number":32,"context_line":"from oslo_vmware import pbm"}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_cb714f78","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":42},"in_reply_to":"7af24918_501ee763","updated":"2016-03-03 08:57:27.000000000","message":"OK, I\u0027ll import it from oslo_service.","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a193afae73c1fd110ec22fa76d0fbb75f94c412e","unresolved":false,"context_lines":[{"line_number":1144,"context_line":"    vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1145,"context_line":"    vm_state \u003d session._call_method(vutil, \"get_object_property\","},{"line_number":1146,"context_line":"                                    vm_ref, \"runtime.powerState\")"},{"line_number":1147,"context_line":"    return constants.VMWARE_POWER_STATES[vm_state]"},{"line_number":1148,"context_line":""},{"line_number":1149,"context_line":""},{"line_number":1150,"context_line":"def get_stats_from_cluster(session, cluster):"}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_2d4ca4c6","line":1147,"updated":"2016-03-02 02:38:33.000000000","message":"This seems dangerous since it\u0027s changing essentially the result of a public utility method used throughout the driver.","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"2b46b33e5b024c9babe5be2db0dfe707b53ae41d","unresolved":false,"context_lines":[{"line_number":1144,"context_line":"    vm_ref \u003d get_vm_ref(session, instance)"},{"line_number":1145,"context_line":"    vm_state \u003d session._call_method(vutil, \"get_object_property\","},{"line_number":1146,"context_line":"                                    vm_ref, \"runtime.powerState\")"},{"line_number":1147,"context_line":"    return constants.VMWARE_POWER_STATES[vm_state]"},{"line_number":1148,"context_line":""},{"line_number":1149,"context_line":""},{"line_number":1150,"context_line":"def get_stats_from_cluster(session, cluster):"}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_1c4edc3a","line":1147,"in_reply_to":"7af24918_2d4ca4c6","updated":"2016-03-03 08:57:27.000000000","message":"Thanks to you for reminding me that I should check all the places that call this method.","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a193afae73c1fd110ec22fa76d0fbb75f94c412e","unresolved":false,"context_lines":[{"line_number":1466,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1467,"context_line":""},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"def _graceful_shutdown(session, instance, vm_ref, timeout, retry_interval):"},{"line_number":1470,"context_line":"    \"\"\"Attempt to shutdown the instance gracefully."},{"line_number":1471,"context_line":""},{"line_number":1472,"context_line":"    :param instance: nova.objects.instance.Instance"}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_8d95f8e5","line":1469,"range":{"start_line":1469,"start_character":50,"end_line":1469,"end_character":73},"updated":"2016-03-02 02:38:33.000000000","message":"Seems it would be better to default these to 0 like in the base ComputeDriver class:\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/driver.py#L725","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"2b46b33e5b024c9babe5be2db0dfe707b53ae41d","unresolved":false,"context_lines":[{"line_number":1466,"context_line":"                return int(option.key.split(\u0027.\u0027)[2])"},{"line_number":1467,"context_line":""},{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"def _graceful_shutdown(session, instance, vm_ref, timeout, retry_interval):"},{"line_number":1470,"context_line":"    \"\"\"Attempt to shutdown the instance gracefully."},{"line_number":1471,"context_line":""},{"line_number":1472,"context_line":"    :param instance: nova.objects.instance.Instance"}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_860bb98d","line":1469,"range":{"start_line":1469,"start_character":50,"end_line":1469,"end_character":73},"in_reply_to":"7af24918_8d95f8e5","updated":"2016-03-03 08:57:27.000000000","message":"OK","commit_id":"3011897fb0af6c3ff22105301f0311fbb5875ef5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"193237bf8e7e7e8c2fe8b9d1877e8ffc695258cd","unresolved":false,"context_lines":[{"line_number":1497,"context_line":"        return False"},{"line_number":1498,"context_line":""},{"line_number":1499,"context_line":"    # nonlocal in Python3.x"},{"line_number":1500,"context_line":"    retry_count \u003d [0]"},{"line_number":1501,"context_line":"    if retry_interval \u003c 1:"},{"line_number":1502,"context_line":"        retry_interval \u003d 1"},{"line_number":1503,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"bacf61ea_ffe98eb8","line":1500,"updated":"2016-08-03 20:09:48.000000000","message":"? Say what? Why are you using a list with a single element in it for a local variable for retry count?\n\nJust do:\n\n retry_count \u003d 0","commit_id":"63684eec47f843de2c06e4d4f397e6fd1c859be1"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"e4acf4f41b23c62412b20505ec85697a5456f9c5","unresolved":false,"context_lines":[{"line_number":1497,"context_line":"        return False"},{"line_number":1498,"context_line":""},{"line_number":1499,"context_line":"    # nonlocal in Python3.x"},{"line_number":1500,"context_line":"    retry_count \u003d [0]"},{"line_number":1501,"context_line":"    if retry_interval \u003c 1:"},{"line_number":1502,"context_line":"        retry_interval \u003d 1"},{"line_number":1503,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa6399be_a62364a6","line":1500,"in_reply_to":"bacf61ea_ffe98eb8","updated":"2016-10-19 20:26:58.000000000","message":"Done","commit_id":"63684eec47f843de2c06e4d4f397e6fd1c859be1"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"890200b898548a5217b87f1696005668b2ef8c50","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"                      timeout, instance\u003dinstance)"},{"line_number":1519,"context_line":"            raise loopingcall.LoopingCallDone(False)"},{"line_number":1520,"context_line":"        else:"},{"line_number":1521,"context_line":"            retry_count +\u003d 1"},{"line_number":1522,"context_line":""},{"line_number":1523,"context_line":"    loop \u003d loopingcall.FixedIntervalLoopingCall(_wait_for_shutdown)"},{"line_number":1524,"context_line":"    evt \u003d loop.start(retry_interval)"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba5da102_9a0dcc40","line":1521,"range":{"start_line":1521,"start_character":12,"end_line":1521,"end_character":28},"updated":"2016-11-01 12:04:17.000000000","message":"If we use \"retry_count \u003d 0\", then an exception will be thrown here: \"UnboundLocalError: local variable \u0027retry_count\u0027 referenced before assignment\".\nThe reason is a Python scoping issue that Python2.x forces the closed over variable to be read only. For more detailed information please refer to:\nhttp://www.gamedev.net/blog/468/entry-2254369-closures-and-python-27/\nhttp://stackoverflow.com/questions/3190706/nonlocal-keyword-in-python-2-x","commit_id":"998d587ae93f148d4ef19f4ac495709893110e26"}],"nova/virt/vmwareapi/vmops.py":[{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"4512e0838482956e407a93ebdc6d1537a11a4c0f","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"            vm_util.power_on_instance(self._session, instance, vm_ref\u003dvm_ref)"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"    def power_off(self, instance, timeout\u003d0, retry_interval\u003d0):"},{"line_number":1070,"context_line":"        \"\"\"Power off the specified instance.\"\"\""},{"line_number":1071,"context_line":"        vm_util.power_off_instance(self._session, instance,"},{"line_number":1072,"context_line":"                                   timeout, retry_interval)"},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_ed7b79bc","line":1070,"updated":"2015-05-21 18:36:59.000000000","message":"same comment on retry_interval as in vm_util but perhaps it should be set here and not in vm_util as an optional param","commit_id":"cc180b0b8d7f84c528d7245b734868e73c56c543"},{"author":{"_account_id":7400,"name":"Tracy Jones","email":"tjones@vmware.com","username":"tracyajones"},"change_message_id":"1e0ae4d5c2cc56098225b095c39f658866b94e02","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"VMWARE_POWER_STATES \u003d constants.VMWARE_POWER_STATES"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"RESIZE_TOTAL_STEPS \u003d 6"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_6db9252e","line":81,"updated":"2015-07-07 00:42:07.000000000","message":"why not convert the usage of VMWARE_POWER_STATES to directly use constants.VMWARE_POWER_STATE?  this seems cleaner","commit_id":"831400b176006a6282930676f7f5e8d218b6a6b1"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"df989b77b43a56214ffe6d5147396ab59ec1d43e","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"VMWARE_POWER_STATES \u003d constants.VMWARE_POWER_STATES"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"RESIZE_TOTAL_STEPS \u003d 6"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba3cc151_8b89ae28","line":81,"in_reply_to":"ba3cc151_6db9252e","updated":"2015-07-08 08:43:56.000000000","message":"ok, thanks","commit_id":"831400b176006a6282930676f7f5e8d218b6a6b1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7d43871d64929d9975d07c7369f4c40dafbc10ed","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"    def power_off(self, instance):"},{"line_number":1236,"context_line":"        \"\"\"Power off the specified instance."},{"line_number":1237,"context_line":""},{"line_number":1238,"context_line":"        :param instance: nova.objects.instance.Instance"},{"line_number":1239,"context_line":"        \"\"\""},{"line_number":1240,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1241,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_ad87140e","side":"PARENT","line":1238,"updated":"2016-03-02 02:19:29.000000000","message":"Rather than remove the docstrings, please just add docstrings here for the new parameters that are being added.","commit_id":"9d615b7eec1344264125bfed488391c0648b7031"},{"author":{"_account_id":15424,"name":"javeme","email":"javaloveme@gmail.com","username":"javeme"},"change_message_id":"2b46b33e5b024c9babe5be2db0dfe707b53ae41d","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"    def power_off(self, instance):"},{"line_number":1236,"context_line":"        \"\"\"Power off the specified instance."},{"line_number":1237,"context_line":""},{"line_number":1238,"context_line":"        :param instance: nova.objects.instance.Instance"},{"line_number":1239,"context_line":"        \"\"\""},{"line_number":1240,"context_line":"        vm_util.power_off_instance(self._session, instance)"},{"line_number":1241,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"7af24918_ebfb6bbf","side":"PARENT","line":1238,"in_reply_to":"7af24918_ad87140e","updated":"2016-03-03 08:57:27.000000000","message":"Done","commit_id":"9d615b7eec1344264125bfed488391c0648b7031"}]}
