From 4e83520b0ef47b2416019ea274a537da10329e7d Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Jan 2025 13:02:46 +0100 Subject: [PATCH 01/14] ixll: Fix ping(8)s that require all options precede address The default ping(8) shipped with alpine does not support `ping -c1`, but happily executes `ping -c1 `. Therefore, make sure that the address is always the last argument. --- utils/libll.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/libll.sh b/utils/libll.sh index d42f94ab..a4441832 100644 --- a/utils/libll.sh +++ b/utils/libll.sh @@ -9,7 +9,7 @@ llping() { local iface="$1" shift - ping -L ff02::1%$iface "$@" + ping -L "$@" ff02::1%$iface } From df3a55d6a0352df4661cc04251d8fbd17e280499 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Jan 2025 13:05:17 +0100 Subject: [PATCH 02/14] ixll: Disable key checking for admin:admin sessions This is a shorthand for the common case when we're attaching to a random Infix device during testing, so don't bother with key checking. --- utils/ixll | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/ixll b/utils/ixll index f4121709..f7cdffa7 100755 --- a/utils/ixll +++ b/utils/ixll @@ -57,6 +57,8 @@ while getopts "A" opt; do A) LLSSH_USER=admin LLSSH_PASS=admin + LLSSH_OPTS="$LLSSH_OPTS -oStrictHostKeyChecking=no" + LLSSH_OPTS="$LLSSH_OPTS -oUserKnownHostsFile=/dev/null" ;; esac done From 41f3fe15a6090c2da202e10c877bacf23660b712 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 14 Jan 2025 17:51:33 +0100 Subject: [PATCH 03/14] confd: Drop unsupported `default-priority` bridge port option --- src/confd/yang/infix-if-bridge.yang | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/confd/yang/infix-if-bridge.yang b/src/confd/yang/infix-if-bridge.yang index 7d8b853b..bd1fb561 100644 --- a/src/confd/yang/infix-if-bridge.yang +++ b/src/confd/yang/infix-if-bridge.yang @@ -27,7 +27,11 @@ submodule infix-if-bridge { description "Linux bridge extension for ietf-interfaces."; revision 2025-01-08 { - description "Add Spanning Tree Protocol (STP) support."; + description "Add Spanning Tree Protocol (STP) support. + + Drop the `default-priority` bridge port option, which + has never been supported but was accidentally + included in the model."; reference "internal"; } @@ -699,13 +703,6 @@ submodule infix-if-bridge { config false; description "The operation state of the bridge port."; } - - leaf default-priority { - if-feature "vlan-filtering"; - type dot1q-types:priority-type; - default "0"; - description "The default priority assigned to this bridge port."; - } } augment "/if:interfaces/if:interface/infix-if:port" { From be1b7cdf4585231a785daa2d06f880ba8d016536 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 15 Jan 2025 10:10:57 +0100 Subject: [PATCH 04/14] confd: Enable remote SSH access via IPv6 in {factory,failure}-config The default was set to only accept connections from localhost when connecting via IPv6. This was not caught in testing since the test-config accepts connections from all hosts (::). Accept connections from all hosts in all builtin configs. Inherit test-config's service definition from factory-config, since we want testing to be done as close as possible to what are users are running. --- .../share/factory.d/10-infix-services.json | 2 +- .../share/failure.d/10-infix-services.json | 2 +- src/confd/share/test.d/10-infix-services.json | 28 +------------------ 3 files changed, 3 insertions(+), 29 deletions(-) mode change 100644 => 120000 src/confd/share/test.d/10-infix-services.json diff --git a/src/confd/share/factory.d/10-infix-services.json b/src/confd/share/factory.d/10-infix-services.json index 5e86d69c..f7b36180 100644 --- a/src/confd/share/factory.d/10-infix-services.json +++ b/src/confd/share/factory.d/10-infix-services.json @@ -15,7 +15,7 @@ }, { "name": "ipv6", - "address": "::1", + "address": "::", "port": 22 } ], diff --git a/src/confd/share/failure.d/10-infix-services.json b/src/confd/share/failure.d/10-infix-services.json index 4371cbb5..a5ef5102 100644 --- a/src/confd/share/failure.d/10-infix-services.json +++ b/src/confd/share/failure.d/10-infix-services.json @@ -21,7 +21,7 @@ }, { "name": "ipv6", - "address": "::1", + "address": "::", "port": 22 } ], diff --git a/src/confd/share/test.d/10-infix-services.json b/src/confd/share/test.d/10-infix-services.json deleted file mode 100644 index 89b1c909..00000000 --- a/src/confd/share/test.d/10-infix-services.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "infix-services:mdns": { - "enabled": true - }, - "infix-services:web": { - "enabled": true, - "restconf": { - "enabled": true - } - }, - "infix-services:ssh": { - "enabled": true, - "listen": [ - { - "name": "ipv4", - "address": "0.0.0.0", - "port": 22 - }, - { - "name": "ipv6", - "address": "::", - "port": 22 - } - ], - "hostkey": [ "genkey" ] - } -} diff --git a/src/confd/share/test.d/10-infix-services.json b/src/confd/share/test.d/10-infix-services.json new file mode 120000 index 00000000..b03ef0f0 --- /dev/null +++ b/src/confd/share/test.d/10-infix-services.json @@ -0,0 +1 @@ +../factory.d/10-infix-services.json \ No newline at end of file From e3970123941fb1416a7e1513d6f6e9db958e548e Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Jan 2025 09:05:01 +0100 Subject: [PATCH 05/14] yanger: Add support for connecting to remote hosts Allow all host commands to be run with a prefix (e.g. `ssh user@remotehost sudo`), such that yanger can be tested against the current state of a remote system. If a command wrapper _and_ a test directory is specified, the output of all commands and files are recorded for use by a future test execution. Example: 1. Launch a `make run` instance and setup some config for which we want to test yanger and cli-pretty 2. Capture the output of all commands needed to produce the data for some YANG model: `yanger -t /tmp/ifs -w "ixll -A ssh qtap1 sudo" ietf-interfaces` 3. Kill the instance (we do not need it any more) 4. Test cli-pretty using the captured state: `yanger -t /tmp/ifs ietf-interfaces | cli-pretty show-interfaces ` --- src/statd/python/yanger/__main__.py | 5 ++- src/statd/python/yanger/host.py | 67 +++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/src/statd/python/yanger/__main__.py b/src/statd/python/yanger/__main__.py index 9ab8d0e7..28c3dc20 100644 --- a/src/statd/python/yanger/__main__.py +++ b/src/statd/python/yanger/__main__.py @@ -13,6 +13,7 @@ def main(): parser = argparse.ArgumentParser(description="YANG data creator") parser.add_argument("model", help="YANG Model") parser.add_argument("-p", "--param", default=None, help="Model dependent parameter") + parser.add_argument("-w", "--wrap-commands", default=None, help="Command execution wrapper") parser.add_argument("-t", "--test", default=None, help="Test data base path") args = parser.parse_args() @@ -30,7 +31,9 @@ def main(): common.LOG.setLevel(logging.INFO) common.LOG.addHandler(log) - if args.test: + if args.wrap_commands: + host.HOST = host.Remotehost(args.wrap_commands, args.test) + elif args.test: host.HOST = host.Testhost(args.test) else: host.HOST = host.Localhost() diff --git a/src/statd/python/yanger/host.py b/src/statd/python/yanger/host.py index 040851fc..09fa7f8d 100644 --- a/src/statd/python/yanger/host.py +++ b/src/statd/python/yanger/host.py @@ -1,13 +1,16 @@ import abc import datetime +import functools import json import os import subprocess from . import common + HOST = None + class Host(abc.ABC): """Host system API""" @@ -66,10 +69,12 @@ class Host(abc.ABC): return default raise + class Localhost(Host): def now(self): return datetime.datetime.now(tz=datetime.timezone.utc) +# @functools.cache def run(self, cmd, default=None, log=True): try: result = subprocess.run(cmd, check=True, text=True, @@ -98,16 +103,72 @@ class Localhost(Host): return None + +class Remotehost(Localhost): + def __init__(self, wrap, basedir): + super().__init__() + self.wrap = wrap.split() + self.basedir = basedir + if basedir: + for subdir in ("rootfs", "run"): + os.makedirs(os.path.join(basedir, subdir), exist_ok=True) + + def now(self): + timestamp = self._run(["date", "-u", "+%s"], default=None, log=True) + if self.basedir: + with open(os.path.join(self.basedir, "timestamp"), "w") as f: + f.write(f"{timestamp}\n") + pass + + return datetime.datetime.fromtimestamp(int(timestamp), datetime.timezone.utc) + + def _run(self, cmd, default, log): + # Assume that the wrapper acts like ssh(1) and simply concats + # arguments to a single string. Therefore, we must quoute + # arguments containing spaces so that commands like `vtysh -c + # "show ip route json"` work as expected. + cmd = " ".join([ arg if " " not in arg else f"\"{arg}\"" for arg in cmd ]) + return super().run(self.wrap + (cmd,), default, log) + + def run(self, cmd, default=None, log=True): + if not self.basedir: + return self._run(cmd, default, log) + + storedpath = os.path.join(self.basedir, "run", Testhost.SlugOf(cmd)) + if os.path.exists(storedpath): + with open(storedpath) as f: + return f.read() + + out = self._run(cmd, default, log) + with open(storedpath, "w") as f: + f.write(out) + + return out + + def read(self, path): + out = self._run(["cat", path], default="", log=False) + + if self.basedir: + dirname = os.path.join(self.basedir, "rootfs", os.path.dirname(path[1:])) + os.makedirs(dirname, exist_ok=True) + with open(os.path.join(self.basedir, "rootfs", path[1:]), "w") as f: + f.write(out) + + class Testhost(Host): + def SlugOf(cmd): + return "_".join(cmd).replace("/", "+").replace(" ", "-") + def __init__(self, basedir): self.basedir = basedir def now(self): - return datetime.datetime(2023, 1, 1, 12, 0, 0, tzinfo=datetime.timezone.utc) + with open(os.path.join(self.basedir, "timestamp")) as f: + timestamp = f.read().strip() + return datetime.datetime.fromtimestamp(int(timestamp), datetime.timezone.utc) def run(self, cmd, default=None, log=True): - slug = "_".join(cmd).replace("/", "+").replace(" ", "-") - path = os.path.join(self.basedir, "run", slug) + path = os.path.join(self.basedir, "run", Testhost.SlugOf(cmd)) try: with open(path, 'r') as f: From 78b7b34799540fcfe8ea3f1c9f7dcd498e6f8daa Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Jan 2025 09:14:47 +0100 Subject: [PATCH 06/14] yanger: Break up ietf-interfaces implementation into modules --- src/statd/python/yanger/common.py | 10 - src/statd/python/yanger/host.py | 12 +- .../python/yanger/ietf_interfaces/__init__.py | 567 +----------------- .../python/yanger/ietf_interfaces/bridge.py | 171 ++++++ .../python/yanger/ietf_interfaces/common.py | 30 + .../yanger/ietf_interfaces/container.py | 57 ++ .../python/yanger/ietf_interfaces/ethernet.py | 110 ++++ src/statd/python/yanger/ietf_interfaces/ip.py | 56 ++ .../python/yanger/ietf_interfaces/link.py | 158 +++++ .../python/yanger/ietf_interfaces/tun.py | 7 + .../python/yanger/ietf_interfaces/veth.py | 7 + .../python/yanger/ietf_interfaces/vlan.py | 21 + 12 files changed, 631 insertions(+), 575 deletions(-) create mode 100644 src/statd/python/yanger/ietf_interfaces/bridge.py create mode 100644 src/statd/python/yanger/ietf_interfaces/common.py create mode 100644 src/statd/python/yanger/ietf_interfaces/container.py create mode 100644 src/statd/python/yanger/ietf_interfaces/ethernet.py create mode 100644 src/statd/python/yanger/ietf_interfaces/ip.py create mode 100644 src/statd/python/yanger/ietf_interfaces/link.py create mode 100644 src/statd/python/yanger/ietf_interfaces/tun.py create mode 100644 src/statd/python/yanger/ietf_interfaces/veth.py create mode 100644 src/statd/python/yanger/ietf_interfaces/vlan.py diff --git a/src/statd/python/yanger/common.py b/src/statd/python/yanger/common.py index 34f59742..2697fced 100644 --- a/src/statd/python/yanger/common.py +++ b/src/statd/python/yanger/common.py @@ -1,15 +1,5 @@ LOG = None -def lookup(obj, *keys): - """This function returns a value from a nested json object""" - curr = obj - for key in keys: - if isinstance(curr, dict) and key in curr: - curr = curr[key] - else: - return None - return curr - def insert(obj, *path_and_value): """"This function inserts a value into a nested json object""" diff --git a/src/statd/python/yanger/host.py b/src/statd/python/yanger/host.py index 09fa7f8d..0e31771b 100644 --- a/src/statd/python/yanger/host.py +++ b/src/statd/python/yanger/host.py @@ -33,7 +33,7 @@ class Host(abc.ABC): def run_multiline(self, cmd, default=None): """Get lines of stdout of cmd""" try: - txt = self.run(cmd, log=(default is None)) + txt = self.run(tuple(cmd), log=(default is None)) return txt.splitlines() except: if default is not None: @@ -43,7 +43,7 @@ class Host(abc.ABC): def run_json(self, cmd, default=None): """Get JSON object from stdout of cmd""" try: - txt = self.run(cmd, log=(default is None)) + txt = self.run(tuple(cmd), log=(default is None)) return json.loads(txt) except: if default is not None: @@ -74,7 +74,7 @@ class Localhost(Host): def now(self): return datetime.datetime.now(tz=datetime.timezone.utc) -# @functools.cache + @functools.cache def run(self, cmd, default=None, log=True): try: result = subprocess.run(cmd, check=True, text=True, @@ -107,7 +107,7 @@ class Localhost(Host): class Remotehost(Localhost): def __init__(self, wrap, basedir): super().__init__() - self.wrap = wrap.split() + self.wrap = tuple(wrap.split()) self.basedir = basedir if basedir: for subdir in ("rootfs", "run"): @@ -146,7 +146,7 @@ class Remotehost(Localhost): return out def read(self, path): - out = self._run(["cat", path], default="", log=False) + out = self._run(("cat", path), default="", log=False) if self.basedir: dirname = os.path.join(self.basedir, "rootfs", os.path.dirname(path[1:])) @@ -154,6 +154,8 @@ class Remotehost(Localhost): with open(os.path.join(self.basedir, "rootfs", path[1:]), "w") as f: f.write(out) + return out + class Testhost(Host): def SlugOf(cmd): diff --git a/src/statd/python/yanger/ietf_interfaces/__init__.py b/src/statd/python/yanger/ietf_interfaces/__init__.py index 87b21b7e..bc6c9646 100644 --- a/src/statd/python/yanger/ietf_interfaces/__init__.py +++ b/src/statd/python/yanger/ietf_interfaces/__init__.py @@ -1,564 +1,11 @@ -from ..common import insert, lookup, LOG -from ..host import HOST - - -def json_get_yang_type(iface_in): - if iface_in['link_type'] == "loopback": - return "infix-if-type:loopback" - - if iface_in['link_type'] in ("gre", "gre6"): - return "infix-if-type:gre" - - if iface_in['link_type'] != "ether": - return "infix-if-type:other" - - if 'parentbus' in iface_in and iface_in['parentbus'] == "virtio": - return "infix-if-type:etherlike" - - if 'linkinfo' not in iface_in: - return "infix-if-type:ethernet" - - if 'info_kind' not in iface_in['linkinfo']: - return "infix-if-type:ethernet" - - if iface_in['linkinfo']['info_kind'] == "veth": - return "infix-if-type:veth" - - if iface_in['linkinfo']['info_kind'] in ("gretap", "ip6gretap"): - return "infix-if-type:gretap" - - if iface_in['linkinfo']['info_kind'] == "vlan": - return "infix-if-type:vlan" - - if iface_in['linkinfo']['info_kind'] == "bridge": - return "infix-if-type:bridge" - - if iface_in['linkinfo']['info_kind'] == "dsa": - return "infix-if-type:ethernet" - - if iface_in['linkinfo']['info_kind'] == "dummy": - return "infix-if-type:dummy" - - # Fallback - return "infix-if-type:ethernet" - - -def json_get_yang_origin(addr): - """Translate kernel IP address origin to YANG""" - xlate = { - "kernel_ll": "link-layer", - "kernel_ra": "link-layer", - "static": "static", - "dhcp": "dhcp", - "random": "random", - } - proto = addr['protocol'] - - if proto in ("kernel_ll", "kernel_ra"): - if "stable-privacy" in addr: - return "random" - - return xlate.get(proto, "other") - - - - -def iface_is_dsa(iface_in): - """Check if interface is a DSA/intra-switch port""" - if "linkinfo" not in iface_in: - return False - if "info_kind" not in iface_in['linkinfo']: - return False - if iface_in['linkinfo']['info_kind'] != "dsa": - return False - return True - - -def get_bridge_port_pvid(ifname): - data = HOST.run_json(['bridge', '-j', 'vlan', 'show', 'dev', ifname]) - if len(data) != 1: - return None - - iface = data[0] - - for vlan in iface['vlans']: - if 'flags' in vlan and 'PVID' in vlan['flags']: - return vlan['vlan'] - - return None - - -def get_bridge_port_stp_state(ifname): - data = HOST.run_json(['bridge', '-j', 'link', 'show', 'dev', ifname]) - if len(data) != 1: - return None - - iface = data[0] - - states = ['disabled', 'listening', 'learning', 'forwarding', 'blocking'] - if 'state' in iface and iface['state'] in states: - return iface['state'] - - return None - - -def get_brport_multicast(ifname): - """Check if multicast snooping is enabled on bridge, default: nope""" - data = HOST.run_json(['mctl', '-p', 'show', 'igmp', 'json'], default={}) - multicast = {} - - if ifname in data.get('fast-leave-ports', []): - multicast["fast-leave"] = True - else: - multicast["fast-leave"] = False - - if ifname in data.get('multicast-router-ports', []): - multicast["router"] = "permanent" - else: - multicast["router"] = "auto" - - return multicast - - -# We always get all interfaces for two reasons. -# 1) To increase speed on large iron with many ports. -# 2) To simplify testing (single dummy file ip-link-show.json). -def get_ip_link(): - """Fetch interface link information from kernel""" - return HOST.run_json(['ip', '-s', '-d', '-j', 'link', 'show']) - -def netns_get_ip_link(netns): - """Fetch interface link information from within a network namespace""" - return HOST.run_json(['ip', 'netns', 'exec', netns, 'ip', '-s', '-d', '-j', 'link', 'show']) - -def get_ip_addr(): - """Fetch interface address information from kernel""" - return HOST.run_json(['ip', '-j', 'addr', 'show']) - -def netns_get_ip_addr(netns): - """Fetch interface address information from within a network namespace""" - return HOST.run_json(['ip', 'netns', 'exec', netns, 'ip', '-j', 'addr', 'show']) - -def get_netns_list(): - """Fetch a list of network namespaces""" - return HOST.run_json(['ip', '-j', 'netns', 'list'], []) - -def netns_find_ifname(ifname): - """Find which network namespace owns ifname (if any)""" - for netns in get_netns_list(): - for iface in netns_get_ip_link(netns['name']): - if 'ifalias' in iface and iface['ifalias'] == ifname: - return netns['name'] - return None - -def netns_ifindex_to_ifname(ifindex): - """Look through all network namespaces for an interface index and return its name""" - for netns in get_netns_list(): - for iface in netns_get_ip_link(netns['name']): - if iface['ifindex'] == ifindex: - if 'ifalias' in iface: - return iface['ifalias'] - if 'ifname' in iface: - return iface['ifname'] - return None - - return None - -def add_bridge_port_common(ifname, iface_in, iface_out): - li = iface_in.get("linkinfo", {}) - if not (li.get("info_slave_kind") == "bridge" or \ - li.get("info_kind") == "bridge"): - return - - pvid = get_bridge_port_pvid(ifname) - if pvid is not None: - insert(iface_out, "infix-interfaces:bridge-port", "pvid", pvid) - -def add_bridge_port_lower(ifname, iface_in, iface_out): - li = iface_in.get("linkinfo", {}) - if not li.get("info_slave_kind") == "bridge": - return - - insert(iface_out, "infix-interfaces:bridge-port", "bridge", iface_in['master']) - - stp_state = get_bridge_port_stp_state(ifname) - if stp_state is not None: - insert(iface_out, "infix-interfaces:bridge-port", "stp-state", stp_state) - - multicast = get_brport_multicast(ifname) - insert(iface_out, "infix-interfaces:bridge-port", "multicast", multicast) - - -def add_gre(iface_in, iface_out): - if 'link_type' in iface_in: - val = json_get_yang_type(iface_in) - if val != "infix-if-type:gre" and val != "infix-if-type:gretap": - return; - gre={} - info_data=iface_in.get("linkinfo", {}).get("info_data", {}) - gre["local"] = info_data.get("local") - gre["remote"] = info_data.get("remote") - insert(iface_out, "infix-interfaces:gre", gre) - - -def add_ip_link(ifname, iface_in, iface_out): - if 'ifname' in iface_in: - iface_out['name'] = ifname - - if 'ifindex' in iface_in: - iface_out['if-index'] = iface_in['ifindex'] - - if 'ifalias' in iface_in: - iface_out['description'] = iface_in['ifalias'] - - if 'address' in iface_in and not "POINTOPOINT" in iface_in["flags"]: - iface_out['phys-address'] = iface_in['address'] - - add_bridge_port_common(ifname, iface_in, iface_out) - add_bridge_port_lower(ifname, iface_in, iface_out) - - if not iface_is_dsa(iface_in): - if iface_in.get('link'): - insert(iface_out, "infix-interfaces:vlan", "lower-layer-if", iface_in['link']) - elif 'link_index' in iface_in: - # 'link_index' is the only reference we have if the link iface is in a namespace - lower = netns_ifindex_to_ifname(iface_in['link_index']) - if lower: - insert(iface_out, "infix-interfaces:vlan", "lower-layer-if", lower) - - if 'flags' in iface_in: - iface_out['admin-status'] = "up" if "UP" in iface_in['flags'] else "down" - - if 'operstate' in iface_in: - xlate = { - "DOWN": "down", - "UP": "up", - "DORMANT": "dormant", - "TESTING": "testing", - "LOWERLAYERDOWN": "lower-layer-down", - "NOTPRESENT": "not-present" - } - val = xlate.get(iface_in['operstate'], "unknown") - iface_out['oper-status'] = val - - if 'link_type' in iface_in: - val = json_get_yang_type(iface_in) - iface_out['type'] = val - add_gre(iface_in, iface_out) - - val = lookup(iface_in, "stats64", "rx", "bytes") - if val is not None: - insert(iface_out, "statistics", "out-octets", str(val)) - - val = lookup(iface_in, "stats64", "tx", "bytes") - if val is not None: - insert(iface_out, "statistics", "in-octets", str(val)) - - -def add_ip_addr(ifname, iface_in, iface_out): - if 'mtu' in iface_in and ifname != "lo": - insert(iface_out, "ietf-ip:ipv4", "mtu", iface_in['mtu']) - - val = HOST.read(f"/proc/sys/net/ipv6/conf/{ifname}/mtu") - if val is not None: - insert(iface_out, "ietf-ip:ipv6", "mtu", int(val.strip())) - - if 'addr_info' in iface_in: - inet = [] - inet6 = [] - - for addr in iface_in['addr_info']: - new = {} - - if 'family' not in addr: - LOG.error("'family' missing from 'addr_info'") - continue - - if 'local' in addr: - new['ip'] = addr['local'] - if 'prefixlen' in addr: - new['prefix-length'] = addr['prefixlen'] - if 'protocol' in addr: - new['origin'] = json_get_yang_origin(addr) - - if addr['family'] == "inet": - inet.append(new) - elif addr['family'] == "inet6": - inet6.append(new) - else: - LOG.error("invalid 'family' in 'addr_info'") - sys.exit(1) - - insert(iface_out, "ietf-ip:ipv4", "address", inet) - insert(iface_out, "ietf-ip:ipv6", "address", inet6) - - -def add_ethtool_groups(ifname, iface_out): - """Fetch interface counters from kernel (need new JSON format!)""" - cmd = ['ethtool', '--json', '-S', ifname, '--all-groups'] - try: - data = HOST.run_json(cmd) - if len(data) != 1: - LOG.warning("%s: no counters available, skipping.", ifname) - return - except subprocess.CalledProcessError: - # Allow comand to fail, not all NICs support --json yet - return - - iface_in = data[0] - - # TODO: room for improvement, the "frame" creation could be more dynamic. - if "eth-mac" in iface_in or "rmon" in iface_in: - insert(iface_out, "ieee802-ethernet-interface:ethernet", "statistics", "frame", {}) - frame = iface_out['ieee802-ethernet-interface:ethernet']['statistics']['frame'] - - if "eth-mac" in iface_in: - mac_in = iface_in['eth-mac'] - - if "FramesTransmittedOK" in mac_in: - frame['out-frames'] = str(mac_in['FramesTransmittedOK']) - if "MulticastFramesXmittedOK" in mac_in: - frame['out-multicast-frames'] = str(mac_in['MulticastFramesXmittedOK']) - if "BroadcastFramesXmittedOK" in mac_in: - frame['out-broadcast-frames'] = str(mac_in['BroadcastFramesXmittedOK']) - if "FramesReceivedOK" in mac_in: - frame['in-frames'] = str(mac_in['FramesReceivedOK']) - if "MulticastFramesReceivedOK" in mac_in: - frame['in-multicast-frames'] = str(mac_in['MulticastFramesReceivedOK']) - if "BroadcastFramesReceivedOK" in mac_in: - frame['in-broadcast-frames'] = str(mac_in['BroadcastFramesReceivedOK']) - if "FrameCheckSequenceErrors" in mac_in: - frame['in-error-fcs-frames'] = str(mac_in['FrameCheckSequenceErrors']) - if "FramesLostDueToIntMACRcvError" in mac_in: - frame['in-error-mac-internal-frames'] = str(mac_in['FramesLostDueToIntMACRcvError']) - - if "OctetsTransmittedOK" in mac_in: - frame['infix-ethernet-interface:out-good-octets'] = str(mac_in['OctetsTransmittedOK']) - if "OctetsReceivedOK" in mac_in: - frame['infix-ethernet-interface:in-good-octets'] = str(mac_in['OctetsReceivedOK']) - - tot = 0 - found = False - if "FramesReceivedOK" in mac_in: - tot += mac_in['FramesReceivedOK'] - found = True - if "FrameCheckSequenceErrors" in mac_in: - tot += mac_in['FrameCheckSequenceErrors'] - found = True - if "FramesLostDueToIntMACRcvError" in mac_in: - tot += mac_in['FramesLostDueToIntMACRcvError'] - found = True - if "AlignmentErrors" in mac_in: - tot += mac_in['AlignmentErrors'] - found = True - if "etherStatsOversizePkts" in mac_in: - tot += mac_in['etherStatsOversizePkts'] - found = True - if "etherStatsJabbers" in mac_in: - tot += mac_in['etherStatsJabbers'] - found = True - if found: - frame['in-total-frames'] = str(tot) - - if "rmon" in iface_in: - rmon_in = iface_in['rmon'] - - if "undersize_pkts" in rmon_in: - frame['in-error-undersize-frames'] = str(rmon_in['undersize_pkts']) - - tot = 0 - found = False - if "etherStatsJabbers" in rmon_in: - tot += rmon_in['etherStatsJabbers'] - found = True - if "etherStatsOversizePkts" in rmon_in: - tot += rmon_in['etherStatsOversizePkts'] - found = True - if found: - frame['in-error-oversize-frames'] = str(tot) - -def add_ethtool_std(ifname, iface_out): - """Fetch interface speed/duplex/autoneg from kernel""" - keys = ['Speed', 'Duplex', 'Auto-negotiation'] - result = {} - - lines = HOST.run_multiline(['ethtool', ifname]) - for line in lines: - line = line.strip() - key = line.split(':', 1)[0].strip() - if key in keys: - key, value = line.split(':', 1) - result[key.strip()] = value.strip() - - if "Auto-negotiation" in result: - if result['Auto-negotiation'] == "on": - insert(iface_out, "ieee802-ethernet-interface:ethernet", "auto-negotiation", "enable", True) - else: - insert(iface_out, "ieee802-ethernet-interface:ethernet", "auto-negotiation", "enable", False) - - if "Duplex" in result: - if result['Duplex'] == "Half": - insert(iface_out, "ieee802-ethernet-interface:ethernet", "duplex", "half") - elif result['Duplex'] == "Full": - insert(iface_out, "ieee802-ethernet-interface:ethernet", "duplex", "full") - else: - insert(iface_out, "ieee802-ethernet-interface:ethernet", "duplex", "unknown") - - if "Speed" in result and result['Speed'] != "Unknown!": - # Avoid importing re (performance) - num = ''.join(filter(str.isdigit, result['Speed'])) - if num: - num = round((int(num) / 1000), 3) - insert(iface_out, "ieee802-ethernet-interface:ethernet", "speed", str(num)) - -def get_querier_data(querier_data): - multicast={} - - if not querier_data: - multicast["snooping"] = False - return multicast - multicast["snooping"] = True - if(querier_data.get("query-interval")): - multicast["query-interval"] = querier_data["query-interval"] - - return multicast - -def get_multicast_filters(filters): - multicast_filters=[] - for f in filters: - multicast_filter={} - multicast_filter["group"] = f["group"] - multicast_filter["ports"] = [] - for p in f["ports"]: - port={} - port["port"] = p - multicast_filter["ports"].append(port) - multicast_filters.append(multicast_filter) - return multicast_filters - -def add_mdb_to_bridge(brname, iface_out, mc_status): - filters = [entry for entry in mc_status.get("multicast-groups", []) if entry.get('vid') == None and entry.get('bridge') == brname] - querier = next((querier for querier in mc_status.get('multicast-queriers', []) if (querier.get("interface", "") == brname) and (querier.get("vid") is None)), None) - multicast = get_querier_data(querier) - multicast_filters = get_multicast_filters(filters) - insert(iface_out, "infix-interfaces:bridge", "multicast", multicast) - insert(iface_out, "infix-interfaces:bridge", "multicast-filters", "multicast-filter", multicast_filters) - -def add_container_ifaces(yang_ifaces): - """Add all podman interfaces with limited data""" - interfaces={} - try: - containers = HOST.run_json(['podman', 'ps', '-a', '--format=json'], default=[]) - except Exception as e: - logging.error(f"Error, unable to run podman: {e}") - return - - for container in containers: - name = container.get('Names', ['Unknown'])[0] - networks = container.get('Networks', []) - - for network in networks: - if not network in interfaces: - interfaces[network] = [] - if name not in interfaces[network]: - interfaces[network].append(name) - - for ifname, containers in interfaces.items(): - iface_out = {} - iface_out['name'] = ifname - iface_out['type'] = "infix-if-type:other" # Fallback - insert(iface_out, "infix-interfaces:container-network", "containers", containers) - - netns = netns_find_ifname(ifname) - if netns is not None: - ip_link_data = netns_get_ip_link(netns) - ip_link_data = next((d for d in ip_link_data if d.get('ifalias') == ifname), None) - add_ip_link(ifname, ip_link_data, iface_out) - - yang_ifaces.append(iface_out) - -# Helper function to add tagged/untagged interfaces to a vlan dict in a list -def _add_vlan_iface(vlans, multicast_filter, multicast, vid, key, val): - for d in vlans: - if d['vid'] == vid: - if key in d: - d[key].append(val) - else: - d[key] = [val] - return - - vlans.append({'vid': vid, "multicast-filters": {"multicast-filter": multicast_filter}, "multicast": multicast, key: [val]}) - -def add_vlans_to_bridge(brname, iface_out, mc_status): - slaves = [] # Contains all interfaces that has this bridge as 'master' - for iface in HOST.run_json(['bridge', '-j', 'link']): - if "master" in iface and iface['master'] == brname: - slaves.append(iface['ifname']) - - vlans = [] # Contains all vlans and slaves belonging to this bridge - for iface in HOST.run_json(['bridge', '-j', 'vlan']): - if iface['ifname'] not in slaves and iface['ifname'] != brname: - continue - for vlan in iface['vlans']: - querier = next((querier for querier in mc_status.get('multicast-queriers', []) if (querier.get("vid") == vlan['vlan'])), None) - filters = [entry for entry in mc_status.get("multicast-groups", []) if (entry.get("vid") == vlan["vlan"])] - if 'flags' in vlan and 'Egress Untagged' in vlan['flags']: - _add_vlan_iface(vlans, get_multicast_filters(filters), get_querier_data(querier), vlan['vlan'], 'untagged', iface['ifname']) - else: - _add_vlan_iface(vlans, get_multicast_filters(filters), get_querier_data(querier), vlan['vlan'], 'tagged', iface['ifname']) - - insert(iface_out, "infix-interfaces:bridge", "vlans", "vlan", vlans) - -def get_iface_data(ifname, ip_link_data, ip_addr_data): - iface_out = {} - - add_ip_link(ifname, ip_link_data, iface_out) - add_ip_addr(ifname, ip_addr_data, iface_out) - - if 'type' in iface_out and iface_out['type'] == "infix-if-type:ethernet": - add_ethtool_groups(ifname, iface_out) - add_ethtool_std(ifname, iface_out) - - if 'type' in iface_out and iface_out['type'] == "infix-if-type:bridge": - # Fail silent, multicast snooping may not be enabled on bridge - mc_status = HOST.run_json(['mctl', '-p', 'show', 'igmp', 'json'], default={}) - - add_vlans_to_bridge(ifname, iface_out, mc_status) - add_mdb_to_bridge(ifname, iface_out, mc_status) - - return iface_out - -def _add_interface(ifname, ip_link_data, ip_addr_data, yang_ifaces): - # We expect both ip addr and link data to exist. - if not ip_link_data or not ip_addr_data: - return - - # Skip internal interfaces. - if 'group' in ip_link_data and ip_link_data['group'] == "internal": - return - - yang_ifaces.append(get_iface_data(ifname, ip_link_data, ip_addr_data)) +from . import container +from . import link def operational(ifname=None): - out = { + return { "ietf-interfaces:interfaces": { - "interface": [] - } + "interface": + link.interfaces(ifname) + + container.interfaces(ifname), + }, } - out_ifaces = out["ietf-interfaces:interfaces"]["interface"] - - ip_link_data = get_ip_link() - ip_addr_data = get_ip_addr() - - if ifname: - ip_link_data = next((d for d in ip_link_data if d.get('ifname') == ifname), None) - ip_addr_data = next((d for d in ip_addr_data if d.get('ifname') == ifname), None) - _add_interface(ifname, ip_link_data, ip_addr_data, out_ifaces) - else: - for link in ip_link_data: - addr = next((d for d in ip_addr_data if d.get('ifname') == link["ifname"]), None) - _add_interface(link["ifname"], link, addr, out_ifaces) - - add_container_ifaces(out_ifaces) - - return out diff --git a/src/statd/python/yanger/ietf_interfaces/bridge.py b/src/statd/python/yanger/ietf_interfaces/bridge.py new file mode 100644 index 00000000..fc076859 --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/bridge.py @@ -0,0 +1,171 @@ +from functools import cache + +from ..common import LOG +from ..host import HOST + +from .common import iplinks, iplinks_lower_of + +from . import vlan + + +@cache +def bridge_vlan(): + return { v["ifname"]: v for v in HOST.run_json("bridge -j vlan show".split(), []) } + + +def lower(iplink): + lower = {} + + if brpvlans := bridge_vlan().get(iplink["ifname"]): + for brpvlan in brpvlans["vlans"]: + if "PVID" in brpvlan.get("flags", []): + lower["pvid"] = brpvlan["vlan"] + + if iplink.get("linkinfo", {}).get("info_kind") == "bridge": + return lower + + info = iplink["linkinfo"]["info_slave_data"] + + return lower | { + "bridge": iplink["master"], + "flood": { + "broadcast": info["bcast_flood"], + "unicast": info["flood"], + "multicast": info["mcast_flood"], + }, + + "multicast": { + "fast-leave": info["fastleave"], + "router": { + 0: "off", + 1: "auto", + 2: "permanent", + }.get(info["multicast_router"], "UNKNOWN"), + }, + + "stp-state": info["state"], + } + + +def mctlq2yang_mode(mctlq): + if state := mctlq.get("state"): + return "proxy" if state == "proxy" else "auto" + + return "off" + + +def mctl(ifname, vid): + mctl = HOST.run_json(["mctl", "-p", "show", "igmp", "json"], default={}) + + for q in mctl.get("multicast-queriers", []): + # TODO: Also need to match against VLAN uppers (e.g. br0.1337) + if q.get("interface") == ifname and q.get("vid") == vid: + return q + + return {} + + +def multicast_filters(iplink, vid): + filt = ["dev", iplink["ifname"]] + (["vid", str(vid)] if vid else []) + brmdb = HOST.run_json(["bridge", "-j", "mdb", "show"] + filt)[0]["mdb"] + + mdb = {} + for brentry in brmdb: + if not (entry := mdb.get(brentry["grp"])): + mdb[brentry["grp"]] = { + "group": brentry["grp"], + "ports": [], + } + entry = mdb[brentry["grp"]] + + entry["ports"].append({ + "port": brentry["port"], + "state": { + "temp": "temporary", + "permanent": "permanent" + }.get(brentry["state"], "UNKNOWN"), + }) + + return { "multicast-filter": list(mdb.values()) } + + +def multicast(iplink, info): + mctlq = mctl(iplink["ifname"], info.get("vlan")) + + mcast = { + "snooping": bool(info.get("mcast_snooping")), + "querier": mctlq2yang_mode(mctlq), + } + + if interval := mctlq.get("interval"): + mcast["query-interval"] = interval + + return mcast + + +def vlans_add_memberships(iplink, vlans): + brvlans = bridge_vlan() + ports = [iplink["ifname"]] + [link["ifname"] for link in iplinks_lower_of(iplink["ifname"]).values()] + + for port in ports: + if not (brpvlans := brvlans.get(port)): + continue + + for brpvlan in brpvlans["vlans"]: + if not (vlan := vlans.get(brpvlan["vlan"])): + LOG.error(f"Unexpected vlan {brpvlans['vlan']} on {port}") + continue + + if "Egress Untagged" in brpvlan.get("flags", []): + vlan["untagged"].append(port) + else: + vlan["tagged"].append(port) + + +def vlans(iplink): + if not (brgvlans := HOST.run_json(f"bridge -j vlan global show dev {iplink['ifname']}".split())): + return [] + + vlans = { + v["vlan"]: { + "vid": v["vlan"], + "untagged": [], + "tagged": [], + + "multicast": multicast(iplink, v), + "multicast-filters": multicast_filters(iplink, v["vlan"]), + } + for v in brgvlans[0]["vlans"] + } + + vlans_add_memberships(iplink, vlans) + return list(vlans.values()) + + +def qbridge(iplink): + info = iplink["linkinfo"]["info_data"] + + return { + "vlans": { + "proto": vlan.proto2yang(info["vlan_protocol"]), + "vlan": vlans(iplink), + } + } + + +def dbridge(iplink): + info = iplink["linkinfo"]["info_data"] + + return { + "multicast": multicast(iplink, info), + "multicast-filters": multicast_filters(iplink, None), + } + + +def bridge(iplink): + info = iplink["linkinfo"]["info_data"] + + if info.get("vlan_filtering"): + return qbridge(iplink) + else: + return dbridge(iplink) diff --git a/src/statd/python/yanger/ietf_interfaces/common.py b/src/statd/python/yanger/ietf_interfaces/common.py new file mode 100644 index 00000000..a2b0b255 --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/common.py @@ -0,0 +1,30 @@ +from functools import cache + +from ..host import HOST + + +@cache +def iplinks(ifname=None, netns=None): + def _iplinks(ifname, netns): + pre = [ "ip", "netns", "exec", netns ] if netns else [] + filt = ["dev", ifname] if ifname else [] + return HOST.run_json(pre + ["ip", "-s", "-d", "-j", "link", "show"] + filt) + + return { link["ifname"]: link for link in _iplinks(ifname, netns) } + + +def iplinks_lower_of(upper): + return { + link["ifname"]: link for link in + filter(lambda link: link.get("master") == upper, iplinks().values()) + } + + +@cache +def ipaddrs(ifname=None, netns=None): + def _ipaddrs(ifname, netns): + pre = [ "ip", "netns", "exec", netns ] if netns else [] + filt = ["dev", ifname] if ifname else [] + return HOST.run_json(pre + ["ip", "-j", "addr", "show"] + filt) + + return { addr["ifname"]: addr for addr in _ipaddrs(ifname, netns) } diff --git a/src/statd/python/yanger/ietf_interfaces/container.py b/src/statd/python/yanger/ietf_interfaces/container.py new file mode 100644 index 00000000..d7caf424 --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/container.py @@ -0,0 +1,57 @@ +from ..host import HOST +from ..infix_containers import podman_ps + +from . import common +from . import link + + +def ip_netns_list(): + return HOST.run_json(["ip", "-j", "netns", "list"], []) + + +def find_interface(cifname): + for ns in ip_netns_list(): + for iplink in common.iplinks(netns=ns["name"]).values(): + if iplink.get("ifalias") == cifname: + ipaddrs = common.ipaddrs(ifname=iplink["ifname"], netns=ns["name"]) + return (iplink, next(iter(ipaddrs.values()))) + + +def podman_interfaces(): + interfaces = {} + + for container in podman_ps(): + containername = container.get("Names", ["Unknown"])[0] + + for ifname in container.get("Networks", []): + if ifname not in interfaces: + interfaces[ifname] = [] + if containername not in interfaces[ifname]: + interfaces[ifname].append(containername) + + return interfaces + +def interfaces(ifname): + interfaces = [] + + for cifname, cnames in podman_interfaces().items(): + if ifname and cifname != ifname: + continue + + iplink, ipaddr = find_interface(cifname) + interface = link.interface_common(iplink, ipaddr) + + # The original interface name is stored in ifalias by podman - + # which we then translate to the description. We need to + # reverse these since the "name" from the user's perspective + # is the one set in running-config, not whatever the container + # has renamed it to. + interface["description"] = interface["name"] + interface["name"] = cifname + + interface["infix-interfaces:container-network"] = { + "containers": cnames, + } + interfaces.append(interface) + + return interfaces diff --git a/src/statd/python/yanger/ietf_interfaces/ethernet.py b/src/statd/python/yanger/ietf_interfaces/ethernet.py new file mode 100644 index 00000000..ed1923b1 --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/ethernet.py @@ -0,0 +1,110 @@ +from ..host import HOST + + +def frame_statistics(etstats): + STAT_MAP = { + "eth-mac": { + "out-frames": "FramesTransmittedOK", + "out-multicast-frames": "MulticastFramesXmittedOK", + "out-broadcast-frames": "BroadcastFramesXmittedOK", + "in-frames": "FramesReceivedOK", + "in-multicast-frames": "MulticastFramesReceivedOK", + "in-broadcast-frames": "BroadcastFramesReceivedOK", + "in-error-fcs-frames": "FrameCheckSequenceErrors", + "in-error-mac-internal-frames": "FramesLostDueToIntMACRcvError", + "infix-ethernet-interface:out-good-octets": "OctetsTransmittedOK", + "infix-ethernet-interface:in-good-octets": "OctetsReceivedOK", + + "in-total-frames": ( + "FramesReceivedOK", + "FrameCheckSequenceErrors", + "FramesLostDueToIntMACRcvError", + "AlignmentErrors", + "etherStatsOversizePkts", + "etherStatsJabbers", + ), + }, + + "rmon": { + "in-error-undersize-frames": "undersize_pkts", + + "in-error-oversize-frames": ( + "etherStatsJabbers", + "etherStatsOversizePkts", + ), + }, + } + + fstats = {} + + for group, mapping in STAT_MAP.items(): + etgroup = etstats.get(group) + if not etgroup: + continue + + for name, source in mapping.items(): + if type(source) == str: + counter = etgroup.get(source) + if counter is not None: + fstats[name] = str(counter) + elif type(source) == tuple: + inputs = [etgroup.get(src) for src in source] + if inputs := filter(lambda i: i is not None, inputs): + fstats[name] = str(sum(inputs)) + + return fstats + + +def statistics(ifname): + if etstats := HOST.run_json(["ethtool", "--json", "-S", ifname, "--all-groups"], []): + etstats = etstats[0] + else: + return None + + statistics = {} + + if fstats := frame_statistics(etstats): + statistics["frame"] = fstats + + return statistics + + +def link(ethtool): + """Parse speed/duplex/autoneg from ethtool output""" + eth = {} + + for line in ethtool: + kv = [s.strip() for s in line.split(":")] + if len(kv) != 2: + continue + + key, val = kv + match key: + case "Auto-negotiation": + eth["auto-negotiation"] = { "enable": val == "on" } + case "Duplex": + match val: + case "Half": + eth["duplex"] = "half" + case "Full": + eth["duplex"] = "full" + case _: + eth["duplex"] = "unknown" + case "Speed": + mbps = "".join(filter(str.isdigit, val)) + if mbps: + gbps = round((int(mbps) / 1000), 3) + eth["speed"] = str(gbps) + + return eth + + +def ethernet(iplink): + ethtool = HOST.run_multiline(["ethtool", iplink["ifname"]]) + + eth = link(ethtool) + + if stats := statistics(iplink["ifname"]): + eth["statistics"] = stats + + return eth diff --git a/src/statd/python/yanger/ietf_interfaces/ip.py b/src/statd/python/yanger/ietf_interfaces/ip.py new file mode 100644 index 00000000..f4a1a5fd --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/ip.py @@ -0,0 +1,56 @@ +from ..host import HOST + +def inet2yang_origin(inet): + """Translate kernel IP address origin to YANG""" + xlate = { + "kernel_ll": "link-layer", + "kernel_ra": "link-layer", + "static": "static", + "dhcp": "dhcp", + "random": "random", + } + proto = inet.get("protocol") + + if proto in ("kernel_ll", "kernel_ra"): + if "stable-privacy" in inet: + return "random" + + return xlate.get(proto, "other") + + +def addresses(ipaddr, proto): + addrs = [] + for inet in ipaddr.get("addr_info", []): + if inet.get("family") != proto: + continue + + addrs.append({ + "ip": inet.get("local"), + "prefix-length": inet.get("prefixlen"), + "origin": inet2yang_origin(inet), + }) + + return addrs + +def ipv4(ipaddr): + ipv4 = {} + + mtu = ipaddr.get("mtu") + if mtu and ipaddr.get("ifname") != "lo": + ipv4["mtu"] = mtu + + if addrs := addresses(ipaddr, "inet"): + ipv4["address"] = addrs + + return ipv4 + +def ipv6(ipaddr): + ipv6 = {} + + if mtu := HOST.read(f"/proc/sys/net/ipv6/conf/{ipaddr['ifname']}/mtu"): + ipv6["mtu"] = int(mtu.strip()) + + if addrs := addresses(ipaddr, "inet6"): + ipv6["address"] = addrs + + return ipv6 diff --git a/src/statd/python/yanger/ietf_interfaces/link.py b/src/statd/python/yanger/ietf_interfaces/link.py new file mode 100644 index 00000000..955d9e08 --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/link.py @@ -0,0 +1,158 @@ +from . import common + +from . import bridge +from . import ethernet +from . import ip +from . import tun +from . import veth +from . import vlan + + +def statistics(iplink): + statistics = {} + + if rx := iplink.get("stats64", {}).get("rx"): + if octets := rx.get("bytes"): + statistics["in-octets"] = str(octets) + + if tx := iplink.get("stats64", {}).get("tx"): + if octets := tx.get("bytes"): + statistics["out-octets"] = str(octets) + + return statistics + + +def iplink2yang_type(iplink): + match iplink["link_type"]: + case "loopback": + return "infix-if-type:loopback" + case "gre"|"gre6": + return "infix-if-type:gre" + case "ether": + pass + case _: + return "infix-if-type:other" + + if iplink.get("parentbus") == "virtio": + return "infix-if-type:etherlike" + + match iplink.get("linkinfo", {}).get("info_kind"): + case "bond": + return "infix-if-type:lag" + case "bridge": + return "infix-if-type:bridge" + case "dummy": + return "infix-if-type:dummy" + case "gretap"|"ip6gretap": + return "infix-if-type:gretap" + case "veth": + return "infix-if-type:veth" + case "vlan": + return "infix-if-type:vlan" + + return "infix-if-type:ethernet" + + +def iplink2yang_lower(iplink): + if not (kind := iplink.get("linkinfo",{}).get("info_slave_kind")): + return None + + match kind: + case "bridge": + return "infix-interfaces:bridge-port" + case "bond": + return "infix-interfaces:lag-port" + + return None + + +def iplink2yang_operstate(iplink): + xlate = { + "DOWN": "down", + "UP": "up", + "DORMANT": "dormant", + "TESTING": "testing", + "LOWERLAYERDOWN": "lower-layer-down", + "NOTPRESENT": "not-present" + } + return xlate.get(iplink["operstate"], "unknown") + + +def interface_common(iplink, ipaddr): + interface = { + "type": iplink2yang_type(iplink), + "name": iplink.get("ifname"), + "if-index": iplink.get("ifindex"), + + "admin-status": "up" if "UP" in iplink.get("flags", "") else "down", + "oper-status": iplink2yang_operstate(iplink), + } + + if "ifalias" in iplink: + interface["description"] = iplink["ifalias"] + + if "address" in iplink and not "POINTOPOINT" in iplink["flags"]: + interface["phys-address"] = iplink["address"] + + if stats := statistics(iplink): + interface["statistics"] = stats + + if ipv4 := ip.ipv4(ipaddr): + interface["ietf-ip:ipv4"] = ipv4 + + if ipv6 := ip.ipv6(ipaddr): + interface["ietf-ip:ipv6"] = ipv6 + + return interface + + +def interface(iplink, ipaddr): + interface = interface_common(iplink, ipaddr) + + match interface["type"]: + case "infix-if-type:bridge": + if br := bridge.bridge(iplink): + interface["infix-interfaces:bridge"] = br + if brport := bridge.lower(iplink): + interface["infix-interfaces:bridge-port"] = brport + # case "infix-if-type:lag": + # if l := lag.lag(iplink): + # interface["infix-interfaces:lag"] = l + case "infix-if-type:ethernet": + if eth := ethernet.ethernet(iplink): + interface["ieee802-ethernet-interface:ethernet"] = eth + case "infix-if-type:gre"|"infix-if-type:gretap": + if gre := tun.gre(iplink): + interface["infix-interfaces:gre"] = gre + case "infix-if-type:veth": + if ve := veth.veth(iplink): + interface["infix-interfaces:veth"] = ve + case "infix-if-type:vlan": + if v := vlan.vlan(iplink): + interface["infix-interfaces:vlan"] = v + + match iplink2yang_lower(iplink): + case "infix-interfaces:bridge-port": + if brport := bridge.lower(iplink): + interface["infix-interfaces:bridge-port"] = brport + # case "infix-interfaces:lag-port": + # if lagport := lag.lower(iplink): + # interface["infix-interfaces:lag-port"] = lagport + + return interface + + +def interfaces(ifname=None): + links = common.iplinks(ifname) + addrs = common.ipaddrs(ifname) + + interfaces = [] + for ifname, iplink in links.items(): + if iplink.get("group") == "internal": + continue + + ipaddr = addrs.get(ifname, {}) + + interfaces.append(interface(iplink, ipaddr)) + + return interfaces diff --git a/src/statd/python/yanger/ietf_interfaces/tun.py b/src/statd/python/yanger/ietf_interfaces/tun.py new file mode 100644 index 00000000..93378f60 --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/tun.py @@ -0,0 +1,7 @@ +def gre(iplink): + info=iplink.get("linkinfo", {}).get("info_data", {}) + + return { + "local": info["local"], + "remote": info["remote"], + } diff --git a/src/statd/python/yanger/ietf_interfaces/veth.py b/src/statd/python/yanger/ietf_interfaces/veth.py new file mode 100644 index 00000000..70f7d016 --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/veth.py @@ -0,0 +1,7 @@ +def veth(iplink): + veth = {} + + if peer := iplink.get("link"): + veth["peer"] = peer + + return veth diff --git a/src/statd/python/yanger/ietf_interfaces/vlan.py b/src/statd/python/yanger/ietf_interfaces/vlan.py new file mode 100644 index 00000000..8ddd3a7b --- /dev/null +++ b/src/statd/python/yanger/ietf_interfaces/vlan.py @@ -0,0 +1,21 @@ +def proto2yang(proto): + return { + "802.1Q": "ieee802-dot1q-types:c-vlan", + "802.1ad": "ieee802-dot1q-types:s-vlan", + }.get(proto, "other") + + +def vlan(iplink): + info = iplink["linkinfo"]["info_data"] + + vlan = { + "tag-type": proto2yang(info["protocol"]), + "id": info["id"], + } + + # Lower could be in a different namespace, and thus might not be + # available to us + if lower := iplink.get("link"): + vlan["lower-layer-if"] = lower + + return vlan From c244042e5549e51146045c45cae630adfbca21eb Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Jan 2025 22:48:13 +0100 Subject: [PATCH 07/14] test: verify_all_interface_types: Add bridge VLANs Ensure that VLANs can be configured on VLAN filtering bridges. In addition to the increased test coverage, it will also be useful as a basis for collecting representative system state for CLI testing. --- .../verify_all_interface_types/test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/case/ietf_interfaces/verify_all_interface_types/test.py b/test/case/ietf_interfaces/verify_all_interface_types/test.py index c10508fd..90a4645a 100755 --- a/test/case/ietf_interfaces/verify_all_interface_types/test.py +++ b/test/case/ietf_interfaces/verify_all_interface_types/test.py @@ -152,6 +152,18 @@ with infamy.Test() as test: "name": br_Q, "type": "infix-if-type:bridge", "enabled": True, + "infix-interfaces:bridge": { + "vlans": { + "vlan": [ + { "vid": 20, "untagged": [br_Q], "tagged": [eth_Q, veth_b] }, + { "vid": 30, "untagged": [br_Q], "tagged": [eth_Q, veth_b] }, + { "vid": 40, "untagged": [], "tagged": [br_Q, eth_Q, veth_b] }, + ], + } + }, + "infix-interfaces:bridge-port": { + "pvid": 10, + } }, { "name": eth_Q, From ddc8282dd78ed23ce6f503b46013b2f5419c679d Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Jan 2025 22:58:14 +0100 Subject: [PATCH 08/14] test: verify_all_interface_types: Add IP addresses Having addresses configured is useful when using this test to collect representative system state for CLI testing. --- .../verify_all_interface_types/test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/case/ietf_interfaces/verify_all_interface_types/test.py b/test/case/ietf_interfaces/verify_all_interface_types/test.py index 90a4645a..2901d1a1 100755 --- a/test/case/ietf_interfaces/verify_all_interface_types/test.py +++ b/test/case/ietf_interfaces/verify_all_interface_types/test.py @@ -127,6 +127,17 @@ with infamy.Test() as test: "name": br_D, "type": "infix-if-type:bridge", "enabled": True, + "ietf-ip:ipv4": { + "address": [ + { "ip": "192.168.20.1", "prefix-length": 24 }, + { "ip": "10.0.0.1", "prefix-length": 8 }, + ], + }, + "ietf-ip:ipv6": { + "address": [ + { "ip": "2001:db8::1", "prefix-length": 64 }, + ], + }, }, { "name": veth_a_20, From 6f2face898abccf1975ca5412543de04841fb69c Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Jan 2025 23:10:16 +0100 Subject: [PATCH 09/14] test: verify_all_interface_types: Add GRE tunnels Ensure that all flavors of GRE tunnels can be configured. In addition to the increased test coverage, it will also be useful as a basis for collecting representative system state for CLI testing. --- .../verify_all_interface_types/test.py | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/test/case/ietf_interfaces/verify_all_interface_types/test.py b/test/case/ietf_interfaces/verify_all_interface_types/test.py index 2901d1a1..a94b9000 100755 --- a/test/case/ietf_interfaces/verify_all_interface_types/test.py +++ b/test/case/ietf_interfaces/verify_all_interface_types/test.py @@ -213,6 +213,46 @@ with infamy.Test() as test: } }) + with test.step("Configure GRE Tunnels"): + target.put_config_dict("ietf-interfaces", { + "interfaces": { + "interface": [ + { + "name": "gre-v4", + "type": "infix-if-type:gre", + "infix-interfaces:gre": { + "local": "192.168.20.1", + "remote": "192.168.20.2", + } + }, + { + "name": "gre-v6", + "type": "infix-if-type:gre", + "infix-interfaces:gre": { + "local": "2001:db8::1", + "remote": "2001:db8::2", + } + }, + { + "name": "gretap-v4", + "type": "infix-if-type:gretap", + "infix-interfaces:gre": { + "local": "192.168.20.1", + "remote": "192.168.20.2", + } + }, + { + "name": "gretap-v6", + "type": "infix-if-type:gretap", + "infix-interfaces:gre": { + "local": "2001:db8::1", + "remote": "2001:db8::2", + } + }, + ] + } + }) + with test.step("Verify interface 'lo' is of type loopback"): verify_interface(target, "lo", "loopback") @@ -236,4 +276,10 @@ with infamy.Test() as test: verify_interface(target, f"{eth_Q}.10", "vlan") verify_interface(target, "br-Q.40", "vlan") + with test.step("Verify GRE interfaces 'gre-v4', 'gre-v6', 'gretap-v4' and 'gretap-v6'"): + verify_interface(target, "gre-v4", "gre") + verify_interface(target, "gre-v6", "gre") + verify_interface(target, "gretap-v4", "gretap") + verify_interface(target, "gretap-v6", "gretap") + test.succeed() From beecff2acf4d7a2b185058c1244d45c31a7feec7 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Jan 2025 09:15:39 +0100 Subject: [PATCH 10/14] test: statd: Refactor cli and yanger testing Existing tests relied on manually captured system data from various points in Infix's history, making them hard to extend as we add new features. Move to a new model where we: To update a unit test: 1. Use Infamy tests to setup a DUT in a known state 2. Use yanger's wrapper mode to capture the system state needed to produce operational data for a set of YANG models 3. Use cli-pretty to create the expected output for a set of show commands When running unit tests, we can then use the captured data to verify that yanger and cli-pretty works as expected without the need for a running Infix system - just like before. The difference is that it is now much easier to capture a new snapshot when the system evolves. --- test/case/all-unit.yaml | 14 +- test/case/cli/all.yaml | 3 - test/case/cli/cli-output/show-bridge-mdb.txt | 7 - .../cli/cli-output/show-interface-br0.txt | 9 - .../case/cli/cli-output/show-interface-e0.txt | 24 - .../case/cli/cli-output/show-interface-e1.txt | 24 - .../case/cli/cli-output/show-interface-e2.txt | 9 - .../case/cli/cli-output/show-interface-e3.txt | 9 - .../case/cli/cli-output/show-interface-e4.txt | 9 - test/case/cli/cli-output/show-interfaces.txt | 16 - test/case/cli/cli-output/show-ntp.txt | 9 - test/case/cli/cli-output/show-routes-ipv4.txt | 11 - test/case/cli/cli-output/show-routes-ipv6.txt | 11 - test/case/cli/cli-output/show-software.txt | 6 - test/case/cli/run.sh | 144 ---- test/case/cli/sysrepo-emulator.sh | 34 - .../cli/system-output/rootfs/run/system.json | 1 - .../run/+usr+libexec+statd+ospf-status | 1 - .../case/cli/system-output/run/bridge_-j_link | 47 -- .../run/bridge_-j_link_show_dev_e0 | 17 - .../run/bridge_-j_link_show_dev_e1 | 17 - .../run/bridge_-j_link_show_dev_e2 | 17 - .../case/cli/system-output/run/bridge_-j_vlan | 57 -- .../run/bridge_-j_vlan_show_dev_br0 | 1 - .../run/bridge_-j_vlan_show_dev_br1 | 1 - .../run/bridge_-j_vlan_show_dev_e0 | 17 - .../run/bridge_-j_vlan_show_dev_e1 | 17 - .../run/bridge_-j_vlan_show_dev_e2 | 14 - .../cli/system-output/run/chronyc_-c_sources | 8 - .../run/ethtool_--json_-S_br0_--all-groups | 61 -- .../run/ethtool_--json_-S_dsa0_--all-groups | 7 - .../run/ethtool_--json_-S_e0_--all-groups | 61 -- .../run/ethtool_--json_-S_e1_--all-groups | 61 -- .../run/ethtool_--json_-S_e2_--all-groups | 61 -- .../run/ethtool_--json_-S_e3_--all-groups | 61 -- .../run/ethtool_--json_-S_e4_--all-groups | 61 -- test/case/cli/system-output/run/ethtool_br0 | 17 - test/case/cli/system-output/run/ethtool_dsa0 | 32 - test/case/cli/system-output/run/ethtool_e0 | 39 - test/case/cli/system-output/run/ethtool_e1 | 39 - test/case/cli/system-output/run/ethtool_e2 | 39 - test/case/cli/system-output/run/ethtool_e3 | 39 - test/case/cli/system-output/run/ethtool_e4 | 39 - .../system-output/run/fw_printenv_BOOT_ORDER | 1 - .../cli/system-output/run/ip_-j_addr_show | 661 ----------------- .../cli/system-output/run/ip_-j_netns_list | 10 - .../system-output/run/ip_-s_-d_-j_link_show | 678 ------------------ .../ip_netns_exec_57ff63cb_ip_-j_addr_show | 119 --- ..._netns_exec_57ff63cb_ip_-s_-d_-j_link_show | 163 ----- .../ip_netns_exec_db5ad90e_ip_-j_addr_show | 80 --- ..._netns_exec_db5ad90e_ip_-s_-d_-j_link_show | 109 --- .../system-output/run/mctl_-p_show_igmp_json | 61 -- .../run/podman_ps_-a_--format=json | 73 -- .../run/rauc-installation-status | 1 - ...auc_status_--detailed_--output-format=json | 1 - .../run/vtysh_-c_show-ip-ospf-route-json | 1 - .../run/vtysh_-c_show-ip-route-json | 302 -------- .../run/vtysh_-c_show-ipv6-route-json | 294 -------- test/case/statd/all.yaml | 3 + .../statd/interfaces-all/cli/show-interfaces | 46 ++ .../statd/interfaces-all/ietf-interfaces.json | 633 ++++++++++++++++ .../statd/interfaces-all/operational.json | 633 ++++++++++++++++ .../rootfs/proc/sys/net/ipv6/conf/br-0/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/br-D/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/br-Q.40/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/br-Q/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/br-X/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e1/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e2.30/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e2/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e3.10/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e3/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e4/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e5/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e6/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e7/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/gre-v4/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/gre-v6/mtu | 1 + .../proc/sys/net/ipv6/conf/gretap-v4/mtu | 1 + .../proc/sys/net/ipv6/conf/gretap-v6/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/lo/mtu | 1 + .../proc/sys/net/ipv6/conf/veth0a.20/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/veth0a/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/veth0b/mtu | 1 + .../system/run/bridge_-j_mdb_show_dev_br-0 | 1 + .../system/run/bridge_-j_mdb_show_dev_br-D | 1 + .../run/bridge_-j_mdb_show_dev_br-Q_vid_10 | 1 + .../run/bridge_-j_mdb_show_dev_br-Q_vid_20 | 1 + .../run/bridge_-j_mdb_show_dev_br-Q_vid_30 | 1 + .../run/bridge_-j_mdb_show_dev_br-Q_vid_40 | 1 + .../system/run/bridge_-j_mdb_show_dev_br-X | 1 + .../run/bridge_-j_vlan_global_show_dev_br-Q | 1 + .../system/run/bridge_-j_vlan_show | 1 + .../interfaces-all/system/run/ip_-j_addr_show | 1 + .../system/run/ip_-s_-d_-j_link_show | 1 + .../system/run/podman_ps_-a_--format=json | 1 + test/case/statd/interfaces-all/test | 11 + test/case/statd/test.sh | 336 +++++++++ 98 files changed, 1706 insertions(+), 3715 deletions(-) delete mode 100644 test/case/cli/all.yaml delete mode 100644 test/case/cli/cli-output/show-bridge-mdb.txt delete mode 100644 test/case/cli/cli-output/show-interface-br0.txt delete mode 100644 test/case/cli/cli-output/show-interface-e0.txt delete mode 100644 test/case/cli/cli-output/show-interface-e1.txt delete mode 100644 test/case/cli/cli-output/show-interface-e2.txt delete mode 100644 test/case/cli/cli-output/show-interface-e3.txt delete mode 100644 test/case/cli/cli-output/show-interface-e4.txt delete mode 100644 test/case/cli/cli-output/show-interfaces.txt delete mode 100644 test/case/cli/cli-output/show-ntp.txt delete mode 100644 test/case/cli/cli-output/show-routes-ipv4.txt delete mode 100644 test/case/cli/cli-output/show-routes-ipv6.txt delete mode 100644 test/case/cli/cli-output/show-software.txt delete mode 100755 test/case/cli/run.sh delete mode 100755 test/case/cli/sysrepo-emulator.sh delete mode 100644 test/case/cli/system-output/rootfs/run/system.json delete mode 100644 test/case/cli/system-output/run/+usr+libexec+statd+ospf-status delete mode 100644 test/case/cli/system-output/run/bridge_-j_link delete mode 100644 test/case/cli/system-output/run/bridge_-j_link_show_dev_e0 delete mode 100644 test/case/cli/system-output/run/bridge_-j_link_show_dev_e1 delete mode 100644 test/case/cli/system-output/run/bridge_-j_link_show_dev_e2 delete mode 100644 test/case/cli/system-output/run/bridge_-j_vlan delete mode 100644 test/case/cli/system-output/run/bridge_-j_vlan_show_dev_br0 delete mode 100644 test/case/cli/system-output/run/bridge_-j_vlan_show_dev_br1 delete mode 100644 test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e0 delete mode 100644 test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e1 delete mode 100644 test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e2 delete mode 100644 test/case/cli/system-output/run/chronyc_-c_sources delete mode 100644 test/case/cli/system-output/run/ethtool_--json_-S_br0_--all-groups delete mode 100644 test/case/cli/system-output/run/ethtool_--json_-S_dsa0_--all-groups delete mode 100644 test/case/cli/system-output/run/ethtool_--json_-S_e0_--all-groups delete mode 100644 test/case/cli/system-output/run/ethtool_--json_-S_e1_--all-groups delete mode 100644 test/case/cli/system-output/run/ethtool_--json_-S_e2_--all-groups delete mode 100644 test/case/cli/system-output/run/ethtool_--json_-S_e3_--all-groups delete mode 100644 test/case/cli/system-output/run/ethtool_--json_-S_e4_--all-groups delete mode 100644 test/case/cli/system-output/run/ethtool_br0 delete mode 100644 test/case/cli/system-output/run/ethtool_dsa0 delete mode 100644 test/case/cli/system-output/run/ethtool_e0 delete mode 100644 test/case/cli/system-output/run/ethtool_e1 delete mode 100644 test/case/cli/system-output/run/ethtool_e2 delete mode 100644 test/case/cli/system-output/run/ethtool_e3 delete mode 100644 test/case/cli/system-output/run/ethtool_e4 delete mode 100644 test/case/cli/system-output/run/fw_printenv_BOOT_ORDER delete mode 100644 test/case/cli/system-output/run/ip_-j_addr_show delete mode 100644 test/case/cli/system-output/run/ip_-j_netns_list delete mode 100644 test/case/cli/system-output/run/ip_-s_-d_-j_link_show delete mode 100644 test/case/cli/system-output/run/ip_netns_exec_57ff63cb_ip_-j_addr_show delete mode 100644 test/case/cli/system-output/run/ip_netns_exec_57ff63cb_ip_-s_-d_-j_link_show delete mode 100644 test/case/cli/system-output/run/ip_netns_exec_db5ad90e_ip_-j_addr_show delete mode 100644 test/case/cli/system-output/run/ip_netns_exec_db5ad90e_ip_-s_-d_-j_link_show delete mode 100644 test/case/cli/system-output/run/mctl_-p_show_igmp_json delete mode 100644 test/case/cli/system-output/run/podman_ps_-a_--format=json delete mode 100644 test/case/cli/system-output/run/rauc-installation-status delete mode 100644 test/case/cli/system-output/run/rauc_status_--detailed_--output-format=json delete mode 100644 test/case/cli/system-output/run/vtysh_-c_show-ip-ospf-route-json delete mode 100644 test/case/cli/system-output/run/vtysh_-c_show-ip-route-json delete mode 100644 test/case/cli/system-output/run/vtysh_-c_show-ipv6-route-json create mode 100644 test/case/statd/all.yaml create mode 100644 test/case/statd/interfaces-all/cli/show-interfaces create mode 100644 test/case/statd/interfaces-all/ietf-interfaces.json create mode 100644 test/case/statd/interfaces-all/operational.json create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-0/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-D/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-Q.40/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-Q/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-X/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e2.30/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e3.10/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gre-v4/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gre-v6/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gretap-v4/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gretap-v6/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0a.20/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0a/mtu create mode 100644 test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0b/mtu create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-0 create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-D create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_10 create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_20 create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_30 create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_40 create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-X create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_vlan_global_show_dev_br-Q create mode 100644 test/case/statd/interfaces-all/system/run/bridge_-j_vlan_show create mode 100644 test/case/statd/interfaces-all/system/run/ip_-j_addr_show create mode 100644 test/case/statd/interfaces-all/system/run/ip_-s_-d_-j_link_show create mode 100644 test/case/statd/interfaces-all/system/run/podman_ps_-a_--format=json create mode 100755 test/case/statd/interfaces-all/test create mode 100644 test/case/statd/test.sh diff --git a/test/case/all-unit.yaml b/test/case/all-unit.yaml index 8b42d6f4..9a0a0266 100644 --- a/test/case/all-unit.yaml +++ b/test/case/all-unit.yaml @@ -1,9 +1,15 @@ --- # Tests in this suite can be run on localhost without a target environment -- name: cli-output - suite: cli/all.yaml +- name: statd-yanger + suite: statd/all.yaml + opts: + - yanger + - check -- name: cli-pretty - suite: cli_pretty/all.yaml +- name: statd-cli + suite: statd/all.yaml + opts: + - cli + - check diff --git a/test/case/cli/all.yaml b/test/case/cli/all.yaml deleted file mode 100644 index bde52354..00000000 --- a/test/case/cli/all.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- case: run.sh - name: "cli-check-output" diff --git a/test/case/cli/cli-output/show-bridge-mdb.txt b/test/case/cli/cli-output/show-bridge-mdb.txt deleted file mode 100644 index 31fd481c..00000000 --- a/test/case/cli/cli-output/show-bridge-mdb.txt +++ /dev/null @@ -1,7 +0,0 @@ -BRIDGE VID GROUP PORTS  -br0 230.1.32.100 e0 -br0 230.1.2.100 e1 -br0 01:01:01:01:01:01 e1 -br0 230.1.2.2 e0 -br1 30 ff02::6a e2 -br1 30 224.2.2.2 e2 diff --git a/test/case/cli/cli-output/show-interface-br0.txt b/test/case/cli/cli-output/show-interface-br0.txt deleted file mode 100644 index 3109ac53..00000000 --- a/test/case/cli/cli-output/show-interface-br0.txt +++ /dev/null @@ -1,9 +0,0 @@ -name : br0 -index : 7 -mtu : 1500 -operational status : up -physical address : 02:00:00:00:00:00 -ipv4 addresses : -ipv6 addresses : -in-octets : 0 -out-octets : 3158 diff --git a/test/case/cli/cli-output/show-interface-e0.txt b/test/case/cli/cli-output/show-interface-e0.txt deleted file mode 100644 index e8c35114..00000000 --- a/test/case/cli/cli-output/show-interface-e0.txt +++ /dev/null @@ -1,24 +0,0 @@ -name : e0 -index : 2 -mtu : 1500 -operational status : up -auto-negotiation : on -duplex : full -speed : 10000 -physical address : 02:00:00:00:00:00 -ipv4 addresses : -ipv6 addresses : -in-octets : 20891 -out-octets : 6537 - -eth-out-frames : 713 -eth-out-multicast-frames : 605 -eth-out-broadcast-frames : 69 -eth-in-frames : 418 -eth-in-multicast-frames : 336 -eth-in-broadcast-frames : 46 -eth-in-error-fcs-frames : 0 -eth-out-good-octets : 129130 -eth-in-good-octets : 72571 -eth-in-total-frames : 418 -eth-in-error-oversize-frames : 0 diff --git a/test/case/cli/cli-output/show-interface-e1.txt b/test/case/cli/cli-output/show-interface-e1.txt deleted file mode 100644 index 6b030cc6..00000000 --- a/test/case/cli/cli-output/show-interface-e1.txt +++ /dev/null @@ -1,24 +0,0 @@ -name : e1 -index : 3 -mtu : 1500 -operational status : up -auto-negotiation : on -duplex : full -speed : 10000 -physical address : 02:00:00:00:00:01 -ipv4 addresses : -ipv6 addresses : -in-octets : 24849 -out-octets : 1397 - -eth-out-frames : 713 -eth-out-multicast-frames : 605 -eth-out-broadcast-frames : 69 -eth-in-frames : 418 -eth-in-multicast-frames : 336 -eth-in-broadcast-frames : 46 -eth-in-error-fcs-frames : 0 -eth-out-good-octets : 129130 -eth-in-good-octets : 72571 -eth-in-total-frames : 418 -eth-in-error-oversize-frames : 0 diff --git a/test/case/cli/cli-output/show-interface-e2.txt b/test/case/cli/cli-output/show-interface-e2.txt deleted file mode 100644 index 119f4163..00000000 --- a/test/case/cli/cli-output/show-interface-e2.txt +++ /dev/null @@ -1,9 +0,0 @@ -name : e2 -index : 4 -mtu : 1500 -operational status : up -physical address : 02:00:00:00:00:02 -ipv4 addresses : -ipv6 addresses : fe80::ff:fe00:2/64 (link-layer) -in-octets : 19114 -out-octets : 0 diff --git a/test/case/cli/cli-output/show-interface-e3.txt b/test/case/cli/cli-output/show-interface-e3.txt deleted file mode 100644 index 9c8851d4..00000000 --- a/test/case/cli/cli-output/show-interface-e3.txt +++ /dev/null @@ -1,9 +0,0 @@ -name : e3 -index : 5 -mtu : 1500 -operational status : up -physical address : 02:00:00:00:00:03 -ipv4 addresses : -ipv6 addresses : -in-octets : 15057 -out-octets : 1327 diff --git a/test/case/cli/cli-output/show-interface-e4.txt b/test/case/cli/cli-output/show-interface-e4.txt deleted file mode 100644 index 75251e92..00000000 --- a/test/case/cli/cli-output/show-interface-e4.txt +++ /dev/null @@ -1,9 +0,0 @@ -name : e4 -index : 6 -mtu : 1500 -operational status : down -physical address : 02:00:00:00:00:04 -ipv4 addresses : -ipv6 addresses : -in-octets : 19022 -out-octets : 1327 diff --git a/test/case/cli/cli-output/show-interfaces.txt b/test/case/cli/cli-output/show-interfaces.txt deleted file mode 100644 index 718dd630..00000000 --- a/test/case/cli/cli-output/show-interfaces.txt +++ /dev/null @@ -1,16 +0,0 @@ -INTERFACE PROTOCOL STATE DATA  -br0 bridge  vlan:40u,50t pvid:1 -│ ethernet UP 02:00:00:00:00:00 -├ e0 bridge DISABLED vlan:10u,20t pvid:10 -└ e1 bridge BLOCKING vlan:10t,20u pvid:20 -br1 bridge   -│ ethernet UP 02:00:00:00:00:02 -└ e2 bridge FORWARDING vlan:30u pvid:30 -e2 container system  -e3 ethernet UP 02:00:00:00:00:03 -e4 ethernet DOWN 02:00:00:00:00:04 -veth0b container system  -veth0j ethernet UP b2:82:e3:ce:d5:9e - veth peer:veth0k - ipv4 192.168.1.1/24 (static) -veth0k container system2  diff --git a/test/case/cli/cli-output/show-ntp.txt b/test/case/cli/cli-output/show-ntp.txt deleted file mode 100644 index e825572a..00000000 --- a/test/case/cli/cli-output/show-ntp.txt +++ /dev/null @@ -1,9 +0,0 @@ -ADDRESS MODE STATE STRATUM POLL-INTERVAL -185.125.190.56 peer candidate 2 8 -185.125.190.58 server unstable 2 7 -185.125.190.57 server falseticker 2 8 -91.189.91.157 local-clock outlier 2 6 -192.121.108.100 server candidate 3 8 -85.24.237.72 server selected 2 8 -162.159.200.1 server unusable 3 7 -85.24.237.71 server candidate 2 8 diff --git a/test/case/cli/cli-output/show-routes-ipv4.txt b/test/case/cli/cli-output/show-routes-ipv4.txt deleted file mode 100644 index ffdc7477..00000000 --- a/test/case/cli/cli-output/show-routes-ipv4.txt +++ /dev/null @@ -1,11 +0,0 @@ - DESTINATION PREF NEXT-HOP PROTO UPTIME ->* 0.0.0.0/0 110/2 10.0.23.1 ospfv2 00:00:00 ->* 10.0.0.1/32 110/4000 10.0.13.1 ospfv2 00:00:00 - 10.0.0.3/32 110/0 lo ospfv2 00:00:00 ->* 10.0.0.3/32 0/0 lo direct 00:00:00 - 10.0.13.0/30 110/2000 e5 ospfv2 00:00:00 ->* 10.0.13.0/30 0/0 e5 direct 00:00:00 - 10.0.23.0/30 110/1 e6 ospfv2 00:00:00 ->* 10.0.23.0/30 0/0 e6 direct 20:10:05 - 192.168.3.0/24 110/1 e2 ospfv2 5d13h05m ->* 192.168.3.0/24 0/0 e2 direct 01w1d13h diff --git a/test/case/cli/cli-output/show-routes-ipv6.txt b/test/case/cli/cli-output/show-routes-ipv6.txt deleted file mode 100644 index d854d1fc..00000000 --- a/test/case/cli/cli-output/show-routes-ipv6.txt +++ /dev/null @@ -1,11 +0,0 @@ - DESTINATION PREF NEXT-HOP PROTO UPTIME ->* ::/0 1/0 2001:db8:3c4d:50::1 static 00:00:00 ->* 2001:db8:3c4d:50::/64 0/0 e6 direct 00:00:00 ->* 2001:db8:3c4d:200::1/128 0/0 lo direct 00:00:00 - * fe80::/64 0/0 e7 direct 00:00:00 - * fe80::/64 0/0 e6 direct 00:00:00 - * fe80::/64 0/0 e5 direct 00:00:00 - * fe80::/64 0/0 e4 direct 00:00:00 - * fe80::/64 0/0 e3 direct 00:00:00 - * fe80::/64 0/0 e2 direct 00:00:00 ->* fe80::/64 0/0 e1 direct 00:00:00 diff --git a/test/case/cli/cli-output/show-software.txt b/test/case/cli/cli-output/show-software.txt deleted file mode 100644 index 66deb741..00000000 --- a/test/case/cli/cli-output/show-software.txt +++ /dev/null @@ -1,6 +0,0 @@ -BOOT ORDER -net primary secondary - -NAME STATE VERSION DATE  -secondary inactive pr873.2a39a38 2024-12-16T14:40:54Z -primary inactive pr871.a4ef38f 2024-12-13T20:00:42Z diff --git a/test/case/cli/run.sh b/test/case/cli/run.sh deleted file mode 100755 index 8c56b3c0..00000000 --- a/test/case/cli/run.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/sh - -SCRIPT_PATH="$(dirname "$(readlink -f "$0")")" -ROOT_PATH="$SCRIPT_PATH/../../../" -CLI_OUTPUT_PATH="$SCRIPT_PATH/cli-output/" - -CLI_PRETTY_TOOL="$ROOT_PATH/src/statd/python/cli_pretty/cli_pretty.py" -SR_EMULATOR_TOOL="$SCRIPT_PATH/sysrepo-emulator.sh" - -CLI_OUTPUT_FILE="$(mktemp)" - -TEST=1 - -cleanup() { - rm -f "$CLI_OUTPUT_FILE" -} -trap cleanup EXIT - -ok() { - echo "ok $TEST - $1" - TEST=$((TEST + 1)) -} - -fail() { - echo "not ok $TEST - $1" - exit 1 -} - -print_update_txt() { - echo - echo "# CLI output has changed. This might not be an error if you intentionally" - echo "# changed something in yanger or cli-pretty. If you did, you need to update" - echo "# the template file." - echo - echo "# Here's how you update the CLI output templates:" - echo "# $SCRIPT_PATH/run.sh update " - echo - echo "# Check the result" - echo "# git diff" - echo - echo "# Then finish up by committing the new template" - echo -} - -if [ ! -e "$CLI_PRETTY_TOOL" ]; then - echo "Error, cli-pretty tool not found" - exit 1 -fi - -if [ $# -eq 2 ] && [ $1 = "update" ]; then - if [ $2 = "show-interfaces" ]; then - "$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-interfaces" > "$CLI_OUTPUT_PATH/show-interfaces.txt" - for iface in "br0" "e0" "e1" "e2" "e3" "e4"; do - "$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-interfaces" -n "$iface" \ - > "$CLI_OUTPUT_PATH/show-interface-${iface}.txt" - done - elif [ $2 = "show-routing-table" ]; then - "$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "-t" "show-routing-table" -i "ipv4" > "$CLI_OUTPUT_PATH/show-routes-ipv4.txt" - "$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "-t" "show-routing-table" -i "ipv6" > "$CLI_OUTPUT_PATH/show-routes-ipv6.txt" - elif [ $2 = "show-bridge-mdb" ]; then - "$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-bridge-mdb" > "$CLI_OUTPUT_PATH/show-bridge-mdb.txt" - elif [ $2 = "show-ntp" ]; then - "$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-ntp" > "$CLI_OUTPUT_PATH/show-ntp.txt" - elif [ $2 = "show-software" ]; then - "$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-software" > "$CLI_OUTPUT_PATH/show-software.txt" - else - echo "Unsupported cli-pretty command $2" - exit 1 - fi - echo "All files updated. Check git diff and commit if they look OK" - exit 0 -fi - -echo "1..12" -echo "# Running:" - -# Show interfaces -echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL show-interfaces" -"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-interfaces" > "$CLI_OUTPUT_FILE" - -if ! diff -u "$CLI_OUTPUT_PATH/show-interfaces.txt" "$CLI_OUTPUT_FILE"; then - print_update_txt - fail "\"show interfaces\" output has changed" -fi -ok "\"show interfaces\" output looks intact" - -echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL show-bridge-mdb" -"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-bridge-mdb" > "$CLI_OUTPUT_FILE" - -if ! diff -u "$CLI_OUTPUT_PATH/show-bridge-mdb.txt" "$CLI_OUTPUT_FILE"; then - print_update_txt - fail "\"show bridge mdb\" output has changed" -fi -ok "\"show bridge mdb\" output looks intact" - -# Show NTP -echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL show-ntp" -"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-ntp" > "$CLI_OUTPUT_FILE" - -if ! diff -u "$CLI_OUTPUT_PATH/show-ntp.txt" "$CLI_OUTPUT_FILE"; then - print_update_txt - fail "\"show ntp\" output has changed" -fi -ok "\"show ntp\" output looks intact" - -# Show software -echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL show-software" -"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-software" > "$CLI_OUTPUT_FILE" - -if ! diff -u "$CLI_OUTPUT_PATH/show-software.txt" "$CLI_OUTPUT_FILE"; then - print_update_txt - fail "\"show software\" output has changed" -fi -ok "\"show software\" output looks intact" - -# Show ipv4 routes -echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL -t show-routing-table -i ipv4" -"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "-t" "show-routing-table" -i "ipv4" > "$CLI_OUTPUT_FILE" - -if ! diff -u "$CLI_OUTPUT_PATH/show-routes-ipv4.txt" "$CLI_OUTPUT_FILE"; then - print_update_txt - fail "\"show routes ipv4\" output has changed" -fi -ok "\"show routes ipv4\" output looks intact" - -# Show ipv6 routes -echo "# $SR_EMULATOR_TOOL | $CLI_PRETTY_TOOL -t show-routing-table -i ipv6" -"$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "-t" "show-routing-table" -i "ipv6" > "$CLI_OUTPUT_FILE" - -if ! diff -u "$CLI_OUTPUT_PATH/show-routes-ipv6.txt" "$CLI_OUTPUT_FILE"; then - print_update_txt - fail "\"show routes ipv6\" output has changed" -fi -ok "\"show routes ipv6\" output looks intact" - -# Show detailed interfaces -for iface in "br0" "e0" "e1" "e2" "e3" "e4"; do - "$SR_EMULATOR_TOOL" | "$CLI_PRETTY_TOOL" "show-interfaces" -n "$iface" > "$CLI_OUTPUT_FILE" - if ! diff -u "$CLI_OUTPUT_PATH/show-interface-${iface}.txt" "$CLI_OUTPUT_FILE"; then - print_update_txt - fail "\"show interface name $iface\" output has changed" - fi - ok "\"show interface name $iface\" output looks intact" -done diff --git a/test/case/cli/sysrepo-emulator.sh b/test/case/cli/sysrepo-emulator.sh deleted file mode 100755 index f846301d..00000000 --- a/test/case/cli/sysrepo-emulator.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -SCRIPT_PATH="$(dirname "$(readlink -f "$0")")" -ROOT_PATH="$SCRIPT_PATH/../../../" - -YANGER_TOOL="$ROOT_PATH/src/statd/python/yanger/yanger" - -INTERFACES_OUTPUT_FILE="$(mktemp)" -ROUTES_OUTPUT_FILE="$(mktemp)" -SYSTEM_OUTPUT_FILE="$(mktemp)" -cleanup() { - rm -f "$INTERFACES_OUTPUT_FILE" - rm -f "$ROUTES_OUTPUT_FILE" - rm -f "$SYSTEM_OUTPUT_FILE" -} -trap cleanup EXIT - -if [ ! -e "$YANGER_TOOL" ]; then - echo "Error, yanger tool not found" - exit 1 -fi - -if ! "$YANGER_TOOL" "ietf-interfaces" \ - -t "$SCRIPT_PATH/system-output/" >> "$INTERFACES_OUTPUT_FILE"; then - echo "Error, running yanger for interface $iface" >&2 - exit 1 -fi - -$YANGER_TOOL "ietf-routing" -t "$SCRIPT_PATH/system-output/" > "$ROUTES_OUTPUT_FILE" - -$YANGER_TOOL "ietf-system" -t "$SCRIPT_PATH/system-output/" > "$SYSTEM_OUTPUT_FILE" - -# Merge all module files -jq -s '.[0] * .[1] * .[2]' $ROUTES_OUTPUT_FILE $INTERFACES_OUTPUT_FILE $SYSTEM_OUTPUT_FILE diff --git a/test/case/cli/system-output/rootfs/run/system.json b/test/case/cli/system-output/rootfs/run/system.json deleted file mode 100644 index b95bd5af..00000000 --- a/test/case/cli/system-output/rootfs/run/system.json +++ /dev/null @@ -1 +0,0 @@ -{"vendor": "QEMU", "product-name": "VM", "part-number": null, "serial-number": null, "mac-address": "02:00:00:00:00:00", "factory-password-hash": "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A", "vpd": {"product": {"board": "product", "available": false, "trusted": true, "data": {}}}, "usb-ports": [{"name": "USB", "path": "/sys/bus/usb/devices/usb1/authorized"}, {"name": "USB", "path": "/sys/bus/usb/devices/usb1/authorized_default"}, {"name": "USB2", "path": "/sys/bus/usb/devices/usb2/authorized"}, {"name": "USB2", "path": "/sys/bus/usb/devices/usb2/authorized_default"}]} \ No newline at end of file diff --git a/test/case/cli/system-output/run/+usr+libexec+statd+ospf-status b/test/case/cli/system-output/run/+usr+libexec+statd+ospf-status deleted file mode 100644 index 7f22ea8b..00000000 --- a/test/case/cli/system-output/run/+usr+libexec+statd+ospf-status +++ /dev/null @@ -1 +0,0 @@ -{"routerId": "10.0.0.1", "tosRoutesOnly": true, "rfc2328Conform": true, "spfScheduleDelayMsecs": 0, "holdtimeMinMsecs": 50, "holdtimeMaxMsecs": 5000, "holdtimeMultplier": 1, "spfLastExecutedMsecs": 17503, "spfLastDurationMsecs": 0, "lsaMinIntervalMsecs": 5000, "lsaMinArrivalMsecs": 1000, "writeMultiplier": 20, "refreshTimerMsecs": 10000, "maximumPaths": 256, "preference": 110, "abrType": "Alternative Cisco", "asbrRouter": "injectingExternalRoutingInformation", "lsaExternalCounter": 1, "lsaExternalChecksum": 23527, "lsaAsopaqueCounter": 0, "lsaAsOpaqueChecksum": 0, "attachedAreaCounter": 3, "areas": {"0.0.0.0": {"backbone": true, "areaIfTotalCounter": 1, "areaIfActiveCounter": 1, "nbrFullAdjacentCounter": 1, "authentication": "authenticationNone", "spfExecutedCounter": 19, "lsaNumber": 24, "lsaRouterNumber": 2, "lsaRouterChecksum": 103244, "lsaNetworkNumber": 1, "lsaNetworkChecksum": 32939, "lsaSummaryNumber": 18, "lsaSummaryChecksum": 593799, "lsaAsbrNumber": 3, "lsaAsbrChecksum": 97451, "lsaNssaNumber": 0, "lsaNssaChecksum": 0, "lsaOpaqueLinkNumber": 0, "lsaOpaqueLinkChecksum": 0, "lsaOpaqueAreaNumber": 0, "lsaOpaqueAreaChecksum": 0, "area-type": "normal-area", "interfaces": [{"ifUp": true, "ifIndex": 6, "mtuBytes": 1500, "bandwidthMbit": 4294967295, "ifFlags": "", "ospfEnabled": true, "interfaceIp": {"10.0.12.1": {"ipAddress": "10.0.12.1", "ipAddressPrefixlen": 30, "ospfIfType": "Broadcast", "localIfUsed": "10.0.12.3", "area": "0.0.0.0", "routerId": "10.0.0.1", "networkType": "BROADCAST", "cost": 1, "transmitDelaySecs": 1, "state": "DR", "priority": 1, "drId": "10.0.0.1", "drAddress": "10.0.12.1", "bdrId": "1.1.1.1", "bdrAddress": "10.0.12.2", "mcastMemberOspfAllRouters": true, "mcastMemberOspfDesignatedRouters": true, "timerMsecs": 1000, "timerDeadSecs": 4, "timerWaitSecs": 4, "timerRetransmitSecs": 5, "timerHelloInMsecs": 565, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "prefixSuppression": false}}, "ipAddress": "10.0.12.1", "ipAddressPrefixlen": 30, "ospfIfType": "Broadcast", "localIfUsed": "10.0.12.3", "area": "0.0.0.0", "routerId": "10.0.0.1", "networkType": "BROADCAST", "cost": 1, "transmitDelaySecs": 1, "state": "DR", "priority": 1, "opaqueCapable": true, "drId": "10.0.0.1", "drAddress": "10.0.12.1", "bdrId": "1.1.1.1", "bdrAddress": "10.0.12.2", "mcastMemberOspfAllRouters": true, "mcastMemberOspfDesignatedRouters": true, "timerMsecs": 1000, "timerDeadSecs": 4, "timerWaitSecs": 4, "timerRetransmitSecs": 5, "timerHelloInMsecs": 565, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "peerBfdInfo": {"detectionMultiplier": 3, "rxMinInterval": 300, "txMinInterval": 300}, "prefixSuppression": false, "name": "e5", "neighbors": [{"ifaceAddress": "10.0.12.2", "areaId": "0.0.0.0", "ifaceName": "e5", "localIfaceAddress": "10.0.12.1", "nbrPriority": 1, "nbrState": "Full/Backup", "role": "Backup", "stateChangeCounter": 5, "lastPrgrsvChangeMsec": 38523, "routerDesignatedId": "10.0.0.1", "routerDesignatedBackupId": "1.1.1.1", "optionsCounter": 2, "optionsList": "*|-|-|-|-|-|E|-", "routerDeadIntervalTimerDueMsec": 3794, "databaseSummaryListCounter": 0, "linkStateRequestListCounter": 0, "linkStateRetransmissionListCounter": 0, "threadInactivityTimer": "on", "threadLinkStateRequestRetransmission": "on", "threadLinkStateUpdateRetransmission": "on", "grHelperStatus": "None", "peerBfdInfo": {"type": "single hop", "detectMultiplier": 3, "rxMinInterval": 300, "txMinInterval": 300, "status": "Up", "lastUpdate": "0:00:00:44"}, "neighborIp": "1.1.1.1"}]}]}, "0.0.0.1": {"nssaNoSummary": true, "shortcuttingMode": "Default", "areaIfTotalCounter": 3, "areaIfActiveCounter": 3, "nssa": true, "abr": true, "nssaTranslatorElected": true, "nbrFullAdjacentCounter": 1, "authentication": "authenticationNone", "virtualAdjacenciesPassingCounter": 0, "spfExecutedCounter": 20, "lsaNumber": 7, "lsaRouterNumber": 3, "lsaRouterChecksum": 184123, "lsaNetworkNumber": 2, "lsaNetworkChecksum": 80372, "lsaSummaryNumber": 2, "lsaSummaryChecksum": 43268, "lsaAsbrNumber": 0, "lsaAsbrChecksum": 0, "lsaNssaNumber": 0, "lsaNssaChecksum": 0, "lsaOpaqueLinkNumber": 0, "lsaOpaqueLinkChecksum": 0, "lsaOpaqueAreaNumber": 0, "lsaOpaqueAreaChecksum": 0, "area-type": "nssa-area", "interfaces": [{"ifUp": true, "ifIndex": 7, "mtuBytes": 1500, "bandwidthMbit": 4294967295, "ifFlags": "", "ospfEnabled": true, "interfaceIp": {"10.0.13.1": {"ipAddress": "10.0.13.1", "ipAddressPrefixlen": 30, "ospfIfType": "Broadcast", "localIfUsed": "10.0.13.3", "area": "0.0.0.1 [NSSA]", "routerId": "10.0.0.1", "networkType": "BROADCAST", "cost": 2000, "transmitDelaySecs": 1, "state": "Backup", "priority": 1, "drId": "10.0.0.3", "drAddress": "10.0.13.2", "bdrId": "10.0.0.1", "bdrAddress": "10.0.13.1", "mcastMemberOspfAllRouters": true, "mcastMemberOspfDesignatedRouters": true, "timerMsecs": 1000, "timerDeadSecs": 4, "timerWaitSecs": 4, "timerRetransmitSecs": 5, "timerHelloInMsecs": 444, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "prefixSuppression": false}}, "ipAddress": "10.0.13.1", "ipAddressPrefixlen": 30, "ospfIfType": "Broadcast", "localIfUsed": "10.0.13.3", "area": "0.0.0.1", "routerId": "10.0.0.1", "networkType": "BROADCAST", "cost": 2000, "transmitDelaySecs": 1, "state": "Backup", "priority": 1, "opaqueCapable": true, "drId": "10.0.0.3", "drAddress": "10.0.13.2", "bdrId": "10.0.0.1", "bdrAddress": "10.0.13.1", "mcastMemberOspfAllRouters": true, "mcastMemberOspfDesignatedRouters": true, "timerMsecs": 1000, "timerDeadSecs": 4, "timerWaitSecs": 4, "timerRetransmitSecs": 5, "timerHelloInMsecs": 444, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "peerBfdInfo": {"detectionMultiplier": 3, "rxMinInterval": 300, "txMinInterval": 300}, "prefixSuppression": false, "name": "e6", "neighbors": [{"ifaceAddress": "10.0.13.2", "areaId": "0.0.0.1", "ifaceName": "e6", "localIfaceAddress": "10.0.13.1", "nbrPriority": 1, "nbrState": "Full/DR", "role": "DR", "stateChangeCounter": 6, "lastPrgrsvChangeMsec": 41758, "routerDesignatedId": "10.0.0.3", "routerDesignatedBackupId": "10.0.0.1", "optionsCounter": 8, "optionsList": "*|-|-|-|N/P|-|-|-", "routerDeadIntervalTimerDueMsec": 3244, "databaseSummaryListCounter": 0, "linkStateRequestListCounter": 0, "linkStateRetransmissionListCounter": 0, "threadInactivityTimer": "on", "threadLinkStateRequestRetransmission": "on", "threadLinkStateUpdateRetransmission": "on", "grHelperStatus": "None", "peerBfdInfo": {"type": "single hop", "detectMultiplier": 3, "rxMinInterval": 300, "txMinInterval": 300, "status": "Up", "lastUpdate": "0:00:00:43"}, "neighborIp": "10.0.0.3"}]}, {"ifUp": true, "ifIndex": 1, "mtuBytes": 65536, "bandwidthMbit": 0, "ifFlags": "", "ospfEnabled": true, "interfaceIp": {"10.0.0.1": {"ipAddress": "10.0.0.1", "ipAddressPrefixlen": 32, "ospfIfType": "Broadcast", "localIfUsed": "10.0.0.1", "area": "0.0.0.1 [NSSA]", "routerId": "10.0.0.1", "networkType": "LOOPBACK", "cost": 0, "transmitDelaySecs": 1, "state": "Loopback", "priority": 1, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 0, "nbrCount": 0, "nbrAdjacentCount": 0, "grHelloDelaySecs": 10, "prefixSuppression": false}, "11.0.8.1": {"ipAddress": "11.0.8.1", "ipAddressPrefixlen": 24, "ospfIfType": "Broadcast", "localIfUsed": "11.0.8.255", "area": "0.0.0.1 [NSSA]", "routerId": "10.0.0.1", "networkType": "LOOPBACK", "cost": 0, "transmitDelaySecs": 1, "state": "Loopback", "priority": 1, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 0, "nbrCount": 0, "nbrAdjacentCount": 0, "grHelloDelaySecs": 10, "prefixSuppression": false}}, "ipAddress": "11.0.8.1", "ipAddressPrefixlen": 24, "ospfIfType": "Broadcast", "localIfUsed": "11.0.8.255", "area": "0.0.0.1", "routerId": "10.0.0.1", "networkType": "LOOPBACK", "cost": 0, "transmitDelaySecs": 1, "state": "Loopback", "priority": 1, "opaqueCapable": true, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 0, "nbrCount": 0, "nbrAdjacentCount": 0, "grHelloDelaySecs": 10, "prefixSuppression": false, "name": "lo", "neighbors": []}]}, "0.0.0.2": {"shortcuttingMode": "Default", "sBitConcensus": true, "areaIfTotalCounter": 0, "areaIfActiveCounter": 0, "nbrFullAdjacentCounter": 0, "authentication": "authenticationNone", "virtualAdjacenciesPassingCounter": 0, "spfExecutedCounter": 19, "lsaNumber": 39, "lsaRouterNumber": 3, "lsaRouterChecksum": 104816, "lsaNetworkNumber": 1, "lsaNetworkChecksum": 9970, "lsaSummaryNumber": 33, "lsaSummaryChecksum": 1065387, "lsaAsbrNumber": 2, "lsaAsbrChecksum": 110374, "lsaNssaNumber": 0, "lsaNssaChecksum": 0, "lsaOpaqueLinkNumber": 0, "lsaOpaqueLinkChecksum": 0, "lsaOpaqueAreaNumber": 0, "lsaOpaqueAreaChecksum": 0}}} diff --git a/test/case/cli/system-output/run/bridge_-j_link b/test/case/cli/system-output/run/bridge_-j_link deleted file mode 100644 index 64ecf9ce..00000000 --- a/test/case/cli/system-output/run/bridge_-j_link +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "ifindex": 2, - "ifname": "e0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "master": "br0", - "state": "disabled", - "priority": 32, - "cost": 100 - }, - { - "ifindex": 3, - "ifname": "e1", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "master": "br0", - "state": "blocking", - "priority": 32, - "cost": 100 - }, - { - "ifindex": 4, - "ifname": "e2", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "master": "br1", - "state": "forwarding", - "priority": 32, - "cost": 100 - } -] diff --git a/test/case/cli/system-output/run/bridge_-j_link_show_dev_e0 b/test/case/cli/system-output/run/bridge_-j_link_show_dev_e0 deleted file mode 100644 index 07fdd391..00000000 --- a/test/case/cli/system-output/run/bridge_-j_link_show_dev_e0 +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "ifindex": 2, - "ifname": "e0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "master": "br0", - "state": "disabled", - "priority": 32, - "cost": 100 - } -] diff --git a/test/case/cli/system-output/run/bridge_-j_link_show_dev_e1 b/test/case/cli/system-output/run/bridge_-j_link_show_dev_e1 deleted file mode 100644 index 81e8ee29..00000000 --- a/test/case/cli/system-output/run/bridge_-j_link_show_dev_e1 +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "ifindex": 3, - "ifname": "e1", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "master": "br0", - "state": "blocking", - "priority": 32, - "cost": 100 - } -] diff --git a/test/case/cli/system-output/run/bridge_-j_link_show_dev_e2 b/test/case/cli/system-output/run/bridge_-j_link_show_dev_e2 deleted file mode 100644 index 4c9b62b9..00000000 --- a/test/case/cli/system-output/run/bridge_-j_link_show_dev_e2 +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "ifindex": 4, - "ifname": "e2", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "master": "br1", - "state": "forwarding", - "priority": 32, - "cost": 100 - } -] diff --git a/test/case/cli/system-output/run/bridge_-j_vlan b/test/case/cli/system-output/run/bridge_-j_vlan deleted file mode 100644 index ff45d5c8..00000000 --- a/test/case/cli/system-output/run/bridge_-j_vlan +++ /dev/null @@ -1,57 +0,0 @@ -[ - { - "ifname": "e0", - "vlans": [ - { - "vlan": 10, - "flags": [ - "PVID", - "Egress Untagged" - ] - }, - { - "vlan": 20 - } - ] - }, - { - "ifname": "e1", - "vlans": [ - { - "vlan": 10 - }, - { - "vlan": 20, - "flags": [ - "PVID", - "Egress Untagged" - ] - } - ] - }, - { - "ifname": "e2", - "vlans": [ - { - "vlan": 30, - "flags": [ - "Egress Untagged" - ] - } - ] - }, - { - "ifname": "br0", - "vlans": [ - { - "vlan": 40, - "flags": [ - "Egress Untagged" - ] - }, - { - "vlan": 50 - } - ] - } -] diff --git a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_br0 b/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_br0 deleted file mode 100644 index 84db79d6..00000000 --- a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_br0 +++ /dev/null @@ -1 +0,0 @@ -[{"ifname":"br0","vlans":[{"vlan":1,"flags":["PVID","Egress Untagged"]},{"vlan":33}]}] diff --git a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_br1 b/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_br1 deleted file mode 100644 index 750c425c..00000000 --- a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_br1 +++ /dev/null @@ -1 +0,0 @@ -[{"ifname":"br1","vlans":[]}] diff --git a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e0 b/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e0 deleted file mode 100644 index 5e8a0813..00000000 --- a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e0 +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "ifname": "e0", - "vlans": [ - { - "vlan": 10, - "flags": [ - "PVID", - "Egress Untagged" - ] - }, - { - "vlan": 20 - } - ] - } -] diff --git a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e1 b/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e1 deleted file mode 100644 index 5199cb9d..00000000 --- a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e1 +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "ifname": "e1", - "vlans": [ - { - "vlan": 10 - }, - { - "vlan": 20, - "flags": [ - "PVID", - "Egress Untagged" - ] - } - ] - } -] diff --git a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e2 b/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e2 deleted file mode 100644 index 63e93de7..00000000 --- a/test/case/cli/system-output/run/bridge_-j_vlan_show_dev_e2 +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "ifname": "e2", - "vlans": [ - { - "vlan": 30, - "flags": [ - "PVID", - "Egress Untagged" - ] - } - ] - } -] diff --git a/test/case/cli/system-output/run/chronyc_-c_sources b/test/case/cli/system-output/run/chronyc_-c_sources deleted file mode 100644 index ba48eaa5..00000000 --- a/test/case/cli/system-output/run/chronyc_-c_sources +++ /dev/null @@ -1,8 +0,0 @@ -=,+,185.125.190.56,2,8,377,166,0.005469983,0.005822986,0.033335429 -^,~,185.125.190.58,2,7,377,37,0.003233160,0.003233160,0.028441129 -^,x,185.125.190.57,2,8,377,167,-0.000418652,-0.000065722,0.027703809 -#,-,91.189.91.157,2,6,377,488,0.000970410,0.001490889,0.077348366 -^,+,192.121.108.100,3,8,377,101,0.005757879,0.006114979,0.024731735 -^,*,85.24.237.72,2,8,377,37,0.006444688,0.006805896,0.017862743 -^,?,162.159.200.1,3,7,377,34,-0.000447366,-0.000447366,0.009887429 -^,+,85.24.237.71,2,8,377,169,0.003875532,0.004228305,0.015323908 diff --git a/test/case/cli/system-output/run/ethtool_--json_-S_br0_--all-groups b/test/case/cli/system-output/run/ethtool_--json_-S_br0_--all-groups deleted file mode 100644 index 78d73034..00000000 --- a/test/case/cli/system-output/run/ethtool_--json_-S_br0_--all-groups +++ /dev/null @@ -1,61 +0,0 @@ -[ - { - "ifname": "e1", - "eth-phy": {}, - "eth-mac": { - "FramesTransmittedOK": 713, - "SingleCollisionFrames": 0, - "MultipleCollisionFrames": 0, - "FramesReceivedOK": 418, - "FrameCheckSequenceErrors": 0, - "OctetsTransmittedOK": 129130, - "FramesWithDeferredXmissions": 0, - "LateCollisions": 0, - "OctetsReceivedOK": 72571, - "MulticastFramesXmittedOK": 605, - "BroadcastFramesXmittedOK": 69, - "FramesWithExcessiveDeferral": 0, - "MulticastFramesReceivedOK": 336, - "BroadcastFramesReceivedOK": 46 - }, - "eth-ctrl": {}, - "rmon": { - "etherStatsUndersizePkts": 0, - "etherStatsOversizePkts": 0, - "etherStatsFragments": 0, - "etherStatsJabbers": 0, - "rx-pktsNtoM": [ - { - "low": 64, - "high": 64, - "val": 12 - }, - { - "low": 65, - "high": 127, - "val": 603 - }, - { - "low": 128, - "high": 255, - "val": 168 - }, - { - "low": 256, - "high": 511, - "val": 348 - }, - { - "low": 512, - "high": 1023, - "val": 0 - }, - { - "low": 1024, - "high": 65535, - "val": 0 - } - ] - } - } -] diff --git a/test/case/cli/system-output/run/ethtool_--json_-S_dsa0_--all-groups b/test/case/cli/system-output/run/ethtool_--json_-S_dsa0_--all-groups deleted file mode 100644 index 55cd2636..00000000 --- a/test/case/cli/system-output/run/ethtool_--json_-S_dsa0_--all-groups +++ /dev/null @@ -1,7 +0,0 @@ -[ { - "ifname": "dsa0", - "eth-phy": {}, - "eth-mac": {}, - "eth-ctrl": {}, - "rmon": {} -} ] diff --git a/test/case/cli/system-output/run/ethtool_--json_-S_e0_--all-groups b/test/case/cli/system-output/run/ethtool_--json_-S_e0_--all-groups deleted file mode 100644 index d218bac3..00000000 --- a/test/case/cli/system-output/run/ethtool_--json_-S_e0_--all-groups +++ /dev/null @@ -1,61 +0,0 @@ -[ - { - "ifname": "e0", - "eth-phy": {}, - "eth-mac": { - "FramesTransmittedOK": 713, - "SingleCollisionFrames": 0, - "MultipleCollisionFrames": 0, - "FramesReceivedOK": 418, - "FrameCheckSequenceErrors": 0, - "OctetsTransmittedOK": 129130, - "FramesWithDeferredXmissions": 0, - "LateCollisions": 0, - "OctetsReceivedOK": 72571, - "MulticastFramesXmittedOK": 605, - "BroadcastFramesXmittedOK": 69, - "FramesWithExcessiveDeferral": 0, - "MulticastFramesReceivedOK": 336, - "BroadcastFramesReceivedOK": 46 - }, - "eth-ctrl": {}, - "rmon": { - "etherStatsUndersizePkts": 0, - "etherStatsOversizePkts": 0, - "etherStatsFragments": 0, - "etherStatsJabbers": 0, - "rx-pktsNtoM": [ - { - "low": 64, - "high": 64, - "val": 12 - }, - { - "low": 65, - "high": 127, - "val": 603 - }, - { - "low": 128, - "high": 255, - "val": 168 - }, - { - "low": 256, - "high": 511, - "val": 348 - }, - { - "low": 512, - "high": 1023, - "val": 0 - }, - { - "low": 1024, - "high": 65535, - "val": 0 - } - ] - } - } -] diff --git a/test/case/cli/system-output/run/ethtool_--json_-S_e1_--all-groups b/test/case/cli/system-output/run/ethtool_--json_-S_e1_--all-groups deleted file mode 100644 index 78d73034..00000000 --- a/test/case/cli/system-output/run/ethtool_--json_-S_e1_--all-groups +++ /dev/null @@ -1,61 +0,0 @@ -[ - { - "ifname": "e1", - "eth-phy": {}, - "eth-mac": { - "FramesTransmittedOK": 713, - "SingleCollisionFrames": 0, - "MultipleCollisionFrames": 0, - "FramesReceivedOK": 418, - "FrameCheckSequenceErrors": 0, - "OctetsTransmittedOK": 129130, - "FramesWithDeferredXmissions": 0, - "LateCollisions": 0, - "OctetsReceivedOK": 72571, - "MulticastFramesXmittedOK": 605, - "BroadcastFramesXmittedOK": 69, - "FramesWithExcessiveDeferral": 0, - "MulticastFramesReceivedOK": 336, - "BroadcastFramesReceivedOK": 46 - }, - "eth-ctrl": {}, - "rmon": { - "etherStatsUndersizePkts": 0, - "etherStatsOversizePkts": 0, - "etherStatsFragments": 0, - "etherStatsJabbers": 0, - "rx-pktsNtoM": [ - { - "low": 64, - "high": 64, - "val": 12 - }, - { - "low": 65, - "high": 127, - "val": 603 - }, - { - "low": 128, - "high": 255, - "val": 168 - }, - { - "low": 256, - "high": 511, - "val": 348 - }, - { - "low": 512, - "high": 1023, - "val": 0 - }, - { - "low": 1024, - "high": 65535, - "val": 0 - } - ] - } - } -] diff --git a/test/case/cli/system-output/run/ethtool_--json_-S_e2_--all-groups b/test/case/cli/system-output/run/ethtool_--json_-S_e2_--all-groups deleted file mode 100644 index 6c23fb74..00000000 --- a/test/case/cli/system-output/run/ethtool_--json_-S_e2_--all-groups +++ /dev/null @@ -1,61 +0,0 @@ -[ - { - "ifname": "e2", - "eth-phy": {}, - "eth-mac": { - "FramesTransmittedOK": 713, - "SingleCollisionFrames": 0, - "MultipleCollisionFrames": 0, - "FramesReceivedOK": 418, - "FrameCheckSequenceErrors": 0, - "OctetsTransmittedOK": 129130, - "FramesWithDeferredXmissions": 0, - "LateCollisions": 0, - "OctetsReceivedOK": 72571, - "MulticastFramesXmittedOK": 605, - "BroadcastFramesXmittedOK": 69, - "FramesWithExcessiveDeferral": 0, - "MulticastFramesReceivedOK": 336, - "BroadcastFramesReceivedOK": 46 - }, - "eth-ctrl": {}, - "rmon": { - "etherStatsUndersizePkts": 0, - "etherStatsOversizePkts": 0, - "etherStatsFragments": 0, - "etherStatsJabbers": 0, - "rx-pktsNtoM": [ - { - "low": 64, - "high": 64, - "val": 12 - }, - { - "low": 65, - "high": 127, - "val": 603 - }, - { - "low": 128, - "high": 255, - "val": 168 - }, - { - "low": 256, - "high": 511, - "val": 348 - }, - { - "low": 512, - "high": 1023, - "val": 0 - }, - { - "low": 1024, - "high": 65535, - "val": 0 - } - ] - } - } -] diff --git a/test/case/cli/system-output/run/ethtool_--json_-S_e3_--all-groups b/test/case/cli/system-output/run/ethtool_--json_-S_e3_--all-groups deleted file mode 100644 index aba18da1..00000000 --- a/test/case/cli/system-output/run/ethtool_--json_-S_e3_--all-groups +++ /dev/null @@ -1,61 +0,0 @@ -[ - { - "ifname": "e3", - "eth-phy": {}, - "eth-mac": { - "FramesTransmittedOK": 713, - "SingleCollisionFrames": 0, - "MultipleCollisionFrames": 0, - "FramesReceivedOK": 418, - "FrameCheckSequenceErrors": 0, - "OctetsTransmittedOK": 129130, - "FramesWithDeferredXmissions": 0, - "LateCollisions": 0, - "OctetsReceivedOK": 72571, - "MulticastFramesXmittedOK": 605, - "BroadcastFramesXmittedOK": 69, - "FramesWithExcessiveDeferral": 0, - "MulticastFramesReceivedOK": 336, - "BroadcastFramesReceivedOK": 46 - }, - "eth-ctrl": {}, - "rmon": { - "etherStatsUndersizePkts": 0, - "etherStatsOversizePkts": 0, - "etherStatsFragments": 0, - "etherStatsJabbers": 0, - "rx-pktsNtoM": [ - { - "low": 64, - "high": 64, - "val": 12 - }, - { - "low": 65, - "high": 127, - "val": 603 - }, - { - "low": 128, - "high": 255, - "val": 168 - }, - { - "low": 256, - "high": 511, - "val": 348 - }, - { - "low": 512, - "high": 1023, - "val": 0 - }, - { - "low": 1024, - "high": 65535, - "val": 0 - } - ] - } - } -] diff --git a/test/case/cli/system-output/run/ethtool_--json_-S_e4_--all-groups b/test/case/cli/system-output/run/ethtool_--json_-S_e4_--all-groups deleted file mode 100644 index 9043bf64..00000000 --- a/test/case/cli/system-output/run/ethtool_--json_-S_e4_--all-groups +++ /dev/null @@ -1,61 +0,0 @@ -[ - { - "ifname": "e4", - "eth-phy": {}, - "eth-mac": { - "FramesTransmittedOK": 713, - "SingleCollisionFrames": 0, - "MultipleCollisionFrames": 0, - "FramesReceivedOK": 418, - "FrameCheckSequenceErrors": 0, - "OctetsTransmittedOK": 129130, - "FramesWithDeferredXmissions": 0, - "LateCollisions": 0, - "OctetsReceivedOK": 72571, - "MulticastFramesXmittedOK": 605, - "BroadcastFramesXmittedOK": 69, - "FramesWithExcessiveDeferral": 0, - "MulticastFramesReceivedOK": 336, - "BroadcastFramesReceivedOK": 46 - }, - "eth-ctrl": {}, - "rmon": { - "etherStatsUndersizePkts": 0, - "etherStatsOversizePkts": 0, - "etherStatsFragments": 0, - "etherStatsJabbers": 0, - "rx-pktsNtoM": [ - { - "low": 64, - "high": 64, - "val": 12 - }, - { - "low": 65, - "high": 127, - "val": 603 - }, - { - "low": 128, - "high": 255, - "val": 168 - }, - { - "low": 256, - "high": 511, - "val": 348 - }, - { - "low": 512, - "high": 1023, - "val": 0 - }, - { - "low": 1024, - "high": 65535, - "val": 0 - } - ] - } - } -] diff --git a/test/case/cli/system-output/run/ethtool_br0 b/test/case/cli/system-output/run/ethtool_br0 deleted file mode 100644 index e2c00a7f..00000000 --- a/test/case/cli/system-output/run/ethtool_br0 +++ /dev/null @@ -1,17 +0,0 @@ -Settings for br0: - Supported ports: [ ] - Supported link modes: Not reported - Supported pause frame use: No - Supports auto-negotiation: No - Supported FEC modes: Not reported - Advertised link modes: Not reported - Advertised pause frame use: No - Advertised auto-negotiation: No - Advertised FEC modes: Not reported - Speed: Unknown! - Duplex: Unknown! (255) - Auto-negotiation: off - Port: Other - PHYAD: 0 - Transceiver: internal - Link detected: yes diff --git a/test/case/cli/system-output/run/ethtool_dsa0 b/test/case/cli/system-output/run/ethtool_dsa0 deleted file mode 100644 index 6fb392ba..00000000 --- a/test/case/cli/system-output/run/ethtool_dsa0 +++ /dev/null @@ -1,32 +0,0 @@ -Settings for dsa0: - Supported ports: [ MII ] - Supported link modes: 10000baseT/Full - 10000baseKX4/Full - 10000baseKR/Full - 10000baseCR/Full - 10000baseSR/Full - 10000baseLR/Full - 10000baseLRM/Full - 10000baseER/Full - Supported pause frame use: Symmetric Receive-only - Supports auto-negotiation: Yes - Supported FEC modes: Not reported - Advertised link modes: 10000baseT/Full - 10000baseKX4/Full - 10000baseKR/Full - 10000baseCR/Full - 10000baseSR/Full - 10000baseLR/Full - 10000baseLRM/Full - 10000baseER/Full - Advertised pause frame use: Symmetric Receive-only - Advertised auto-negotiation: Yes - Advertised FEC modes: Not reported - Speed: 10000Mb/s - Duplex: Full - Auto-negotiation: on - Port: MII - PHYAD: 0 - Transceiver: internal -netlink error: Operation not permitted - Link detected: yes diff --git a/test/case/cli/system-output/run/ethtool_e0 b/test/case/cli/system-output/run/ethtool_e0 deleted file mode 100644 index de4a03d7..00000000 --- a/test/case/cli/system-output/run/ethtool_e0 +++ /dev/null @@ -1,39 +0,0 @@ -Settings for e0: - Supported ports: [ ] - Supported link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Supported pause frame use: Symmetric - Supports auto-negotiation: Yes - Supported FEC modes: Not reported - Advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Advertised pause frame use: Symmetric - Advertised auto-negotiation: Yes - Advertised FEC modes: Not reported - Link partner advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Link partner advertised pause frame use: Symmetric - Link partner advertised auto-negotiation: Yes - Link partner advertised FEC modes: Not reported - Speed: 10000Mb/s - Duplex: Full - Auto-negotiation: on - Port: Twisted Pair - PHYAD: 4 - Transceiver: external - MDI-X: on (auto) - Supports Wake-on: g - Wake-on: d - Link detected: yes diff --git a/test/case/cli/system-output/run/ethtool_e1 b/test/case/cli/system-output/run/ethtool_e1 deleted file mode 100644 index 2685d5cb..00000000 --- a/test/case/cli/system-output/run/ethtool_e1 +++ /dev/null @@ -1,39 +0,0 @@ -Settings for e1: - Supported ports: [ ] - Supported link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Supported pause frame use: Symmetric - Supports auto-negotiation: Yes - Supported FEC modes: Not reported - Advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Advertised pause frame use: Symmetric - Advertised auto-negotiation: Yes - Advertised FEC modes: Not reported - Link partner advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Link partner advertised pause frame use: Symmetric - Link partner advertised auto-negotiation: Yes - Link partner advertised FEC modes: Not reported - Speed: 10000Mb/s - Duplex: Full - Auto-negotiation: on - Port: Twisted Pair - PHYAD: 4 - Transceiver: external - MDI-X: on (auto) - Supports Wake-on: g - Wake-on: d - Link detected: yes diff --git a/test/case/cli/system-output/run/ethtool_e2 b/test/case/cli/system-output/run/ethtool_e2 deleted file mode 100644 index 2ebad562..00000000 --- a/test/case/cli/system-output/run/ethtool_e2 +++ /dev/null @@ -1,39 +0,0 @@ -Settings for e2: - Supported ports: [ ] - Supported link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Supported pause frame use: Symmetric - Supports auto-negotiation: Yes - Supported FEC modes: Not reported - Advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Advertised pause frame use: Symmetric - Advertised auto-negotiation: Yes - Advertised FEC modes: Not reported - Link partner advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Link partner advertised pause frame use: Symmetric - Link partner advertised auto-negotiation: Yes - Link partner advertised FEC modes: Not reported - Speed: 10000Mb/s - Duplex: Full - Auto-negotiation: on - Port: Twisted Pair - PHYAD: 4 - Transceiver: external - MDI-X: on (auto) - Supports Wake-on: g - Wake-on: d - Link detected: yes diff --git a/test/case/cli/system-output/run/ethtool_e3 b/test/case/cli/system-output/run/ethtool_e3 deleted file mode 100644 index 77966026..00000000 --- a/test/case/cli/system-output/run/ethtool_e3 +++ /dev/null @@ -1,39 +0,0 @@ -Settings for e3: - Supported ports: [ ] - Supported link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Supported pause frame use: Symmetric - Supports auto-negotiation: Yes - Supported FEC modes: Not reported - Advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Advertised pause frame use: Symmetric - Advertised auto-negotiation: Yes - Advertised FEC modes: Not reported - Link partner advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Link partner advertised pause frame use: Symmetric - Link partner advertised auto-negotiation: Yes - Link partner advertised FEC modes: Not reported - Speed: 10000Mb/s - Duplex: Full - Auto-negotiation: on - Port: Twisted Pair - PHYAD: 4 - Transceiver: external - MDI-X: on (auto) - Supports Wake-on: g - Wake-on: d - Link detected: yes diff --git a/test/case/cli/system-output/run/ethtool_e4 b/test/case/cli/system-output/run/ethtool_e4 deleted file mode 100644 index feb3df49..00000000 --- a/test/case/cli/system-output/run/ethtool_e4 +++ /dev/null @@ -1,39 +0,0 @@ -Settings for e4: - Supported ports: [ ] - Supported link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Supported pause frame use: Symmetric - Supports auto-negotiation: Yes - Supported FEC modes: Not reported - Advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Advertised pause frame use: Symmetric - Advertised auto-negotiation: Yes - Advertised FEC modes: Not reported - Link partner advertised link modes: 10baseT/Half 10baseT/Full - 100baseT/Half 100baseT/Full - 1000baseT/Full - 10000baseT/Full - 2500baseT/Full - 5000baseT/Full - Link partner advertised pause frame use: Symmetric - Link partner advertised auto-negotiation: Yes - Link partner advertised FEC modes: Not reported - Speed: 10000Mb/s - Duplex: Full - Auto-negotiation: on - Port: Twisted Pair - PHYAD: 4 - Transceiver: external - MDI-X: on (auto) - Supports Wake-on: g - Wake-on: d - Link detected: yes diff --git a/test/case/cli/system-output/run/fw_printenv_BOOT_ORDER b/test/case/cli/system-output/run/fw_printenv_BOOT_ORDER deleted file mode 100644 index 72561adc..00000000 --- a/test/case/cli/system-output/run/fw_printenv_BOOT_ORDER +++ /dev/null @@ -1 +0,0 @@ -BOOT_ORDER=net primary secondary diff --git a/test/case/cli/system-output/run/ip_-j_addr_show b/test/case/cli/system-output/run/ip_-j_addr_show deleted file mode 100644 index 8b17f319..00000000 --- a/test/case/cli/system-output/run/ip_-j_addr_show +++ /dev/null @@ -1,661 +0,0 @@ -[ - { - "ifindex": 2, - "ifname": "dsa0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1504, - "qdisc": "mq", - "operstate": "UP", - "group": "internal", - "txqlen": 2048, - "link_type": "ether", - "address": "02:00:de:ad:02:20", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 9888, - "num_tx_queues": 8, - "num_rx_queues": 4, - "gso_max_size": 65536, - "gso_max_segs": 300, - "tso_max_size": 65536, - "tso_max_segs": 300, - "gro_max_size": 65536, - "gso_ipv4_max_size": 65536, - "gro_ipv4_max_size": 65536, - "parentbus": "platform", - "parentdev": "f2000000.ethernet", - "addr_info": [], - "stats64": { - "rx": { - "bytes": 1756811, - "packets": 6777, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 1849127, - "packets": 7157, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 7, - "ifname": "br0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:00", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_kind": "bridge", - "info_data": { - "forward_delay": 1500, - "hello_time": 200, - "max_age": 2000, - "ageing_time": 30000, - "stp_state": 0, - "priority": 32768, - "vlan_filtering": 1, - "vlan_protocol": "802.1Q", - "bridge_id": "8000.2:0:0:0:0:0", - "root_id": "8000.2:0:0:0:0:0", - "root_port": 0, - "root_path_cost": 0, - "topology_change": 0, - "topology_change_detected": 0, - "hello_timer": 0, - "tcn_timer": 0, - "topology_change_timer": 0, - "gc_timer": 63.88, - "vlan_default_pvid": 0, - "vlan_stats_enabled": 0, - "vlan_stats_per_port": 0, - "group_fwd_mask": "0", - "group_addr": "01:80:c2:00:00:00", - "mcast_snooping": 0, - "no_linklocal_learn": 0, - "mcast_vlan_snooping": 0, - "mcast_router": 1, - "mcast_query_use_ifaddr": 0, - "mcast_querier": 0, - "mcast_hash_elasticity": 16, - "mcast_hash_max": 4096, - "mcast_last_member_cnt": 2, - "mcast_startup_query_cnt": 2, - "mcast_last_member_intvl": 100, - "mcast_membership_intvl": 26000, - "mcast_querier_intvl": 25500, - "mcast_query_intvl": 12500, - "mcast_query_response_intvl": 1000, - "mcast_startup_query_intvl": 3124, - "mcast_stats_enabled": 0, - "mcast_igmp_version": 2, - "mcast_mld_version": 1, - "nf_call_iptables": 0, - "nf_call_ip6tables": 0, - "nf_call_arptables": 0 - } - }, - "inet6_addr_gen_mode": "none", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "stats64": { - "rx": { - "bytes": 3158, - "packets": 42, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 37 - }, - "tx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 8, - "ifname": "br1", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:02", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_kind": "bridge", - "info_data": { - "forward_delay": 1500, - "hello_time": 200, - "max_age": 2000, - "ageing_time": 30000, - "stp_state": 0, - "priority": 32768, - "vlan_filtering": 1, - "vlan_protocol": "802.1Q", - "bridge_id": "8000.2:0:0:0:0:2", - "root_id": "8000.2:0:0:0:0:2", - "root_port": 0, - "root_path_cost": 0, - "topology_change": 0, - "topology_change_detected": 0, - "hello_timer": 0.00, - "tcn_timer": 0.00, - "topology_change_timer": 0.00, - "gc_timer": 0.00, - "vlan_default_pvid": 0, - "vlan_stats_enabled": 0, - "vlan_stats_per_port": 0, - "group_fwd_mask": "0", - "group_addr": "01:80:c2:00:00:00", - "mcast_snooping": 0, - "no_linklocal_learn": 0, - "mcast_vlan_snooping": 0, - "mcast_router": 1, - "mcast_query_use_ifaddr": 0, - "mcast_querier": 0, - "mcast_hash_elasticity": 16, - "mcast_hash_max": 4096, - "mcast_last_member_cnt": 2, - "mcast_startup_query_cnt": 2, - "mcast_last_member_intvl": 100, - "mcast_membership_intvl": 26000, - "mcast_querier_intvl": 25500, - "mcast_query_intvl": 12500, - "mcast_query_response_intvl": 1000, - "mcast_startup_query_intvl": 3124, - "mcast_stats_enabled": 0, - "mcast_igmp_version": 2, - "mcast_mld_version": 1, - "nf_call_iptables": 0, - "nf_call_ip6tables": 0, - "nf_call_arptables": 0 - } - }, - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "addr_info": [], - "stats64": { - "rx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 2, - "ifname": "e0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "master": "br0", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:00", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 1, - "allmulti": 1, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_slave_kind": "bridge", - "info_slave_data": { - "state": "forwarding", - "priority": 32, - "cost": 100, - "hairpin": false, - "guard": false, - "root_block": false, - "fastleave": false, - "learning": true, - "flood": true, - "id": "0x8001", - "no": "0x1", - "designated_port": 32769, - "designated_cost": 0, - "bridge_id": "8000.2:0:0:0:0:0", - "root_id": "8000.2:0:0:0:0:0", - "hold_timer": 0, - "message_age_timer": 0, - "forward_delay_timer": 0, - "topology_change_ack": 0, - "config_pending": 0, - "proxy_arp": false, - "proxy_arp_wifi": false, - "multicast_router": 1, - "mcast_flood": true, - "bcast_flood": true, - "mcast_to_unicast": false, - "neigh_suppress": false, - "group_fwd_mask": "0", - "group_fwd_mask_str": "0x0", - "vlan_tunnel": false, - "isolated": false, - "locked": false - } - }, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio2", - "stats64": { - "rx": { - "bytes": 6795, - "packets": 62, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 22830, - "packets": 114, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 3, - "ifname": "e1", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "master": "br0", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:01", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 1, - "allmulti": 1, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_slave_kind": "bridge", - "info_slave_data": { - "state": "forwarding", - "priority": 32, - "cost": 100, - "hairpin": false, - "guard": false, - "root_block": false, - "fastleave": false, - "learning": true, - "flood": true, - "id": "0x8002", - "no": "0x2", - "designated_port": 32770, - "designated_cost": 0, - "bridge_id": "8000.2:0:0:0:0:0", - "root_id": "8000.2:0:0:0:0:0", - "hold_timer": 0, - "message_age_timer": 0, - "forward_delay_timer": 0, - "topology_change_ack": 0, - "config_pending": 0, - "proxy_arp": false, - "proxy_arp_wifi": false, - "multicast_router": 1, - "mcast_flood": true, - "bcast_flood": true, - "mcast_to_unicast": false, - "neigh_suppress": false, - "group_fwd_mask": "0", - "group_fwd_mask_str": "0x0", - "vlan_tunnel": false, - "isolated": false, - "locked": false - } - }, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio3", - "stats64": { - "rx": { - "bytes": 1397, - "packets": 11, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 23781, - "packets": 126, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 4, - "ifname": "e2", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "master": "br1", - "operstate": "UP", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:02", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 1, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_slave_kind": "bridge", - "info_slave_data": { - "state": "forwarding", - "priority": 32, - "cost": 100, - "hairpin": false, - "guard": false, - "root_block": false, - "fastleave": false, - "learning": true, - "flood": true, - "id": "0x8001", - "no": "0x1", - "designated_port": 32769, - "designated_cost": 0, - "bridge_id": "8000.2:0:0:0:0:2", - "root_id": "8000.2:0:0:0:0:2", - "hold_timer": 0.00, - "message_age_timer": 0.00, - "forward_delay_timer": 0.00, - "topology_change_ack": 0, - "config_pending": 0, - "proxy_arp": false, - "proxy_arp_wifi": false, - "multicast_router": 1, - "mcast_flood": true, - "bcast_flood": true, - "mcast_to_unicast": false, - "neigh_suppress": false, - "group_fwd_mask": "0", - "group_fwd_mask_str": "0x0", - "vlan_tunnel": false, - "isolated": false, - "locked": false - } - }, - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio4", - "addr_info": [ - { - "family": "inet6", - "local": "fe80::ff:fe00:2", - "prefixlen": 64, - "scope": "link", - "protocol": "kernel_ll", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - } - ], - "stats64": { - "rx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 19676, - "packets": 83, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 5, - "ifname": "e3", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:03", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio5", - "stats64": { - "rx": { - "bytes": 1327, - "packets": 10, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 13837, - "packets": 67, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 6, - "ifname": "e4", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "operstate": "DOWN", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:04", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio6", - "stats64": { - "rx": { - "bytes": 1327, - "packets": 10, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 18046, - "packets": 91, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 9, - "link_index": 8, - "ifname": "veth0j", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "b2:82:e3:ce:d5:9e", - "broadcast": "ff:ff:ff:ff:ff:ff", - "link_netnsid": 1, - "addr_info": [ - { - "family": "inet", - "local": "192.168.1.1", - "prefixlen": 24, - "scope": "global", - "protocol": "static", - "label": "veth0j", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - } - ] - } -] diff --git a/test/case/cli/system-output/run/ip_-j_netns_list b/test/case/cli/system-output/run/ip_-j_netns_list deleted file mode 100644 index c8fe6406..00000000 --- a/test/case/cli/system-output/run/ip_-j_netns_list +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "name": "57ff63cb", - "id": 0 - }, - { - "name": "db5ad90e", - "id": 1 - } -] diff --git a/test/case/cli/system-output/run/ip_-s_-d_-j_link_show b/test/case/cli/system-output/run/ip_-s_-d_-j_link_show deleted file mode 100644 index 3d477884..00000000 --- a/test/case/cli/system-output/run/ip_-s_-d_-j_link_show +++ /dev/null @@ -1,678 +0,0 @@ -[ - { - "ifindex": 2, - "ifname": "dsa0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1504, - "qdisc": "mq", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "internal", - "txqlen": 2048, - "link_type": "ether", - "address": "02:00:de:ad:02:20", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 9888, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 8, - "num_rx_queues": 4, - "gso_max_size": 65536, - "gso_max_segs": 300, - "tso_max_size": 65536, - "tso_max_segs": 300, - "gro_max_size": 65536, - "gso_ipv4_max_size": 65536, - "gro_ipv4_max_size": 65536, - "parentbus": "platform", - "parentdev": "f2000000.ethernet", - "stats64": { - "rx": { - "bytes": 1751876, - "packets": 6757, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 1843945, - "packets": 7136, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 7, - "ifname": "br0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:00", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_kind": "bridge", - "info_data": { - "forward_delay": 1500, - "hello_time": 200, - "max_age": 2000, - "ageing_time": 30000, - "stp_state": 0, - "priority": 32768, - "vlan_filtering": 1, - "vlan_protocol": "802.1Q", - "bridge_id": "8000.2:0:0:0:0:0", - "root_id": "8000.2:0:0:0:0:0", - "root_port": 0, - "root_path_cost": 0, - "topology_change": 0, - "topology_change_detected": 0, - "hello_timer": 0, - "tcn_timer": 0, - "topology_change_timer": 0, - "gc_timer": 27.38, - "vlan_default_pvid": 0, - "vlan_stats_enabled": 0, - "vlan_stats_per_port": 0, - "group_fwd_mask": "0", - "group_addr": "01:80:c2:00:00:00", - "mcast_snooping": 0, - "no_linklocal_learn": 0, - "mcast_vlan_snooping": 0, - "mcast_router": 1, - "mcast_query_use_ifaddr": 0, - "mcast_querier": 0, - "mcast_hash_elasticity": 16, - "mcast_hash_max": 4096, - "mcast_last_member_cnt": 2, - "mcast_startup_query_cnt": 2, - "mcast_last_member_intvl": 100, - "mcast_membership_intvl": 26000, - "mcast_querier_intvl": 25500, - "mcast_query_intvl": 12500, - "mcast_query_response_intvl": 1000, - "mcast_startup_query_intvl": 3124, - "mcast_stats_enabled": 0, - "mcast_igmp_version": 2, - "mcast_mld_version": 1, - "nf_call_iptables": 0, - "nf_call_ip6tables": 0, - "nf_call_arptables": 0 - } - }, - "inet6_addr_gen_mode": "none", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "stats64": { - "rx": { - "bytes": 3158, - "packets": 42, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 37 - }, - "tx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 8, - "ifname": "br1", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:02", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_kind": "bridge", - "info_data": { - "forward_delay": 1500, - "hello_time": 200, - "max_age": 2000, - "ageing_time": 30000, - "stp_state": 0, - "priority": 32768, - "vlan_filtering": 1, - "vlan_protocol": "802.1Q", - "bridge_id": "8000.2:0:0:0:0:2", - "root_id": "8000.2:0:0:0:0:2", - "root_port": 0, - "root_path_cost": 0, - "topology_change": 0, - "topology_change_detected": 0, - "hello_timer": 0.00, - "tcn_timer": 0.00, - "topology_change_timer": 0.00, - "gc_timer": 53.73, - "vlan_default_pvid": 0, - "vlan_stats_enabled": 0, - "vlan_stats_per_port": 0, - "group_fwd_mask": "0", - "group_addr": "01:80:c2:00:00:00", - "mcast_snooping": 0, - "no_linklocal_learn": 0, - "mcast_vlan_snooping": 0, - "mcast_router": 1, - "mcast_query_use_ifaddr": 0, - "mcast_querier": 0, - "mcast_hash_elasticity": 16, - "mcast_hash_max": 4096, - "mcast_last_member_cnt": 2, - "mcast_startup_query_cnt": 2, - "mcast_last_member_intvl": 100, - "mcast_membership_intvl": 26000, - "mcast_querier_intvl": 25500, - "mcast_query_intvl": 12500, - "mcast_query_response_intvl": 1000, - "mcast_startup_query_intvl": 3124, - "mcast_stats_enabled": 0, - "mcast_igmp_version": 2, - "mcast_mld_version": 1, - "nf_call_iptables": 0, - "nf_call_ip6tables": 0, - "nf_call_arptables": 0 - } - }, - "inet6_addr_gen_mode": "none", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "stats64": { - "rx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 2, - "ifname": "e0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "master": "br0", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:00", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 1, - "allmulti": 1, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_slave_kind": "bridge", - "info_slave_data": { - "state": "forwarding", - "priority": 32, - "cost": 100, - "hairpin": false, - "guard": false, - "root_block": false, - "fastleave": false, - "learning": true, - "flood": true, - "id": "0x8001", - "no": "0x1", - "designated_port": 32769, - "designated_cost": 0, - "bridge_id": "8000.2:0:0:0:0:0", - "root_id": "8000.2:0:0:0:0:0", - "hold_timer": 0, - "message_age_timer": 0, - "forward_delay_timer": 0, - "topology_change_ack": 0, - "config_pending": 0, - "proxy_arp": false, - "proxy_arp_wifi": false, - "multicast_router": 1, - "mcast_flood": true, - "bcast_flood": true, - "mcast_to_unicast": false, - "neigh_suppress": false, - "group_fwd_mask": "0", - "group_fwd_mask_str": "0x0", - "vlan_tunnel": false, - "isolated": false, - "locked": false - } - }, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "e1000", - "parentdev": "e1000-foobar", - "stats64": { - "rx": { - "bytes": 6537, - "packets": 59, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 20891, - "packets": 106, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 3, - "ifname": "e1", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "master": "br0", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:01", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 1, - "allmulti": 1, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_slave_kind": "bridge", - "info_slave_data": { - "state": "forwarding", - "priority": 32, - "cost": 100, - "hairpin": false, - "guard": false, - "root_block": false, - "fastleave": false, - "learning": true, - "flood": true, - "id": "0x8002", - "no": "0x2", - "designated_port": 32770, - "designated_cost": 0, - "bridge_id": "8000.2:0:0:0:0:0", - "root_id": "8000.2:0:0:0:0:0", - "hold_timer": 0, - "message_age_timer": 0, - "forward_delay_timer": 0, - "topology_change_ack": 0, - "config_pending": 0, - "proxy_arp": false, - "proxy_arp_wifi": false, - "multicast_router": 1, - "mcast_flood": true, - "bcast_flood": true, - "mcast_to_unicast": false, - "neigh_suppress": false, - "group_fwd_mask": "0", - "group_fwd_mask_str": "0x0", - "vlan_tunnel": false, - "isolated": false, - "locked": false - } - }, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "e1000", - "parentdev": "e1000-foobar", - "stats64": { - "rx": { - "bytes": 1397, - "packets": 11, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 24849, - "packets": 130, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 4, - "ifname": "e2", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "master": "br1", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:02", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 1, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_slave_kind": "bridge", - "info_slave_data": { - "state": "forwarding", - "priority": 32, - "cost": 100, - "hairpin": false, - "guard": false, - "root_block": false, - "fastleave": false, - "learning": true, - "flood": true, - "id": "0x8001", - "no": "0x1", - "designated_port": 32769, - "designated_cost": 0, - "bridge_id": "8000.2:0:0:0:0:2", - "root_id": "8000.2:0:0:0:0:2", - "hold_timer": 0.00, - "message_age_timer": 0.00, - "forward_delay_timer": 0.00, - "topology_change_ack": 0, - "config_pending": 0, - "proxy_arp": false, - "proxy_arp_wifi": false, - "multicast_router": 1, - "mcast_flood": true, - "bcast_flood": true, - "mcast_to_unicast": false, - "neigh_suppress": false, - "group_fwd_mask": "0", - "group_fwd_mask_str": "0x0", - "vlan_tunnel": false, - "isolated": false, - "locked": false - } - }, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio4", - "stats64": { - "rx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 19114, - "packets": 81, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 5, - "ifname": "e3", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:03", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio5", - "stats64": { - "rx": { - "bytes": 1327, - "packets": 10, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 15057, - "packets": 72, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 6, - "ifname": "e4", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "operstate": "DOWN", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:04", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio6", - "stats64": { - "rx": { - "bytes": 1327, - "packets": 10, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 19022, - "packets": 95, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 9, - "link_index": 8, - "ifname": "veth0j", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "b2:82:e3:ce:d5:9e", - "broadcast": "ff:ff:ff:ff:ff:ff", - "link_netnsid": 1, - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_kind": "veth" - }, - "inet6_addr_gen_mode": "none", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 524280, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "gso_ipv4_max_size": 65536, - "gro_ipv4_max_size": 65536, - "stats64": { - "rx": { - "bytes": 1006, - "packets": 13, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 18668, - "packets": 50, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - } -] diff --git a/test/case/cli/system-output/run/ip_netns_exec_57ff63cb_ip_-j_addr_show b/test/case/cli/system-output/run/ip_netns_exec_57ff63cb_ip_-j_addr_show deleted file mode 100644 index a87540e8..00000000 --- a/test/case/cli/system-output/run/ip_netns_exec_57ff63cb_ip_-j_addr_show +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "ifindex": 1, - "ifname": "lo", - "flags": [ - "LOOPBACK", - "UP", - "LOWER_UP" - ], - "mtu": 65536, - "qdisc": "noqueue", - "operstate": "UNKNOWN", - "group": "default", - "txqlen": 1000, - "link_type": "loopback", - "address": "00:00:00:00:00:00", - "broadcast": "00:00:00:00:00:00", - "addr_info": [ - { - "family": "inet", - "local": "127.0.0.1", - "prefixlen": 8, - "scope": "host", - "label": "lo", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - }, - { - "family": "inet6", - "local": "::1", - "prefixlen": 128, - "scope": "host", - "protocol": "kernel_lo", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - } - ] - }, - { - "ifindex": 3, - "ifname": "eth0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "operstate": "UP", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:02", - "broadcast": "ff:ff:ff:ff:ff:ff", - "addr_info": [ - { - "family": "inet", - "local": "172.0.0.1", - "prefixlen": 24, - "broadcast": "172.0.0.255", - "scope": "global", - "label": "eth0", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - }, - { - "family": "inet6", - "local": "fe80::ff:fe00:2", - "prefixlen": 64, - "scope": "link", - "protocol": "kernel_ll", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - } - ] - }, - { - "ifindex": 6, - "link_index": 7, - "ifname": "eth1", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "62:64:85:4c:7c:87", - "broadcast": "ff:ff:ff:ff:ff:ff", - "link_netnsid": 0, - "addr_info": [ - { - "family": "inet", - "local": "192.168.0.2", - "prefixlen": 24, - "broadcast": "192.168.0.255", - "scope": "global", - "label": "eth1", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - }, - { - "family": "inet6", - "local": "fe80::6064:85ff:fe4c:7c87", - "prefixlen": 64, - "scope": "link", - "protocol": "kernel_ll", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - } - ] - } -] diff --git a/test/case/cli/system-output/run/ip_netns_exec_57ff63cb_ip_-s_-d_-j_link_show b/test/case/cli/system-output/run/ip_netns_exec_57ff63cb_ip_-s_-d_-j_link_show deleted file mode 100644 index 4c852ae2..00000000 --- a/test/case/cli/system-output/run/ip_netns_exec_57ff63cb_ip_-s_-d_-j_link_show +++ /dev/null @@ -1,163 +0,0 @@ -[ - { - "ifindex": 1, - "ifname": "lo", - "flags": [ - "LOOPBACK", - "UP", - "LOWER_UP" - ], - "mtu": 65536, - "qdisc": "noqueue", - "operstate": "UNKNOWN", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "loopback", - "address": "00:00:00:00:00:00", - "broadcast": "00:00:00:00:00:00", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 0, - "max_mtu": 0, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 524280, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "gso_ipv4_max_size": 65536, - "gro_ipv4_max_size": 65536, - "stats64": { - "rx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 3, - "ifname": "eth0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "pfifo_fast", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "02:00:00:00:00:02", - "broadcast": "ff:ff:ff:ff:ff:ff", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 65536, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "gso_ipv4_max_size": 65536, - "gro_ipv4_max_size": 65536, - "parentbus": "virtio", - "parentdev": "virtio3", - "ifalias": "e2", - "stats64": { - "rx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 1006, - "packets": 13, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 6, - "link_index": 7, - "ifname": "eth1", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "62:64:85:4c:7c:87", - "broadcast": "ff:ff:ff:ff:ff:ff", - "link_netnsid": 0, - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_kind": "veth" - }, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 524280, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "gso_ipv4_max_size": 65536, - "gro_ipv4_max_size": 65536, - "ifalias": "veth0b", - "stats64": { - "rx": { - "bytes": 17643, - "packets": 44, - "errors": 0, - "dropped": 24, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 1006, - "packets": 13, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - } -] diff --git a/test/case/cli/system-output/run/ip_netns_exec_db5ad90e_ip_-j_addr_show b/test/case/cli/system-output/run/ip_netns_exec_db5ad90e_ip_-j_addr_show deleted file mode 100644 index 28a207bb..00000000 --- a/test/case/cli/system-output/run/ip_netns_exec_db5ad90e_ip_-j_addr_show +++ /dev/null @@ -1,80 +0,0 @@ -[ - { - "ifindex": 1, - "ifname": "lo", - "flags": [ - "LOOPBACK", - "UP", - "LOWER_UP" - ], - "mtu": 65536, - "qdisc": "noqueue", - "operstate": "UNKNOWN", - "group": "default", - "txqlen": 1000, - "link_type": "loopback", - "address": "00:00:00:00:00:00", - "broadcast": "00:00:00:00:00:00", - "addr_info": [ - { - "family": "inet", - "local": "127.0.0.1", - "prefixlen": 8, - "scope": "host", - "label": "lo", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - }, - { - "family": "inet6", - "local": "::1", - "prefixlen": 128, - "scope": "host", - "protocol": "kernel_lo", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - } - ] - }, - { - "ifindex": 8, - "link_index": 9, - "ifname": "eth0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "c2:1b:78:88:e2:b8", - "broadcast": "ff:ff:ff:ff:ff:ff", - "link_netnsid": 0, - "addr_info": [ - { - "family": "inet", - "local": "192.168.1.2", - "prefixlen": 24, - "broadcast": "192.168.1.255", - "scope": "global", - "label": "eth0", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - }, - { - "family": "inet6", - "local": "fe80::c01b:78ff:fe88:e2b8", - "prefixlen": 64, - "scope": "link", - "protocol": "kernel_ll", - "valid_life_time": 4294967295, - "preferred_life_time": 4294967295 - } - ] - } -] diff --git a/test/case/cli/system-output/run/ip_netns_exec_db5ad90e_ip_-s_-d_-j_link_show b/test/case/cli/system-output/run/ip_netns_exec_db5ad90e_ip_-s_-d_-j_link_show deleted file mode 100644 index dd2d8006..00000000 --- a/test/case/cli/system-output/run/ip_netns_exec_db5ad90e_ip_-s_-d_-j_link_show +++ /dev/null @@ -1,109 +0,0 @@ -[ - { - "ifindex": 1, - "ifname": "lo", - "flags": [ - "LOOPBACK", - "UP", - "LOWER_UP" - ], - "mtu": 65536, - "qdisc": "noqueue", - "operstate": "UNKNOWN", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "loopback", - "address": "00:00:00:00:00:00", - "broadcast": "00:00:00:00:00:00", - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 0, - "max_mtu": 0, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 524280, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "gso_ipv4_max_size": 65536, - "gro_ipv4_max_size": 65536, - "stats64": { - "rx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 0, - "packets": 0, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - }, - { - "ifindex": 8, - "link_index": 9, - "ifname": "eth0", - "flags": [ - "BROADCAST", - "MULTICAST", - "UP", - "LOWER_UP" - ], - "mtu": 1500, - "qdisc": "noqueue", - "operstate": "UP", - "linkmode": "DEFAULT", - "group": "default", - "txqlen": 1000, - "link_type": "ether", - "address": "c2:1b:78:88:e2:b8", - "broadcast": "ff:ff:ff:ff:ff:ff", - "link_netnsid": 0, - "promiscuity": 0, - "allmulti": 0, - "min_mtu": 68, - "max_mtu": 65535, - "linkinfo": { - "info_kind": "veth" - }, - "inet6_addr_gen_mode": "eui64", - "num_tx_queues": 1, - "num_rx_queues": 1, - "gso_max_size": 65536, - "gso_max_segs": 65535, - "tso_max_size": 524280, - "tso_max_segs": 65535, - "gro_max_size": 65536, - "gso_ipv4_max_size": 65536, - "gro_ipv4_max_size": 65536, - "ifalias": "veth0k", - "stats64": { - "rx": { - "bytes": 15197, - "packets": 37, - "errors": 0, - "dropped": 22, - "over_errors": 0, - "multicast": 0 - }, - "tx": { - "bytes": 1006, - "packets": 13, - "errors": 0, - "dropped": 0, - "carrier_errors": 0, - "collisions": 0 - } - } - } -] diff --git a/test/case/cli/system-output/run/mctl_-p_show_igmp_json b/test/case/cli/system-output/run/mctl_-p_show_igmp_json deleted file mode 100644 index 5668736e..00000000 --- a/test/case/cli/system-output/run/mctl_-p_show_igmp_json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "pid": 6510, - "query-interval": 125, - "query-response-interval": 10, - "query-last-member-interval": 1, - "robustness": 2, - "router-timeout": 255, - "router-alert": true, - "fast-leave-ports": [ ], - "multicast-router-ports": [ ], - "multicast-flood-ports": [ "e0", "e1", "e2" ], - "multicast-queriers": [ - { - "interface": "br0", - "state": "up", - "querier": "0.0.0.0", - "interval": 125, - "version": 3 - } - ], - "multicast-groups": [ - { - "bridge": "br0", - "group": "230.1.32.100", - "mac": "01:00:5e:01:20:64", - "ports": [ "e0" ] - }, - { - "bridge": "br0", - "group": "230.1.2.100", - "mac": "01:00:5e:01:02:64", - "ports": [ "e1" ] - }, - { - "bridge": "br0", - "group": "01:01:01:01:01:01", - "mac": "01:01:01:01:01:01", - "ports": [ "e1" ] - }, - { - "bridge": "br0", - "group": "230.1.2.2", - "mac": "01:00:5e:01:02:02", - "ports": [ "e0" ] - }, - { - "bridge": "br1", - "vid": 30, - "group": "ff02::6a", - "mac": "33:33:00:00:00:6a", - "ports": [ "e2" ] - }, - { - "bridge": "br1", - "vid": 30, - "group": "224.2.2.2", - "mac": "33:33:00:00:00:6a", - "ports": [ "e2" ] - } - ] -} diff --git a/test/case/cli/system-output/run/podman_ps_-a_--format=json b/test/case/cli/system-output/run/podman_ps_-a_--format=json deleted file mode 100644 index c406233c..00000000 --- a/test/case/cli/system-output/run/podman_ps_-a_--format=json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "AutoRemove": false, - "Command": null, - "CreatedAt": "25 minutes ago", - "Exited": false, - "ExitedAt": 1730216567, - "ExitCode": 0, - "Id": "cf054e1bc3ff7d7d6fec0cc9a0435f0c96f166e54bc9e9d92149ab53ffa60321", - "Image": "ghcr.io/kernelkit/curios:edge", - "ImageID": "cee712df3c4ea28bd3f03ca50d46e53788b1526812f4dac8d9133870eb5c49c0", - "IsInfra": false, - "Labels": { - "org.opencontainers.image.title": "curiOS", - "org.opencontainers.image.url": "https://github.com/kernelkit/curiOS" - }, - "Mounts": [], - "Names": [ - "system2" - ], - "Namespaces": { - - }, - "Networks": [ - "veth0k" - ], - "Pid": 3934, - "Pod": "", - "PodName": "", - "Ports": null, - "Size": null, - "StartedAt": 1730216629, - "State": "running", - "Status": "Up 3 minutes", - "Created": 1730215318 - }, - { - "AutoRemove": false, - "Command": null, - "CreatedAt": "22 minutes ago", - "Exited": false, - "ExitedAt": 1730216567, - "ExitCode": 0, - "Id": "400172de2290a387bd10de7c2995a0876169a4b69679b862b474c645308dcea1", - "Image": "ghcr.io/kernelkit/curios:edge", - "ImageID": "cee712df3c4ea28bd3f03ca50d46e53788b1526812f4dac8d9133870eb5c49c0", - "IsInfra": false, - "Labels": { - "org.opencontainers.image.title": "curiOS", - "org.opencontainers.image.url": "https://github.com/kernelkit/curiOS" - }, - "Mounts": [], - "Names": [ - "system" - ], - "Namespaces": { - - }, - "Networks": [ - "e2", - "veth0b" - ], - "Pid": 3933, - "Pod": "", - "PodName": "", - "Ports": null, - "Size": null, - "StartedAt": 1730216629, - "State": "running", - "Status": "Up 3 minutes", - "Created": 1730215507 - } -] diff --git a/test/case/cli/system-output/run/rauc-installation-status b/test/case/cli/system-output/run/rauc-installation-status deleted file mode 100644 index 5e09b20e..00000000 --- a/test/case/cli/system-output/run/rauc-installation-status +++ /dev/null @@ -1 +0,0 @@ -{"operation": "idle", "progress": {"percentage": "100", "message": "Installing failed."}} diff --git a/test/case/cli/system-output/run/rauc_status_--detailed_--output-format=json b/test/case/cli/system-output/run/rauc_status_--detailed_--output-format=json deleted file mode 100644 index 14418a7e..00000000 --- a/test/case/cli/system-output/run/rauc_status_--detailed_--output-format=json +++ /dev/null @@ -1 +0,0 @@ -{"compatible":"infix-aarch64","variant":"","booted":"net","boot_primary":"net.0","slots":[{"rootfs.1":{"class":"rootfs","device":"/dev/disk/by-partlabel/secondary","type":"raw","bootname":"secondary","state":"inactive","parent":null,"mountpoint":null,"boot_status":"bad","slot_status":{"bundle":{"compatible":"infix-aarch64","version":"pr873.2a39a38","hash":"99a9543fe85a2b32a4a28409f7103099fd8cfce3f3bbccb5175ace74e7bf9ea6"},"checksum":{"sha256":"d2595e8af8468c19a5da6c3fffbf27ff8e00d7ac2559a87f60591829151fd7e3","size":59707392},"installed":{"timestamp":"2024-12-16T14:40:54Z","count":12},"activated":{"timestamp":"2024-12-16T14:40:54Z","count":12},"status":"ok"}}},{"rootfs.0":{"class":"rootfs","device":"/dev/disk/by-partlabel/primary","type":"raw","bootname":"primary","state":"inactive","parent":null,"mountpoint":null,"boot_status":"bad","slot_status":{"bundle":{"compatible":"infix-aarch64","version":"pr871.a4ef38f","hash":"d36189afff31ac1193ee7eda161f7e9b2007df08ccdc0014cfa231f9a836780a"},"checksum":{"sha256":"d78a9ef52f08238972b6b9151c381327dd0c40e410f9ed4634e379056f9bacd8","size":59699200},"installed":{"timestamp":"2024-12-13T20:00:42Z","count":3},"activated":{"timestamp":"2024-12-13T20:00:42Z","count":4},"status":"ok"}}},{"net.0":{"class":"net","device":"/dev/ram0","type":"raw","bootname":"net","state":"booted","parent":null,"mountpoint":null,"boot_status":"good","slot_status":{"bundle":{"compatible":null}}}}]} diff --git a/test/case/cli/system-output/run/vtysh_-c_show-ip-ospf-route-json b/test/case/cli/system-output/run/vtysh_-c_show-ip-ospf-route-json deleted file mode 100644 index e03c6425..00000000 --- a/test/case/cli/system-output/run/vtysh_-c_show-ip-ospf-route-json +++ /dev/null @@ -1 +0,0 @@ -{"10.0.0.1/32":{"routeType":"N","transit":false,"cost":0,"area":"0.0.0.1","nexthops":[{"ip":" ","directlyAttachedTo":"lo"}]},"10.0.0.2/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"10.0.0.3/32":{"routeType":"N","transit":false,"cost":2000,"area":"0.0.0.1","nexthops":[{"ip":"10.0.13.2","via":"e6","advertisedRouter":"10.0.0.3"}]},"10.0.0.4/32":{"routeType":"N IA","cost":2001,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"10.0.12.0/30":{"routeType":"N","transit":true,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":" ","directlyAttachedTo":"e5"}]},"10.0.13.0/30":{"routeType":"N","transit":true,"cost":2000,"area":"0.0.0.1","nexthops":[{"ip":" ","directlyAttachedTo":"e6"}]},"10.0.23.0/30":{"routeType":"N","transit":true,"cost":2001,"area":"0.0.0.1","nexthops":[{"ip":"10.0.13.2","via":"e6","advertisedRouter":"10.0.0.3"}]},"10.0.24.0/30":{"routeType":"N IA","cost":2001,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"10.0.41.0/30":{"routeType":"N IA","cost":2002,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.8.1/32":{"routeType":"N","transit":false,"cost":0,"area":"0.0.0.1","nexthops":[{"ip":" ","directlyAttachedTo":"lo"}]},"11.0.9.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.10.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.11.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.12.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.13.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.14.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"11.0.15.1/32":{"routeType":"N","transit":false,"cost":1,"area":"0.0.0.0","nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]},"192.168.3.0/24":{"routeType":"N","transit":false,"cost":2001,"area":"0.0.0.1","nexthops":[{"ip":"10.0.13.2","via":"e6","advertisedRouter":"10.0.0.3"}]},"1.1.1.1":{"routeType":"R ","cost":1,"area":"0.0.0.0","routerType":"abr","nexthops":[{"ip":"10.0.12.2","via":"e5"}]},"10.0.0.4":{"routeType":"R ","cost":2001,"area":"0.0.0.0","IA":true,"ia":true,"routerType":"asbr","nexthops":[{"ip":"10.0.12.2","via":"e5"}]},"192.168.4.0/24":{"routeType":"N E2","cost":2001,"type2cost":20,"tag":0,"nexthops":[{"ip":"10.0.12.2","via":"e5","advertisedRouter":"1.1.1.1"}]}} diff --git a/test/case/cli/system-output/run/vtysh_-c_show-ip-route-json b/test/case/cli/system-output/run/vtysh_-c_show-ip-route-json deleted file mode 100644 index 20b2cf8b..00000000 --- a/test/case/cli/system-output/run/vtysh_-c_show-ip-route-json +++ /dev/null @@ -1,302 +0,0 @@ -{ - "0.0.0.0/0":[ - { - "prefix":"0.0.0.0/0", - "prefixLen":0, - "protocol":"ospf", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":110, - "metric":2, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":42, - "installedNexthopGroupId":42, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "ip":"10.0.23.1", - "afi":"ipv4", - "interfaceIndex":7, - "interfaceName":"e6", - "active":true, - "weight":1 - } - ] - } - ], - "10.0.0.1/32":[ - { - "prefix":"10.0.0.1/32", - "prefixLen":32, - "protocol":"ospf", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":110, - "metric":4000, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":43, - "installedNexthopGroupId":43, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "ip":"10.0.13.1", - "afi":"ipv4", - "interfaceIndex":6, - "interfaceName":"e5", - "active":true, - "weight":1 - } - ] - } - ], - "10.0.0.3/32":[ - { - "prefix":"10.0.0.3/32", - "prefixLen":32, - "protocol":"ospf", - "vrfId":0, - "vrfName":"default", - "distance":110, - "metric":0, - "table":254, - "internalStatus":0, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":30, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":1, - "directlyConnected":true, - "interfaceIndex":1, - "interfaceName":"lo", - "active":true, - "weight":1 - } - ] - }, - { - "prefix":"10.0.0.3/32", - "prefixLen":32, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":25, - "installedNexthopGroupId":25, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":1, - "interfaceName":"lo", - "active":true - } - ] - } - ], - "10.0.13.0/30":[ - { - "prefix":"10.0.13.0/30", - "prefixLen":30, - "protocol":"ospf", - "vrfId":0, - "vrfName":"default", - "distance":110, - "metric":2000, - "table":254, - "internalStatus":0, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":31, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":1, - "directlyConnected":true, - "interfaceIndex":6, - "interfaceName":"e5", - "active":true, - "weight":1 - } - ] - }, - { - "prefix":"10.0.13.0/30", - "prefixLen":30, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":20, - "installedNexthopGroupId":20, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":6, - "interfaceName":"e5", - "active":true - } - ] - } - ], - "10.0.23.0/30":[ - { - "prefix":"10.0.23.0/30", - "prefixLen":30, - "protocol":"ospf", - "vrfId":0, - "vrfName":"default", - "distance":110, - "metric":1, - "table":254, - "internalStatus":0, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":32, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":1, - "directlyConnected":true, - "interfaceIndex":7, - "interfaceName":"e6", - "active":true, - "weight":1 - } - ] - }, - { - "prefix":"10.0.23.0/30", - "prefixLen":30, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":23, - "installedNexthopGroupId":23, - "uptime":"20:10:05", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":7, - "interfaceName":"e6", - "active":true - } - ] - } - ], - "192.168.3.0/24":[ - { - "prefix":"192.168.3.0/24", - "prefixLen":24, - "protocol":"ospf", - "vrfId":0, - "vrfName":"default", - "distance":110, - "metric":1, - "table":254, - "internalStatus":0, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":33, - "uptime":"5d13h05m", - "nexthops":[ - { - "flags":1, - "directlyConnected":true, - "interfaceIndex":3, - "interfaceName":"e2", - "active":true, - "weight":1 - } - ] - }, - { - "prefix":"192.168.3.0/24", - "prefixLen":24, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":17, - "installedNexthopGroupId":17, - "uptime":"01w1d13h", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":3, - "interfaceName":"e2", - "active":true - } - ] - } - ] -} diff --git a/test/case/cli/system-output/run/vtysh_-c_show-ipv6-route-json b/test/case/cli/system-output/run/vtysh_-c_show-ipv6-route-json deleted file mode 100644 index 35cd6794..00000000 --- a/test/case/cli/system-output/run/vtysh_-c_show-ipv6-route-json +++ /dev/null @@ -1,294 +0,0 @@ -{ - "::/0":[ - { - "prefix":"::/0", - "prefixLen":0, - "protocol":"static", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":1, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":73, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":24, - "installedNexthopGroupId":24, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "ip":"2001:db8:3c4d:50::1", - "afi":"ipv6", - "interfaceIndex":7, - "interfaceName":"e6", - "active":true, - "weight":1 - } - ] - } - ], - "2001:db8:3c4d:50::/64":[ - { - "prefix":"2001:db8:3c4d:50::/64", - "prefixLen":64, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":15, - "installedNexthopGroupId":15, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":7, - "interfaceName":"e6", - "active":true - } - ] - } - ], - "2001:db8:3c4d:200::1/128":[ - { - "prefix":"2001:db8:3c4d:200::1/128", - "prefixLen":128, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":13, - "installedNexthopGroupId":13, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":1, - "interfaceName":"lo", - "active":true - } - ] - } - ], - "fe80::/64":[ - { - "prefix":"fe80::/64", - "prefixLen":64, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":14, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":8, - "interfaceName":"e7", - "active":true - } - ] - }, - { - "prefix":"fe80::/64", - "prefixLen":64, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":15, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":7, - "interfaceName":"e6", - "active":true - } - ] - }, - { - "prefix":"fe80::/64", - "prefixLen":64, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":16, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":6, - "interfaceName":"e5", - "active":true - } - ] - }, - { - "prefix":"fe80::/64", - "prefixLen":64, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":17, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":5, - "interfaceName":"e4", - "active":true - } - ] - }, - { - "prefix":"fe80::/64", - "prefixLen":64, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":18, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":4, - "interfaceName":"e3", - "active":true - } - ] - }, - { - "prefix":"fe80::/64", - "prefixLen":64, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":0, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":19, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":3, - "interfaceName":"e2", - "active":true - } - ] - }, - { - "prefix":"fe80::/64", - "prefixLen":64, - "protocol":"connected", - "vrfId":0, - "vrfName":"default", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthopGroupId":20, - "installedNexthopGroupId":20, - "uptime":"00:00:00", - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":2, - "interfaceName":"e1", - "active":true - } - ] - } - ] -} diff --git a/test/case/statd/all.yaml b/test/case/statd/all.yaml new file mode 100644 index 00000000..3c04c566 --- /dev/null +++ b/test/case/statd/all.yaml @@ -0,0 +1,3 @@ +--- +- case: interfaces-all/test + name: "interfaces-all" diff --git a/test/case/statd/interfaces-all/cli/show-interfaces b/test/case/statd/interfaces-all/cli/show-interfaces new file mode 100644 index 00000000..1bd4784f --- /dev/null +++ b/test/case/statd/interfaces-all/cli/show-interfaces @@ -0,0 +1,46 @@ +INTERFACE PROTOCOL STATE DATA  +lo ethernet UP 00:00:00:00:00:00 + ipv4 127.0.0.1/8 (static) + ipv6 ::1/128 (static) +br-0 bridge DOWN  + ethernet DOWN 00:a0:85:00:03:00 +br-D bridge   +│ ethernet UP 00:a0:85:00:03:00 +│ ipv4 10.0.0.1/8 (static) +│ ipv4 192.168.20.1/24 (static) +│ ipv6 2001:db8::1/64 (static) +│ ipv6 fe80::2a0:85ff:fe00:300/64 (link-layer) +└ veth0a.20 bridge FORWARDING  +br-Q bridge  vlan:10u,20u,30t,40t pvid:10 +│ ethernet UP 00:a0:85:00:03:00 +├ e3 bridge FORWARDING vlan:20t,30t,40t +└ veth0b bridge FORWARDING vlan:10t,20t,30t,40t +br-Q.40 ethernet UP 00:a0:85:00:03:00 +└ br-Q ethernet UP 00:a0:85:00:03:00 +br-X bridge   +│ ethernet UP 00:a0:85:00:03:00 +└ e2.30 bridge FORWARDING  +e1 ethernet UP 00:a0:85:00:03:01 + ipv6 fe80::2a0:85ff:fe00:301/64 (link-layer) +e2 ethernet UP 00:a0:85:00:03:02 + ipv6 fe80::2a0:85ff:fe00:302/64 (link-layer) +e2.30 ethernet UP 00:a0:85:00:03:02 +└ e2 ethernet UP 00:a0:85:00:03:02 +e3.10 ethernet UP 00:a0:85:00:03:03 +└ e3 ethernet UP 00:a0:85:00:03:03 +e4 ethernet UP 00:a0:85:00:03:04 + ipv6 fe80::2a0:85ff:fe00:304/64 (link-layer) +e5 ethernet UP 00:a0:85:00:03:05 + ipv6 fe80::2a0:85ff:fe00:305/64 (link-layer) +e6 ethernet UP 00:a0:85:00:03:06 + ipv6 fe80::2a0:85ff:fe00:306/64 (link-layer) +e7 ethernet UP 00:a0:85:00:03:07 + ipv6 fe80::2a0:85ff:fe00:307/64 (link-layer) +gre-v4 ethernet UP  +gre-v6 ethernet UP  +gretap-v4 ethernet UP 1e:9d:e1:46:5d:9e +gretap-v6 ethernet UP ae:c7:28:08:7c:ca +veth0a ethernet UP 86:2a:11:4e:5d:9f +veth0a.20 ethernet UP 86:2a:11:4e:5d:9f +└ veth0a ethernet UP 86:2a:11:4e:5d:9f +veth0b ethernet UP e2:f0:55:1b:34:f3 diff --git a/test/case/statd/interfaces-all/ietf-interfaces.json b/test/case/statd/interfaces-all/ietf-interfaces.json new file mode 100644 index 00000000..e2bd0e86 --- /dev/null +++ b/test/case/statd/interfaces-all/ietf-interfaces.json @@ -0,0 +1,633 @@ +{ + "ietf-interfaces:interfaces": { + "interface": [ + { + "type": "infix-if-type:loopback", + "name": "lo", + "if-index": 1, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:00:00:00:00:00", + "statistics": { + "in-octets": "420569", + "out-octets": "420569" + }, + "ietf-ip:ipv4": { + "address": [ + { + "ip": "127.0.0.1", + "prefix-length": 8, + "origin": "static" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 65536, + "address": [ + { + "ip": "::1", + "prefix-length": 128, + "origin": "static" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e1", + "if-index": 2, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:01", + "statistics": { + "in-octets": "5654369", + "out-octets": "8200041" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:301", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e2", + "if-index": 3, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:02", + "statistics": { + "out-octets": "101161" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:302", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e3", + "if-index": 4, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "statistics": { + "in-octets": "23589", + "out-octets": "251584" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "bridge": "br-Q", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e4", + "if-index": 5, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:04", + "statistics": { + "in-octets": "30583", + "out-octets": "231318" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:304", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e5", + "if-index": 6, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:05", + "statistics": { + "in-octets": "67364", + "out-octets": "105244" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:305", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e6", + "if-index": 7, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:06", + "statistics": { + "in-octets": "136295", + "out-octets": "209032" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:306", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e7", + "if-index": 8, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:07", + "statistics": { + "in-octets": "70752", + "out-octets": "108022" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:307", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:bridge", + "name": "br-0", + "if-index": 47, + "admin-status": "up", + "oper-status": "down", + "phys-address": "00:a0:85:00:03:00", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge": { + "multicast": { + "snooping": false, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + } + }, + { + "type": "infix-if-type:vlan", + "name": "e2.30", + "if-index": 48, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:02", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:vlan": { + "tag-type": "ieee802-dot1q-types:c-vlan", + "id": 30, + "lower-layer-if": "e2" + }, + "infix-interfaces:bridge-port": { + "bridge": "br-X", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:bridge", + "name": "br-X", + "if-index": 49, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge": { + "multicast": { + "snooping": false, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + } + }, + { + "type": "infix-if-type:veth", + "name": "veth0b", + "if-index": 50, + "admin-status": "up", + "oper-status": "up", + "phys-address": "e2:f0:55:1b:34:f3", + "statistics": { + "in-octets": "13501" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:veth": { + "peer": "veth0a" + }, + "infix-interfaces:bridge-port": { + "bridge": "br-Q", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:veth", + "name": "veth0a", + "if-index": 51, + "admin-status": "up", + "oper-status": "up", + "phys-address": "86:2a:11:4e:5d:9f", + "statistics": { + "out-octets": "13501" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:veth": { + "peer": "veth0b" + } + }, + { + "type": "infix-if-type:vlan", + "name": "veth0a.20", + "if-index": 52, + "admin-status": "up", + "oper-status": "up", + "phys-address": "86:2a:11:4e:5d:9f", + "statistics": { + "out-octets": "13501" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:vlan": { + "tag-type": "ieee802-dot1q-types:c-vlan", + "id": 20, + "lower-layer-if": "veth0a" + }, + "infix-interfaces:bridge-port": { + "bridge": "br-D", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:bridge", + "name": "br-D", + "if-index": 53, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "out-octets": "13501" + }, + "ietf-ip:ipv4": { + "mtu": 1500, + "address": [ + { + "ip": "10.0.0.1", + "prefix-length": 8, + "origin": "static" + }, + { + "ip": "192.168.20.1", + "prefix-length": 24, + "origin": "static" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "2001:db8::1", + "prefix-length": 64, + "origin": "static" + }, + { + "ip": "fe80::2a0:85ff:fe00:300", + "prefix-length": 64, + "origin": "link-layer" + } + ] + }, + "infix-interfaces:bridge": { + "multicast": { + "snooping": false, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + } + }, + { + "type": "infix-if-type:bridge", + "name": "br-Q", + "if-index": 54, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "in-octets": "9469" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge": { + "vlans": { + "proto": "ieee802-dot1q-types:c-vlan", + "vlan": [ + { + "vid": 10, + "untagged": [ + "br-Q" + ], + "tagged": [ + "veth0b" + ], + "multicast": { + "snooping": true, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + }, + { + "vid": 20, + "untagged": [ + "br-Q" + ], + "tagged": [ + "e3", + "veth0b" + ], + "multicast": { + "snooping": true, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + }, + { + "vid": 30, + "untagged": [], + "tagged": [ + "br-Q", + "e3", + "veth0b" + ], + "multicast": { + "snooping": true, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + }, + { + "vid": 40, + "untagged": [], + "tagged": [ + "br-Q", + "e3", + "veth0b" + ], + "multicast": { + "snooping": true, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + } + ] + } + }, + "infix-interfaces:bridge-port": { + "pvid": 10 + } + }, + { + "type": "infix-if-type:vlan", + "name": "br-Q.40", + "if-index": 55, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:vlan": { + "tag-type": "ieee802-dot1q-types:c-vlan", + "id": 40, + "lower-layer-if": "br-Q" + } + }, + { + "type": "infix-if-type:vlan", + "name": "e3.10", + "if-index": 56, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:vlan": { + "tag-type": "ieee802-dot1q-types:c-vlan", + "id": 10, + "lower-layer-if": "e3" + } + }, + { + "type": "infix-if-type:gre", + "name": "gre-v4", + "if-index": 57, + "admin-status": "up", + "oper-status": "up", + "ietf-ip:ipv4": { + "mtu": 1476 + }, + "ietf-ip:ipv6": { + "mtu": 1476 + }, + "infix-interfaces:gre": { + "local": "192.168.20.1", + "remote": "192.168.20.2" + } + }, + { + "type": "infix-if-type:gre", + "name": "gre-v6", + "if-index": 58, + "admin-status": "up", + "oper-status": "up", + "ietf-ip:ipv4": { + "mtu": 1448 + }, + "ietf-ip:ipv6": { + "mtu": 1448 + }, + "infix-interfaces:gre": { + "local": "2001:db8::1", + "remote": "2001:db8::2" + } + }, + { + "type": "infix-if-type:gretap", + "name": "gretap-v4", + "if-index": 59, + "admin-status": "up", + "oper-status": "up", + "phys-address": "1e:9d:e1:46:5d:9e", + "ietf-ip:ipv4": { + "mtu": 1462 + }, + "ietf-ip:ipv6": { + "mtu": 1462 + }, + "infix-interfaces:gre": { + "local": "192.168.20.1", + "remote": "192.168.20.2" + } + }, + { + "type": "infix-if-type:gretap", + "name": "gretap-v6", + "if-index": 60, + "admin-status": "up", + "oper-status": "up", + "phys-address": "ae:c7:28:08:7c:ca", + "ietf-ip:ipv4": { + "mtu": 1434 + }, + "ietf-ip:ipv6": { + "mtu": 1434 + }, + "infix-interfaces:gre": { + "local": "2001:db8::1", + "remote": "2001:db8::2" + } + } + ] + } +} diff --git a/test/case/statd/interfaces-all/operational.json b/test/case/statd/interfaces-all/operational.json new file mode 100644 index 00000000..7f9e1c33 --- /dev/null +++ b/test/case/statd/interfaces-all/operational.json @@ -0,0 +1,633 @@ +{ + "ietf-interfaces:interfaces": { + "interface": [ + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "127.0.0.1", + "origin": "static", + "prefix-length": 8 + } + ] + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "::1", + "origin": "static", + "prefix-length": 128 + } + ], + "mtu": 65536 + }, + "if-index": 1, + "name": "lo", + "oper-status": "up", + "phys-address": "00:00:00:00:00:00", + "statistics": { + "in-octets": "420569", + "out-octets": "420569" + }, + "type": "infix-if-type:loopback" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:301", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 2, + "name": "e1", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:01", + "statistics": { + "in-octets": "5654369", + "out-octets": "8200041" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:302", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 3, + "name": "e2", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:02", + "statistics": { + "out-octets": "101161" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 4, + "infix-interfaces:bridge-port": { + "bridge": "br-Q", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + }, + "name": "e3", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "statistics": { + "in-octets": "23589", + "out-octets": "251584" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:304", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 5, + "name": "e4", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:04", + "statistics": { + "in-octets": "30583", + "out-octets": "231318" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:305", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 6, + "name": "e5", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:05", + "statistics": { + "in-octets": "67364", + "out-octets": "105244" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:306", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 7, + "name": "e6", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:06", + "statistics": { + "in-octets": "136295", + "out-octets": "209032" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:307", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 8, + "name": "e7", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:07", + "statistics": { + "in-octets": "70752", + "out-octets": "108022" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 47, + "infix-interfaces:bridge": { + "multicast": { + "querier": "off", + "snooping": false + }, + "multicast-filters": { + "multicast-filter": [] + } + }, + "name": "br-0", + "oper-status": "down", + "phys-address": "00:a0:85:00:03:00", + "type": "infix-if-type:bridge" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 48, + "infix-interfaces:bridge-port": { + "bridge": "br-X", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + }, + "infix-interfaces:vlan": { + "id": 30, + "lower-layer-if": "e2", + "tag-type": "ieee802-dot1q-types:c-vlan" + }, + "name": "e2.30", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:02", + "type": "infix-if-type:vlan" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 49, + "infix-interfaces:bridge": { + "multicast": { + "querier": "off", + "snooping": false + }, + "multicast-filters": { + "multicast-filter": [] + } + }, + "name": "br-X", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "type": "infix-if-type:bridge" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 50, + "infix-interfaces:bridge-port": { + "bridge": "br-Q", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + }, + "infix-interfaces:veth": { + "peer": "veth0a" + }, + "name": "veth0b", + "oper-status": "up", + "phys-address": "e2:f0:55:1b:34:f3", + "statistics": { + "in-octets": "13501" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 51, + "infix-interfaces:veth": { + "peer": "veth0b" + }, + "name": "veth0a", + "oper-status": "up", + "phys-address": "86:2a:11:4e:5d:9f", + "statistics": { + "out-octets": "13501" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 52, + "infix-interfaces:bridge-port": { + "bridge": "br-D", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + }, + "infix-interfaces:vlan": { + "id": 20, + "lower-layer-if": "veth0a", + "tag-type": "ieee802-dot1q-types:c-vlan" + }, + "name": "veth0a.20", + "oper-status": "up", + "phys-address": "86:2a:11:4e:5d:9f", + "statistics": { + "out-octets": "13501" + }, + "type": "infix-if-type:vlan" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "10.0.0.1", + "origin": "static", + "prefix-length": 8 + }, + { + "ip": "192.168.20.1", + "origin": "static", + "prefix-length": 24 + } + ], + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "2001:db8::1", + "origin": "static", + "prefix-length": 64 + }, + { + "ip": "fe80::2a0:85ff:fe00:300", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 53, + "infix-interfaces:bridge": { + "multicast": { + "querier": "off", + "snooping": false + }, + "multicast-filters": { + "multicast-filter": [] + } + }, + "name": "br-D", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "out-octets": "13501" + }, + "type": "infix-if-type:bridge" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 54, + "infix-interfaces:bridge": { + "vlans": { + "proto": "ieee802-dot1q-types:c-vlan", + "vlan": [ + { + "multicast": { + "querier": "off", + "snooping": true + }, + "multicast-filters": { + "multicast-filter": [] + }, + "tagged": [ + "veth0b" + ], + "untagged": [ + "br-Q" + ], + "vid": 10 + }, + { + "multicast": { + "querier": "off", + "snooping": true + }, + "multicast-filters": { + "multicast-filter": [] + }, + "tagged": [ + "e3", + "veth0b" + ], + "untagged": [ + "br-Q" + ], + "vid": 20 + }, + { + "multicast": { + "querier": "off", + "snooping": true + }, + "multicast-filters": { + "multicast-filter": [] + }, + "tagged": [ + "br-Q", + "e3", + "veth0b" + ], + "untagged": [], + "vid": 30 + }, + { + "multicast": { + "querier": "off", + "snooping": true + }, + "multicast-filters": { + "multicast-filter": [] + }, + "tagged": [ + "br-Q", + "e3", + "veth0b" + ], + "untagged": [], + "vid": 40 + } + ] + } + }, + "infix-interfaces:bridge-port": { + "pvid": 10 + }, + "name": "br-Q", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "in-octets": "9469" + }, + "type": "infix-if-type:bridge" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 55, + "infix-interfaces:vlan": { + "id": 40, + "lower-layer-if": "br-Q", + "tag-type": "ieee802-dot1q-types:c-vlan" + }, + "name": "br-Q.40", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "type": "infix-if-type:vlan" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 56, + "infix-interfaces:vlan": { + "id": 10, + "lower-layer-if": "e3", + "tag-type": "ieee802-dot1q-types:c-vlan" + }, + "name": "e3.10", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "type": "infix-if-type:vlan" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1476 + }, + "ietf-ip:ipv6": { + "mtu": 1476 + }, + "if-index": 57, + "infix-interfaces:gre": { + "local": "192.168.20.1", + "remote": "192.168.20.2" + }, + "name": "gre-v4", + "oper-status": "up", + "type": "infix-if-type:gre" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1448 + }, + "ietf-ip:ipv6": { + "mtu": 1448 + }, + "if-index": 58, + "infix-interfaces:gre": { + "local": "2001:db8::1", + "remote": "2001:db8::2" + }, + "name": "gre-v6", + "oper-status": "up", + "type": "infix-if-type:gre" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1462 + }, + "ietf-ip:ipv6": { + "mtu": 1462 + }, + "if-index": 59, + "infix-interfaces:gre": { + "local": "192.168.20.1", + "remote": "192.168.20.2" + }, + "name": "gretap-v4", + "oper-status": "up", + "phys-address": "1e:9d:e1:46:5d:9e", + "type": "infix-if-type:gretap" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1434 + }, + "ietf-ip:ipv6": { + "mtu": 1434 + }, + "if-index": 60, + "infix-interfaces:gre": { + "local": "2001:db8::1", + "remote": "2001:db8::2" + }, + "name": "gretap-v6", + "oper-status": "up", + "phys-address": "ae:c7:28:08:7c:ca", + "type": "infix-if-type:gretap" + } + ] + } +} diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-0/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-0/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-0/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-D/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-D/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-D/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-Q.40/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-Q.40/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-Q.40/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-Q/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-Q/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-Q/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-X/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-X/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/br-X/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e2.30/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e2.30/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e2.30/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e3.10/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e3.10/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e3.10/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gre-v4/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gre-v4/mtu new file mode 100644 index 00000000..0d4b7f59 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gre-v4/mtu @@ -0,0 +1 @@ +1476 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gre-v6/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gre-v6/mtu new file mode 100644 index 00000000..a3cd1167 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gre-v6/mtu @@ -0,0 +1 @@ +1448 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gretap-v4/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gretap-v4/mtu new file mode 100644 index 00000000..ac48d993 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gretap-v4/mtu @@ -0,0 +1 @@ +1462 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gretap-v6/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gretap-v6/mtu new file mode 100644 index 00000000..a2f103a0 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/gretap-v6/mtu @@ -0,0 +1 @@ +1434 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu new file mode 100644 index 00000000..e2ed8f4d --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu @@ -0,0 +1 @@ +65536 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0a.20/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0a.20/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0a.20/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0a/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0a/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0a/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0b/mtu b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0b/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/interfaces-all/system/rootfs/proc/sys/net/ipv6/conf/veth0b/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-0 b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-0 new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-0 @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-D b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-D new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-D @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_10 b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_10 new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_10 @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_20 b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_20 new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_20 @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_30 b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_30 new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_30 @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_40 b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_40 new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-Q_vid_40 @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-X b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-X new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_mdb_show_dev_br-X @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_vlan_global_show_dev_br-Q b/test/case/statd/interfaces-all/system/run/bridge_-j_vlan_global_show_dev_br-Q new file mode 100644 index 00000000..a8e601bd --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_vlan_global_show_dev_br-Q @@ -0,0 +1 @@ +[{"ifname":"br-Q","vlans":[{"vlan":10,"mcast_snooping":1,"mcast_querier":0,"mcast_igmp_version":2,"mcast_mld_version":1,"mcast_last_member_count":2,"mcast_last_member_interval":100,"mcast_startup_query_count":2,"mcast_startup_query_interval":3124,"mcast_membership_interval":26000,"mcast_querier_interval":25500,"mcast_query_interval":12500,"mcast_query_response_interval":1000,"msti":0},{"vlan":20,"mcast_snooping":1,"mcast_querier":0,"mcast_igmp_version":2,"mcast_mld_version":1,"mcast_last_member_count":2,"mcast_last_member_interval":100,"mcast_startup_query_count":2,"mcast_startup_query_interval":3124,"mcast_membership_interval":26000,"mcast_querier_interval":25500,"mcast_query_interval":12500,"mcast_query_response_interval":1000,"msti":0},{"vlan":30,"mcast_snooping":1,"mcast_querier":0,"mcast_igmp_version":2,"mcast_mld_version":1,"mcast_last_member_count":2,"mcast_last_member_interval":100,"mcast_startup_query_count":2,"mcast_startup_query_interval":3124,"mcast_membership_interval":26000,"mcast_querier_interval":25500,"mcast_query_interval":12500,"mcast_query_response_interval":1000,"msti":0},{"vlan":40,"mcast_snooping":1,"mcast_querier":0,"mcast_igmp_version":2,"mcast_mld_version":1,"mcast_last_member_count":2,"mcast_last_member_interval":100,"mcast_startup_query_count":2,"mcast_startup_query_interval":3124,"mcast_membership_interval":26000,"mcast_querier_interval":25500,"mcast_query_interval":12500,"mcast_query_response_interval":1000,"msti":0}]}] diff --git a/test/case/statd/interfaces-all/system/run/bridge_-j_vlan_show b/test/case/statd/interfaces-all/system/run/bridge_-j_vlan_show new file mode 100644 index 00000000..b894d184 --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/bridge_-j_vlan_show @@ -0,0 +1 @@ +[{"ifname":"e3","vlans":[{"vlan":20},{"vlan":30},{"vlan":40}]},{"ifname":"veth0b","vlans":[{"vlan":10},{"vlan":20},{"vlan":30},{"vlan":40}]},{"ifname":"br-Q","vlans":[{"vlan":10,"flags":["PVID","Egress Untagged"]},{"vlan":20,"flags":["Egress Untagged"]},{"vlan":30},{"vlan":40}]}] diff --git a/test/case/statd/interfaces-all/system/run/ip_-j_addr_show b/test/case/statd/interfaces-all/system/run/ip_-j_addr_show new file mode 100644 index 00000000..ed92a928 --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/ip_-j_addr_show @@ -0,0 +1 @@ +[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UP","group":"iface","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","addr_info":[{"family":"inet","local":"127.0.0.1","prefixlen":8,"scope":"host","protocol":"static","label":"lo","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"::1","prefixlen":128,"scope":"host","protocol":"static","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":2,"ifname":"e1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:01","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:301","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":3,"ifname":"e2","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:302","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":4,"ifname":"e3","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br-Q","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":5,"ifname":"e4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:304","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":6,"ifname":"e5","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:05","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:305","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":7,"ifname":"e6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:06","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:306","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":8,"ifname":"e7","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:07","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:307","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":47,"ifname":"br-0","flags":["NO-CARRIER","BROADCAST","MULTICAST","UP"],"mtu":1500,"qdisc":"noqueue","operstate":"DOWN","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":48,"link":"e2","ifname":"e2.30","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br-X","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":49,"ifname":"br-X","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":50,"link":"veth0a","ifname":"veth0b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br-Q","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"e2:f0:55:1b:34:f3","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":51,"link":"veth0b","ifname":"veth0a","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"86:2a:11:4e:5d:9f","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":52,"link":"veth0a","ifname":"veth0a.20","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br-D","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"86:2a:11:4e:5d:9f","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":53,"ifname":"br-D","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet","local":"10.0.0.1","prefixlen":8,"scope":"global","protocol":"static","label":"br-D","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet","local":"192.168.20.1","prefixlen":24,"scope":"global","protocol":"static","label":"br-D","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"2001:db8::1","prefixlen":64,"scope":"global","protocol":"static","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"fe80::2a0:85ff:fe00:300","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":54,"ifname":"br-Q","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":55,"link":"br-Q","ifname":"br-Q.40","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":56,"link":"e3","ifname":"e3.10","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":57,"link":null,"ifname":"gre-v4","flags":["POINTOPOINT","NOARP","UP","LOWER_UP"],"mtu":1476,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"gre","address":"192.168.20.1","link_pointtopoint":true,"broadcast":"192.168.20.2","addr_info":[]},{"ifindex":58,"link":null,"ifname":"gre-v6","flags":["POINTOPOINT","NOARP","UP","LOWER_UP"],"mtu":1448,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"gre6","address":"2001:db8::1","link_pointtopoint":true,"broadcast":"2001:db8::2","permaddr":"a25:b1c4:4786::","addr_info":[]},{"ifindex":59,"link":null,"ifname":"gretap-v4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1462,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"1e:9d:e1:46:5d:9e","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":60,"link":null,"ifname":"gretap-v6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1434,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"ae:c7:28:08:7c:ca","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]}] diff --git a/test/case/statd/interfaces-all/system/run/ip_-s_-d_-j_link_show b/test/case/statd/interfaces-all/system/run/ip_-s_-d_-j_link_show new file mode 100644 index 00000000..732ffd94 --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/ip_-s_-d_-j_link_show @@ -0,0 +1 @@ +[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"iface","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":0,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":420569,"packets":1348,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":420569,"packets":1348,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":2,"ifname":"e1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:01","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio0","stats64":{"rx":{"bytes":5654369,"packets":25555,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":8200041,"packets":21596,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":3,"ifname":"e2","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio1","stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":101161,"packets":265,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":4,"ifname":"e3","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br-Q","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8001","no":"0x1","designated_port":32769,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":12.03,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio2","stats64":{"rx":{"bytes":23589,"packets":129,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":251584,"packets":1303,"errors":0,"dropped":1,"carrier_errors":0,"collisions":0}}},{"ifindex":5,"ifname":"e4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio3","stats64":{"rx":{"bytes":30583,"packets":153,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":231318,"packets":1261,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":6,"ifname":"e5","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:05","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio4","stats64":{"rx":{"bytes":67364,"packets":199,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":105244,"packets":275,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":7,"ifname":"e6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:06","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio5","stats64":{"rx":{"bytes":136295,"packets":1009,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":209032,"packets":1188,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":8,"ifname":"e7","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:07","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio6","stats64":{"rx":{"bytes":70752,"packets":202,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":108022,"packets":283,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":47,"ifname":"br-0","flags":["NO-CARRIER","BROADCAST","MULTICAST","UP"],"mtu":1500,"qdisc":"noqueue","operstate":"DOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bridge","info_data":{"forward_delay":1500,"hello_time":200,"max_age":2000,"ageing_time":30000,"stp_state":0,"priority":32768,"vlan_filtering":0,"vlan_protocol":"802.1Q","bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","root_port":0,"root_path_cost":0,"topology_change":0,"topology_change_detected":0,"hello_timer":0.00,"tcn_timer":0.00,"topology_change_timer":0.00,"gc_timer":295.85,"fdb_n_learned":0,"fdb_max_learned":0,"vlan_default_pvid":0,"vlan_stats_enabled":0,"vlan_stats_per_port":0,"group_fwd_mask":"0","group_addr":"01:80:c2:00:00:00","mcast_snooping":0,"no_linklocal_learn":0,"mcast_vlan_snooping":0,"mst_enabled":0,"mcast_flood_always":1,"mcast_router":1,"mcast_query_use_ifaddr":0,"mcast_querier":0,"mcast_hash_elasticity":16,"mcast_hash_max":4096,"mcast_last_member_cnt":2,"mcast_startup_query_cnt":2,"mcast_last_member_intvl":100,"mcast_membership_intvl":26000,"mcast_querier_intvl":25500,"mcast_query_intvl":12500,"mcast_query_response_intvl":1000,"mcast_startup_query_intvl":3124,"mcast_stats_enabled":0,"mcast_igmp_version":2,"mcast_mld_version":1,"nf_call_iptables":0,"nf_call_ip6tables":0,"nf_call_arptables":0}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":48,"link":"e2","ifname":"e2.30","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br-X","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":0,"max_mtu":65535,"linkinfo":{"info_kind":"vlan","info_data":{"protocol":"802.1Q","id":30,"flags":["REORDER_HDR"]},"info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8001","no":"0x1","designated_port":32769,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":11.05,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":49,"ifname":"br-X","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bridge","info_data":{"forward_delay":1500,"hello_time":200,"max_age":2000,"ageing_time":30000,"stp_state":0,"priority":32768,"vlan_filtering":0,"vlan_protocol":"802.1Q","bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","root_port":0,"root_path_cost":0,"topology_change":0,"topology_change_detected":0,"hello_timer":0.00,"tcn_timer":0.00,"topology_change_timer":0.00,"gc_timer":296.15,"fdb_n_learned":0,"fdb_max_learned":0,"vlan_default_pvid":0,"vlan_stats_enabled":0,"vlan_stats_per_port":0,"group_fwd_mask":"0","group_addr":"01:80:c2:00:00:00","mcast_snooping":0,"no_linklocal_learn":0,"mcast_vlan_snooping":0,"mst_enabled":0,"mcast_flood_always":1,"mcast_router":1,"mcast_query_use_ifaddr":0,"mcast_querier":0,"mcast_hash_elasticity":16,"mcast_hash_max":4096,"mcast_last_member_cnt":2,"mcast_startup_query_cnt":2,"mcast_last_member_intvl":100,"mcast_membership_intvl":26000,"mcast_querier_intvl":25500,"mcast_query_intvl":12500,"mcast_query_response_intvl":1000,"mcast_startup_query_intvl":3124,"mcast_stats_enabled":0,"mcast_igmp_version":2,"mcast_mld_version":1,"nf_call_iptables":0,"nf_call_ip6tables":0,"nf_call_arptables":0}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":50,"link":"veth0a","ifname":"veth0b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br-Q","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"e2:f0:55:1b:34:f3","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth","info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":2,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8002","no":"0x2","designated_port":32770,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":12.03,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":13501,"packets":23,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":51,"link":"veth0b","ifname":"veth0a","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"86:2a:11:4e:5d:9f","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth"},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":13501,"packets":23,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":52,"link":"veth0a","ifname":"veth0a.20","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br-D","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"86:2a:11:4e:5d:9f","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":0,"max_mtu":65535,"linkinfo":{"info_kind":"vlan","info_data":{"protocol":"802.1Q","id":20,"flags":["REORDER_HDR"]},"info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":2,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8001","no":"0x1","designated_port":32769,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":12.02,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":13501,"packets":23,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":53,"ifname":"br-D","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bridge","info_data":{"forward_delay":1500,"hello_time":200,"max_age":2000,"ageing_time":30000,"stp_state":0,"priority":32768,"vlan_filtering":0,"vlan_protocol":"802.1Q","bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","root_port":0,"root_path_cost":0,"topology_change":0,"topology_change_detected":0,"hello_timer":0.00,"tcn_timer":0.00,"topology_change_timer":0.00,"gc_timer":296.70,"fdb_n_learned":0,"fdb_max_learned":0,"vlan_default_pvid":0,"vlan_stats_enabled":0,"vlan_stats_per_port":0,"group_fwd_mask":"0","group_addr":"01:80:c2:00:00:00","mcast_snooping":0,"no_linklocal_learn":0,"mcast_vlan_snooping":0,"mst_enabled":0,"mcast_flood_always":1,"mcast_router":1,"mcast_query_use_ifaddr":0,"mcast_querier":0,"mcast_hash_elasticity":16,"mcast_hash_max":4096,"mcast_last_member_cnt":2,"mcast_startup_query_cnt":2,"mcast_last_member_intvl":100,"mcast_membership_intvl":26000,"mcast_querier_intvl":25500,"mcast_query_intvl":12500,"mcast_query_response_intvl":1000,"mcast_startup_query_intvl":3124,"mcast_stats_enabled":0,"mcast_igmp_version":2,"mcast_mld_version":1,"nf_call_iptables":0,"nf_call_ip6tables":0,"nf_call_arptables":0}},"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":13501,"packets":23,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":54,"ifname":"br-Q","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bridge","info_data":{"forward_delay":1500,"hello_time":200,"max_age":2000,"ageing_time":30000,"stp_state":0,"priority":32768,"vlan_filtering":1,"vlan_protocol":"802.1Q","bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","root_port":0,"root_path_cost":0,"topology_change":0,"topology_change_detected":0,"hello_timer":0.00,"tcn_timer":0.00,"topology_change_timer":0.00,"gc_timer":297.13,"fdb_n_learned":0,"fdb_max_learned":0,"vlan_default_pvid":0,"vlan_stats_enabled":0,"vlan_stats_per_port":0,"group_fwd_mask":"0","group_addr":"01:80:c2:00:00:00","mcast_snooping":0,"no_linklocal_learn":0,"mcast_vlan_snooping":0,"mst_enabled":0,"mcast_flood_always":1,"mcast_router":1,"mcast_query_use_ifaddr":0,"mcast_querier":0,"mcast_hash_elasticity":16,"mcast_hash_max":4096,"mcast_last_member_cnt":2,"mcast_startup_query_cnt":2,"mcast_last_member_intvl":100,"mcast_membership_intvl":26000,"mcast_querier_intvl":25500,"mcast_query_intvl":12500,"mcast_query_response_intvl":1000,"mcast_startup_query_intvl":3124,"mcast_stats_enabled":0,"mcast_igmp_version":2,"mcast_mld_version":1,"nf_call_iptables":0,"nf_call_ip6tables":0,"nf_call_arptables":0}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":9469,"packets":15,"errors":0,"dropped":0,"over_errors":0,"multicast":15},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":55,"link":"br-Q","ifname":"br-Q.40","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"linkinfo":{"info_kind":"vlan","info_data":{"protocol":"802.1Q","id":40,"flags":["REORDER_HDR"]}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":56,"link":"e3","ifname":"e3.10","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"linkinfo":{"info_kind":"vlan","info_data":{"protocol":"802.1Q","id":10,"flags":["REORDER_HDR"]}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":57,"link":null,"ifname":"gre-v4","flags":["POINTOPOINT","NOARP","UP","LOWER_UP"],"mtu":1476,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"gre","address":"192.168.20.1","link_pointtopoint":true,"broadcast":"192.168.20.2","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":0,"linkinfo":{"info_kind":"gre","info_data":{"remote":"192.168.20.2","local":"192.168.20.1","ttl":0,"pmtudisc":true}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":58,"link":null,"ifname":"gre-v6","flags":["POINTOPOINT","NOARP","UP","LOWER_UP"],"mtu":1448,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"gre6","address":"2001:db8::1","link_pointtopoint":true,"broadcast":"2001:db8::2","permaddr":"a25:b1c4:4786::","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":0,"linkinfo":{"info_kind":"ip6gre","info_data":{"remote":"2001:db8::2","local":"2001:db8::1","ttl":64,"encap_limit":4,"tclass":"0x00","flowlabel":"0x00000"}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":59,"link":null,"ifname":"gretap-v4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1462,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"1e:9d:e1:46:5d:9e","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":0,"linkinfo":{"info_kind":"gretap","info_data":{"remote":"192.168.20.2","local":"192.168.20.1","ttl":0,"pmtudisc":true}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":60,"link":null,"ifname":"gretap-v6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1434,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"ae:c7:28:08:7c:ca","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":0,"linkinfo":{"info_kind":"ip6gretap","info_data":{"remote":"2001:db8::2","local":"2001:db8::1","ttl":64,"encap_limit":4,"tclass":"0x00","flowlabel":"0x00000"}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}}] diff --git a/test/case/statd/interfaces-all/system/run/podman_ps_-a_--format=json b/test/case/statd/interfaces-all/system/run/podman_ps_-a_--format=json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/test/case/statd/interfaces-all/system/run/podman_ps_-a_--format=json @@ -0,0 +1 @@ +[] diff --git a/test/case/statd/interfaces-all/test b/test/case/statd/interfaces-all/test new file mode 100755 index 00000000..5dcd1b8d --- /dev/null +++ b/test/case/statd/interfaces-all/test @@ -0,0 +1,11 @@ +#!/bin/sh + +yang_models="ietf-interfaces" + +gen_test=ietf_interfaces/verify_all_interface_types/test.py +gen_iface=d3a + +cli_commands="show-interfaces" + +. $(readlink -f $(dirname $0)/../test.sh) +main "$@" diff --git a/test/case/statd/test.sh b/test/case/statd/test.sh new file mode 100644 index 00000000..dd15ca43 --- /dev/null +++ b/test/case/statd/test.sh @@ -0,0 +1,336 @@ +set -e + +usage() +{ + local me="$(basename $0)" + + cat <] + +Verify that yanger produces the expected operational data for +$yang_models, and that cli_pretty produces the expected output for +$cli_commands. + + Commands: + If no command is specified it defaults to "check" + + gen + (Re)generate system state, operational.json and expected + cli_pretty output based on $gen_test + + check + Check yanger and CLI output + + yanger gen + Run $gen_test and capture the system status from the Infix + device behind $gen_iface + + yanger check + Verify that yanger produces the operational data previously + recorded in operational.json + + yanger live + Produce the operational data for $yang_models from the Infix + device behind $gen_iface, and write it to stdout + + cli gen + Update the expected output of $cli_commands from the current + operational.json + + cli check + Verify that cli_pretty produces the expected output for + $cli_commands, based on the current operational.json + +EOF +} + +casedir=$(readlink -f $(dirname $0)) +ixdir=$(readlink -f $casedir/../../../../) + +YANGER=${YANGER:-$ixdir/src/statd/python/yanger/yanger} +CLI=${CLI:-$ixdir/src/statd/python/cli_pretty/cli_pretty.py} + +wrapper="$ixdir/utils/ixll -A ssh $gen_iface sudo" + +# Make sure topology matchings are stable since we capture system +# states by referencing a _physical_ interface, which must match the +# expected _logical_ node. +export PYTHONHASHSEED=0 + +exitcode=0 +n_steps=0 +step() +{ + local status="$1" + shift + + if [ "$status" != "ok" ]; then + exitcode=1 + fi + + n_steps=$((n_steps+1)) + echo "$status $n_steps - $*" +} + +plan() +{ + echo "$n_steps..$n_steps" + exit $exitcode +} + +prepare_infamy_test() +{ + $ixdir/test/case/meta/wait.py && \ + $ixdir/test/case/$1 +} + +yanger_exec() +{ + local opts= + while getopts "w:t:" opt; do + case ${opt} in + w) + opts="$opts -w \"$OPTARG\"" + ;; + t) + opts="$opts -t \"$OPTARG\"" + ;; + esac + done + shift $((OPTIND - 1)) + + eval "$YANGER" $opts "$1" +} + +yanger_gen() +{ + local operfiles= + + if type gen_exec &>/dev/null; then + gen_exec + return + fi + + if ! [ "$gen_test" ] && [ "$gen_iface" ]; then + echo "!!! Not implemented" >&2 + false + fi + + echo ">>> RUNNING $gen_test" >&2 + prepare_infamy_test "$gen_test" + set $yang_models + while [ $# -gt 0 ]; do + echo ">>> CAPTURING $1 from $gen_iface" >&2 + yanger_exec \ + -t "$casedir/system" \ + -w "$wrapper" \ + $1 \ + >"$casedir/$1.json" + operfiles="$operfiles $casedir/$1.json" + echo ">>> OK" >&2 + shift + done + + echo ">>> GENERATING operational.json" >&2 + cat $operfiles | jq --slurp --sort-keys \ + 'reduce .[] as $item ({}; . * $item)' \ + >"$casedir/operational.json" + echo ">>> OK" >&2 +} + +yanger_check() +{ + local status= + local diff=$(mktemp) + + set $yang_models + while [ $# -gt 0 ]; do + status="ok" + if ! diff -up \ + "$casedir/$1.json" \ + <(yanger_exec -t "$casedir/system" $1) \ + >"$diff"; then + cat $diff | sed 's/^/# /' + status="not ok" + fi + + rm $diff + step "$status" \ + "yanger output of \"$1\" matches $1.json" + shift + done +} + +yanger_cat() +{ + if [ $# -eq 0 ]; then + set $yang_models + fi + + while [ $# -gt 0 ]; do + yanger_exec -t "$casedir/system" $1 + shift + done +} + +yanger_live() +{ + if [ $# -eq 0 ]; then + set $yang_models + fi + + while [ $# -gt 0 ]; do + yanger_exec -w "$wrapper" $1 + shift + done +} + +yanger() +{ + local cmd=check + + if [ $# -gt 0 ]; then + cmd="$1" + shift + fi + + case "$cmd" in + cat|gen|live) + "yanger_$cmd" "$@" + return + ;; + check) + yanger_check "$@" + plan + esac + + false +} + + +cli_exec() +{ + $CLI -t $(echo "$1" | tr '_' ' ') +} + +cli_gen() +{ + mkdir -p "$casedir/cli" + + set $cli_commands + while [ $# -gt 0 ]; do + cli_exec "$1" <"$casedir/operational.json" >"$casedir/cli/$1" + shift + done +} + +cli_check() +{ + local diff= + local status= + + set $cli_commands + while [ $# -gt 0 ]; do + diff="$(mktemp)" + status="ok" + if ! diff -up \ + "$casedir/cli/$1" \ + <(cli_exec "$1" <"$casedir/operational.json") \ + >"$diff"; then + cat $diff | sed 's/^/# /' + status="not ok" + fi + rm $diff + step "$status" \ + "cli output of \"$1\" matches cli/$1" + + shift + done +} + +cli_cat() +{ + if [ $# -eq 0 ]; then + set $cli_commands + fi + + while [ $# -gt 0 ]; do + echo ">>> Running $1" >&2 + cli_exec "$1" <"$casedir/operational.json" + shift + done +} + +cli_live() +{ + local json=$(mktemp) + echo ">>> Capturing live state" >&2 + yanger_live >$json + echo ">>> OK" >&2 + + if [ $# -eq 0 ]; then + set $cli_commands + fi + + while [ $# -gt 0 ]; do + echo ">>> Running $1" >&2 + cli_exec "$1" <"$casedir/cli/$1" + shift + done + + rm $json +} + +cli() +{ + local cmd=check + + if [ $# -gt 0 ]; then + cmd="$1" + shift + fi + + case "$cmd" in + cat|gen|live) + "cli_$cmd" "$@" + return + ;; + check) + cli_check "$@" + plan + ;; + esac + + false +} + +main() +{ + local cmd=check + + if [ $# -gt 0 ]; then + cmd="$1" + shift + fi + + case $cmd in + gen) + yanger gen && cli gen + ;; + check) + yanger_check && cli_check + plan + ;; + yanger|cli) + "$cmd" "$@" + ;; + -h|--help|help) + usage + ;; + *) + echo "!!! Unknown command \"$cmd\"" >&2 + usage >&2 + exit 1 + ;; + esac +} From 9879e8b685b987428e691e5edb582cb4b09aa8d8 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Fri, 17 Jan 2025 14:32:58 +0100 Subject: [PATCH 11/14] test: statd: Add unittest for containers --- test/case/statd/all.yaml | 2 + .../case/statd/containers/cli/show-interfaces | 41 + .../cli/show-routing-table_--ip_ipv4 | 12 + .../cli/show-routing-table_--ip_ipv6 | 7 + .../statd/containers/ietf-interfaces.json | 642 +++++++++ test/case/statd/containers/ietf-ospf.json | 139 ++ test/case/statd/containers/ietf-routing.json | 325 +++++ .../statd/containers/infix-containers.json | 60 + test/case/statd/containers/operational.json | 1158 +++++++++++++++++ .../rootfs/proc/sys/net/ipv6/conf/br0/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/br1/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e1/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e2/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e3.8/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e3/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e4.8/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e4/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e5/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e6/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e7/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/eth0/mtu | 0 .../rootfs/proc/sys/net/ipv6/conf/eth1/mtu | 0 .../rootfs/proc/sys/net/ipv6/conf/lo/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/veth0b/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/veth1b/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/veth2b/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/veth3b/mtu | 1 + .../system/run/+usr+libexec+statd+ospf-status | 1 + .../run/bridge_-j_mdb_show_dev_br0_vid_1 | 1 + .../run/bridge_-j_mdb_show_dev_br1_vid_6 | 1 + .../run/bridge_-j_vlan_global_show_dev_br0 | 1 + .../run/bridge_-j_vlan_global_show_dev_br1 | 1 + .../containers/system/run/bridge_-j_vlan_show | 1 + .../containers/system/run/ip_-j_addr_show | 1 + .../containers/system/run/ip_-j_netns_list | 1 + .../system/run/ip_-s_-d_-j_link_show | 1 + ...71e0-81b6d69cd910_ip_-j_addr_show_dev_eth0 | 1 + ...71e0-81b6d69cd910_ip_-j_addr_show_dev_eth1 | 1 + ...2c-71e0-81b6d69cd910_ip_-s_-d_-j_link_show | 1 + ...-728b-46c24d727874_ip_-j_addr_show_dev_br0 | 1 + ...-728b-46c24d727874_ip_-j_addr_show_dev_br1 | 1 + ...1b-728b-46c24d727874_ip_-s_-d_-j_link_show | 1 + .../system/run/podman_inspect_container-A | 348 +++++ .../system/run/podman_inspect_container-B | 368 ++++++ .../system/run/podman_inspect_firewall | 359 +++++ .../system/run/podman_ps_-a_--format=json | 132 ++ .../run/vtysh_-c_show-ip-ospf-route-json | 1 + .../system/run/vtysh_-c_show-ip-route-json | 1 + .../system/run/vtysh_-c_show-ipv6-route-json | 1 + test/case/statd/containers/system/timestamp | 2 + test/case/statd/containers/test | 13 + 51 files changed, 3642 insertions(+) create mode 100644 test/case/statd/containers/cli/show-interfaces create mode 100644 test/case/statd/containers/cli/show-routing-table_--ip_ipv4 create mode 100644 test/case/statd/containers/cli/show-routing-table_--ip_ipv6 create mode 100644 test/case/statd/containers/ietf-interfaces.json create mode 100644 test/case/statd/containers/ietf-ospf.json create mode 100644 test/case/statd/containers/ietf-routing.json create mode 100644 test/case/statd/containers/infix-containers.json create mode 100644 test/case/statd/containers/operational.json create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/br0/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/br1/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e3.8/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e4.8/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/eth0/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/eth1/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth0b/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth1b/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth2b/mtu create mode 100644 test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth3b/mtu create mode 100644 test/case/statd/containers/system/run/+usr+libexec+statd+ospf-status create mode 100644 test/case/statd/containers/system/run/bridge_-j_mdb_show_dev_br0_vid_1 create mode 100644 test/case/statd/containers/system/run/bridge_-j_mdb_show_dev_br1_vid_6 create mode 100644 test/case/statd/containers/system/run/bridge_-j_vlan_global_show_dev_br0 create mode 100644 test/case/statd/containers/system/run/bridge_-j_vlan_global_show_dev_br1 create mode 100644 test/case/statd/containers/system/run/bridge_-j_vlan_show create mode 100644 test/case/statd/containers/system/run/ip_-j_addr_show create mode 100644 test/case/statd/containers/system/run/ip_-j_netns_list create mode 100644 test/case/statd/containers/system/run/ip_-s_-d_-j_link_show create mode 100644 test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-j_addr_show_dev_eth0 create mode 100644 test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-j_addr_show_dev_eth1 create mode 100644 test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-s_-d_-j_link_show create mode 100644 test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-j_addr_show_dev_br0 create mode 100644 test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-j_addr_show_dev_br1 create mode 100644 test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-s_-d_-j_link_show create mode 100644 test/case/statd/containers/system/run/podman_inspect_container-A create mode 100644 test/case/statd/containers/system/run/podman_inspect_container-B create mode 100644 test/case/statd/containers/system/run/podman_inspect_firewall create mode 100644 test/case/statd/containers/system/run/podman_ps_-a_--format=json create mode 100644 test/case/statd/containers/system/run/vtysh_-c_show-ip-ospf-route-json create mode 100644 test/case/statd/containers/system/run/vtysh_-c_show-ip-route-json create mode 100644 test/case/statd/containers/system/run/vtysh_-c_show-ipv6-route-json create mode 100644 test/case/statd/containers/system/timestamp create mode 100755 test/case/statd/containers/test diff --git a/test/case/statd/all.yaml b/test/case/statd/all.yaml index 3c04c566..cc2589d5 100644 --- a/test/case/statd/all.yaml +++ b/test/case/statd/all.yaml @@ -1,3 +1,5 @@ --- +- case: containers/test + name: "containers" - case: interfaces-all/test name: "interfaces-all" diff --git a/test/case/statd/containers/cli/show-interfaces b/test/case/statd/containers/cli/show-interfaces new file mode 100644 index 00000000..1a02ceb9 --- /dev/null +++ b/test/case/statd/containers/cli/show-interfaces @@ -0,0 +1,41 @@ +INTERFACE PROTOCOL STATE DATA  +lo ethernet UP 00:00:00:00:00:00 + ipv4 127.0.0.1/8 (static) + ipv6 ::1/128 (static) +br0 bridge  vlan:1u pvid:1 +│ ethernet UP 00:a0:85:00:03:00 +│ ipv4 169.254.1.1/16 (random) +│ ipv6 fe80::2a0:85ff:fe00:300/64 (link-layer) +├ e3 bridge FORWARDING vlan:1u pvid:1 +├ e4 bridge FORWARDING vlan:1u pvid:1 +├ veth0b bridge FORWARDING vlan:1u pvid:1 +└ veth2b bridge FORWARDING vlan:1u pvid:1 +br1 bridge   +│ ethernet UP 00:a0:85:00:03:00 +├ veth1b bridge FORWARDING vlan:6u pvid:6 +└ veth3b bridge FORWARDING  +e1 ethernet UP 00:a0:85:00:03:01 + ipv6 fe80::2a0:85ff:fe00:301/64 (link-layer) +e2 ethernet UP 00:a0:85:00:03:02 + ipv6 fe80::2a0:85ff:fe00:302/64 (link-layer) +e3.8 ethernet UP 00:a0:85:00:03:03 +│ ipv4 10.1.1.1/32 (static) +└ e3 ethernet UP 00:a0:85:00:03:03 +e4.8 ethernet UP 00:a0:85:00:03:04 +│ ipv4 10.1.1.1/32 (static) +└ e4 ethernet UP 00:a0:85:00:03:04 +e5 ethernet UP 00:a0:85:00:03:05 + ipv6 fe80::2a0:85ff:fe00:305/64 (link-layer) +e6 ethernet UP 00:a0:85:00:03:06 + ipv4 10.1.1.101/24 (static) + ipv6 fe80::2a0:85ff:fe00:306/64 (link-layer) +e7 ethernet UP 00:a0:85:00:03:07 + ipv6 fe80::2a0:85ff:fe00:307/64 (link-layer) +veth0a container container-A  +veth0b ethernet UP c2:61:ae:82:0a:c1 +veth1a container container-A  +veth1b ethernet UP e6:c6:34:dc:b9:f4 +veth2a container container-B  +veth2b ethernet UP 96:8b:c6:17:74:d3 +veth3a container container-B  +veth3b ethernet UP 0e:c3:01:d6:e6:ea diff --git a/test/case/statd/containers/cli/show-routing-table_--ip_ipv4 b/test/case/statd/containers/cli/show-routing-table_--ip_ipv4 new file mode 100644 index 00000000..bcf4ffa3 --- /dev/null +++ b/test/case/statd/containers/cli/show-routing-table_--ip_ipv4 @@ -0,0 +1,12 @@ + DESTINATION PREF NEXT-HOP PROTO UPTIME +>* 0.0.0.0/0 110/2 10.1.1.100 ospfv2 01:59:57 + 0.0.0.0/0 254/0 br0 static 02:00:37 + 10.1.1.0/24 110/1 e6 ospfv2 02:00:07 +>* 10.1.1.0/24 0/0 e6 direct 02:00:51 + * 10.1.1.1/32 0/0 e4.8 direct 02:00:52 +>* 10.1.1.1/32 0/0 e3.8 direct 02:00:52 +>* 10.1.2.0/24 110/2 10.1.1.100 ospfv2 01:59:57 + * 10.1.2.1 +>* 10.1.3.0/24 110/2 10.1.1.100 ospfv2 01:59:57 + * 10.1.3.1 +>* 169.254.0.0/16 0/0 br0 direct 02:00:46 diff --git a/test/case/statd/containers/cli/show-routing-table_--ip_ipv6 b/test/case/statd/containers/cli/show-routing-table_--ip_ipv6 new file mode 100644 index 00000000..4006d7cf --- /dev/null +++ b/test/case/statd/containers/cli/show-routing-table_--ip_ipv6 @@ -0,0 +1,7 @@ + DESTINATION PREF NEXT-HOP PROTO UPTIME + * fe80::/64 0/0 e6 direct 02:00:50 + * fe80::/64 0/0 br0 direct 02:00:50 + * fe80::/64 0/0 e5 direct 03:54:57 + * fe80::/64 0/0 e7 direct 03:54:57 + * fe80::/64 0/0 e2 direct 03:54:57 +>* fe80::/64 0/0 e1 direct 03:54:57 diff --git a/test/case/statd/containers/ietf-interfaces.json b/test/case/statd/containers/ietf-interfaces.json new file mode 100644 index 00000000..2142b735 --- /dev/null +++ b/test/case/statd/containers/ietf-interfaces.json @@ -0,0 +1,642 @@ +{ + "ietf-interfaces:interfaces": { + "interface": [ + { + "type": "infix-if-type:loopback", + "name": "lo", + "if-index": 1, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:00:00:00:00:00", + "statistics": { + "in-octets": "72275", + "out-octets": "72275" + }, + "ietf-ip:ipv4": { + "address": [ + { + "ip": "127.0.0.1", + "prefix-length": 8, + "origin": "static" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 65536, + "address": [ + { + "ip": "::1", + "prefix-length": 128, + "origin": "static" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e1", + "if-index": 2, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:01", + "statistics": { + "in-octets": "5166282", + "out-octets": "7407399" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:301", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e2", + "if-index": 3, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:02", + "statistics": { + "out-octets": "79382" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:302", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e3", + "if-index": 4, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "statistics": { + "in-octets": "23589", + "out-octets": "208789" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "pvid": 1, + "bridge": "br0", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e4", + "if-index": 5, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:04", + "statistics": { + "in-octets": "30583", + "out-octets": "206341" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "pvid": 1, + "bridge": "br0", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e5", + "if-index": 6, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:05", + "statistics": { + "in-octets": "66626", + "out-octets": "83465" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:305", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e6", + "if-index": 7, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:06", + "statistics": { + "in-octets": "134367", + "out-octets": "184122" + }, + "ietf-ip:ipv4": { + "mtu": 1500, + "address": [ + { + "ip": "10.1.1.101", + "prefix-length": 24, + "origin": "static" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:306", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e7", + "if-index": 8, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:07", + "statistics": { + "in-octets": "70368", + "out-octets": "86243" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:307", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:veth", + "name": "veth0b", + "if-index": 22, + "admin-status": "up", + "oper-status": "up", + "phys-address": "c2:61:ae:82:0a:c1", + "statistics": { + "in-octets": "1583", + "out-octets": "28383" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "pvid": 1, + "bridge": "br0", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:veth", + "name": "veth2b", + "if-index": 24, + "admin-status": "up", + "oper-status": "up", + "phys-address": "96:8b:c6:17:74:d3", + "statistics": { + "in-octets": "796", + "out-octets": "28028" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "pvid": 1, + "bridge": "br0", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:bridge", + "name": "br0", + "if-index": 25, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "in-octets": "3285", + "out-octets": "28281" + }, + "ietf-ip:ipv4": { + "mtu": 1500, + "address": [ + { + "ip": "169.254.1.1", + "prefix-length": 16, + "origin": "random" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:300", + "prefix-length": 64, + "origin": "link-layer" + } + ] + }, + "infix-interfaces:bridge": { + "vlans": { + "proto": "ieee802-dot1q-types:c-vlan", + "vlan": [ + { + "vid": 1, + "untagged": [ + "br0", + "e3", + "e4", + "veth0b", + "veth2b" + ], + "tagged": [], + "multicast": { + "snooping": true, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + } + ] + } + }, + "infix-interfaces:bridge-port": { + "pvid": 1 + } + }, + { + "type": "infix-if-type:veth", + "name": "veth1b", + "if-index": 27, + "admin-status": "up", + "oper-status": "up", + "phys-address": "e6:c6:34:dc:b9:f4", + "statistics": { + "in-octets": "796" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "pvid": 6, + "bridge": "br1", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:veth", + "name": "veth3b", + "if-index": 29, + "admin-status": "up", + "oper-status": "up", + "phys-address": "0e:c3:01:d6:e6:ea", + "statistics": { + "in-octets": "796" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "bridge": "br1", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:bridge", + "name": "br1", + "if-index": 30, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "in-octets": "656" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge": { + "vlans": { + "proto": "ieee802-dot1q-types:c-vlan", + "vlan": [ + { + "vid": 6, + "untagged": [ + "veth1b" + ], + "tagged": [], + "multicast": { + "snooping": true, + "querier": "off" + }, + "multicast-filters": { + "multicast-filter": [] + } + } + ] + } + } + }, + { + "type": "infix-if-type:vlan", + "name": "e3.8", + "if-index": 31, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "statistics": { + "in-octets": "5005", + "out-octets": "16009" + }, + "ietf-ip:ipv4": { + "mtu": 1500, + "address": [ + { + "ip": "10.1.1.1", + "prefix-length": 32, + "origin": "static" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:vlan": { + "tag-type": "ieee802-dot1q-types:c-vlan", + "id": 8, + "lower-layer-if": "e3" + } + }, + { + "type": "infix-if-type:vlan", + "name": "e4.8", + "if-index": 32, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:04", + "statistics": { + "in-octets": "15080", + "out-octets": "15546" + }, + "ietf-ip:ipv4": { + "mtu": 1500, + "address": [ + { + "ip": "10.1.1.1", + "prefix-length": 32, + "origin": "static" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:vlan": { + "tag-type": "ieee802-dot1q-types:c-vlan", + "id": 8, + "lower-layer-if": "e4" + } + }, + { + "type": "infix-if-type:veth", + "name": "veth2a", + "if-index": 23, + "admin-status": "up", + "oper-status": "up", + "description": "eth0", + "phys-address": "06:a0:85:00:03:00", + "statistics": { + "in-octets": "28028", + "out-octets": "796" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::4a0:85ff:fe00:300", + "prefix-length": 64, + "origin": "link-layer" + } + ] + }, + "infix-interfaces:container-network": { + "containers": [ + "container-B" + ] + } + }, + { + "type": "infix-if-type:veth", + "name": "veth3a", + "if-index": 28, + "admin-status": "up", + "oper-status": "up", + "description": "eth1", + "phys-address": "06:a0:85:00:03:00", + "statistics": { + "out-octets": "796" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::4a0:85ff:fe00:300", + "prefix-length": 64, + "origin": "link-layer" + } + ] + }, + "infix-interfaces:container-network": { + "containers": [ + "container-B" + ] + } + }, + { + "type": "infix-if-type:veth", + "name": "veth0a", + "if-index": 21, + "admin-status": "up", + "oper-status": "up", + "description": "br0", + "phys-address": "06:a0:85:00:03:00", + "statistics": { + "in-octets": "28425", + "out-octets": "1625" + }, + "ietf-ip:ipv4": { + "mtu": 1500, + "address": [ + { + "ip": "169.254.1.2", + "prefix-length": 16, + "origin": "other" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::4a0:85ff:fe00:300", + "prefix-length": 64, + "origin": "link-layer" + } + ] + }, + "infix-interfaces:container-network": { + "containers": [ + "container-A" + ] + } + }, + { + "type": "infix-if-type:veth", + "name": "veth1a", + "if-index": 26, + "admin-status": "up", + "oper-status": "up", + "description": "br1", + "phys-address": "06:a0:85:00:03:00", + "statistics": { + "out-octets": "796" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::4a0:85ff:fe00:300", + "prefix-length": 64, + "origin": "link-layer" + } + ] + }, + "infix-interfaces:container-network": { + "containers": [ + "container-A" + ] + } + } + ] + } +} diff --git a/test/case/statd/containers/ietf-ospf.json b/test/case/statd/containers/ietf-ospf.json new file mode 100644 index 00000000..e1718903 --- /dev/null +++ b/test/case/statd/containers/ietf-ospf.json @@ -0,0 +1,139 @@ +{ + "ietf-routing:routing": { + "control-plane-protocols": { + "control-plane-protocol": [ + { + "type": "infix-routing:ospfv2", + "name": "default", + "ietf-ospf:ospf": { + "ietf-ospf:areas": { + "ietf-ospf:area": [ + { + "ietf-ospf:area-id": "0.0.0.1", + "ietf-ospf:interfaces": { + "ietf-ospf:interface": [ + { + "ietf-ospf:neighbors": { + "ietf-ospf:neighbor": [ + { + "neighbor-router-id": "10.1.2.1", + "address": "10.1.2.1", + "dead-timer": 25130, + "state": "full" + } + ] + }, + "name": "e3.8", + "passive": false, + "enabled": true, + "interface-type": "point-to-point", + "state": "point-to-point" + }, + { + "ietf-ospf:neighbors": { + "ietf-ospf:neighbor": [ + { + "neighbor-router-id": "10.1.3.1", + "address": "10.1.3.1", + "dead-timer": 25210, + "state": "full" + } + ] + }, + "name": "e4.8", + "passive": false, + "enabled": true, + "interface-type": "point-to-point", + "state": "point-to-point" + }, + { + "ietf-ospf:neighbors": { + "ietf-ospf:neighbor": [ + { + "neighbor-router-id": "192.168.100.1", + "address": "10.1.1.100", + "dead-timer": 34600, + "state": "full", + "dr-router-id": "192.168.100.1", + "bdr-router-id": "10.1.1.1" + } + ] + }, + "name": "e6", + "dr-router-id": "192.168.100.1", + "dr-ip-addr": "10.1.1.100", + "bdr-router-id": "10.1.1.1", + "bdr-ip-addr": "10.1.1.101", + "passive": false, + "enabled": true, + "interface-type": "broadcast", + "state": "bdr" + } + ] + }, + "ietf-ospf:area-type": "nssa-area" + } + ] + }, + "ietf-ospf:router-id": "10.1.1.1", + "ietf-ospf:address-family": "ipv4", + "ietf-ospf:local-rib": { + "ietf-ospf:route": [ + { + "prefix": "0.0.0.0/0", + "route-type": "inter-area", + "next-hops": { + "next-hop": [ + { + "next-hop": "10.1.1.100" + } + ] + } + }, + { + "prefix": "10.1.1.0/24", + "route-type": "intra-area", + "next-hops": { + "next-hop": [ + { + "outgoing-interface": "e6" + } + ] + } + }, + { + "prefix": "10.1.2.0/24", + "route-type": "intra-area", + "next-hops": { + "next-hop": [ + { + "next-hop": "10.1.1.100" + }, + { + "next-hop": "10.1.2.1" + } + ] + } + }, + { + "prefix": "10.1.3.0/24", + "route-type": "intra-area", + "next-hops": { + "next-hop": [ + { + "next-hop": "10.1.1.100" + }, + { + "next-hop": "10.1.3.1" + } + ] + } + } + ] + } + } + } + ] + } + } +} diff --git a/test/case/statd/containers/ietf-routing.json b/test/case/statd/containers/ietf-routing.json new file mode 100644 index 00000000..33e512c1 --- /dev/null +++ b/test/case/statd/containers/ietf-routing.json @@ -0,0 +1,325 @@ +{ + "ietf-routing:routing": { + "ribs": { + "rib": [ + { + "name": "ipv4", + "address-family": "ipv4", + "routes": { + "route": [ + { + "ietf-ipv4-unicast-routing:destination-prefix": "0.0.0.0/0", + "source-protocol": "ietf-ospf:ospfv2", + "route-preference": 110, + "ietf-ospf:metric": 2, + "active": [ + null + ], + "last-updated": "2025-01-20T10:00:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "ietf-ipv4-unicast-routing:address": "10.1.1.100", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "0.0.0.0/0", + "source-protocol": "static", + "route-preference": 254, + "last-updated": "2025-01-20T09:59:23+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "br0" + } + ] + } + } + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.0/24", + "source-protocol": "ietf-ospf:ospfv2", + "route-preference": 110, + "ietf-ospf:metric": 1, + "last-updated": "2025-01-20T09:59:53+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e6" + } + ] + } + } + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.0/24", + "source-protocol": "direct", + "route-preference": 0, + "active": [ + null + ], + "last-updated": "2025-01-20T09:59:09+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e6", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.1/32", + "source-protocol": "direct", + "route-preference": 0, + "last-updated": "2025-01-20T09:59:08+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e4.8", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.1/32", + "source-protocol": "direct", + "route-preference": 0, + "active": [ + null + ], + "last-updated": "2025-01-20T09:59:08+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e3.8", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.2.0/24", + "source-protocol": "ietf-ospf:ospfv2", + "route-preference": 110, + "ietf-ospf:metric": 2, + "active": [ + null + ], + "last-updated": "2025-01-20T10:00:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "ietf-ipv4-unicast-routing:address": "10.1.1.100", + "infix-routing:installed": [ + null + ] + }, + { + "ietf-ipv4-unicast-routing:address": "10.1.2.1", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.3.0/24", + "source-protocol": "ietf-ospf:ospfv2", + "route-preference": 110, + "ietf-ospf:metric": 2, + "active": [ + null + ], + "last-updated": "2025-01-20T10:00:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "ietf-ipv4-unicast-routing:address": "10.1.1.100", + "infix-routing:installed": [ + null + ] + }, + { + "ietf-ipv4-unicast-routing:address": "10.1.3.1", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "169.254.0.0/16", + "source-protocol": "direct", + "route-preference": 0, + "active": [ + null + ], + "last-updated": "2025-01-20T09:59:14+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "br0", + "infix-routing:installed": [ + null + ] + } + ] + } + } + } + ] + } + }, + { + "name": "ipv6", + "address-family": "ipv6", + "routes": { + "route": [ + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "source-protocol": "direct", + "route-preference": 0, + "last-updated": "2025-01-20T09:59:10+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e6", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "source-protocol": "direct", + "route-preference": 0, + "last-updated": "2025-01-20T09:59:10+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "br0", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "source-protocol": "direct", + "route-preference": 0, + "last-updated": "2025-01-20T08:05:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e5", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "source-protocol": "direct", + "route-preference": 0, + "last-updated": "2025-01-20T08:05:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e7", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "source-protocol": "direct", + "route-preference": 0, + "last-updated": "2025-01-20T08:05:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e2", + "infix-routing:installed": [ + null + ] + } + ] + } + } + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "source-protocol": "direct", + "route-preference": 0, + "active": [ + null + ], + "last-updated": "2025-01-20T08:05:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e1", + "infix-routing:installed": [ + null + ] + } + ] + } + } + } + ] + } + } + ] + } + } +} diff --git a/test/case/statd/containers/infix-containers.json b/test/case/statd/containers/infix-containers.json new file mode 100644 index 00000000..0335149d --- /dev/null +++ b/test/case/statd/containers/infix-containers.json @@ -0,0 +1,60 @@ +{ + "infix-containers:containers": { + "container": [ + { + "name": "container-B", + "id": "0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3", + "image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "image-id": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033", + "running": true, + "status": "Up About a minute", + "command": "/usr/sbin/httpd -f -v", + "network": { + "interface": [ + { + "name": "veth2a" + }, + { + "name": "veth3a" + } + ], + "publish": [] + } + }, + { + "name": "firewall", + "id": "3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8", + "image": "localhost/curios-nftables-oci-amd64-v24.11.0:latest", + "image-id": "7a3cc502436250357a6664100a600f306334b4d7203890b85b7ea9b8da6b5665", + "running": true, + "status": "Up About a minute", + "command": "/usr/sbin/nft-helper /etc/nftables.conf", + "network": { + "host": true + } + }, + { + "name": "container-A", + "id": "93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e", + "image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "image-id": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033", + "running": true, + "status": "Up About a minute", + "command": "/usr/sbin/httpd -f -v -p 91", + "network": { + "interface": [ + { + "name": "veth0a" + }, + { + "name": "veth1a" + } + ], + "publish": [ + "36971->91/tcp" + ] + } + } + ] + } +} diff --git a/test/case/statd/containers/operational.json b/test/case/statd/containers/operational.json new file mode 100644 index 00000000..37803c41 --- /dev/null +++ b/test/case/statd/containers/operational.json @@ -0,0 +1,1158 @@ +{ + "ietf-interfaces:interfaces": { + "interface": [ + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "127.0.0.1", + "origin": "static", + "prefix-length": 8 + } + ] + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "::1", + "origin": "static", + "prefix-length": 128 + } + ], + "mtu": 65536 + }, + "if-index": 1, + "name": "lo", + "oper-status": "up", + "phys-address": "00:00:00:00:00:00", + "statistics": { + "in-octets": "72275", + "out-octets": "72275" + }, + "type": "infix-if-type:loopback" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:301", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 2, + "name": "e1", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:01", + "statistics": { + "in-octets": "5166282", + "out-octets": "7407399" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:302", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 3, + "name": "e2", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:02", + "statistics": { + "out-octets": "79382" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 4, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "pvid": 1, + "stp-state": "forwarding" + }, + "name": "e3", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "statistics": { + "in-octets": "23589", + "out-octets": "208789" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 5, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "pvid": 1, + "stp-state": "forwarding" + }, + "name": "e4", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:04", + "statistics": { + "in-octets": "30583", + "out-octets": "206341" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:305", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 6, + "name": "e5", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:05", + "statistics": { + "in-octets": "66626", + "out-octets": "83465" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "10.1.1.101", + "origin": "static", + "prefix-length": 24 + } + ], + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:306", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 7, + "name": "e6", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:06", + "statistics": { + "in-octets": "134367", + "out-octets": "184122" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:307", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 8, + "name": "e7", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:07", + "statistics": { + "in-octets": "70368", + "out-octets": "86243" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 22, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "pvid": 1, + "stp-state": "forwarding" + }, + "name": "veth0b", + "oper-status": "up", + "phys-address": "c2:61:ae:82:0a:c1", + "statistics": { + "in-octets": "1583", + "out-octets": "28383" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 24, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "pvid": 1, + "stp-state": "forwarding" + }, + "name": "veth2b", + "oper-status": "up", + "phys-address": "96:8b:c6:17:74:d3", + "statistics": { + "in-octets": "796", + "out-octets": "28028" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "169.254.1.1", + "origin": "random", + "prefix-length": 16 + } + ], + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:300", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 25, + "infix-interfaces:bridge": { + "vlans": { + "proto": "ieee802-dot1q-types:c-vlan", + "vlan": [ + { + "multicast": { + "querier": "off", + "snooping": true + }, + "multicast-filters": { + "multicast-filter": [] + }, + "tagged": [], + "untagged": [ + "br0", + "e3", + "e4", + "veth0b", + "veth2b" + ], + "vid": 1 + } + ] + } + }, + "infix-interfaces:bridge-port": { + "pvid": 1 + }, + "name": "br0", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "in-octets": "3285", + "out-octets": "28281" + }, + "type": "infix-if-type:bridge" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 27, + "infix-interfaces:bridge-port": { + "bridge": "br1", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "pvid": 6, + "stp-state": "forwarding" + }, + "name": "veth1b", + "oper-status": "up", + "phys-address": "e6:c6:34:dc:b9:f4", + "statistics": { + "in-octets": "796" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 29, + "infix-interfaces:bridge-port": { + "bridge": "br1", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + }, + "name": "veth3b", + "oper-status": "up", + "phys-address": "0e:c3:01:d6:e6:ea", + "statistics": { + "in-octets": "796" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 30, + "infix-interfaces:bridge": { + "vlans": { + "proto": "ieee802-dot1q-types:c-vlan", + "vlan": [ + { + "multicast": { + "querier": "off", + "snooping": true + }, + "multicast-filters": { + "multicast-filter": [] + }, + "tagged": [], + "untagged": [ + "veth1b" + ], + "vid": 6 + } + ] + } + }, + "name": "br1", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "in-octets": "656" + }, + "type": "infix-if-type:bridge" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "10.1.1.1", + "origin": "static", + "prefix-length": 32 + } + ], + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 31, + "infix-interfaces:vlan": { + "id": 8, + "lower-layer-if": "e3", + "tag-type": "ieee802-dot1q-types:c-vlan" + }, + "name": "e3.8", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "statistics": { + "in-octets": "5005", + "out-octets": "16009" + }, + "type": "infix-if-type:vlan" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "10.1.1.1", + "origin": "static", + "prefix-length": 32 + } + ], + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 32, + "infix-interfaces:vlan": { + "id": 8, + "lower-layer-if": "e4", + "tag-type": "ieee802-dot1q-types:c-vlan" + }, + "name": "e4.8", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:04", + "statistics": { + "in-octets": "15080", + "out-octets": "15546" + }, + "type": "infix-if-type:vlan" + }, + { + "admin-status": "up", + "description": "eth0", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::4a0:85ff:fe00:300", + "origin": "link-layer", + "prefix-length": 64 + } + ] + }, + "if-index": 23, + "infix-interfaces:container-network": { + "containers": [ + "container-B" + ] + }, + "name": "veth2a", + "oper-status": "up", + "phys-address": "06:a0:85:00:03:00", + "statistics": { + "in-octets": "28028", + "out-octets": "796" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "description": "eth1", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::4a0:85ff:fe00:300", + "origin": "link-layer", + "prefix-length": 64 + } + ] + }, + "if-index": 28, + "infix-interfaces:container-network": { + "containers": [ + "container-B" + ] + }, + "name": "veth3a", + "oper-status": "up", + "phys-address": "06:a0:85:00:03:00", + "statistics": { + "out-octets": "796" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "description": "br0", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "169.254.1.2", + "origin": "other", + "prefix-length": 16 + } + ], + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::4a0:85ff:fe00:300", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 21, + "infix-interfaces:container-network": { + "containers": [ + "container-A" + ] + }, + "name": "veth0a", + "oper-status": "up", + "phys-address": "06:a0:85:00:03:00", + "statistics": { + "in-octets": "28425", + "out-octets": "1625" + }, + "type": "infix-if-type:veth" + }, + { + "admin-status": "up", + "description": "br1", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::4a0:85ff:fe00:300", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 26, + "infix-interfaces:container-network": { + "containers": [ + "container-A" + ] + }, + "name": "veth1a", + "oper-status": "up", + "phys-address": "06:a0:85:00:03:00", + "statistics": { + "out-octets": "796" + }, + "type": "infix-if-type:veth" + } + ] + }, + "ietf-routing:routing": { + "control-plane-protocols": { + "control-plane-protocol": [ + { + "ietf-ospf:ospf": { + "ietf-ospf:address-family": "ipv4", + "ietf-ospf:areas": { + "ietf-ospf:area": [ + { + "ietf-ospf:area-id": "0.0.0.1", + "ietf-ospf:area-type": "nssa-area", + "ietf-ospf:interfaces": { + "ietf-ospf:interface": [ + { + "enabled": true, + "ietf-ospf:neighbors": { + "ietf-ospf:neighbor": [ + { + "address": "10.1.2.1", + "dead-timer": 25130, + "neighbor-router-id": "10.1.2.1", + "state": "full" + } + ] + }, + "interface-type": "point-to-point", + "name": "e3.8", + "passive": false, + "state": "point-to-point" + }, + { + "enabled": true, + "ietf-ospf:neighbors": { + "ietf-ospf:neighbor": [ + { + "address": "10.1.3.1", + "dead-timer": 25210, + "neighbor-router-id": "10.1.3.1", + "state": "full" + } + ] + }, + "interface-type": "point-to-point", + "name": "e4.8", + "passive": false, + "state": "point-to-point" + }, + { + "bdr-ip-addr": "10.1.1.101", + "bdr-router-id": "10.1.1.1", + "dr-ip-addr": "10.1.1.100", + "dr-router-id": "192.168.100.1", + "enabled": true, + "ietf-ospf:neighbors": { + "ietf-ospf:neighbor": [ + { + "address": "10.1.1.100", + "bdr-router-id": "10.1.1.1", + "dead-timer": 34600, + "dr-router-id": "192.168.100.1", + "neighbor-router-id": "192.168.100.1", + "state": "full" + } + ] + }, + "interface-type": "broadcast", + "name": "e6", + "passive": false, + "state": "bdr" + } + ] + } + } + ] + }, + "ietf-ospf:local-rib": { + "ietf-ospf:route": [ + { + "next-hops": { + "next-hop": [ + { + "next-hop": "10.1.1.100" + } + ] + }, + "prefix": "0.0.0.0/0", + "route-type": "inter-area" + }, + { + "next-hops": { + "next-hop": [ + { + "outgoing-interface": "e6" + } + ] + }, + "prefix": "10.1.1.0/24", + "route-type": "intra-area" + }, + { + "next-hops": { + "next-hop": [ + { + "next-hop": "10.1.1.100" + }, + { + "next-hop": "10.1.2.1" + } + ] + }, + "prefix": "10.1.2.0/24", + "route-type": "intra-area" + }, + { + "next-hops": { + "next-hop": [ + { + "next-hop": "10.1.1.100" + }, + { + "next-hop": "10.1.3.1" + } + ] + }, + "prefix": "10.1.3.0/24", + "route-type": "intra-area" + } + ] + }, + "ietf-ospf:router-id": "10.1.1.1" + }, + "name": "default", + "type": "infix-routing:ospfv2" + } + ] + }, + "ribs": { + "rib": [ + { + "address-family": "ipv4", + "name": "ipv4", + "routes": { + "route": [ + { + "active": [ + null + ], + "ietf-ipv4-unicast-routing:destination-prefix": "0.0.0.0/0", + "ietf-ospf:metric": 2, + "last-updated": "2025-01-20T10:00:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "ietf-ipv4-unicast-routing:address": "10.1.1.100", + "infix-routing:installed": [ + null + ] + } + ] + } + }, + "route-preference": 110, + "source-protocol": "ietf-ospf:ospfv2" + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "0.0.0.0/0", + "last-updated": "2025-01-20T09:59:23+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "br0" + } + ] + } + }, + "route-preference": 254, + "source-protocol": "static" + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.0/24", + "ietf-ospf:metric": 1, + "last-updated": "2025-01-20T09:59:53+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "outgoing-interface": "e6" + } + ] + } + }, + "route-preference": 110, + "source-protocol": "ietf-ospf:ospfv2" + }, + { + "active": [ + null + ], + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.0/24", + "last-updated": "2025-01-20T09:59:09+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "e6" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + }, + { + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.1/32", + "last-updated": "2025-01-20T09:59:08+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "e4.8" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + }, + { + "active": [ + null + ], + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.1.1/32", + "last-updated": "2025-01-20T09:59:08+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "e3.8" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + }, + { + "active": [ + null + ], + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.2.0/24", + "ietf-ospf:metric": 2, + "last-updated": "2025-01-20T10:00:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "ietf-ipv4-unicast-routing:address": "10.1.1.100", + "infix-routing:installed": [ + null + ] + }, + { + "ietf-ipv4-unicast-routing:address": "10.1.2.1", + "infix-routing:installed": [ + null + ] + } + ] + } + }, + "route-preference": 110, + "source-protocol": "ietf-ospf:ospfv2" + }, + { + "active": [ + null + ], + "ietf-ipv4-unicast-routing:destination-prefix": "10.1.3.0/24", + "ietf-ospf:metric": 2, + "last-updated": "2025-01-20T10:00:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "ietf-ipv4-unicast-routing:address": "10.1.1.100", + "infix-routing:installed": [ + null + ] + }, + { + "ietf-ipv4-unicast-routing:address": "10.1.3.1", + "infix-routing:installed": [ + null + ] + } + ] + } + }, + "route-preference": 110, + "source-protocol": "ietf-ospf:ospfv2" + }, + { + "active": [ + null + ], + "ietf-ipv4-unicast-routing:destination-prefix": "169.254.0.0/16", + "last-updated": "2025-01-20T09:59:14+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "br0" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + } + ] + } + }, + { + "address-family": "ipv6", + "name": "ipv6", + "routes": { + "route": [ + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "last-updated": "2025-01-20T09:59:10+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "e6" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "last-updated": "2025-01-20T09:59:10+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "br0" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "last-updated": "2025-01-20T08:05:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "e5" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "last-updated": "2025-01-20T08:05:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "e7" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + }, + { + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "last-updated": "2025-01-20T08:05:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "e2" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + }, + { + "active": [ + null + ], + "ietf-ipv6-unicast-routing:destination-prefix": "fe80::/64", + "last-updated": "2025-01-20T08:05:03+00:00", + "next-hop": { + "next-hop-list": { + "next-hop": [ + { + "infix-routing:installed": [ + null + ], + "outgoing-interface": "e1" + } + ] + } + }, + "route-preference": 0, + "source-protocol": "direct" + } + ] + } + } + ] + } + }, + "infix-containers:containers": { + "container": [ + { + "command": "/usr/sbin/httpd -f -v", + "id": "0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3", + "image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "image-id": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033", + "name": "container-B", + "network": { + "interface": [ + { + "name": "veth2a" + }, + { + "name": "veth3a" + } + ], + "publish": [] + }, + "running": true, + "status": "Up About a minute" + }, + { + "command": "/usr/sbin/nft-helper /etc/nftables.conf", + "id": "3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8", + "image": "localhost/curios-nftables-oci-amd64-v24.11.0:latest", + "image-id": "7a3cc502436250357a6664100a600f306334b4d7203890b85b7ea9b8da6b5665", + "name": "firewall", + "network": { + "host": true + }, + "running": true, + "status": "Up About a minute" + }, + { + "command": "/usr/sbin/httpd -f -v -p 91", + "id": "93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e", + "image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "image-id": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033", + "name": "container-A", + "network": { + "interface": [ + { + "name": "veth0a" + }, + { + "name": "veth1a" + } + ], + "publish": [ + "36971->91/tcp" + ] + }, + "running": true, + "status": "Up About a minute" + } + ] + } +} diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/br0/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/br0/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/br0/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/br1/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/br1/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/br1/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e3.8/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e3.8/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e3.8/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e4.8/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e4.8/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e4.8/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/eth0/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/eth0/mtu new file mode 100644 index 00000000..e69de29b diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/eth1/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/eth1/mtu new file mode 100644 index 00000000..e69de29b diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu new file mode 100644 index 00000000..e2ed8f4d --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu @@ -0,0 +1 @@ +65536 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth0b/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth0b/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth0b/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth1b/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth1b/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth1b/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth2b/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth2b/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth2b/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth3b/mtu b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth3b/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/containers/system/rootfs/proc/sys/net/ipv6/conf/veth3b/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/containers/system/run/+usr+libexec+statd+ospf-status b/test/case/statd/containers/system/run/+usr+libexec+statd+ospf-status new file mode 100644 index 00000000..09c69a65 --- /dev/null +++ b/test/case/statd/containers/system/run/+usr+libexec+statd+ospf-status @@ -0,0 +1 @@ +{"routerId": "10.1.1.1", "tosRoutesOnly": true, "rfc2328Conform": true, "spfScheduleDelayMsecs": 0, "holdtimeMinMsecs": 50, "holdtimeMaxMsecs": 5000, "holdtimeMultplier": 1, "spfLastExecutedMsecs": 40359, "spfLastDurationMsecs": 0, "lsaMinIntervalMsecs": 5000, "lsaMinArrivalMsecs": 1000, "writeMultiplier": 20, "refreshTimerMsecs": 10000, "maximumPaths": 256, "preference": 110, "lsaExternalCounter": 0, "lsaExternalChecksum": 0, "lsaAsopaqueCounter": 0, "lsaAsOpaqueChecksum": 0, "attachedAreaCounter": 1, "areas": {"0.0.0.1": {"nssaNoSummary": true, "shortcuttingMode": "Default", "areaIfTotalCounter": 3, "areaIfActiveCounter": 3, "nssa": true, "abr": false, "nbrFullAdjacentCounter": 3, "authentication": "authenticationNone", "virtualAdjacenciesPassingCounter": 0, "spfExecutedCounter": 9, "lsaNumber": 8, "lsaRouterNumber": 4, "lsaRouterChecksum": 183702, "lsaNetworkNumber": 3, "lsaNetworkChecksum": 101910, "lsaSummaryNumber": 1, "lsaSummaryChecksum": 49868, "lsaAsbrNumber": 0, "lsaAsbrChecksum": 0, "lsaNssaNumber": 0, "lsaNssaChecksum": 0, "lsaOpaqueLinkNumber": 0, "lsaOpaqueLinkChecksum": 0, "lsaOpaqueAreaNumber": 0, "lsaOpaqueAreaChecksum": 0, "area-type": "nssa-area", "interfaces": [{"ifUp": true, "ifIndex": 31, "mtuBytes": 1500, "bandwidthMbit": 4294967295, "ifFlags": "", "ospfEnabled": true, "interfaceIp": {"10.1.1.1": {"ifUnnumbered": true, "area": "0.0.0.1 [NSSA]", "routerId": "10.1.1.1", "networkType": "POINTOPOINT", "cost": 1, "transmitDelaySecs": 1, "state": "Point-To-Point", "priority": 1, "mcastMemberOspfAllRouters": true, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 5236, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "prefixSuppression": false}}, "ifUnnumbered": true, "area": "0.0.0.1", "routerId": "10.1.1.1", "networkType": "POINTOPOINT", "cost": 1, "transmitDelaySecs": 1, "state": "Point-To-Point", "priority": 1, "opaqueCapable": true, "mcastMemberOspfAllRouters": true, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 5236, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "prefixSuppression": false, "name": "e3.8", "neighbors": [{"ifaceAddress": "10.1.2.1", "areaId": "0.0.0.1", "ifaceName": "e3.8", "localIfaceAddress": "10.1.1.1", "nbrPriority": 1, "nbrState": "Full/-", "role": "DROther", "stateChangeCounter": 5, "lastPrgrsvChangeMsec": 84809, "optionsCounter": 8, "optionsList": "*|-|-|-|N/P|-|-|-", "routerDeadIntervalTimerDueMsec": 25130, "databaseSummaryListCounter": 0, "linkStateRequestListCounter": 0, "linkStateRetransmissionListCounter": 0, "threadInactivityTimer": "on", "threadLinkStateRequestRetransmission": "on", "threadLinkStateUpdateRetransmission": "on", "grHelperStatus": "None", "neighborIp": "10.1.2.1"}]}, {"ifUp": true, "ifIndex": 32, "mtuBytes": 1500, "bandwidthMbit": 4294967295, "ifFlags": "", "ospfEnabled": true, "interfaceIp": {"10.1.1.1": {"ifUnnumbered": true, "area": "0.0.0.1 [NSSA]", "routerId": "10.1.1.1", "networkType": "POINTOPOINT", "cost": 1, "transmitDelaySecs": 1, "state": "Point-To-Point", "priority": 1, "mcastMemberOspfAllRouters": true, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 5242, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "prefixSuppression": false}}, "ifUnnumbered": true, "area": "0.0.0.1", "routerId": "10.1.1.1", "networkType": "POINTOPOINT", "cost": 1, "transmitDelaySecs": 1, "state": "Point-To-Point", "priority": 1, "opaqueCapable": true, "mcastMemberOspfAllRouters": true, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 5242, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "prefixSuppression": false, "name": "e4.8", "neighbors": [{"ifaceAddress": "10.1.3.1", "areaId": "0.0.0.1", "ifaceName": "e4.8", "localIfaceAddress": "10.1.1.1", "nbrPriority": 1, "nbrState": "Full/-", "role": "DROther", "stateChangeCounter": 5, "lastPrgrsvChangeMsec": 84781, "optionsCounter": 8, "optionsList": "*|-|-|-|N/P|-|-|-", "routerDeadIntervalTimerDueMsec": 25210, "databaseSummaryListCounter": 0, "linkStateRequestListCounter": 0, "linkStateRetransmissionListCounter": 0, "threadInactivityTimer": "on", "threadLinkStateRequestRetransmission": "on", "threadLinkStateUpdateRetransmission": "on", "grHelperStatus": "None", "neighborIp": "10.1.3.1"}]}, {"ifUp": true, "ifIndex": 7, "mtuBytes": 1500, "bandwidthMbit": 4294967295, "ifFlags": "", "ospfEnabled": true, "interfaceIp": {"10.1.1.101": {"ipAddress": "10.1.1.101", "ipAddressPrefixlen": 24, "ospfIfType": "Broadcast", "localIfUsed": "10.1.1.255", "area": "0.0.0.1 [NSSA]", "routerId": "10.1.1.1", "networkType": "BROADCAST", "cost": 1, "transmitDelaySecs": 1, "state": "Backup", "priority": 1, "drId": "192.168.100.1", "drAddress": "10.1.1.100", "bdrId": "10.1.1.1", "bdrAddress": "10.1.1.101", "mcastMemberOspfAllRouters": true, "mcastMemberOspfDesignatedRouters": true, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 5567, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "prefixSuppression": false}}, "ipAddress": "10.1.1.101", "ipAddressPrefixlen": 24, "ospfIfType": "Broadcast", "localIfUsed": "10.1.1.255", "area": "0.0.0.1", "routerId": "10.1.1.1", "networkType": "BROADCAST", "cost": 1, "transmitDelaySecs": 1, "state": "Backup", "priority": 1, "opaqueCapable": true, "drId": "192.168.100.1", "drAddress": "10.1.1.100", "bdrId": "10.1.1.1", "bdrAddress": "10.1.1.101", "mcastMemberOspfAllRouters": true, "mcastMemberOspfDesignatedRouters": true, "timerMsecs": 10000, "timerDeadSecs": 40, "timerWaitSecs": 40, "timerRetransmitSecs": 5, "timerHelloInMsecs": 5567, "nbrCount": 1, "nbrAdjacentCount": 1, "grHelloDelaySecs": 10, "prefixSuppression": false, "name": "e6", "neighbors": [{"ifaceAddress": "10.1.1.100", "areaId": "0.0.0.1", "ifaceName": "e6", "localIfaceAddress": "10.1.1.101", "nbrPriority": 1, "nbrState": "Full/DR", "role": "DR", "stateChangeCounter": 6, "lastPrgrsvChangeMsec": 50390, "routerDesignatedId": "192.168.100.1", "routerDesignatedBackupId": "10.1.1.1", "optionsCounter": 8, "optionsList": "*|-|-|-|N/P|-|-|-", "routerDeadIntervalTimerDueMsec": 34600, "databaseSummaryListCounter": 0, "linkStateRequestListCounter": 0, "linkStateRetransmissionListCounter": 0, "threadInactivityTimer": "on", "threadLinkStateRequestRetransmission": "on", "threadLinkStateUpdateRetransmission": "on", "grHelperStatus": "None", "neighborIp": "192.168.100.1"}]}]}}} diff --git a/test/case/statd/containers/system/run/bridge_-j_mdb_show_dev_br0_vid_1 b/test/case/statd/containers/system/run/bridge_-j_mdb_show_dev_br0_vid_1 new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/containers/system/run/bridge_-j_mdb_show_dev_br0_vid_1 @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/containers/system/run/bridge_-j_mdb_show_dev_br1_vid_6 b/test/case/statd/containers/system/run/bridge_-j_mdb_show_dev_br1_vid_6 new file mode 100644 index 00000000..b5d4f77e --- /dev/null +++ b/test/case/statd/containers/system/run/bridge_-j_mdb_show_dev_br1_vid_6 @@ -0,0 +1 @@ +[{"mdb":[],"router":{}}] diff --git a/test/case/statd/containers/system/run/bridge_-j_vlan_global_show_dev_br0 b/test/case/statd/containers/system/run/bridge_-j_vlan_global_show_dev_br0 new file mode 100644 index 00000000..fadbcedb --- /dev/null +++ b/test/case/statd/containers/system/run/bridge_-j_vlan_global_show_dev_br0 @@ -0,0 +1 @@ +[{"ifname":"br0","vlans":[{"vlan":1,"mcast_snooping":1,"mcast_querier":0,"mcast_igmp_version":2,"mcast_mld_version":1,"mcast_last_member_count":2,"mcast_last_member_interval":100,"mcast_startup_query_count":2,"mcast_startup_query_interval":3124,"mcast_membership_interval":26000,"mcast_querier_interval":25500,"mcast_query_interval":12500,"mcast_query_response_interval":1000,"msti":0}]}] diff --git a/test/case/statd/containers/system/run/bridge_-j_vlan_global_show_dev_br1 b/test/case/statd/containers/system/run/bridge_-j_vlan_global_show_dev_br1 new file mode 100644 index 00000000..35e0e272 --- /dev/null +++ b/test/case/statd/containers/system/run/bridge_-j_vlan_global_show_dev_br1 @@ -0,0 +1 @@ +[{"ifname":"br1","vlans":[{"vlan":6,"mcast_snooping":1,"mcast_querier":0,"mcast_igmp_version":2,"mcast_mld_version":1,"mcast_last_member_count":2,"mcast_last_member_interval":100,"mcast_startup_query_count":2,"mcast_startup_query_interval":3124,"mcast_membership_interval":26000,"mcast_querier_interval":25500,"mcast_query_interval":12500,"mcast_query_response_interval":1000,"msti":0}]}] diff --git a/test/case/statd/containers/system/run/bridge_-j_vlan_show b/test/case/statd/containers/system/run/bridge_-j_vlan_show new file mode 100644 index 00000000..4ae43ec2 --- /dev/null +++ b/test/case/statd/containers/system/run/bridge_-j_vlan_show @@ -0,0 +1 @@ +[{"ifname":"e3","vlans":[{"vlan":1,"flags":["PVID","Egress Untagged"]}]},{"ifname":"e4","vlans":[{"vlan":1,"flags":["PVID","Egress Untagged"]}]},{"ifname":"veth0b","vlans":[{"vlan":1,"flags":["PVID","Egress Untagged"]}]},{"ifname":"veth2b","vlans":[{"vlan":1,"flags":["PVID","Egress Untagged"]}]},{"ifname":"br0","vlans":[{"vlan":1,"flags":["PVID","Egress Untagged"]}]},{"ifname":"veth1b","vlans":[{"vlan":6,"flags":["PVID","Egress Untagged"]}]}] diff --git a/test/case/statd/containers/system/run/ip_-j_addr_show b/test/case/statd/containers/system/run/ip_-j_addr_show new file mode 100644 index 00000000..602c290c --- /dev/null +++ b/test/case/statd/containers/system/run/ip_-j_addr_show @@ -0,0 +1 @@ +[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UP","group":"iface","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","addr_info":[{"family":"inet","local":"127.0.0.1","prefixlen":8,"scope":"host","protocol":"static","label":"lo","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"::1","prefixlen":128,"scope":"host","protocol":"static","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":2,"ifname":"e1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:01","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:301","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":3,"ifname":"e2","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:302","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":4,"ifname":"e3","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":5,"ifname":"e4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":6,"ifname":"e5","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:05","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:305","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":7,"ifname":"e6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:06","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet","local":"10.1.1.101","prefixlen":24,"scope":"global","protocol":"static","label":"e6","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"fe80::2a0:85ff:fe00:306","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":8,"ifname":"e7","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:07","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:307","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":22,"link_index":21,"ifname":"veth0b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"c2:61:ae:82:0a:c1","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":1,"addr_info":[]},{"ifindex":24,"link_index":23,"ifname":"veth2b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"96:8b:c6:17:74:d3","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"addr_info":[]},{"ifindex":25,"ifname":"br0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet","local":"169.254.1.1","prefixlen":16,"broadcast":"169.254.255.255","scope":"link","protocol":"random","label":"br0","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"fe80::2a0:85ff:fe00:300","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":27,"link_index":26,"ifname":"veth1b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br1","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"e6:c6:34:dc:b9:f4","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":1,"addr_info":[]},{"ifindex":29,"link_index":28,"ifname":"veth3b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br1","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"0e:c3:01:d6:e6:ea","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"addr_info":[]},{"ifindex":30,"ifname":"br1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":31,"link":"e3","ifname":"e3.8","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet","local":"10.1.1.1","prefixlen":32,"scope":"global","protocol":"static","label":"e3.8","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":32,"link":"e4","ifname":"e4.8","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet","local":"10.1.1.1","prefixlen":32,"scope":"global","protocol":"static","label":"e4.8","valid_life_time":4294967295,"preferred_life_time":4294967295}]}] diff --git a/test/case/statd/containers/system/run/ip_-j_netns_list b/test/case/statd/containers/system/run/ip_-j_netns_list new file mode 100644 index 00000000..7b0e9199 --- /dev/null +++ b/test/case/statd/containers/system/run/ip_-j_netns_list @@ -0,0 +1 @@ +[{"name":"netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910","id":0},{"name":"netns-769ed047-f7d6-211b-728b-46c24d727874","id":1}] diff --git a/test/case/statd/containers/system/run/ip_-s_-d_-j_link_show b/test/case/statd/containers/system/run/ip_-s_-d_-j_link_show new file mode 100644 index 00000000..e3feaa62 --- /dev/null +++ b/test/case/statd/containers/system/run/ip_-s_-d_-j_link_show @@ -0,0 +1 @@ +[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"iface","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":0,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":72275,"packets":194,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":72275,"packets":194,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":2,"ifname":"e1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:01","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio0","stats64":{"rx":{"bytes":5166282,"packets":23468,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":7407399,"packets":19837,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":3,"ifname":"e2","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio1","stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":79382,"packets":221,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":4,"ifname":"e3","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8001","no":"0x1","designated_port":32769,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":0.00,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio2","stats64":{"rx":{"bytes":23589,"packets":129,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":208789,"packets":1209,"errors":0,"dropped":1,"carrier_errors":0,"collisions":0}}},{"ifindex":5,"ifname":"e4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8002","no":"0x2","designated_port":32770,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":0.00,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio3","stats64":{"rx":{"bytes":30583,"packets":153,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":206341,"packets":1202,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":6,"ifname":"e5","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:05","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio4","stats64":{"rx":{"bytes":66626,"packets":196,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":83465,"packets":231,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":7,"ifname":"e6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:06","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio5","stats64":{"rx":{"bytes":134367,"packets":991,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":184122,"packets":1118,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":8,"ifname":"e7","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:07","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio6","stats64":{"rx":{"bytes":70368,"packets":199,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":86243,"packets":239,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":22,"link_index":21,"ifname":"veth0b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br0","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"c2:61:ae:82:0a:c1","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":1,"promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth","info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":2,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8003","no":"0x3","designated_port":32771,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":0.00,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":1583,"packets":19,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":28383,"packets":123,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":24,"link_index":23,"ifname":"veth2b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br0","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"96:8b:c6:17:74:d3","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth","info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":2,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8004","no":"0x4","designated_port":32772,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":0.00,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":796,"packets":10,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":28028,"packets":123,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":25,"ifname":"br0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bridge","info_data":{"forward_delay":1500,"hello_time":200,"max_age":2000,"ageing_time":30000,"stp_state":0,"priority":32768,"vlan_filtering":1,"vlan_protocol":"802.1Q","bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","root_port":0,"root_path_cost":0,"topology_change":0,"topology_change_detected":0,"hello_timer":0.00,"tcn_timer":0.00,"topology_change_timer":0.00,"gc_timer":215.50,"fdb_n_learned":3,"fdb_max_learned":0,"vlan_default_pvid":0,"vlan_stats_enabled":0,"vlan_stats_per_port":0,"group_fwd_mask":"0x4000","group_addr":"01:80:c2:00:00:00","mcast_snooping":0,"no_linklocal_learn":0,"mcast_vlan_snooping":0,"mst_enabled":0,"mcast_flood_always":1,"mcast_router":1,"mcast_query_use_ifaddr":0,"mcast_querier":0,"mcast_hash_elasticity":16,"mcast_hash_max":4096,"mcast_last_member_cnt":2,"mcast_startup_query_cnt":2,"mcast_last_member_intvl":100,"mcast_membership_intvl":26000,"mcast_querier_intvl":25500,"mcast_query_intvl":12500,"mcast_query_response_intvl":1000,"mcast_startup_query_intvl":3124,"mcast_stats_enabled":0,"mcast_igmp_version":2,"mcast_mld_version":1,"nf_call_iptables":0,"nf_call_ip6tables":0,"nf_call_arptables":0}},"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":3285,"packets":49,"errors":0,"dropped":0,"over_errors":0,"multicast":32},"tx":{"bytes":28281,"packets":124,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":27,"link_index":26,"ifname":"veth1b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br1","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"e6:c6:34:dc:b9:f4","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":1,"promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth","info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":2,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8001","no":"0x1","designated_port":32769,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":0.00,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":796,"packets":10,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":29,"link_index":28,"ifname":"veth3b","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","master":"br1","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"0e:c3:01:d6:e6:ea","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth","info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":2,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8002","no":"0x2","designated_port":32770,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":0.00,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":796,"packets":10,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":30,"ifname":"br1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bridge","info_data":{"forward_delay":1500,"hello_time":200,"max_age":2000,"ageing_time":30000,"stp_state":0,"priority":32768,"vlan_filtering":1,"vlan_protocol":"802.1Q","bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","root_port":0,"root_path_cost":0,"topology_change":0,"topology_change_detected":0,"hello_timer":0.00,"tcn_timer":0.00,"topology_change_timer":0.00,"gc_timer":215.53,"fdb_n_learned":1,"fdb_max_learned":0,"vlan_default_pvid":0,"vlan_stats_enabled":0,"vlan_stats_per_port":0,"group_fwd_mask":"0","group_addr":"01:80:c2:00:00:00","mcast_snooping":0,"no_linklocal_learn":0,"mcast_vlan_snooping":0,"mst_enabled":0,"mcast_flood_always":1,"mcast_router":1,"mcast_query_use_ifaddr":0,"mcast_querier":0,"mcast_hash_elasticity":16,"mcast_hash_max":4096,"mcast_last_member_cnt":2,"mcast_startup_query_cnt":2,"mcast_last_member_intvl":100,"mcast_membership_intvl":26000,"mcast_querier_intvl":25500,"mcast_query_intvl":12500,"mcast_query_response_intvl":1000,"mcast_startup_query_intvl":3124,"mcast_stats_enabled":0,"mcast_igmp_version":2,"mcast_mld_version":1,"nf_call_iptables":0,"nf_call_ip6tables":0,"nf_call_arptables":0}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":656,"packets":10,"errors":0,"dropped":0,"over_errors":0,"multicast":10},"tx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":31,"link":"e3","ifname":"e3.8","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"linkinfo":{"info_kind":"vlan","info_data":{"protocol":"802.1Q","id":8,"flags":["REORDER_HDR"]}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":5005,"packets":43,"errors":0,"dropped":0,"over_errors":0,"multicast":41},"tx":{"bytes":16009,"packets":79,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":32,"link":"e4","ifname":"e4.8","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"linkinfo":{"info_kind":"vlan","info_data":{"protocol":"802.1Q","id":8,"flags":["REORDER_HDR"]}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":15080,"packets":72,"errors":0,"dropped":0,"over_errors":0,"multicast":70},"tx":{"bytes":15546,"packets":74,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}}] diff --git a/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-j_addr_show_dev_eth0 b/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-j_addr_show_dev_eth0 new file mode 100644 index 00000000..b9552151 --- /dev/null +++ b/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-j_addr_show_dev_eth0 @@ -0,0 +1 @@ +[{"ifindex":23,"link_index":24,"ifname":"eth0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"06:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"addr_info":[{"family":"inet6","local":"fe80::4a0:85ff:fe00:300","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]}] diff --git a/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-j_addr_show_dev_eth1 b/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-j_addr_show_dev_eth1 new file mode 100644 index 00000000..f6e5f6f2 --- /dev/null +++ b/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-j_addr_show_dev_eth1 @@ -0,0 +1 @@ +[{"ifindex":28,"link_index":29,"ifname":"eth1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"06:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"addr_info":[{"family":"inet6","local":"fe80::4a0:85ff:fe00:300","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]}] diff --git a/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-s_-d_-j_link_show b/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-s_-d_-j_link_show new file mode 100644 index 00000000..1ac44368 --- /dev/null +++ b/test/case/statd/containers/system/run/ip_netns_exec_netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910_ip_-s_-d_-j_link_show @@ -0,0 +1 @@ +[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":0,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":28,"packets":1,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":28,"packets":1,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":23,"link_index":24,"ifname":"eth0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"06:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth"},"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"ifalias":"veth2a","stats64":{"rx":{"bytes":28028,"packets":123,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":796,"packets":10,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":28,"link_index":29,"ifname":"eth1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"06:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth"},"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"ifalias":"veth3a","stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":796,"packets":10,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}}] diff --git a/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-j_addr_show_dev_br0 b/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-j_addr_show_dev_br0 new file mode 100644 index 00000000..3cfbcc96 --- /dev/null +++ b/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-j_addr_show_dev_br0 @@ -0,0 +1 @@ +[{"ifindex":21,"link_index":22,"ifname":"br0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"06:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"addr_info":[{"family":"inet","local":"169.254.1.2","prefixlen":16,"broadcast":"169.254.255.255","scope":"global","label":"br0","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"fe80::4a0:85ff:fe00:300","prefixlen":64,"scope":"link","dadfailed":true,"tentative":true,"protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]}] diff --git a/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-j_addr_show_dev_br1 b/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-j_addr_show_dev_br1 new file mode 100644 index 00000000..7e884211 --- /dev/null +++ b/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-j_addr_show_dev_br1 @@ -0,0 +1 @@ +[{"ifindex":26,"link_index":27,"ifname":"br1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"06:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"addr_info":[{"family":"inet6","local":"fe80::4a0:85ff:fe00:300","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]}] diff --git a/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-s_-d_-j_link_show b/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-s_-d_-j_link_show new file mode 100644 index 00000000..ed8ff2c1 --- /dev/null +++ b/test/case/statd/containers/system/run/ip_netns_exec_netns-769ed047-f7d6-211b-728b-46c24d727874_ip_-s_-d_-j_link_show @@ -0,0 +1 @@ +[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":0,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":28,"packets":1,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":28,"packets":1,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":21,"link_index":22,"ifname":"br0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"06:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth"},"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"ifalias":"veth0a","stats64":{"rx":{"bytes":28425,"packets":124,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":1625,"packets":20,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":26,"link_index":27,"ifname":"br1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"06:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","link_netnsid":0,"promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"veth"},"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"ifalias":"veth1a","stats64":{"rx":{"bytes":0,"packets":0,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":796,"packets":10,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}}] diff --git a/test/case/statd/containers/system/run/podman_inspect_container-A b/test/case/statd/containers/system/run/podman_inspect_container-A new file mode 100644 index 00000000..52540fb6 --- /dev/null +++ b/test/case/statd/containers/system/run/podman_inspect_container-A @@ -0,0 +1,348 @@ +[ + { + "Id": "93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e", + "Created": "2025-01-20T09:59:10.084076243Z", + "Path": "/usr/bin/tini", + "Args": [ + "--", + "/usr/sbin/httpd", + "-f", + "-v", + "-p", + "91" + ], + "State": { + "OciVersion": "1.1.0-rc.1", + "Status": "running", + "Running": true, + "Paused": false, + "Restarting": false, + "OOMKilled": false, + "Dead": false, + "Pid": 25343, + "ConmonPid": 25341, + "ExitCode": 0, + "Error": "", + "StartedAt": "2025-01-20T09:59:10.208616914Z", + "FinishedAt": "0001-01-01T00:00:00Z", + "Health": { + "Status": "", + "FailingStreak": 0, + "Log": null + }, + "CgroupPath": "/containers/libpod-93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e", + "CheckpointedAt": "0001-01-01T00:00:00Z", + "RestoredAt": "0001-01-01T00:00:00Z" + }, + "Image": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033", + "ImageDigest": "sha256:bd3f18b45e02eac2ac96a8d329963ae18b1bcecf924ff1c98148ad178982f01d", + "ImageName": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "Rootfs": "", + "Pod": "", + "ResolvConfPath": "/run/containers/storage/overlay-containers/93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e/userdata/resolv.conf", + "HostnamePath": "/run/containers/storage/overlay-containers/93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e/userdata/hostname", + "HostsPath": "/run/containers/storage/overlay-containers/93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e/userdata/hosts", + "StaticDir": "/var/lib/containers/storage/overlay-containers/93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e/userdata", + "OCIConfigPath": "/var/lib/containers/storage/overlay-containers/93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e/userdata/config.json", + "OCIRuntime": "crun", + "ConmonPidFile": "/run/container:container-A.pid", + "PidFile": "/run/containers/storage/overlay-containers/93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e/userdata/pidfile", + "Name": "container-A", + "RestartCount": 0, + "Driver": "overlay", + "MountLabel": "", + "ProcessLabel": "", + "AppArmorProfile": "", + "EffectiveCaps": [ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_KILL", + "CAP_NET_BIND_SERVICE", + "CAP_SETFCAP", + "CAP_SETGID", + "CAP_SETPCAP", + "CAP_SETUID", + "CAP_SYS_CHROOT" + ], + "BoundingCaps": [ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_KILL", + "CAP_NET_BIND_SERVICE", + "CAP_SETFCAP", + "CAP_SETGID", + "CAP_SETPCAP", + "CAP_SETUID", + "CAP_SYS_CHROOT" + ], + "ExecIDs": [], + "GraphDriver": { + "Name": "overlay", + "Data": { + "LowerDir": "/var/lib/containers/storage/overlay/7f1ed5e7f0b5c759a9e1864bdb0bf0b03751a85345c51a97cea18d4701f2fb53/diff", + "MergedDir": "/var/lib/containers/storage/overlay/4f3e9ccc3864e3b663061db696ae34ae75248f64c2139b0cc4f7da4d01a2a6e1/merged", + "UpperDir": "/var/lib/containers/storage/overlay/4f3e9ccc3864e3b663061db696ae34ae75248f64c2139b0cc4f7da4d01a2a6e1/diff", + "WorkDir": "/var/lib/containers/storage/overlay/4f3e9ccc3864e3b663061db696ae34ae75248f64c2139b0cc4f7da4d01a2a6e1/work" + } + }, + "Mounts": [ + { + "Type": "bind", + "Source": "/run/containers/files/container-A-index.html", + "Destination": "/var/www/index.html", + "Driver": "", + "Mode": "", + "Options": [ + "nosuid", + "nodev", + "rbind" + ], + "RW": false, + "Propagation": "rprivate" + } + ], + "Dependencies": [], + "NetworkSettings": { + "EndpointID": "", + "Gateway": "", + "IPAddress": "", + "IPPrefixLen": 0, + "IPv6Gateway": "", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "MacAddress": "", + "Bridge": "", + "SandboxID": "", + "HairpinMode": false, + "LinkLocalIPv6Address": "", + "LinkLocalIPv6PrefixLen": 0, + "Ports": { + "80/tcp": null, + "91/tcp": [ + { + "HostIp": "", + "HostPort": "36971" + } + ] + }, + "SandboxKey": "/run/netns/netns-769ed047-f7d6-211b-728b-46c24d727874", + "Networks": { + "veth0a": { + "EndpointID": "", + "Gateway": "", + "IPAddress": "169.254.1.2", + "IPPrefixLen": 16, + "IPv6Gateway": "", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "MacAddress": "06:a0:85:00:03:00", + "NetworkID": "veth0a", + "DriverOpts": null, + "IPAMConfig": null, + "Links": null, + "Aliases": [ + "93753e99ceb3" + ] + }, + "veth1a": { + "EndpointID": "", + "Gateway": "", + "IPAddress": "", + "IPPrefixLen": 0, + "IPv6Gateway": "", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "MacAddress": "06:a0:85:00:03:00", + "NetworkID": "veth1a", + "DriverOpts": null, + "IPAMConfig": null, + "Links": null, + "Aliases": [ + "93753e99ceb3" + ] + } + } + }, + "Namespace": "", + "IsInfra": false, + "IsService": false, + "Config": { + "Hostname": "web-container-00-03-00", + "Domainname": "", + "User": "0", + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "TERM=xterm", + "container=podman", + "HOSTNAME=web-container-00-03-00", + "HOME=/root" + ], + "Cmd": [ + "/usr/sbin/httpd", + "-f", + "-v", + "-p", + "91" + ], + "Image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "Volumes": null, + "WorkingDir": "/var/www", + "Entrypoint": "/usr/bin/tini --", + "OnBuild": null, + "Labels": { + "org.opencontainers.image.title": "curiOS-httpd", + "org.opencontainers.image.url": "https://github.com/kernelkit/curiOS" + }, + "Annotations": { + "io.container.manager": "libpod", + "org.opencontainers.image.stopSignal": "15" + }, + "StopSignal": 15, + "HealthcheckOnFailureAction": "none", + "CreateCommand": [ + "podman", + "create", + "--name", + "container-A", + "--conmon-pidfile=/run/container:container-A.pid", + "--read-only", + "--replace", + "--quiet", + "--cgroup-parent=containers", + "--restart=on-failure:10", + "--systemd=false", + "--tz=local", + "--mount=type=bind,src=/run/containers/files/container-A-index.html,dst=/var/www/index.html,readonly=true", + "--hostname", + "web-container-00-03-00", + "-p", + "91", + "--log-driver", + "syslog", + "--net=veth0a:interface_name=br0", + "--net=veth1a:interface_name=br1", + "curios-httpd-oci-amd64-v24.11.0", + "/usr/sbin/httpd", + "-f", + "-v", + "-p", + "91" + ], + "Timezone": "local", + "Umask": "0022", + "Timeout": 0, + "StopTimeout": 10, + "Passwd": true, + "sdNotifyMode": "container" + }, + "HostConfig": { + "Binds": [ + "/run/containers/files/container-A-index.html:/var/www/index.html:ro,rprivate,nosuid,nodev,rbind" + ], + "CgroupManager": "cgroupfs", + "CgroupMode": "private", + "ContainerIDFile": "", + "LogConfig": { + "Type": "syslog", + "Config": null, + "Path": "", + "Tag": "", + "Size": "0B" + }, + "NetworkMode": "bridge", + "PortBindings": { + "91/tcp": [ + { + "HostIp": "", + "HostPort": "36971" + } + ] + }, + "RestartPolicy": { + "Name": "on-failure", + "MaximumRetryCount": 10 + }, + "AutoRemove": false, + "VolumeDriver": "", + "VolumesFrom": null, + "CapAdd": [], + "CapDrop": [], + "Dns": [], + "DnsOptions": [], + "DnsSearch": [], + "ExtraHosts": [], + "GroupAdd": [], + "IpcMode": "shareable", + "Cgroup": "", + "Cgroups": "default", + "Links": null, + "OomScoreAdj": 0, + "PidMode": "private", + "Privileged": false, + "PublishAllPorts": false, + "ReadonlyRootfs": true, + "SecurityOpt": [], + "Tmpfs": {}, + "UTSMode": "private", + "UsernsMode": "", + "ShmSize": 65536000, + "Runtime": "oci", + "ConsoleSize": [ + 0, + 0 + ], + "Isolation": "", + "CpuShares": 0, + "Memory": 0, + "NanoCpus": 0, + "CgroupParent": "containers", + "BlkioWeight": 0, + "BlkioWeightDevice": null, + "BlkioDeviceReadBps": null, + "BlkioDeviceWriteBps": null, + "BlkioDeviceReadIOps": null, + "BlkioDeviceWriteIOps": null, + "CpuPeriod": 0, + "CpuQuota": 0, + "CpuRealtimePeriod": 0, + "CpuRealtimeRuntime": 0, + "CpusetCpus": "", + "CpusetMems": "", + "Devices": [], + "DiskQuota": 0, + "KernelMemory": 0, + "MemoryReservation": 0, + "MemorySwap": 0, + "MemorySwappiness": 0, + "OomKillDisable": false, + "PidsLimit": 2048, + "Ulimits": [ + { + "Name": "RLIMIT_NOFILE", + "Soft": 1048576, + "Hard": 1048576 + }, + { + "Name": "RLIMIT_NPROC", + "Soft": 32768, + "Hard": 32768 + } + ], + "CpuCount": 0, + "CpuPercent": 0, + "IOMaximumIOps": 0, + "IOMaximumBandwidth": 0, + "CgroupConf": null + } + } +] diff --git a/test/case/statd/containers/system/run/podman_inspect_container-B b/test/case/statd/containers/system/run/podman_inspect_container-B new file mode 100644 index 00000000..4a20406e --- /dev/null +++ b/test/case/statd/containers/system/run/podman_inspect_container-B @@ -0,0 +1,368 @@ +[ + { + "Id": "0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3", + "Created": "2025-01-20T09:59:09.376207821Z", + "Path": "/usr/bin/tini", + "Args": [ + "--", + "/usr/sbin/httpd", + "-f", + "-v" + ], + "State": { + "OciVersion": "1.1.0-rc.1", + "Status": "running", + "Running": true, + "Paused": false, + "Restarting": false, + "OOMKilled": false, + "Dead": false, + "Pid": 25086, + "ConmonPid": 25080, + "ExitCode": 0, + "Error": "", + "StartedAt": "2025-01-20T09:59:09.771128108Z", + "FinishedAt": "0001-01-01T00:00:00Z", + "Health": { + "Status": "", + "FailingStreak": 0, + "Log": null + }, + "CgroupPath": "/containers/libpod-0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3", + "CheckpointedAt": "0001-01-01T00:00:00Z", + "RestoredAt": "0001-01-01T00:00:00Z" + }, + "Image": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033", + "ImageDigest": "sha256:bd3f18b45e02eac2ac96a8d329963ae18b1bcecf924ff1c98148ad178982f01d", + "ImageName": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "Rootfs": "", + "Pod": "", + "ResolvConfPath": "/run/containers/storage/overlay-containers/0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3/userdata/resolv.conf", + "HostnamePath": "/run/containers/storage/overlay-containers/0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3/userdata/hostname", + "HostsPath": "/run/containers/storage/overlay-containers/0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3/userdata/hosts", + "StaticDir": "/var/lib/containers/storage/overlay-containers/0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3/userdata", + "OCIConfigPath": "/var/lib/containers/storage/overlay-containers/0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3/userdata/config.json", + "OCIRuntime": "crun", + "ConmonPidFile": "/run/container:container-B.pid", + "PidFile": "/run/containers/storage/overlay-containers/0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3/userdata/pidfile", + "Name": "container-B", + "RestartCount": 0, + "Driver": "overlay", + "MountLabel": "", + "ProcessLabel": "", + "AppArmorProfile": "", + "EffectiveCaps": [ + "CAP_AUDIT_CONTROL", + "CAP_AUDIT_READ", + "CAP_AUDIT_WRITE", + "CAP_BLOCK_SUSPEND", + "CAP_BPF", + "CAP_CHECKPOINT_RESTORE", + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_KILL", + "CAP_LEASE", + "CAP_LINUX_IMMUTABLE", + "CAP_MAC_ADMIN", + "CAP_MAC_OVERRIDE", + "CAP_MKNOD", + "CAP_NET_ADMIN", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_RAW", + "CAP_PERFMON", + "CAP_SETFCAP", + "CAP_SETGID", + "CAP_SETPCAP", + "CAP_SETUID", + "CAP_SYSLOG", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_CHROOT", + "CAP_SYS_MODULE", + "CAP_SYS_NICE", + "CAP_SYS_PACCT", + "CAP_SYS_PTRACE", + "CAP_SYS_RAWIO", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_WAKE_ALARM" + ], + "BoundingCaps": [ + "CAP_AUDIT_CONTROL", + "CAP_AUDIT_READ", + "CAP_AUDIT_WRITE", + "CAP_BLOCK_SUSPEND", + "CAP_BPF", + "CAP_CHECKPOINT_RESTORE", + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_KILL", + "CAP_LEASE", + "CAP_LINUX_IMMUTABLE", + "CAP_MAC_ADMIN", + "CAP_MAC_OVERRIDE", + "CAP_MKNOD", + "CAP_NET_ADMIN", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_RAW", + "CAP_PERFMON", + "CAP_SETFCAP", + "CAP_SETGID", + "CAP_SETPCAP", + "CAP_SETUID", + "CAP_SYSLOG", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_CHROOT", + "CAP_SYS_MODULE", + "CAP_SYS_NICE", + "CAP_SYS_PACCT", + "CAP_SYS_PTRACE", + "CAP_SYS_RAWIO", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_WAKE_ALARM" + ], + "ExecIDs": [], + "GraphDriver": { + "Name": "overlay", + "Data": { + "LowerDir": "/var/lib/containers/storage/overlay/7f1ed5e7f0b5c759a9e1864bdb0bf0b03751a85345c51a97cea18d4701f2fb53/diff", + "MergedDir": "/var/lib/containers/storage/overlay/dddcf27b3db1e47b06e1662850c22494fe52fc11d4094b91923251b797e71c1a/merged", + "UpperDir": "/var/lib/containers/storage/overlay/dddcf27b3db1e47b06e1662850c22494fe52fc11d4094b91923251b797e71c1a/diff", + "WorkDir": "/var/lib/containers/storage/overlay/dddcf27b3db1e47b06e1662850c22494fe52fc11d4094b91923251b797e71c1a/work" + } + }, + "Mounts": [], + "Dependencies": [], + "NetworkSettings": { + "EndpointID": "", + "Gateway": "", + "IPAddress": "", + "IPPrefixLen": 0, + "IPv6Gateway": "", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "MacAddress": "", + "Bridge": "", + "SandboxID": "", + "HairpinMode": false, + "LinkLocalIPv6Address": "", + "LinkLocalIPv6PrefixLen": 0, + "Ports": { + "80/tcp": null + }, + "SandboxKey": "/run/netns/netns-3ea40bc1-9daa-902c-71e0-81b6d69cd910", + "Networks": { + "veth2a": { + "EndpointID": "", + "Gateway": "", + "IPAddress": "", + "IPPrefixLen": 0, + "IPv6Gateway": "", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "MacAddress": "06:a0:85:00:03:00", + "NetworkID": "veth2a", + "DriverOpts": null, + "IPAMConfig": null, + "Links": null, + "Aliases": [ + "0aed2ca36b5e" + ] + }, + "veth3a": { + "EndpointID": "", + "Gateway": "", + "IPAddress": "", + "IPPrefixLen": 0, + "IPv6Gateway": "", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "MacAddress": "06:a0:85:00:03:00", + "NetworkID": "veth3a", + "DriverOpts": null, + "IPAMConfig": null, + "Links": null, + "Aliases": [ + "0aed2ca36b5e" + ] + } + } + }, + "Namespace": "", + "IsInfra": false, + "IsService": false, + "Config": { + "Hostname": "web-container-00-03-00", + "Domainname": "", + "User": "0", + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "TERM=xterm", + "container=podman", + "HOSTNAME=web-container-00-03-00", + "HOME=/root" + ], + "Cmd": [ + "/usr/sbin/httpd", + "-f", + "-v" + ], + "Image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "Volumes": null, + "WorkingDir": "/var/www", + "Entrypoint": "/usr/bin/tini --", + "OnBuild": null, + "Labels": { + "org.opencontainers.image.title": "curiOS-httpd", + "org.opencontainers.image.url": "https://github.com/kernelkit/curiOS" + }, + "Annotations": { + "io.container.manager": "libpod", + "io.podman.annotations.privileged": "TRUE", + "org.opencontainers.image.stopSignal": "15" + }, + "StopSignal": 15, + "HealthcheckOnFailureAction": "none", + "CreateCommand": [ + "podman", + "create", + "--name", + "container-B", + "--conmon-pidfile=/run/container:container-B.pid", + "--read-only", + "--replace", + "--quiet", + "--cgroup-parent=containers", + "--restart=on-failure:10", + "--systemd=false", + "--tz=local", + "--privileged=true", + "--hostname", + "web-container-00-03-00", + "--log-driver", + "syslog", + "--net=veth2a:ip=169.254.1.3", + "--net=veth3a", + "curios-httpd-oci-amd64-v24.11.0" + ], + "Timezone": "local", + "Umask": "0022", + "Timeout": 0, + "StopTimeout": 10, + "Passwd": true, + "sdNotifyMode": "container" + }, + "HostConfig": { + "Binds": [], + "CgroupManager": "cgroupfs", + "CgroupMode": "private", + "ContainerIDFile": "", + "LogConfig": { + "Type": "syslog", + "Config": null, + "Path": "", + "Tag": "", + "Size": "0B" + }, + "NetworkMode": "bridge", + "PortBindings": {}, + "RestartPolicy": { + "Name": "on-failure", + "MaximumRetryCount": 10 + }, + "AutoRemove": false, + "VolumeDriver": "", + "VolumesFrom": null, + "CapAdd": [], + "CapDrop": [], + "Dns": [], + "DnsOptions": [], + "DnsSearch": [], + "ExtraHosts": [], + "GroupAdd": [], + "IpcMode": "shareable", + "Cgroup": "", + "Cgroups": "default", + "Links": null, + "OomScoreAdj": 0, + "PidMode": "private", + "Privileged": true, + "PublishAllPorts": false, + "ReadonlyRootfs": true, + "SecurityOpt": [], + "Tmpfs": {}, + "UTSMode": "private", + "UsernsMode": "", + "ShmSize": 65536000, + "Runtime": "oci", + "ConsoleSize": [ + 0, + 0 + ], + "Isolation": "", + "CpuShares": 0, + "Memory": 0, + "NanoCpus": 0, + "CgroupParent": "containers", + "BlkioWeight": 0, + "BlkioWeightDevice": null, + "BlkioDeviceReadBps": null, + "BlkioDeviceWriteBps": null, + "BlkioDeviceReadIOps": null, + "BlkioDeviceWriteIOps": null, + "CpuPeriod": 0, + "CpuQuota": 0, + "CpuRealtimePeriod": 0, + "CpuRealtimeRuntime": 0, + "CpusetCpus": "", + "CpusetMems": "", + "Devices": [], + "DiskQuota": 0, + "KernelMemory": 0, + "MemoryReservation": 0, + "MemorySwap": 0, + "MemorySwappiness": 0, + "OomKillDisable": false, + "PidsLimit": 2048, + "Ulimits": [ + { + "Name": "RLIMIT_NOFILE", + "Soft": 1048576, + "Hard": 1048576 + }, + { + "Name": "RLIMIT_NPROC", + "Soft": 32768, + "Hard": 32768 + } + ], + "CpuCount": 0, + "CpuPercent": 0, + "IOMaximumIOps": 0, + "IOMaximumBandwidth": 0, + "CgroupConf": null + } + } +] diff --git a/test/case/statd/containers/system/run/podman_inspect_firewall b/test/case/statd/containers/system/run/podman_inspect_firewall new file mode 100644 index 00000000..d5b37cc0 --- /dev/null +++ b/test/case/statd/containers/system/run/podman_inspect_firewall @@ -0,0 +1,359 @@ +[ + { + "Id": "3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8", + "Created": "2025-01-20T09:59:09.523653759Z", + "Path": "/usr/bin/tini", + "Args": [ + "--", + "/usr/sbin/nft-helper", + "/etc/nftables.conf" + ], + "State": { + "OciVersion": "1.1.0-rc.1", + "Status": "running", + "Running": true, + "Paused": false, + "Restarting": false, + "OOMKilled": false, + "Dead": false, + "Pid": 25085, + "ConmonPid": 25083, + "ExitCode": 0, + "Error": "", + "StartedAt": "2025-01-20T09:59:09.756062512Z", + "FinishedAt": "0001-01-01T00:00:00Z", + "Health": { + "Status": "", + "FailingStreak": 0, + "Log": null + }, + "CgroupPath": "/containers/libpod-3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8", + "CheckpointedAt": "0001-01-01T00:00:00Z", + "RestoredAt": "0001-01-01T00:00:00Z" + }, + "Image": "7a3cc502436250357a6664100a600f306334b4d7203890b85b7ea9b8da6b5665", + "ImageDigest": "sha256:269ef1857e6bb63f20a70a827a7afddd620eac94d5c7ec11618121b9e271f758", + "ImageName": "localhost/curios-nftables-oci-amd64-v24.11.0:latest", + "Rootfs": "", + "Pod": "", + "ResolvConfPath": "/run/containers/storage/overlay-containers/3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8/userdata/resolv.conf", + "HostnamePath": "/run/containers/storage/overlay-containers/3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8/userdata/hostname", + "HostsPath": "/run/containers/storage/overlay-containers/3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8/userdata/hosts", + "StaticDir": "/var/lib/containers/storage/overlay-containers/3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8/userdata", + "OCIConfigPath": "/var/lib/containers/storage/overlay-containers/3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8/userdata/config.json", + "OCIRuntime": "crun", + "ConmonPidFile": "/run/container:firewall.pid", + "PidFile": "/run/containers/storage/overlay-containers/3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8/userdata/pidfile", + "Name": "firewall", + "RestartCount": 0, + "Driver": "overlay", + "MountLabel": "", + "ProcessLabel": "", + "AppArmorProfile": "", + "EffectiveCaps": [ + "CAP_AUDIT_CONTROL", + "CAP_AUDIT_READ", + "CAP_AUDIT_WRITE", + "CAP_BLOCK_SUSPEND", + "CAP_BPF", + "CAP_CHECKPOINT_RESTORE", + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_KILL", + "CAP_LEASE", + "CAP_LINUX_IMMUTABLE", + "CAP_MAC_ADMIN", + "CAP_MAC_OVERRIDE", + "CAP_MKNOD", + "CAP_NET_ADMIN", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_RAW", + "CAP_PERFMON", + "CAP_SETFCAP", + "CAP_SETGID", + "CAP_SETPCAP", + "CAP_SETUID", + "CAP_SYSLOG", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_CHROOT", + "CAP_SYS_MODULE", + "CAP_SYS_NICE", + "CAP_SYS_PACCT", + "CAP_SYS_PTRACE", + "CAP_SYS_RAWIO", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_WAKE_ALARM" + ], + "BoundingCaps": [ + "CAP_AUDIT_CONTROL", + "CAP_AUDIT_READ", + "CAP_AUDIT_WRITE", + "CAP_BLOCK_SUSPEND", + "CAP_BPF", + "CAP_CHECKPOINT_RESTORE", + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_KILL", + "CAP_LEASE", + "CAP_LINUX_IMMUTABLE", + "CAP_MAC_ADMIN", + "CAP_MAC_OVERRIDE", + "CAP_MKNOD", + "CAP_NET_ADMIN", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_RAW", + "CAP_PERFMON", + "CAP_SETFCAP", + "CAP_SETGID", + "CAP_SETPCAP", + "CAP_SETUID", + "CAP_SYSLOG", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_CHROOT", + "CAP_SYS_MODULE", + "CAP_SYS_NICE", + "CAP_SYS_PACCT", + "CAP_SYS_PTRACE", + "CAP_SYS_RAWIO", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_WAKE_ALARM" + ], + "ExecIDs": [], + "GraphDriver": { + "Name": "overlay", + "Data": { + "LowerDir": "/var/lib/containers/storage/overlay/5a47f694a11e7abd644d015c96ebe954f5d3099459c7c8dc847b2d8809895f0e/diff", + "MergedDir": "/var/lib/containers/storage/overlay/4965d52024a50f88cf0302aa9a270eddcfdd223347c3f9c8062d481d5d4a4a84/merged", + "UpperDir": "/var/lib/containers/storage/overlay/4965d52024a50f88cf0302aa9a270eddcfdd223347c3f9c8062d481d5d4a4a84/diff", + "WorkDir": "/var/lib/containers/storage/overlay/4965d52024a50f88cf0302aa9a270eddcfdd223347c3f9c8062d481d5d4a4a84/work" + } + }, + "Mounts": [ + { + "Type": "bind", + "Source": "/run/containers/files/firewall-nftables.conf", + "Destination": "/etc/nftables.conf", + "Driver": "", + "Mode": "", + "Options": [ + "nosuid", + "nodev", + "rbind" + ], + "RW": false, + "Propagation": "rprivate" + } + ], + "Dependencies": [], + "NetworkSettings": { + "EndpointID": "", + "Gateway": "", + "IPAddress": "", + "IPPrefixLen": 0, + "IPv6Gateway": "", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "MacAddress": "", + "Bridge": "", + "SandboxID": "", + "HairpinMode": false, + "LinkLocalIPv6Address": "", + "LinkLocalIPv6PrefixLen": 0, + "Ports": {}, + "SandboxKey": "", + "Networks": { + "host": { + "EndpointID": "", + "Gateway": "", + "IPAddress": "", + "IPPrefixLen": 0, + "IPv6Gateway": "", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "MacAddress": "", + "NetworkID": "host", + "DriverOpts": null, + "IPAMConfig": null, + "Links": null + } + } + }, + "Namespace": "", + "IsInfra": false, + "IsService": false, + "Config": { + "Hostname": "R1", + "Domainname": "", + "User": "0", + "AttachStdin": false, + "AttachStdout": false, + "AttachStderr": false, + "Tty": false, + "OpenStdin": false, + "StdinOnce": false, + "Env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "TERM=xterm", + "container=podman", + "HOME=/root", + "HOSTNAME=R1" + ], + "Cmd": [ + "/usr/sbin/nft-helper", + "/etc/nftables.conf" + ], + "Image": "localhost/curios-nftables-oci-amd64-v24.11.0:latest", + "Volumes": null, + "WorkingDir": "/", + "Entrypoint": "/usr/bin/tini --", + "OnBuild": null, + "Labels": { + "org.opencontainers.image.title": "curiOS-nftables", + "org.opencontainers.image.url": "https://github.com/kernelkit/curiOS" + }, + "Annotations": { + "io.container.manager": "libpod", + "io.podman.annotations.privileged": "TRUE", + "org.opencontainers.image.stopSignal": "15" + }, + "StopSignal": 15, + "HealthcheckOnFailureAction": "none", + "CreateCommand": [ + "podman", + "create", + "--name", + "firewall", + "--conmon-pidfile=/run/container:firewall.pid", + "--read-only", + "--replace", + "--quiet", + "--cgroup-parent=containers", + "--restart=always", + "--systemd=false", + "--tz=local", + "--privileged=true", + "--mount=type=bind,src=/run/containers/files/firewall-nftables.conf,dst=/etc/nftables.conf,readonly=true", + "--log-driver", + "syslog", + "--net=host", + "curios-nftables-oci-amd64-v24.11.0" + ], + "Timezone": "local", + "Umask": "0022", + "Timeout": 0, + "StopTimeout": 10, + "Passwd": true, + "sdNotifyMode": "container" + }, + "HostConfig": { + "Binds": [ + "/run/containers/files/firewall-nftables.conf:/etc/nftables.conf:ro,rprivate,nosuid,nodev,rbind" + ], + "CgroupManager": "cgroupfs", + "CgroupMode": "private", + "ContainerIDFile": "", + "LogConfig": { + "Type": "syslog", + "Config": null, + "Path": "", + "Tag": "", + "Size": "0B" + }, + "NetworkMode": "host", + "PortBindings": {}, + "RestartPolicy": { + "Name": "always", + "MaximumRetryCount": 0 + }, + "AutoRemove": false, + "VolumeDriver": "", + "VolumesFrom": null, + "CapAdd": [], + "CapDrop": [], + "Dns": [], + "DnsOptions": [], + "DnsSearch": [], + "ExtraHosts": [], + "GroupAdd": [], + "IpcMode": "shareable", + "Cgroup": "", + "Cgroups": "default", + "Links": null, + "OomScoreAdj": 0, + "PidMode": "private", + "Privileged": true, + "PublishAllPorts": false, + "ReadonlyRootfs": true, + "SecurityOpt": [], + "Tmpfs": {}, + "UTSMode": "private", + "UsernsMode": "", + "ShmSize": 65536000, + "Runtime": "oci", + "ConsoleSize": [ + 0, + 0 + ], + "Isolation": "", + "CpuShares": 0, + "Memory": 0, + "NanoCpus": 0, + "CgroupParent": "containers", + "BlkioWeight": 0, + "BlkioWeightDevice": null, + "BlkioDeviceReadBps": null, + "BlkioDeviceWriteBps": null, + "BlkioDeviceReadIOps": null, + "BlkioDeviceWriteIOps": null, + "CpuPeriod": 0, + "CpuQuota": 0, + "CpuRealtimePeriod": 0, + "CpuRealtimeRuntime": 0, + "CpusetCpus": "", + "CpusetMems": "", + "Devices": [], + "DiskQuota": 0, + "KernelMemory": 0, + "MemoryReservation": 0, + "MemorySwap": 0, + "MemorySwappiness": 0, + "OomKillDisable": false, + "PidsLimit": 2048, + "Ulimits": [ + { + "Name": "RLIMIT_NOFILE", + "Soft": 1048576, + "Hard": 1048576 + }, + { + "Name": "RLIMIT_NPROC", + "Soft": 32768, + "Hard": 32768 + } + ], + "CpuCount": 0, + "CpuPercent": 0, + "IOMaximumIOps": 0, + "IOMaximumBandwidth": 0, + "CgroupConf": null + } + } +] diff --git a/test/case/statd/containers/system/run/podman_ps_-a_--format=json b/test/case/statd/containers/system/run/podman_ps_-a_--format=json new file mode 100644 index 00000000..c12e4c77 --- /dev/null +++ b/test/case/statd/containers/system/run/podman_ps_-a_--format=json @@ -0,0 +1,132 @@ +[ + { + "AutoRemove": false, + "Command": [ + "/usr/sbin/httpd", + "-f", + "-v" + ], + "CreatedAt": "About a minute ago", + "Exited": false, + "ExitedAt": -62135596800, + "ExitCode": 0, + "Id": "0aed2ca36b5e9012d8d647a684047410444c0e3134987f0c020bf0234ef0e0f3", + "Image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "ImageID": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033", + "IsInfra": false, + "Labels": { + "org.opencontainers.image.title": "curiOS-httpd", + "org.opencontainers.image.url": "https://github.com/kernelkit/curiOS" + }, + "Mounts": [], + "Names": [ + "container-B" + ], + "Namespaces": { + + }, + "Networks": [ + "veth2a", + "veth3a" + ], + "Pid": 25086, + "Pod": "", + "PodName": "", + "Ports": null, + "Size": null, + "StartedAt": 1737367149, + "State": "running", + "Status": "Up About a minute", + "Created": 1737367149 + }, + { + "AutoRemove": false, + "Command": [ + "/usr/sbin/nft-helper", + "/etc/nftables.conf" + ], + "CreatedAt": "About a minute ago", + "Exited": false, + "ExitedAt": -62135596800, + "ExitCode": 0, + "Id": "3d9ac5c827ed9dba01401774283f00a1a79b19375fba1a3849cf64b5ed68dbb8", + "Image": "localhost/curios-nftables-oci-amd64-v24.11.0:latest", + "ImageID": "7a3cc502436250357a6664100a600f306334b4d7203890b85b7ea9b8da6b5665", + "IsInfra": false, + "Labels": { + "org.opencontainers.image.title": "curiOS-nftables", + "org.opencontainers.image.url": "https://github.com/kernelkit/curiOS" + }, + "Mounts": [ + "/etc/nftables.conf" + ], + "Names": [ + "firewall" + ], + "Namespaces": { + + }, + "Networks": [], + "Pid": 25085, + "Pod": "", + "PodName": "", + "Ports": null, + "Size": null, + "StartedAt": 1737367149, + "State": "running", + "Status": "Up About a minute", + "Created": 1737367149 + }, + { + "AutoRemove": false, + "Command": [ + "/usr/sbin/httpd", + "-f", + "-v", + "-p", + "91" + ], + "CreatedAt": "About a minute ago", + "Exited": false, + "ExitedAt": -62135596800, + "ExitCode": 0, + "Id": "93753e99ceb3bc80c3a3002952f3d8f130deb77924e352d8e49f5c822c3af34e", + "Image": "localhost/curios-httpd-oci-amd64-v24.11.0:latest", + "ImageID": "d6930d60a73be9980f8e19b4b4f63586a6d3492178e20bea962e4e9b8c654033", + "IsInfra": false, + "Labels": { + "org.opencontainers.image.title": "curiOS-httpd", + "org.opencontainers.image.url": "https://github.com/kernelkit/curiOS" + }, + "Mounts": [ + "/var/www/index.html" + ], + "Names": [ + "container-A" + ], + "Namespaces": { + + }, + "Networks": [ + "veth0a", + "veth1a" + ], + "Pid": 25343, + "Pod": "", + "PodName": "", + "Ports": [ + { + "host_ip": "", + "container_port": 91, + "host_port": 36971, + "range": 1, + "protocol": "tcp" + } + ], + "Size": null, + "StartedAt": 1737367150, + "State": "running", + "Status": "Up About a minute", + "Created": 1737367150 + } +] diff --git a/test/case/statd/containers/system/run/vtysh_-c_show-ip-ospf-route-json b/test/case/statd/containers/system/run/vtysh_-c_show-ip-ospf-route-json new file mode 100644 index 00000000..a11de5d1 --- /dev/null +++ b/test/case/statd/containers/system/run/vtysh_-c_show-ip-ospf-route-json @@ -0,0 +1 @@ +{"0.0.0.0/0":{"routeType":"N IA","cost":2,"area":"0.0.0.1","nexthops":[{"ip":"10.1.1.100","via":"e6","advertisedRouter":"192.168.100.1"}]},"10.1.1.0/24":{"routeType":"N","transit":true,"cost":1,"area":"0.0.0.1","nexthops":[{"ip":" ","directlyAttachedTo":"e6"}]},"10.1.2.0/24":{"routeType":"N","transit":true,"cost":2,"area":"0.0.0.1","nexthops":[{"ip":"10.1.1.100","via":"e6","advertisedRouter":"192.168.100.1"},{"ip":"10.1.2.1","via":"e3.8","advertisedRouter":"192.168.100.1"}]},"10.1.3.0/24":{"routeType":"N","transit":true,"cost":2,"area":"0.0.0.1","nexthops":[{"ip":"10.1.1.100","via":"e6","advertisedRouter":"192.168.100.1"},{"ip":"10.1.3.1","via":"e4.8","advertisedRouter":"192.168.100.1"}]},"192.168.100.1":{"routeType":"R ","cost":1,"area":"0.0.0.1","routerType":"abr","nexthops":[{"ip":"10.1.1.100","via":"e6"}]}} diff --git a/test/case/statd/containers/system/run/vtysh_-c_show-ip-route-json b/test/case/statd/containers/system/run/vtysh_-c_show-ip-route-json new file mode 100644 index 00000000..0a8b0f4b --- /dev/null +++ b/test/case/statd/containers/system/run/vtysh_-c_show-ip-route-json @@ -0,0 +1 @@ +{"0.0.0.0/0":[{"prefix":"0.0.0.0/0","prefixLen":0,"protocol":"ospf","vrfId":0,"vrfName":"default","selected":true,"destSelected":true,"distance":110,"metric":2,"installed":true,"table":254,"internalStatus":16,"internalFlags":8,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":41,"installedNexthopGroupId":41,"uptime":"00:00:40","nexthops":[{"flags":3,"fib":true,"ip":"10.1.1.100","afi":"ipv4","interfaceIndex":7,"interfaceName":"e6","active":true,"weight":1}]},{"prefix":"0.0.0.0/0","prefixLen":0,"protocol":"static","vrfId":0,"vrfName":"default","distance":254,"metric":0,"table":254,"internalStatus":0,"internalFlags":65,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":64,"installedNexthopGroupId":64,"uptime":"00:01:20","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":25,"interfaceName":"br0","active":true,"weight":1}]}],"10.1.1.0/24":[{"prefix":"10.1.1.0/24","prefixLen":24,"protocol":"ospf","vrfId":0,"vrfName":"default","distance":110,"metric":1,"table":254,"internalStatus":0,"internalFlags":0,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":22,"uptime":"00:00:50","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":7,"interfaceName":"e6","active":true,"weight":1}]},{"prefix":"10.1.1.0/24","prefixLen":24,"protocol":"connected","vrfId":0,"vrfName":"default","selected":true,"destSelected":true,"distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":8,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":20,"installedNexthopGroupId":20,"uptime":"00:01:34","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":7,"interfaceName":"e6","active":true}]}],"10.1.1.1/32":[{"prefix":"10.1.1.1/32","prefixLen":32,"protocol":"connected","vrfId":0,"vrfName":"default","distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":0,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":54,"uptime":"00:01:35","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":32,"interfaceName":"e4.8","active":true}]},{"prefix":"10.1.1.1/32","prefixLen":32,"protocol":"connected","vrfId":0,"vrfName":"default","selected":true,"destSelected":true,"distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":8,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":55,"installedNexthopGroupId":55,"uptime":"00:01:35","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":31,"interfaceName":"e3.8","active":true}]}],"10.1.2.0/24":[{"prefix":"10.1.2.0/24","prefixLen":24,"protocol":"ospf","vrfId":0,"vrfName":"default","selected":true,"destSelected":true,"distance":110,"metric":2,"installed":true,"table":254,"internalStatus":16,"internalFlags":8,"internalNextHopNum":2,"internalNextHopActiveNum":2,"nexthopGroupId":76,"installedNexthopGroupId":76,"uptime":"00:00:40","nexthops":[{"flags":3,"fib":true,"ip":"10.1.1.100","afi":"ipv4","interfaceIndex":7,"interfaceName":"e6","active":true,"weight":1},{"flags":11,"fib":true,"ip":"10.1.2.1","afi":"ipv4","interfaceIndex":31,"interfaceName":"e3.8","active":true,"onLink":true,"weight":1}]}],"10.1.3.0/24":[{"prefix":"10.1.3.0/24","prefixLen":24,"protocol":"ospf","vrfId":0,"vrfName":"default","selected":true,"destSelected":true,"distance":110,"metric":2,"installed":true,"table":254,"internalStatus":16,"internalFlags":8,"internalNextHopNum":2,"internalNextHopActiveNum":2,"nexthopGroupId":77,"installedNexthopGroupId":77,"uptime":"00:00:40","nexthops":[{"flags":3,"fib":true,"ip":"10.1.1.100","afi":"ipv4","interfaceIndex":7,"interfaceName":"e6","active":true,"weight":1},{"flags":11,"fib":true,"ip":"10.1.3.1","afi":"ipv4","interfaceIndex":32,"interfaceName":"e4.8","active":true,"onLink":true,"weight":1}]}],"169.254.0.0/16":[{"prefix":"169.254.0.0/16","prefixLen":16,"protocol":"connected","vrfId":0,"vrfName":"default","selected":true,"destSelected":true,"distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":8,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":62,"installedNexthopGroupId":62,"uptime":"00:01:29","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":25,"interfaceName":"br0","active":true}]}]} diff --git a/test/case/statd/containers/system/run/vtysh_-c_show-ipv6-route-json b/test/case/statd/containers/system/run/vtysh_-c_show-ipv6-route-json new file mode 100644 index 00000000..6eb20cab --- /dev/null +++ b/test/case/statd/containers/system/run/vtysh_-c_show-ipv6-route-json @@ -0,0 +1 @@ +{"fe80::/64":[{"prefix":"fe80::/64","prefixLen":64,"protocol":"connected","vrfId":0,"vrfName":"default","distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":0,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":47,"uptime":"00:01:33","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":7,"interfaceName":"e6","active":true}]},{"prefix":"fe80::/64","prefixLen":64,"protocol":"connected","vrfId":0,"vrfName":"default","distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":0,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":59,"uptime":"00:01:33","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":25,"interfaceName":"br0","active":true}]},{"prefix":"fe80::/64","prefixLen":64,"protocol":"connected","vrfId":0,"vrfName":"default","distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":0,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":12,"uptime":"01:55:40","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":6,"interfaceName":"e5","active":true}]},{"prefix":"fe80::/64","prefixLen":64,"protocol":"connected","vrfId":0,"vrfName":"default","distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":0,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":6,"uptime":"01:55:40","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":8,"interfaceName":"e7","active":true}]},{"prefix":"fe80::/64","prefixLen":64,"protocol":"connected","vrfId":0,"vrfName":"default","distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":0,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":7,"uptime":"01:55:40","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":3,"interfaceName":"e2","active":true}]},{"prefix":"fe80::/64","prefixLen":64,"protocol":"connected","vrfId":0,"vrfName":"default","selected":true,"destSelected":true,"distance":0,"metric":0,"installed":true,"table":254,"internalStatus":16,"internalFlags":8,"internalNextHopNum":1,"internalNextHopActiveNum":1,"nexthopGroupId":2,"installedNexthopGroupId":2,"uptime":"01:55:40","nexthops":[{"flags":3,"fib":true,"directlyConnected":true,"interfaceIndex":2,"interfaceName":"e1","active":true}]}]} diff --git a/test/case/statd/containers/system/timestamp b/test/case/statd/containers/system/timestamp new file mode 100644 index 00000000..e1533031 --- /dev/null +++ b/test/case/statd/containers/system/timestamp @@ -0,0 +1,2 @@ +1737367243 + diff --git a/test/case/statd/containers/test b/test/case/statd/containers/test new file mode 100755 index 00000000..8e413f57 --- /dev/null +++ b/test/case/statd/containers/test @@ -0,0 +1,13 @@ +#!/bin/sh + +yang_models="ietf-interfaces ietf-routing ietf-ospf infix-containers" + +gen_test=use_case/ospf_container/test.py +gen_iface=d3a + +cli_commands="show-interfaces" +cli_commands="$cli_commands show-routing-table_--ip_ipv4" +cli_commands="$cli_commands show-routing-table_--ip_ipv6" + +. $(readlink -f $(dirname $0)/../test.sh) +main "$@" From f4c9a57bb51833401540db5160d7b88e5bb68a65 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Mon, 20 Jan 2025 11:11:48 +0100 Subject: [PATCH 12/14] test: statd: Add unittest for ietf-{hardware,system} --- test/case/statd/all.yaml | 2 + test/case/statd/system/cli/show-hardware | 4 + test/case/statd/system/cli/show-ntp | 4 + test/case/statd/system/cli/show-software | 6 + test/case/statd/system/ietf-hardware.json | 26 ++++ test/case/statd/system/ietf-system.json | 98 ++++++++++++++ test/case/statd/system/operational.json | 122 ++++++++++++++++++ .../system/system/rootfs/run/system.json | 1 + .../system/system/run/chronyc_-c_sources | 3 + .../grub-editenv_+mnt+aux+grub+grubenv_list | 7 + .../system/run/rauc-installation-status | 1 + ...auc_status_--detailed_--output-format=json | 1 + test/case/statd/system/test | 13 ++ 13 files changed, 288 insertions(+) create mode 100644 test/case/statd/system/cli/show-hardware create mode 100644 test/case/statd/system/cli/show-ntp create mode 100644 test/case/statd/system/cli/show-software create mode 100644 test/case/statd/system/ietf-hardware.json create mode 100644 test/case/statd/system/ietf-system.json create mode 100644 test/case/statd/system/operational.json create mode 100644 test/case/statd/system/system/rootfs/run/system.json create mode 100644 test/case/statd/system/system/run/chronyc_-c_sources create mode 100644 test/case/statd/system/system/run/grub-editenv_+mnt+aux+grub+grubenv_list create mode 100644 test/case/statd/system/system/run/rauc-installation-status create mode 100644 test/case/statd/system/system/run/rauc_status_--detailed_--output-format=json create mode 100755 test/case/statd/system/test diff --git a/test/case/statd/all.yaml b/test/case/statd/all.yaml index cc2589d5..4f59386d 100644 --- a/test/case/statd/all.yaml +++ b/test/case/statd/all.yaml @@ -3,3 +3,5 @@ name: "containers" - case: interfaces-all/test name: "interfaces-all" +- case: system/test + name: "system" diff --git a/test/case/statd/system/cli/show-hardware b/test/case/statd/system/cli/show-hardware new file mode 100644 index 00000000..29460a6c --- /dev/null +++ b/test/case/statd/system/cli/show-hardware @@ -0,0 +1,4 @@ +USB PORTS  +NAME STATE  +USB unlocked +USB2 unlocked diff --git a/test/case/statd/system/cli/show-ntp b/test/case/statd/system/cli/show-ntp new file mode 100644 index 00000000..5ed95397 --- /dev/null +++ b/test/case/statd/system/cli/show-ntp @@ -0,0 +1,4 @@ +ADDRESS MODE STATE STRATUM POLL-INTERVAL +192.168.1.1 server candidate 1 6 +192.168.2.1 server candidate 1 6 +192.168.3.1 server selected 1 6 diff --git a/test/case/statd/system/cli/show-software b/test/case/statd/system/cli/show-software new file mode 100644 index 00000000..d2e8e23e --- /dev/null +++ b/test/case/statd/system/cli/show-software @@ -0,0 +1,6 @@ +BOOT ORDER +primary secondary net + +NAME STATE VERSION DATE  +secondary inactive 94cd526 2025-01-15T10:00:56Z +primary booted 94cd526 2025-01-15T10:00:56Z diff --git a/test/case/statd/system/ietf-hardware.json b/test/case/statd/system/ietf-hardware.json new file mode 100644 index 00000000..c8153af6 --- /dev/null +++ b/test/case/statd/system/ietf-hardware.json @@ -0,0 +1,26 @@ +{ + "ietf-hardware:hardware": { + "component": [ + { + "name": "product", + "infix-hardware:vpd-data": {} + }, + { + "state": { + "admin-state": "unlocked", + "oper-state": "enabled" + }, + "name": "USB", + "class": "infix-hardware:usb" + }, + { + "state": { + "admin-state": "unlocked", + "oper-state": "enabled" + }, + "name": "USB2", + "class": "infix-hardware:usb" + } + ] + } +} diff --git a/test/case/statd/system/ietf-system.json b/test/case/statd/system/ietf-system.json new file mode 100644 index 00000000..f8e82eab --- /dev/null +++ b/test/case/statd/system/ietf-system.json @@ -0,0 +1,98 @@ +{ + "ietf-system:system-state": { + "infix-system:software": { + "compatible": "infix-x86_64", + "variant": "", + "booted": "primary", + "boot-order": [ + "primary", + "secondary", + "net" + ], + "slot": [ + { + "name": "rootfs.1", + "bootname": "secondary", + "class": "rootfs", + "state": "inactive", + "bundle": { + "compatible": "infix-x86_64", + "version": "94cd526" + }, + "size": "126205952", + "sha256": "6cc0272f46b1a014f91693dc6218ce2f9a4b58bea727c492f6689c3ab102acca", + "installed": { + "datetime": "2025-01-15T10:00:56Z", + "count": 1 + }, + "activated": { + "datetime": "2025-01-15T10:00:56Z", + "count": 1 + } + }, + { + "name": "rootfs.0", + "bootname": "primary", + "class": "rootfs", + "state": "booted", + "bundle": { + "compatible": "infix-x86_64", + "version": "94cd526" + }, + "size": "126205952", + "sha256": "6cc0272f46b1a014f91693dc6218ce2f9a4b58bea727c492f6689c3ab102acca", + "installed": { + "datetime": "2025-01-15T10:00:56Z", + "count": 1 + }, + "activated": { + "datetime": "2025-01-15T10:00:56Z", + "count": 1 + } + }, + { + "name": "net.0", + "bootname": "net", + "class": "net", + "state": "inactive", + "bundle": {}, + "installed": {}, + "activated": {} + } + ], + "installer": { + "operation": "idle", + "progress": { + "percentage": 0 + } + } + }, + "infix-system:ntp": { + "sources": { + "source": [ + { + "address": "192.168.1.1", + "mode": "server", + "state": "candidate", + "stratum": 1, + "poll": 6 + }, + { + "address": "192.168.2.1", + "mode": "server", + "state": "candidate", + "stratum": 1, + "poll": 6 + }, + { + "address": "192.168.3.1", + "mode": "server", + "state": "selected", + "stratum": 1, + "poll": 6 + } + ] + } + } + } +} diff --git a/test/case/statd/system/operational.json b/test/case/statd/system/operational.json new file mode 100644 index 00000000..47da2c65 --- /dev/null +++ b/test/case/statd/system/operational.json @@ -0,0 +1,122 @@ +{ + "ietf-hardware:hardware": { + "component": [ + { + "infix-hardware:vpd-data": {}, + "name": "product" + }, + { + "class": "infix-hardware:usb", + "name": "USB", + "state": { + "admin-state": "unlocked", + "oper-state": "enabled" + } + }, + { + "class": "infix-hardware:usb", + "name": "USB2", + "state": { + "admin-state": "unlocked", + "oper-state": "enabled" + } + } + ] + }, + "ietf-system:system-state": { + "infix-system:ntp": { + "sources": { + "source": [ + { + "address": "192.168.1.1", + "mode": "server", + "poll": 6, + "state": "candidate", + "stratum": 1 + }, + { + "address": "192.168.2.1", + "mode": "server", + "poll": 6, + "state": "candidate", + "stratum": 1 + }, + { + "address": "192.168.3.1", + "mode": "server", + "poll": 6, + "state": "selected", + "stratum": 1 + } + ] + } + }, + "infix-system:software": { + "boot-order": [ + "primary", + "secondary", + "net" + ], + "booted": "primary", + "compatible": "infix-x86_64", + "installer": { + "operation": "idle", + "progress": { + "percentage": 0 + } + }, + "slot": [ + { + "activated": { + "count": 1, + "datetime": "2025-01-15T10:00:56Z" + }, + "bootname": "secondary", + "bundle": { + "compatible": "infix-x86_64", + "version": "94cd526" + }, + "class": "rootfs", + "installed": { + "count": 1, + "datetime": "2025-01-15T10:00:56Z" + }, + "name": "rootfs.1", + "sha256": "6cc0272f46b1a014f91693dc6218ce2f9a4b58bea727c492f6689c3ab102acca", + "size": "126205952", + "state": "inactive" + }, + { + "activated": { + "count": 1, + "datetime": "2025-01-15T10:00:56Z" + }, + "bootname": "primary", + "bundle": { + "compatible": "infix-x86_64", + "version": "94cd526" + }, + "class": "rootfs", + "installed": { + "count": 1, + "datetime": "2025-01-15T10:00:56Z" + }, + "name": "rootfs.0", + "sha256": "6cc0272f46b1a014f91693dc6218ce2f9a4b58bea727c492f6689c3ab102acca", + "size": "126205952", + "state": "booted" + }, + { + "activated": {}, + "bootname": "net", + "bundle": {}, + "class": "net", + "installed": {}, + "name": "net.0", + "state": "inactive" + } + ], + "variant": "" + } + } +} diff --git a/test/case/statd/system/system/rootfs/run/system.json b/test/case/statd/system/system/rootfs/run/system.json new file mode 100644 index 00000000..9bd199c1 --- /dev/null +++ b/test/case/statd/system/system/rootfs/run/system.json @@ -0,0 +1 @@ +{"vendor": "QEMU", "product-name": "VM", "part-number": null, "serial-number": null, "mac-address": "00:a0:85:00:03:00", "factory-password-hash": "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A", "vpd": {"product": {"board": "product", "available": false, "trusted": true, "data": {}}}, "usb-ports": [{"name": "USB", "path": "/sys/bus/usb/devices/usb1/authorized"}, {"name": "USB", "path": "/sys/bus/usb/devices/usb1/authorized_default"}, {"name": "USB2", "path": "/sys/bus/usb/devices/usb2/authorized"}, {"name": "USB2", "path": "/sys/bus/usb/devices/usb2/authorized_default"}]} \ No newline at end of file diff --git a/test/case/statd/system/system/run/chronyc_-c_sources b/test/case/statd/system/system/run/chronyc_-c_sources new file mode 100644 index 00000000..cf847af0 --- /dev/null +++ b/test/case/statd/system/system/run/chronyc_-c_sources @@ -0,0 +1,3 @@ +^,+,192.168.1.1,1,6,7,3,0.000038081,0.000504333,0.002931096 +^,+,192.168.2.1,1,6,7,3,0.000066315,0.000532567,0.002930348 +^,*,192.168.3.1,1,6,7,3,-0.000002138,0.000464114,0.002930853 diff --git a/test/case/statd/system/system/run/grub-editenv_+mnt+aux+grub+grubenv_list b/test/case/statd/system/system/run/grub-editenv_+mnt+aux+grub+grubenv_list new file mode 100644 index 00000000..0287c05e --- /dev/null +++ b/test/case/statd/system/system/run/grub-editenv_+mnt+aux+grub+grubenv_list @@ -0,0 +1,7 @@ +ORDER=primary secondary net +primary_OK=1 +secondary_OK=1 +net_OK=1 +primary_TRY=0 +secondary_TRY=0 +net_TRY=0 diff --git a/test/case/statd/system/system/run/rauc-installation-status b/test/case/statd/system/system/run/rauc-installation-status new file mode 100644 index 00000000..d3991a2d --- /dev/null +++ b/test/case/statd/system/system/run/rauc-installation-status @@ -0,0 +1 @@ +{"operation": "idle", "progress": {"percentage": "0", "message": ""}} \ No newline at end of file diff --git a/test/case/statd/system/system/run/rauc_status_--detailed_--output-format=json b/test/case/statd/system/system/run/rauc_status_--detailed_--output-format=json new file mode 100644 index 00000000..7b30e342 --- /dev/null +++ b/test/case/statd/system/system/run/rauc_status_--detailed_--output-format=json @@ -0,0 +1 @@ +{"compatible":"infix-x86_64","variant":"","booted":"primary","boot_primary":"rootfs.0","slots":[{"rootfs.1":{"class":"rootfs","device":"/dev/disk/by-partlabel/secondary","type":"raw","bootname":"secondary","state":"inactive","parent":null,"mountpoint":null,"boot_status":"good","slot_status":{"bundle":{"compatible":"infix-x86_64","version":"94cd526"},"checksum":{"sha256":"6cc0272f46b1a014f91693dc6218ce2f9a4b58bea727c492f6689c3ab102acca","size":126205952},"installed":{"timestamp":"2025-01-15T10:00:56Z","count":1},"activated":{"timestamp":"2025-01-15T10:00:56Z","count":1},"status":"ok"}}},{"rootfs.0":{"class":"rootfs","device":"/dev/disk/by-partlabel/primary","type":"raw","bootname":"primary","state":"booted","parent":null,"mountpoint":null,"boot_status":"good","slot_status":{"bundle":{"compatible":"infix-x86_64","version":"94cd526"},"checksum":{"sha256":"6cc0272f46b1a014f91693dc6218ce2f9a4b58bea727c492f6689c3ab102acca","size":126205952},"installed":{"timestamp":"2025-01-15T10:00:56Z","count":1},"activated":{"timestamp":"2025-01-15T10:00:56Z","count":1},"status":"ok"}}},{"net.0":{"class":"net","device":"/dev/ram0","type":"raw","bootname":"net","state":"inactive","parent":null,"mountpoint":null,"boot_status":"good","slot_status":{"bundle":{"compatible":null}}}}]} diff --git a/test/case/statd/system/test b/test/case/statd/system/test new file mode 100755 index 00000000..9b35d6d9 --- /dev/null +++ b/test/case/statd/system/test @@ -0,0 +1,13 @@ +#!/bin/sh + +yang_models="ietf-system ietf-hardware" + +gen_test=ietf_system/ntp_client/test.py +gen_iface=d3a + +cli_commands="show-ntp" +cli_commands="$cli_commands show-software" +cli_commands="$cli_commands show-hardware" + +. $(readlink -f $(dirname $0)/../test.sh) +main "$@" From 57c8d0cf1b6546cffad7f9831f9647d7732f9737 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Mon, 20 Jan 2025 11:17:11 +0100 Subject: [PATCH 13/14] test: statd: Add unittest for bridge-mdb --- test/case/statd/all.yaml | 2 + .../case/statd/bridge-mdb/cli/show-bridge-mdb | 4 + .../statd/bridge-mdb/ietf-interfaces.json | 293 ++++++++++++++++++ test/case/statd/bridge-mdb/operational.json | 293 ++++++++++++++++++ .../rootfs/proc/sys/net/ipv6/conf/br0/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e1/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e2/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e3/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e4/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e5/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e6/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/e7/mtu | 1 + .../rootfs/proc/sys/net/ipv6/conf/lo/mtu | 1 + .../system/run/bridge_-j_mdb_show_dev_br0 | 1 + .../bridge-mdb/system/run/bridge_-j_vlan_show | 1 + .../bridge-mdb/system/run/ip_-j_addr_show | 1 + .../system/run/ip_-s_-d_-j_link_show | 1 + .../system/run/mctl_-p_show_igmp_json | 41 +++ .../system/run/podman_ps_-a_--format=json | 1 + test/case/statd/bridge-mdb/test | 11 + 20 files changed, 658 insertions(+) create mode 100644 test/case/statd/bridge-mdb/cli/show-bridge-mdb create mode 100644 test/case/statd/bridge-mdb/ietf-interfaces.json create mode 100644 test/case/statd/bridge-mdb/operational.json create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/br0/mtu create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu create mode 100644 test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu create mode 100644 test/case/statd/bridge-mdb/system/run/bridge_-j_mdb_show_dev_br0 create mode 100644 test/case/statd/bridge-mdb/system/run/bridge_-j_vlan_show create mode 100644 test/case/statd/bridge-mdb/system/run/ip_-j_addr_show create mode 100644 test/case/statd/bridge-mdb/system/run/ip_-s_-d_-j_link_show create mode 100644 test/case/statd/bridge-mdb/system/run/mctl_-p_show_igmp_json create mode 100644 test/case/statd/bridge-mdb/system/run/podman_ps_-a_--format=json create mode 100755 test/case/statd/bridge-mdb/test diff --git a/test/case/statd/all.yaml b/test/case/statd/all.yaml index 4f59386d..b7993e15 100644 --- a/test/case/statd/all.yaml +++ b/test/case/statd/all.yaml @@ -1,4 +1,6 @@ --- +- case: bridge-mdb/test + name: "bridge-mdb" - case: containers/test name: "containers" - case: interfaces-all/test diff --git a/test/case/statd/bridge-mdb/cli/show-bridge-mdb b/test/case/statd/bridge-mdb/cli/show-bridge-mdb new file mode 100644 index 00000000..ae1acdf4 --- /dev/null +++ b/test/case/statd/bridge-mdb/cli/show-bridge-mdb @@ -0,0 +1,4 @@ +BRIDGE VID GROUP PORTS  +br0 01:00:00:01:02:03 e3 +br0 224.1.1.1 e3 +br0 ff02::6a br0 diff --git a/test/case/statd/bridge-mdb/ietf-interfaces.json b/test/case/statd/bridge-mdb/ietf-interfaces.json new file mode 100644 index 00000000..58753393 --- /dev/null +++ b/test/case/statd/bridge-mdb/ietf-interfaces.json @@ -0,0 +1,293 @@ +{ + "ietf-interfaces:interfaces": { + "interface": [ + { + "type": "infix-if-type:loopback", + "name": "lo", + "if-index": 1, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:00:00:00:00:00", + "statistics": { + "in-octets": "568136", + "out-octets": "568136" + }, + "ietf-ip:ipv4": { + "address": [ + { + "ip": "127.0.0.1", + "prefix-length": 8, + "origin": "static" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 65536, + "address": [ + { + "ip": "::1", + "prefix-length": 128, + "origin": "static" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e1", + "if-index": 2, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:01", + "statistics": { + "in-octets": "6056801", + "out-octets": "8943399" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:301", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e2", + "if-index": 3, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:02", + "statistics": { + "in-octets": "4388", + "out-octets": "223073" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e3", + "if-index": 4, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "statistics": { + "in-octets": "25889", + "out-octets": "375562" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e4", + "if-index": 5, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:04", + "statistics": { + "in-octets": "32799", + "out-octets": "354844" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "unicast": true, + "multicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e5", + "if-index": 6, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:05", + "statistics": { + "in-octets": "68102", + "out-octets": "151156" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:305", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e6", + "if-index": 7, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:06", + "statistics": { + "in-octets": "137033", + "out-octets": "255084" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:306", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:etherlike", + "name": "e7", + "if-index": 8, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:07", + "statistics": { + "in-octets": "71136", + "out-octets": "153864" + }, + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500, + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:307", + "prefix-length": 64, + "origin": "link-layer" + } + ] + } + }, + { + "type": "infix-if-type:bridge", + "name": "br0", + "if-index": 62, + "admin-status": "up", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "in-octets": "2200", + "out-octets": "27797" + }, + "ietf-ip:ipv4": { + "mtu": 1500, + "address": [ + { + "ip": "10.0.0.1", + "prefix-length": 24, + "origin": "static" + } + ] + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "infix-interfaces:bridge": { + "multicast": { + "snooping": true, + "querier": "auto", + "query-interval": 125 + }, + "multicast-filters": { + "multicast-filter": [ + { + "group": "01:00:00:01:02:03", + "ports": [ + { + "port": "e3", + "state": "permanent" + } + ] + }, + { + "group": "224.1.1.1", + "ports": [ + { + "port": "e3", + "state": "permanent" + } + ] + }, + { + "group": "ff02::6a", + "ports": [ + { + "port": "br0", + "state": "temporary" + } + ] + } + ] + } + } + } + ] + } +} diff --git a/test/case/statd/bridge-mdb/operational.json b/test/case/statd/bridge-mdb/operational.json new file mode 100644 index 00000000..813f9926 --- /dev/null +++ b/test/case/statd/bridge-mdb/operational.json @@ -0,0 +1,293 @@ +{ + "ietf-interfaces:interfaces": { + "interface": [ + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "127.0.0.1", + "origin": "static", + "prefix-length": 8 + } + ] + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "::1", + "origin": "static", + "prefix-length": 128 + } + ], + "mtu": 65536 + }, + "if-index": 1, + "name": "lo", + "oper-status": "up", + "phys-address": "00:00:00:00:00:00", + "statistics": { + "in-octets": "568136", + "out-octets": "568136" + }, + "type": "infix-if-type:loopback" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:301", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 2, + "name": "e1", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:01", + "statistics": { + "in-octets": "6056801", + "out-octets": "8943399" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 3, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + }, + "name": "e2", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:02", + "statistics": { + "in-octets": "4388", + "out-octets": "223073" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 4, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + }, + "name": "e3", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:03", + "statistics": { + "in-octets": "25889", + "out-octets": "375562" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 5, + "infix-interfaces:bridge-port": { + "bridge": "br0", + "flood": { + "broadcast": true, + "multicast": true, + "unicast": true + }, + "multicast": { + "fast-leave": false, + "router": "auto" + }, + "stp-state": "forwarding" + }, + "name": "e4", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:04", + "statistics": { + "in-octets": "32799", + "out-octets": "354844" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:305", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 6, + "name": "e5", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:05", + "statistics": { + "in-octets": "68102", + "out-octets": "151156" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:306", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 7, + "name": "e6", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:06", + "statistics": { + "in-octets": "137033", + "out-octets": "255084" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "address": [ + { + "ip": "fe80::2a0:85ff:fe00:307", + "origin": "link-layer", + "prefix-length": 64 + } + ], + "mtu": 1500 + }, + "if-index": 8, + "name": "e7", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:07", + "statistics": { + "in-octets": "71136", + "out-octets": "153864" + }, + "type": "infix-if-type:etherlike" + }, + { + "admin-status": "up", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "10.0.0.1", + "origin": "static", + "prefix-length": 24 + } + ], + "mtu": 1500 + }, + "ietf-ip:ipv6": { + "mtu": 1500 + }, + "if-index": 62, + "infix-interfaces:bridge": { + "multicast": { + "querier": "auto", + "query-interval": 125, + "snooping": true + }, + "multicast-filters": { + "multicast-filter": [ + { + "group": "01:00:00:01:02:03", + "ports": [ + { + "port": "e3", + "state": "permanent" + } + ] + }, + { + "group": "224.1.1.1", + "ports": [ + { + "port": "e3", + "state": "permanent" + } + ] + }, + { + "group": "ff02::6a", + "ports": [ + { + "port": "br0", + "state": "temporary" + } + ] + } + ] + } + }, + "name": "br0", + "oper-status": "up", + "phys-address": "00:a0:85:00:03:00", + "statistics": { + "in-octets": "2200", + "out-octets": "27797" + }, + "type": "infix-if-type:bridge" + } + ] + } +} diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/br0/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/br0/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/br0/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e1/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e2/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e3/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e4/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e5/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e6/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu new file mode 100644 index 00000000..3d86ec64 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/e7/mtu @@ -0,0 +1 @@ +1500 diff --git a/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu new file mode 100644 index 00000000..e2ed8f4d --- /dev/null +++ b/test/case/statd/bridge-mdb/system/rootfs/proc/sys/net/ipv6/conf/lo/mtu @@ -0,0 +1 @@ +65536 diff --git a/test/case/statd/bridge-mdb/system/run/bridge_-j_mdb_show_dev_br0 b/test/case/statd/bridge-mdb/system/run/bridge_-j_mdb_show_dev_br0 new file mode 100644 index 00000000..5f911e74 --- /dev/null +++ b/test/case/statd/bridge-mdb/system/run/bridge_-j_mdb_show_dev_br0 @@ -0,0 +1 @@ +[{"mdb":[{"index":62,"dev":"br0","port":"e3","grp":"01:00:00:01:02:03","state":"permanent","flags":[]},{"index":62,"dev":"br0","port":"e3","grp":"224.1.1.1","state":"permanent","flags":[]},{"index":62,"dev":"br0","port":"br0","grp":"ff02::6a","state":"temp","flags":[]}],"router":{}}] diff --git a/test/case/statd/bridge-mdb/system/run/bridge_-j_vlan_show b/test/case/statd/bridge-mdb/system/run/bridge_-j_vlan_show new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/test/case/statd/bridge-mdb/system/run/bridge_-j_vlan_show @@ -0,0 +1 @@ +[] diff --git a/test/case/statd/bridge-mdb/system/run/ip_-j_addr_show b/test/case/statd/bridge-mdb/system/run/ip_-j_addr_show new file mode 100644 index 00000000..23c5e44c --- /dev/null +++ b/test/case/statd/bridge-mdb/system/run/ip_-j_addr_show @@ -0,0 +1 @@ +[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UP","group":"iface","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","addr_info":[{"family":"inet","local":"127.0.0.1","prefixlen":8,"scope":"host","protocol":"static","label":"lo","valid_life_time":4294967295,"preferred_life_time":4294967295},{"family":"inet6","local":"::1","prefixlen":128,"scope":"host","protocol":"static","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":2,"ifname":"e1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:01","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:301","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":3,"ifname":"e2","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":4,"ifname":"e3","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":5,"ifname":"e4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[]},{"ifindex":6,"ifname":"e5","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:05","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:305","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":7,"ifname":"e6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:06","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:306","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":8,"ifname":"e7","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:07","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet6","local":"fe80::2a0:85ff:fe00:307","prefixlen":64,"scope":"link","protocol":"kernel_ll","valid_life_time":4294967295,"preferred_life_time":4294967295}]},{"ifindex":62,"ifname":"br0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","addr_info":[{"family":"inet","local":"10.0.0.1","prefixlen":24,"scope":"global","protocol":"static","label":"br0","valid_life_time":4294967295,"preferred_life_time":4294967295}]}] diff --git a/test/case/statd/bridge-mdb/system/run/ip_-s_-d_-j_link_show b/test/case/statd/bridge-mdb/system/run/ip_-s_-d_-j_link_show new file mode 100644 index 00000000..cf6cb33b --- /dev/null +++ b/test/case/statd/bridge-mdb/system/run/ip_-s_-d_-j_link_show @@ -0,0 +1 @@ +[{"ifindex":1,"ifname":"lo","flags":["LOOPBACK","UP","LOWER_UP"],"mtu":65536,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"iface","txqlen":1000,"link_type":"loopback","address":"00:00:00:00:00:00","broadcast":"00:00:00:00:00:00","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":0,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":524280,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":568136,"packets":1738,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":568136,"packets":1738,"errors":0,"dropped":0,"carrier_errors":0,"collisions":0}}},{"ifindex":2,"ifname":"e1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:01","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio0","stats64":{"rx":{"bytes":6056801,"packets":27587,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":8943399,"packets":23531,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":3,"ifname":"e2","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:02","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8001","no":"0x1","designated_port":32769,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":7.32,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio1","stats64":{"rx":{"bytes":4388,"packets":146,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":223073,"packets":644,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":4,"ifname":"e3","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:03","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8002","no":"0x2","designated_port":32770,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":7.32,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio2","stats64":{"rx":{"bytes":25889,"packets":159,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":375562,"packets":1794,"errors":0,"dropped":1,"carrier_errors":0,"collisions":0}}},{"ifindex":5,"ifname":"e4","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","master":"br0","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:04","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":1,"allmulti":1,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_slave_kind":"bridge","info_slave_data":{"state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"id":"0x8003","no":"0x3","designated_port":32771,"designated_cost":0,"bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","hold_timer":0.00,"message_age_timer":0.00,"forward_delay_timer":7.32,"topology_change_ack":0,"config_pending":0,"proxy_arp":false,"proxy_arp_wifi":false,"multicast_router":1,"mcast_flood":true,"bcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"neigh_vlan_suppress":false,"group_fwd_mask":"0","group_fwd_mask_str":"0x0","vlan_tunnel":false,"isolated":false,"locked":false,"mab":false}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio3","stats64":{"rx":{"bytes":32799,"packets":181,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":354844,"packets":1682,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":6,"ifname":"e5","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:05","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio4","stats64":{"rx":{"bytes":68102,"packets":202,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":151156,"packets":394,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":7,"ifname":"e6","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:06","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio5","stats64":{"rx":{"bytes":137033,"packets":1012,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":255084,"packets":1309,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":8,"ifname":"e7","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:07","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"inet6_addr_gen_mode":"eui64","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"virtio","parentdev":"virtio6","stats64":{"rx":{"bytes":71136,"packets":205,"errors":0,"dropped":0,"over_errors":0,"multicast":0},"tx":{"bytes":153864,"packets":401,"errors":0,"dropped":2,"carrier_errors":0,"collisions":0}}},{"ifindex":62,"ifname":"br0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"noqueue","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"00:a0:85:00:03:00","broadcast":"ff:ff:ff:ff:ff:ff","promiscuity":0,"allmulti":0,"min_mtu":68,"max_mtu":65535,"linkinfo":{"info_kind":"bridge","info_data":{"forward_delay":1500,"hello_time":200,"max_age":2000,"ageing_time":30000,"stp_state":0,"priority":32768,"vlan_filtering":0,"vlan_protocol":"802.1Q","bridge_id":"8000.0:a0:85:0:3:0","root_id":"8000.0:a0:85:0:3:0","root_port":0,"root_path_cost":0,"topology_change":0,"topology_change_detected":0,"hello_timer":0.00,"tcn_timer":0.00,"topology_change_timer":0.00,"gc_timer":292.37,"fdb_n_learned":4,"fdb_max_learned":0,"vlan_default_pvid":0,"vlan_stats_enabled":0,"vlan_stats_per_port":0,"group_fwd_mask":"0","group_addr":"01:80:c2:00:00:00","mcast_snooping":1,"no_linklocal_learn":0,"mcast_vlan_snooping":0,"mst_enabled":0,"mcast_flood_always":1,"mcast_router":1,"mcast_query_use_ifaddr":0,"mcast_querier":0,"mcast_hash_elasticity":16,"mcast_hash_max":4096,"mcast_last_member_cnt":2,"mcast_startup_query_cnt":2,"mcast_last_member_intvl":100,"mcast_membership_intvl":26000,"mcast_querier_intvl":25500,"mcast_query_intvl":12500,"mcast_query_response_intvl":1000,"mcast_startup_query_intvl":3124,"mcast_stats_enabled":0,"mcast_igmp_version":3,"mcast_mld_version":2,"nf_call_iptables":0,"nf_call_ip6tables":0,"nf_call_arptables":0}},"inet6_addr_gen_mode":"none","num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"stats64":{"rx":{"bytes":2200,"packets":42,"errors":0,"dropped":0,"over_errors":0,"multicast":36},"tx":{"bytes":27797,"packets":58,"errors":0,"dropped":1,"carrier_errors":0,"collisions":0}}}] diff --git a/test/case/statd/bridge-mdb/system/run/mctl_-p_show_igmp_json b/test/case/statd/bridge-mdb/system/run/mctl_-p_show_igmp_json new file mode 100644 index 00000000..e6455e8f --- /dev/null +++ b/test/case/statd/bridge-mdb/system/run/mctl_-p_show_igmp_json @@ -0,0 +1,41 @@ +{ + "pid": 4570, + "query-interval": 125, + "query-response-interval": 10, + "query-last-member-interval": 1, + "robustness": 2, + "router-timeout": 255, + "router-alert": true, + "fast-leave-ports": [ ], + "multicast-router-ports": [ ], + "multicast-flood-ports": [ "e2", "e3", "e4" ], + "multicast-queriers": [ + { + "interface": "br0", + "state": "up", + "querier": "10.0.0.1", + "interval": 125, + "version": 3 + } + ], + "multicast-groups": [ + { + "bridge": "br0", + "group": "01:00:00:01:02:03", + "mac": "01:00:00:01:02:03", + "ports": [ "e3" ] + }, + { + "bridge": "br0", + "group": "224.1.1.1", + "mac": "01:00:5e:01:01:01", + "ports": [ "e3" ] + }, + { + "bridge": "br0", + "group": "ff02::6a", + "mac": "33:33:00:00:00:6a", + "ports": [ "br0" ] + } + ] +} diff --git a/test/case/statd/bridge-mdb/system/run/podman_ps_-a_--format=json b/test/case/statd/bridge-mdb/system/run/podman_ps_-a_--format=json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/test/case/statd/bridge-mdb/system/run/podman_ps_-a_--format=json @@ -0,0 +1 @@ +[] diff --git a/test/case/statd/bridge-mdb/test b/test/case/statd/bridge-mdb/test new file mode 100755 index 00000000..27a5b90c --- /dev/null +++ b/test/case/statd/bridge-mdb/test @@ -0,0 +1,11 @@ +#!/bin/sh + +yang_models="ietf-interfaces" + +gen_test=ietf_interfaces/static_multicast_filters/test.py +gen_iface=d3a + +cli_commands="show-bridge-mdb" + +. $(readlink -f $(dirname $0)/../test.sh) +main "$@" From 5d6180a3951630879d63a261f13159ccf23e5754 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 22 Jan 2025 09:44:52 +0100 Subject: [PATCH 14/14] yanger: Improve option names and validation after review Break up the --test parameter into either: --capture: Write system command output to a local directory for later consumption by... --replay: Which can replay a previous capture Rename --wrap-commands => --cmd-prefix --- src/statd/python/yanger/__main__.py | 33 +++++++++++++++++++------ src/statd/python/yanger/host.py | 38 ++++++++++++++--------------- test/case/statd/test.sh | 19 ++++++--------- 3 files changed, 52 insertions(+), 38 deletions(-) diff --git a/src/statd/python/yanger/__main__.py b/src/statd/python/yanger/__main__.py index 28c3dc20..e5bfec27 100644 --- a/src/statd/python/yanger/__main__.py +++ b/src/statd/python/yanger/__main__.py @@ -10,13 +10,30 @@ from . import common from . import host def main(): + def dirpath(path): + if not os.path.isdir(path): + raise argparse.ArgumentTypeError(f"'{path}' is not a valid directory") + return path + parser = argparse.ArgumentParser(description="YANG data creator") parser.add_argument("model", help="YANG Model") - parser.add_argument("-p", "--param", default=None, help="Model dependent parameter") - parser.add_argument("-w", "--wrap-commands", default=None, help="Command execution wrapper") - parser.add_argument("-t", "--test", default=None, help="Test data base path") - args = parser.parse_args() + parser.add_argument("-p", "--param", + help="Model dependent parameter, e.g. interface name") + parser.add_argument("-x", "--cmd-prefix", metavar="PREFIX", + help="Use this prefix for all system commands, e.g. " + + "'ssh user@remotehost sudo'") + rrparser = parser.add_mutually_exclusive_group() + rrparser.add_argument("-r", "--replay", type=dirpath, metavar="DIR", + help="Generate output based on recorded system commands from DIR, " + + "rather than querying the local system") + rrparser.add_argument("-c", "--capture", type=dirpath, metavar="DIR", + help="Capture system command output in DIR, such that the current system " + + "state can be recreated offline (with --replay) for testing purposes") + + args = parser.parse_args() + if args.replay and args.cmd_prefix: + parser.error("--cmd-prefix cannot be used with --replay") # Set up syslog output for critical errors to aid debugging common.LOG = logging.getLogger('yanger') @@ -31,10 +48,10 @@ def main(): common.LOG.setLevel(logging.INFO) common.LOG.addHandler(log) - if args.wrap_commands: - host.HOST = host.Remotehost(args.wrap_commands, args.test) - elif args.test: - host.HOST = host.Testhost(args.test) + if args.cmd_prefix or args.capture: + host.HOST = host.Remotehost(args.cmd_prefix, args.capture) + elif args.replay: + host.HOST = host.Replayhost(args.replay) else: host.HOST = host.Localhost() diff --git a/src/statd/python/yanger/host.py b/src/statd/python/yanger/host.py index 0e31771b..cb3f572f 100644 --- a/src/statd/python/yanger/host.py +++ b/src/statd/python/yanger/host.py @@ -105,18 +105,18 @@ class Localhost(Host): class Remotehost(Localhost): - def __init__(self, wrap, basedir): + def __init__(self, prefix, capdir): super().__init__() - self.wrap = tuple(wrap.split()) - self.basedir = basedir - if basedir: + self.prefix = tuple(prefix.split()) if prefix else tuple() + self.capdir = capdir + if capdir: for subdir in ("rootfs", "run"): - os.makedirs(os.path.join(basedir, subdir), exist_ok=True) + os.makedirs(os.path.join(capdir, subdir), exist_ok=True) def now(self): timestamp = self._run(["date", "-u", "+%s"], default=None, log=True) - if self.basedir: - with open(os.path.join(self.basedir, "timestamp"), "w") as f: + if self.capdir: + with open(os.path.join(self.capdir, "timestamp"), "w") as f: f.write(f"{timestamp}\n") pass @@ -128,13 +128,13 @@ class Remotehost(Localhost): # arguments containing spaces so that commands like `vtysh -c # "show ip route json"` work as expected. cmd = " ".join([ arg if " " not in arg else f"\"{arg}\"" for arg in cmd ]) - return super().run(self.wrap + (cmd,), default, log) + return super().run(self.prefix + (cmd,), default, log) def run(self, cmd, default=None, log=True): - if not self.basedir: + if not self.capdir: return self._run(cmd, default, log) - storedpath = os.path.join(self.basedir, "run", Testhost.SlugOf(cmd)) + storedpath = os.path.join(self.capdir, "run", Replayhost.SlugOf(cmd)) if os.path.exists(storedpath): with open(storedpath) as f: return f.read() @@ -148,29 +148,29 @@ class Remotehost(Localhost): def read(self, path): out = self._run(("cat", path), default="", log=False) - if self.basedir: - dirname = os.path.join(self.basedir, "rootfs", os.path.dirname(path[1:])) + if self.capdir: + dirname = os.path.join(self.capdir, "rootfs", os.path.dirname(path[1:])) os.makedirs(dirname, exist_ok=True) - with open(os.path.join(self.basedir, "rootfs", path[1:]), "w") as f: + with open(os.path.join(self.capdir, "rootfs", path[1:]), "w") as f: f.write(out) return out -class Testhost(Host): +class Replayhost(Host): def SlugOf(cmd): return "_".join(cmd).replace("/", "+").replace(" ", "-") - def __init__(self, basedir): - self.basedir = basedir + def __init__(self, replaydir): + self.replaydir = replaydir def now(self): - with open(os.path.join(self.basedir, "timestamp")) as f: + with open(os.path.join(self.replaydir, "timestamp")) as f: timestamp = f.read().strip() return datetime.datetime.fromtimestamp(int(timestamp), datetime.timezone.utc) def run(self, cmd, default=None, log=True): - path = os.path.join(self.basedir, "run", Testhost.SlugOf(cmd)) + path = os.path.join(self.replaydir, "run", Replayhost.SlugOf(cmd)) try: with open(path, 'r') as f: @@ -184,7 +184,7 @@ class Testhost(Host): raise def read(self, path): - path = os.path.join(self.basedir, "rootfs", path[1:]) + path = os.path.join(self.replaydir, "rootfs", path[1:]) try: with open(path, 'r') as f: return f.read() diff --git a/test/case/statd/test.sh b/test/case/statd/test.sh index dd15ca43..941981fc 100644 --- a/test/case/statd/test.sh +++ b/test/case/statd/test.sh @@ -87,13 +87,10 @@ prepare_infamy_test() yanger_exec() { local opts= - while getopts "w:t:" opt; do + while getopts "c:r:x:" opt; do case ${opt} in - w) - opts="$opts -w \"$OPTARG\"" - ;; - t) - opts="$opts -t \"$OPTARG\"" + c|r|x) + opts="$opts -$opt \"$OPTARG\"" ;; esac done @@ -122,8 +119,8 @@ yanger_gen() while [ $# -gt 0 ]; do echo ">>> CAPTURING $1 from $gen_iface" >&2 yanger_exec \ - -t "$casedir/system" \ - -w "$wrapper" \ + -c "$casedir/system" \ + -x "$wrapper" \ $1 \ >"$casedir/$1.json" operfiles="$operfiles $casedir/$1.json" @@ -148,7 +145,7 @@ yanger_check() status="ok" if ! diff -up \ "$casedir/$1.json" \ - <(yanger_exec -t "$casedir/system" $1) \ + <(yanger_exec -r "$casedir/system" $1) \ >"$diff"; then cat $diff | sed 's/^/# /' status="not ok" @@ -168,7 +165,7 @@ yanger_cat() fi while [ $# -gt 0 ]; do - yanger_exec -t "$casedir/system" $1 + yanger_exec -r "$casedir/system" $1 shift done } @@ -180,7 +177,7 @@ yanger_live() fi while [ $# -gt 0 ]; do - yanger_exec -w "$wrapper" $1 + yanger_exec -x "$wrapper" $1 shift done }