Fix compute names in tests

On the recent version of podified deployment
compute nodes have names with domain name specified. This
caused tests behave not correctly. This patch fixes this.

Change-Id: I00283a76040ca13f3b6f119efe71d5cfb9ee1051
This commit is contained in:
Roman Safronov
2024-04-18 08:48:30 +03:00
parent 6feb524aa3
commit ecf9a3e312
2 changed files with 2 additions and 2 deletions

View File

@@ -277,7 +277,7 @@ class InternalDNSInterruptionsTestOvn(InternalDNSBaseOvn):
# restart controller service on compute which runs guest VM
self.discover_nodes()
compute_hostname = self.get_host_for_server(
vm_1['server']['id']).partition('.')[0]
vm_1['server']['id'])
compute_client = self.find_node_client(compute_hostname)
self.reset_node_service('ovn controller', compute_client)
# validate hostname configured on VM is same as VM's name

View File

@@ -335,7 +335,7 @@ class BaseSecGroupLoggingTest(
self.ping_ip_address(server['fip'])
server['ssh_client'] = self._create_ssh_client(server['fip'])
server['hv_base_name'] = server[
'OS-EXT-SRV-ATTR:hypervisor_hostname'].split('.')[0]
'OS-EXT-SRV-ATTR:hypervisor_hostname']
server['hv_ssh_client'] = self.find_node_client(
server['hv_base_name'])
return server