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

Method test_03_ssvm_internals

test/integration/smoke/test_ssvm.py:417–591  ·  view source on GitHub ↗

Test SSVM Internals

(self)

Source from the content-addressed store, hash-verified

415 "sg"],
416 required_hardware="true")
417 def test_03_ssvm_internals(self):
418 """Test SSVM Internals"""
419
420 # Validate the following
421 # 1. The SSVM check script should not return any
422 # WARN|ERROR|FAIL messages
423 # 2. If you are unable to login to the SSVM with the signed key
424 # then test is deemed a failure
425 # 3. There should be only one ""cloud"" process running within the SSVM
426 # 4. If no process is running/multiple process are running
427 # then the test is a failure
428
429 list_ssvm_response = list_ssvms(
430 self.apiclient,
431 systemvmtype='secondarystoragevm',
432 state='Running',
433 zoneid=self.zone.id
434 )
435 self.assertEqual(
436 isinstance(list_ssvm_response, list),
437 True,
438 "Check list response returns a valid list"
439 )
440 ssvm = list_ssvm_response[0]
441
442 hosts = list_hosts(
443 self.apiclient,
444 id=ssvm.hostid
445 )
446 self.assertEqual(
447 isinstance(hosts, list),
448 True,
449 "Check list response returns a valid list"
450 )
451 host = hosts[0]
452
453 self.debug("Running SSVM check script")
454
455 if self.hypervisor.lower() in ('vmware', 'hyperv'):
456 # SSH into SSVMs is done via management server for Vmware and
457 # Hyper-V
458 result = get_process_status(
459 self.apiclient.connection.mgtSvr,
460 22,
461 self.apiclient.connection.user,
462 self.apiclient.connection.passwd,
463 ssvm.privateip,
464 "/usr/local/cloud/systemvm/ssvm-check.sh |grep -e ERROR -e WARNING -e FAIL",
465 hypervisor=self.hypervisor)
466 else:
467 try:
468 host.user, host.passwd = get_host_credentials(
469 self.config, host.ipaddress)
470 result = get_process_status(
471 host.ipaddress,
472 22,
473 host.user,
474 host.passwd,

Callers 4

test_05_stop_ssvmMethod · 0.95
test_07_reboot_ssvmMethod · 0.95
test_11_destroy_ssvmMethod · 0.95

Calls 8

list_ssvmsFunction · 0.90
list_hostsFunction · 0.90
get_process_statusFunction · 0.90
get_host_credentialsFunction · 0.90
assertEqualMethod · 0.80
debugMethod · 0.80
countMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected