|
6 | 6 | import pytest |
7 | 7 | from pyhelper_utils.shell import run_ssh_commands |
8 | 8 |
|
9 | | -from tests.network.constants import DHCP_IP_RANGE_END, DHCP_IP_RANGE_START |
10 | | -from tests.network.utils import ( |
| 9 | +from tests.network.libs.dhcpd import ( |
| 10 | + DHCP_IP_RANGE_END, |
| 11 | + DHCP_IP_RANGE_START, |
| 12 | + DHCP_IP_SUBNET, |
11 | 13 | DHCP_SERVER_CONF_FILE, |
12 | 14 | DHCP_SERVICE_RESTART, |
13 | | - update_cloud_init_extra_user_data, |
| 15 | + verify_dhcpd_activated, |
14 | 16 | ) |
| 17 | +from tests.network.utils import update_cloud_init_extra_user_data |
15 | 18 | from utilities.infra import get_node_selector_dict, name_prefix |
16 | 19 | from utilities.network import ( |
17 | 20 | cloud_init_network_data, |
18 | 21 | get_vmi_mac_address_by_iface_name, |
19 | 22 | network_device, |
20 | 23 | network_nad, |
21 | | - verify_dhcpd_activated, |
22 | 24 | ) |
23 | 25 | from utilities.virt import ( |
24 | 26 | VirtualMachineForTests, |
|
27 | 29 | ) |
28 | 30 |
|
29 | 31 | #: Test setup |
30 | | -# ......... .......... |
31 | | -# | |---eth1:10.200.0.1: 10.200.0.2:---eth1:| | |
| 32 | +# ......... .......... |
| 33 | +# | |---eth1:10.200.0.1: 10.200.0.2:eth1---| | |
32 | 34 | # | VM-A |---eth2:10.200.2.1 : multicast(ICMP), custom eth type test: 10.200.2.2:eth2---| VM-B | |
33 | 35 | # | |---eth3:10.200.3.1 : DHCP test : 10.200.3.2:eth3---| | |
34 | 36 | # |.......|---eth4:10.200.4.1 : mpls test : 10.200.4.2:eth4---|........| |
@@ -297,7 +299,7 @@ def l2_bridge_running_vm_a( |
297 | 299 | namespace, worker_node1, l2_bridge_all_nads, dhcp_nad, unprivileged_client, l2_bridge_running_vm_b |
298 | 300 | ): |
299 | 301 | dhcpd_data = DHCP_SERVER_CONF_FILE.format( |
300 | | - DHCP_IP_SUBNET="10.200.3", |
| 302 | + DHCP_IP_SUBNET=DHCP_IP_SUBNET, |
301 | 303 | DHCP_IP_RANGE_START=DHCP_IP_RANGE_START, |
302 | 304 | DHCP_IP_RANGE_END=DHCP_IP_RANGE_END, |
303 | 305 | CLIENT_MAC_ADDRESS=get_vmi_mac_address_by_iface_name(vmi=l2_bridge_running_vm_b.vmi, iface_name=dhcp_nad.name), |
|
0 commit comments