Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHCP_RELAY: use config interface instead of ifconfig #16648

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/dhcp_relay/test_dhcp_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ def test_dhcp_relay_after_link_flap(ptfhost, dut_dhcp_relay_data, validate_dut_r
for dhcp_relay in dut_dhcp_relay_data:
# Bring all uplink interfaces down
for iface in dhcp_relay['uplink_interfaces']:
duthost.shell('ifconfig {} down'.format(iface))
duthost.shell('config interface shutdown {}'.format(iface))

pytest_assert(wait_until(50, 5, 0, check_link_status, duthost, dhcp_relay['uplink_interfaces'], "down"),
"Not all uplinks go down")

# Bring all uplink interfaces back up
for iface in dhcp_relay['uplink_interfaces']:
duthost.shell('ifconfig {} up'.format(iface))
duthost.shell('config interface startup {}'.format(iface))

# Wait until uplinks are up and routes are recovered
pytest_assert(wait_until(50, 5, 0, check_routes_to_dhcp_server, duthost, dut_dhcp_relay_data),
Expand Down Expand Up @@ -422,7 +422,7 @@ def test_dhcp_relay_start_with_uplinks_down(ptfhost, dut_dhcp_relay_data, valida
for dhcp_relay in dut_dhcp_relay_data:
# Bring all uplink interfaces down
for iface in dhcp_relay['uplink_interfaces']:
duthost.shell('ifconfig {} down'.format(iface))
duthost.shell('config interface shutdown {}'.format(iface))

pytest_assert(wait_until(50, 5, 0, check_link_status, duthost, dhcp_relay['uplink_interfaces'], "down"),
"Not all uplinks go down")
Expand All @@ -439,7 +439,7 @@ def test_dhcp_relay_start_with_uplinks_down(ptfhost, dut_dhcp_relay_data, valida

# Bring all uplink interfaces back up
for iface in dhcp_relay['uplink_interfaces']:
duthost.shell('ifconfig {} up'.format(iface))
duthost.shell('config interface startup {}'.format(iface))

# Wait until uplinks are up and routes are recovered
pytest_assert(wait_until(50, 5, 0, check_routes_to_dhcp_server, duthost, dut_dhcp_relay_data),
Expand Down
Loading