Files
infix/test/case/interfaces/ipv6_address/test.py
T
Joachim Wiberg 1bbd80d8c7 test: drop leading ietf/infix prefix from directories
Let's drop the leading IETF or Infix prefixes from tests.  Initially the
idea was to mimnic the YANG models, but it's difficult to navigate and
does not provide any real benefit to developers or end-users.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:23 +01:00

51 lines
1.6 KiB
Python
Executable File

#!/usr/bin/env python3
"""
Interface IPv6 autoconf for bridges
Verify IPv6 autoconf on a bridge is properly set up for global prefix.
See issue #473 for details.
"""
import infamy
with infamy.Test() as test:
with test.step("Set up topology and attach to target DUT"):
env = infamy.Env()
target = env.attach("target", "mgmt")
tgtssh = env.attach("target", "mgmt", "ssh")
with test.step("Setting up bridge with IPv6 SLAAC for global prefix on target:data"):
_, tport = env.ltop.xlate("target", "data")
target.put_config_dict("ietf-interfaces", {
"interfaces": {
"interface": [
{
"name": "br0",
"type": "infix-if-type:bridge",
"enabled": True,
"ipv6": {
"enabled": True,
"autoconf": {
"create-global-addresses": True
}
}
},
{
"name": tport,
"enabled": True,
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
]
}
})
with test.step("Verify using sysctl that 'net.ipv6.conf.br0.autoconf' is 1 on target"):
out = tgtssh.runsh("sysctl net.ipv6.conf.br0.autoconf").stdout
print(out)
if "autoconf = 1" not in out:
test.fail()
test.succeed()