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

[IPv6][SNMP]: Remove skip of IPv6 loopback testing #8824

Merged
merged 4 commits into from
Jul 26, 2023
Merged
Changes from 2 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
9 changes: 0 additions & 9 deletions tests/snmp/test_snmp_loopback.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ def get_snmp_output(ip, duthost, nbr, creds_all_duts):
ipaddr = ipaddress.ip_address(ip)
iptables_cmd = "iptables"

# TODO : Fix snmp query over loopback v6 and remove this check and add IPv6 ACL table/rule.
if isinstance(ipaddr, ipaddress.IPv6Address):
iptables_cmd = "ip6tables"
return None

ip_tbl_rule_add = "sudo {} -I INPUT 1 -p udp --dport 161 -d {} -j ACCEPT".format(
iptables_cmd, ip)
duthost.shell(ip_tbl_rule_add)
Expand Down Expand Up @@ -56,14 +53,8 @@ def test_snmp_loopback(duthosts, enum_rand_one_per_hwsku_frontend_hostname,
# Get first neighbor VM information
nbr = nbrhosts[list(nbrhosts.keys())[0]]

# TODO: Fix snmp query over Management IPv6 adderess and add SNMP test over management IPv6 address.

for ip in config_facts['LOOPBACK_INTERFACE']['Loopback0']:
loip = ip.split('/')[0]
loip = ipaddress.ip_address(loip)
# TODO: Fix SNMP query over IPv6 and remove the below check.
if not isinstance(loip, ipaddress.IPv4Address):
continue
result = get_snmp_output(loip, duthost, nbr, creds_all_duts)
assert result is not None, 'No result from snmpget'
assert len(result['stdout_lines']) > 0, 'No result from snmpget'
Expand Down
Loading