File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import pytest
66
77from robottelo .config import settings
8+ from robottelo .enums import NetworkType
89from robottelo .exceptions import ContentHostError
910from robottelo .hosts import Satellite , lru_sat_ready_rhel
1011
@@ -89,6 +90,11 @@ def module_discovery_sat(
8990 # Build PXE default template to get default PXE file
9091 sat .api .ProvisioningTemplate ().build_pxe_default ()
9192
93+ # Clear stale DHCP leases and restart dhcpd to pick up new PXE configuration
94+ if sat .network_type == NetworkType .IPV4 :
95+ assert sat .execute ('cat /dev/null > /var/lib/dhcpd/dhcpd.leases' ).status == 0
96+ assert sat .execute ('systemctl restart dhcpd' ).status == 0
97+
9298 # Update discovery taxonomies settings
9399 discovery_loc = sat .api .Setting ().search (query = {'search' : 'name=discovery_location' })[0 ]
94100 discovery_loc .value = module_location .name
You can’t perform that action at this time.
0 commit comments