diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py index f8359f0e2c5..ced3f525ca2 100644 --- a/test/integration/component/test_routers.py +++ b/test/integration/component/test_routers.py @@ -1254,21 +1254,10 @@ class TestRouterStopCreateFW(cloudstackTestCase): str(self.services["fw_rule"]["endport"]), "Check end port of firewall rule" ) - hosts = list_hosts( - self.apiclient, - id=router.hostid, - ) - self.assertEqual( - isinstance(hosts, list), - True, - "Check for list hosts response return valid data" - ) - host = hosts[0] - host.user, host.passwd = get_host_credentials(self.config, host.ipaddress) - # For DNS and DHCP check 'dnsmasq' process status - if self.apiclient.hypervisor.lower() == 'vmware': - result = get_process_status( + if (self.apiclient.hypervisor.lower() == 'vmware' + or self.apiclient.hypervisor.lower() == 'hyperv'): + result = get_process_status( self.apiclient.connection.mgtSvr, 22, self.apiclient.connection.user, @@ -1278,6 +1267,17 @@ class TestRouterStopCreateFW(cloudstackTestCase): hypervisor=self.apiclient.hypervisor ) else: + hosts = list_hosts( + self.apiclient, + id=router.hostid, + ) + self.assertEqual( + isinstance(hosts, list), + True, + "Check for list hosts response return valid data" + ) + host = hosts[0] + host.user, host.passwd = get_host_credentials(self.config, host.ipaddress) try: result = get_process_status( host.ipaddress, diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index e870158cfb5..709fddebe78 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -191,7 +191,8 @@ def get_process_status(hostip, port, username, password, linklocalip, process, h #SSH to the machine ssh = SshClient(hostip, port, username, password) - if str(hypervisor).lower() == 'vmware': + if (str(hypervisor).lower() == 'vmware' + or str(hypervisor).lower() == 'hyperv'): ssh_command = "ssh -i /var/cloudstack/management/.ssh/id_rsa -ostricthostkeychecking=no " else: ssh_command = "ssh -i ~/.ssh/id_rsa.cloud -ostricthostkeychecking=no "