Skip to content

Commit

Permalink
Merge pull request #5261 from hs0210/virtual_network_user_interface
Browse files Browse the repository at this point in the history
virtual_network: remove acpi settings in connectivity_check_user_interface
  • Loading branch information
chloerh authored Nov 9, 2023
2 parents e0c45be + 62142f4 commit 494aa10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,25 @@
variants:
- positive_test:
expect_error = no
vm_iface = eno1
variants:
- default:
iface_attrs = {'model': 'virtio', 'type_name': 'user', 'acpi': {'index': '1'}, }
iface_attrs = {'model': 'virtio', 'type_name': 'user'}
ipv4_addr = 10.0.2.15
ipv4_prefix = 24
ipv4_default_gw = 10.0.2.2
nameserver = 10.0.2.3
- customized_ip:
variants:
- no_prefix:
iface_attrs = {'model': 'virtio', 'type_name': 'user', 'acpi': {'index': '1'}, 'ips': [{'address': '100.100.100.20', 'family': 'ipv4'}, {'address': '2001:db8:ac10:fd01::', 'family': 'ipv6'}]}
iface_attrs = {'model': 'virtio', 'type_name': 'user', 'ips': [{'address': '100.100.100.20', 'family': 'ipv4'}, {'address': '2001:db8:ac10:fd01::', 'family': 'ipv6'}]}
ipv4_addr = \d+.0.2.15
ipv4_prefix = 8
ipv6_addr = 2001:db8:ac10:fd01:.+
ipv6_prefix = 64
ipv4_default_gw = \d+.0.2.2
nameserver = \d+.0.2.3
- with_prefix:
iface_attrs = {'model': 'virtio', 'type_name': 'user', 'acpi': {'index': '1'}, 'ips': [{'address': '100.100.100.20', 'family': 'ipv4', 'prefix': '24'}, {'address': '2001:db8:ac10:fd01::', 'family': 'ipv6', 'prefix': '64'}]}
iface_attrs = {'model': 'virtio', 'type_name': 'user', 'ips': [{'address': '100.100.100.20', 'family': 'ipv4', 'prefix': '24'}, {'address': '2001:db8:ac10:fd01::', 'family': 'ipv6', 'prefix': '64'}]}
ipv4_addr = 100.100.100.15
ipv4_default_gw = 100.100.100.2
nameserver = 100.100.100.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from virttest.utils_libvirt import libvirt_vmxml
from virttest.utils_test import libvirt

from provider.interface import interface_base
from provider.virtual_network import network_base
from provider.virtual_network import passt

Expand Down Expand Up @@ -73,7 +74,6 @@ def run(test, params, env):
params['host_ip_v6'] = host_ip_v6 = utils_net.get_host_ip_address(
ip_ver='ipv6')
iface_attrs = eval(params.get('iface_attrs'))
vm_iface = params.get('vm_iface', 'eno1')
outside_ip = params.get('outside_ip')
host_iface = params.get('host_iface')
host_iface = host_iface if host_iface else utils_net.get_net_if(
Expand Down Expand Up @@ -108,6 +108,7 @@ def run(test, params, env):

session = vm.wait_for_serial_login(timeout=60)
LOG.debug(session.cmd_output('ip addr'))
vm_iface = interface_base.get_vm_iface(session)
vm_ipv4, vm_ipv4_pfx = passt.get_iface_ip_and_prefix(vm_iface, session)
LOG.debug(f'vm ipv4 address and prefix: {vm_ipv4} {vm_ipv4_pfx}')
check_val(ipv4_addr, vm_ipv4, 'vm ipv4', test)
Expand Down

0 comments on commit 494aa10

Please sign in to comment.