Skip to content

Commit e29ba4b

Browse files
author
Pearl Dsilva
committed
Change the approach to get host details for different hypervisors - Marvin
1 parent 4c9879d commit e29ba4b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/integration/smoke/test_network.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,10 +1935,14 @@ def get_router_host(self, router):
19351935
True,
19361936
"Check for list hosts response return valid data")
19371937
host = hosts[0]
1938-
if host.hypervisor.lower() not in "kvm":
1939-
return
1940-
host.user, host.password = get_host_credentials(self.config, host.ipaddress)
1941-
host.port = 22
1938+
if host.hypervisor.lower() in ("vmware", "hyperv"):
1939+
host.ipaddress = self.apiclient.connection.mgtSvr
1940+
host.user = self.apiclient.connection.user
1941+
host.password = self.apiclient.connection.passwd
1942+
host.port = 22
1943+
else:
1944+
host.user, host.password = get_host_credentials(self.config, host.ipaddress)
1945+
host.port = 22
19421946
return host
19431947

19441948
def verify_ip_address_in_router(self, router, host, ipaddress, device, isExist=True):
@@ -1950,7 +1954,8 @@ def verify_ip_address_in_router(self, router, host, ipaddress, device, isExist=T
19501954
host.user,
19511955
host.password,
19521956
router.linklocalip,
1953-
command)
1957+
command,
1958+
host.hypervisor.lower())
19541959
self.assertEqual(len(result) > 0 and result[0] == ipaddress, isExist, "ip %s verification failed" % ipaddress)
19551960

19561961
@attr(tags=["advanced", "shared"])

0 commit comments

Comments
 (0)