refactor: don't require host= for check_connectivity

When ssh_client is passed, the argument is not used.

Change-Id: Ibf73130fbf82c2ed85e16b3f69aacbc2930efb3d
This commit is contained in:
Ihar Hrachyshka 2024-08-26 12:47:24 -04:00
parent 20dec4e823
commit 2d66355407
4 changed files with 3 additions and 7 deletions

View File

@ -337,7 +337,7 @@ class BaseTempestTestCase(base_api.BaseNetworkTest):
if create_fip:
self.fip = self.create_floatingip(port=self.port)
def check_connectivity(self, host, ssh_user=None, ssh_key=None,
def check_connectivity(self, host=None, ssh_user=None, ssh_key=None,
servers=None, ssh_timeout=None, ssh_client=None):
# Either ssh_client or ssh_user+ssh_key is mandatory.
if ssh_client is None:

View File

@ -169,8 +169,7 @@ class MetadataTest(base.BaseTempestTestCase):
self.network, use_advanced_image=use_advanced_image)
self.wait_for_server_active(server=vm.server)
self.wait_for_guest_os_ready(vm.server)
self.check_connectivity(host=vm.floating_ip['floating_ip_address'],
ssh_client=vm.ssh_client)
self.check_connectivity(ssh_client=vm.ssh_client)
interface = self._get_primary_interface(vm.ssh_client)
try:

View File

@ -193,7 +193,6 @@ class TrunkTest(base.BaseTempestTestCase):
self._wait_for_port(port=vm.port)
self._wait_for_port(port=vm.subport)
self.check_connectivity(
host=vm.floating_ip['floating_ip_address'],
ssh_client=vm.ssh_client,
servers=[vm.server])

View File

@ -138,9 +138,7 @@ class VlanTransparencyTest(base.BaseTempestTestCase):
ssh_clients.append(
self._create_ssh_client(floating_ip=floating_ips[i]))
self.check_connectivity(
host=floating_ips[i]['floating_ip_address'],
ssh_client=ssh_clients[i])
self.check_connectivity(ssh_client=ssh_clients[i])
self._configure_vlan_transparent(port=self.vm_ports[-1],
ssh_client=ssh_clients[i],
vlan_tag=vlan_tag,