MCPcopy Create free account
hub / github.com/apache/cloudstack / checkForRunningSystemVM

Method checkForRunningSystemVM

test/integration/smoke/test_ssvm.py:83–108  ·  view source on GitHub ↗
(self, ssvm, ssvm_type=None)

Source from the content-addressed store, hash-verified

81 raise Exception("Failed to wait for SSVM agent to be Up")
82
83 def checkForRunningSystemVM(self, ssvm, ssvm_type=None):
84 if not ssvm:
85 return None
86
87 def checkRunningState():
88 if not ssvm_type:
89 response = list_ssvms(
90 self.apiclient,
91 id=ssvm.id
92 )
93 else:
94 response = list_ssvms(
95 self.apiclient,
96 zoneid=self.zone.id,
97 systemvmtype=ssvm_type
98 )
99
100 if isinstance(response, list):
101 ssvm_response = response[0]
102 return ssvm_response.state == 'Running', ssvm_response
103 return False, None
104
105 res, ssvm_response = wait_until(3, 300, checkRunningState)
106 if not res:
107 self.fail("Failed to reach systemvm state to Running")
108 return ssvm_response
109
110 @attr(
111 tags=[

Callers 9

test_05_stop_ssvmMethod · 0.95
test_06_stop_cpvmMethod · 0.95
test_07_reboot_ssvmMethod · 0.95
test_08_reboot_cpvmMethod · 0.95
test_11_destroy_ssvmMethod · 0.95
test_12_destroy_cpvmMethod · 0.95

Calls 1

wait_untilFunction · 0.90

Tested by

no test coverage detected