mirror of https://github.com/apache/cloudstack.git
Bug-Id: CS-19455 Add support for Hyper-v in regression test test_routers.py
Signed-off-by: sanjeevneelarapu <sanjeev.neelarapu@citrix.com>
This commit is contained in:
parent
3f7b628c70
commit
4eece72eb1
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 "
|
||||
|
|
|
|||
Loading…
Reference in New Issue