Test CPVM Internals
(self)
| 599 | "sg"], |
| 600 | required_hardware="true") |
| 601 | def test_04_cpvm_internals(self): |
| 602 | """Test CPVM Internals""" |
| 603 | |
| 604 | # Validate the following |
| 605 | # 1. test that telnet access on 8250 is available to |
| 606 | # the management server for the CPVM |
| 607 | # 2. No telnet access, test FAIL |
| 608 | # 3. Service cloud status should report cloud agent status to be |
| 609 | # running |
| 610 | |
| 611 | list_cpvm_response = list_ssvms( |
| 612 | self.apiclient, |
| 613 | systemvmtype='consoleproxy', |
| 614 | state='Running', |
| 615 | zoneid=self.zone.id |
| 616 | ) |
| 617 | self.assertEqual( |
| 618 | isinstance(list_cpvm_response, list), |
| 619 | True, |
| 620 | "Check list response returns a valid list" |
| 621 | ) |
| 622 | cpvm = list_cpvm_response[0] |
| 623 | |
| 624 | hosts = list_hosts( |
| 625 | self.apiclient, |
| 626 | id=cpvm.hostid |
| 627 | ) |
| 628 | self.assertEqual( |
| 629 | isinstance(hosts, list), |
| 630 | True, |
| 631 | "Check list response returns a valid list" |
| 632 | ) |
| 633 | host = hosts[0] |
| 634 | |
| 635 | try: |
| 636 | telnetlib.Telnet( |
| 637 | str(self.apiclient.connection.mgtSvr), |
| 638 | '8250' |
| 639 | ) |
| 640 | self.debug("Telnet management server (IP: %s)" % |
| 641 | self.apiclient.connection.mgtSvr) |
| 642 | except Exception as e: |
| 643 | self.fail( |
| 644 | "Telnet Access failed for %s: %s" % |
| 645 | (self.apiclient.connection.mgtSvr, e) |
| 646 | ) |
| 647 | |
| 648 | self.debug("Checking cloud process status") |
| 649 | |
| 650 | if self.hypervisor.lower() in ('vmware', 'hyperv'): |
| 651 | # SSH into SSVMs is done via management server for Vmware and |
| 652 | # Hyper-V |
| 653 | result = get_process_status( |
| 654 | self.apiclient.connection.mgtSvr, |
| 655 | 22, |
| 656 | self.apiclient.connection.user, |
| 657 | self.apiclient.connection.passwd, |
| 658 | cpvm.privateip, |
no test coverage detected