Test force reboot CPVM
(self)
| 1068 | "sg"], |
| 1069 | required_hardware="true") |
| 1070 | def test_10_reboot_cpvm_forced(self): |
| 1071 | """Test force reboot CPVM |
| 1072 | """ |
| 1073 | |
| 1074 | list_cpvm_response = list_ssvms( |
| 1075 | self.apiclient, |
| 1076 | systemvmtype='consoleproxy', |
| 1077 | state='Running', |
| 1078 | zoneid=self.zone.id |
| 1079 | ) |
| 1080 | self.assertEqual( |
| 1081 | isinstance(list_cpvm_response, list), |
| 1082 | True, |
| 1083 | "Check list response returns a valid list" |
| 1084 | ) |
| 1085 | cpvm_response = list_cpvm_response[0] |
| 1086 | |
| 1087 | hosts = list_hosts( |
| 1088 | self.apiclient, |
| 1089 | id=cpvm_response.hostid |
| 1090 | ) |
| 1091 | self.assertEqual( |
| 1092 | isinstance(hosts, list), |
| 1093 | True, |
| 1094 | "Check list response returns a valid list" |
| 1095 | ) |
| 1096 | |
| 1097 | self.debug("Force rebooting CPVM: %s" % cpvm_response.id) |
| 1098 | |
| 1099 | cmd = rebootSystemVm.rebootSystemVmCmd() |
| 1100 | cmd.id = cpvm_response.id |
| 1101 | cmd.forced = True |
| 1102 | self.apiclient.rebootSystemVm(cmd) |
| 1103 | |
| 1104 | cpvm_response = self.checkForRunningSystemVM(cpvm_response) |
| 1105 | self.debug("CPVM state: %s" % cpvm_response.state) |
| 1106 | self.assertEqual( |
| 1107 | 'Running', |
| 1108 | str(cpvm_response.state), |
| 1109 | "Check whether CPVM is running or not" |
| 1110 | ) |
| 1111 | |
| 1112 | # Agent in Up state for a while after reboot, wait for the agent to Disconnect and back Up. |
| 1113 | time.sleep(60) |
| 1114 | |
| 1115 | # Wait for the agent to be up |
| 1116 | self.waitForSystemVMAgent(cpvm_response.name) |
| 1117 | |
| 1118 | # Call to verify cloud process is running |
| 1119 | self.test_04_cpvm_internals() |
| 1120 | |
| 1121 | @attr( |
| 1122 | tags=[ |
nothing calls this directly
no test coverage detected