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

Method test_09_reboot_ssvm_forced

test/integration/smoke/test_ssvm.py:1011–1060  ·  view source on GitHub ↗

Test force reboot SSVM

(self)

Source from the content-addressed store, hash-verified

1009 "sg"],
1010 required_hardware="true")
1011 def test_09_reboot_ssvm_forced(self):
1012 """Test force reboot SSVM
1013 """
1014
1015 list_ssvm_response = list_ssvms(
1016 self.apiclient,
1017 systemvmtype='secondarystoragevm',
1018 state='Running',
1019 zoneid=self.zone.id
1020 )
1021
1022 self.assertEqual(
1023 isinstance(list_ssvm_response, list),
1024 True,
1025 "Check list response returns a valid list"
1026 )
1027
1028 ssvm_response = list_ssvm_response[0]
1029
1030 hosts = list_hosts(
1031 self.apiclient,
1032 id=ssvm_response.hostid
1033 )
1034 self.assertEqual(
1035 isinstance(hosts, list),
1036 True,
1037 "Check list response returns a valid list"
1038 )
1039
1040 self.debug("Force rebooting SSVM: %s" % ssvm_response.id)
1041 cmd = rebootSystemVm.rebootSystemVmCmd()
1042 cmd.id = ssvm_response.id
1043 cmd.forced = True
1044 self.apiclient.rebootSystemVm(cmd)
1045
1046 ssvm_response = self.checkForRunningSystemVM(ssvm_response)
1047 self.debug("SSVM State: %s" % ssvm_response.state)
1048 self.assertEqual(
1049 'Running',
1050 str(ssvm_response.state),
1051 "Check whether SSVM is running or not"
1052 )
1053
1054 # Wait for the agent to be up
1055 self.waitForSystemVMAgent(ssvm_response.name)
1056
1057 # Wait until NFS stores mounted before running the script
1058 time.sleep(90)
1059 # Call to verify cloud process is running
1060 self.test_03_ssvm_internals()
1061
1062 @attr(
1063 tags=[

Callers

nothing calls this directly

Calls 8

waitForSystemVMAgentMethod · 0.95
list_ssvmsFunction · 0.90
list_hostsFunction · 0.90
assertEqualMethod · 0.80
debugMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected