From b2db59f3bcbfd06a60965b19cc06413fd478fd1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Fri, 10 Jan 2025 14:43:06 +0100 Subject: [PATCH 1/3] infamy: Add support for parameters to tests All test added parameters is required and no default behaviour is allowed. --- test/infamy/__init__.py | 1 + test/infamy/env.py | 35 ++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/test/infamy/__init__.py b/test/infamy/__init__.py index abf18f5b..fae02eb0 100644 --- a/test/infamy/__init__.py +++ b/test/infamy/__init__.py @@ -2,6 +2,7 @@ import os from .container import Container from .env import Env +from .env import ArgumentParser from .furl import Furl from .netns import IsolatedMacVlan,IsolatedMacVlans from .sniffer import Sniffer diff --git a/test/infamy/env.py b/test/infamy/env.py index 06f84216..8fd6032f 100644 --- a/test/infamy/env.py +++ b/test/infamy/env.py @@ -16,8 +16,7 @@ class NullEnv: ENV = NullEnv() - -class ArgumentParser(argparse.ArgumentParser): +class ArgumentParser(): def DefaultTransport(): """Pick pseudo-random transport @@ -32,24 +31,34 @@ class ArgumentParser(argparse.ArgumentParser): return random.choice(["netconf", "restconf"]) - def __init__(self, top): - super().__init__() + def __init__(self, top = None): + self.args = argparse.ArgumentParser(top) - self.add_argument("-d", "--debug", default=False, action="store_true") - self.add_argument("-l", "--logical-topology", dest="ltop", default=top) - self.add_argument("-p", "--package", default=None) - self.add_argument("-y", "--yangdir", default=None) - self.add_argument("-t", "--transport", default=ArgumentParser.DefaultTransport()) - self.add_argument("ptop", nargs=1, metavar="topology") + self.args.add_argument("-d", "--debug", default=False, action="store_true") + self.args.add_argument("-p", "--package", default=None) + self.args.add_argument("-y", "--yangdir", default=None) + self.args.add_argument("-t", "--transport", default=ArgumentParser.DefaultTransport()) + self.args.add_argument("ptop", nargs=1, metavar="topology") + self.args.add_argument("-l", "--logical-topology", dest="ltop", default=top) + def add_argument(self, *args, **kwargs): + kwargs["required"] = True + self.args.add_argument(*args, **kwargs) + + def parse_args(self, argv): + return self.args.parse_args(argv) + class Env(object): - def __init__(self, ltop=None, argv=sys.argv[1::], environ=os.environ): + def __init__(self, ltop=None, args=None, argv=sys.argv[1::], environ=os.environ): if "INFAMY_ARGS" in environ: argv = shlex.split(environ["INFAMY_ARGS"]) + argv - self.args = ArgumentParser(ltop).parse_args(argv) - + if args: + self.argp = args + else: + self.argp = ArgumentParser(ltop) + self.args = self.argp.parse_args(argv) pdot = pydot.graph_from_dot_file(self.args.ptop[0])[0] self.ptop = topology.Topology(pdot) From 29031be4e9a0975f917f4459c5b1158a3292be3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Wed, 8 Jan 2025 14:55:46 +0100 Subject: [PATCH 2/3] test-specification: Generate test specification from suite file The suite can also contain meta data for the test specification, One meta data that is implemented is title, which is used when the same test code is used twice with parameters. Also if a test case should not be present in the test specification for some case. You can add specification: False as meta data. --- test/case/all.yaml | 5 +- test/spec/generate_spec.py | 116 ++++++++++++++++++++----------------- test/test.mk | 2 +- 3 files changed, 69 insertions(+), 54 deletions(-) diff --git a/test/case/all.yaml b/test/case/all.yaml index 114d836c..5f254c4c 100644 --- a/test/case/all.yaml +++ b/test/case/all.yaml @@ -1,7 +1,10 @@ --- - case: meta/wait.py + infamy: + specification: False - case: meta/reproducible.py - + infamy: + specification: False - name: Misc tests suite: misc/misc.yaml diff --git a/test/spec/generate_spec.py b/test/spec/generate_spec.py index 10279a05..ec181ebd 100755 --- a/test/spec/generate_spec.py +++ b/test/spec/generate_spec.py @@ -5,6 +5,7 @@ import argparse import io import sys import re +import yaml from pathlib import Path @@ -86,14 +87,6 @@ class TestCase: self.topology_image=f"{directory}/topology" self.test_case=f"{directory}/test.py" self.specification=f"{directory}/Readme.adoc" - with open(self.test_case, 'r') as file: - script_content = file.read() - parsed_script = ast.parse(script_content) - visitor = TestStepVisitor() - visitor.visit(parsed_script) - self.name=visitor.name if visitor.name != "" else "Undefined" - self.description=visitor.description if visitor.description != "" else "Undefined" - self.test_steps=visitor.test_steps def generate_topology(self): """Generate SVG file from the topology.dot file""" @@ -110,72 +103,91 @@ class TestCase: f.write(mod_content) - def generate_specification(self): - """Generate a Readme.adoc for the test case""" + def generate_specification(self, name, case_path, spec_path): + """Generate a ASCIIDOC specification for the test case""" + with open(case_path, 'r') as file: + script_content = file.read() + + parsed_script = ast.parse(script_content) + visitor = TestStepVisitor() + visitor.visit(parsed_script) + description=visitor.description if visitor.description != "" else "Undefined" + test_steps=visitor.test_steps + if name is None: + name = visitor.name self.generate_topology() - self.description = replace_image_tag(self.description, self.test_dir) - with open(self.specification, "w") as spec: - spec.write(f"=== {self.name}\n") + description = replace_image_tag(description, self.test_dir) + with open(spec_path, "w") as spec: + spec.write(f"=== {name}\n") spec.write("==== Description\n") - spec.write(self.description + "\n\n") + spec.write(description + "\n\n") spec.write("==== Topology\n") spec.write("ifdef::topdoc[]\n") - spec.write(f"image::../../{self.test_dir}/topology.svg[{self.name} topology]\n") + spec.write(f"image::../../{self.test_dir}/topology.svg[{name} topology]\n") spec.write("endif::topdoc[]\n") spec.write("ifndef::topdoc[]\n") spec.write("ifdef::testgroup[]\n") - spec.write(f"image::{Path(*self.test_dir.parts[3:])}/topology.svg[{self.name} topology]\n") + spec.write(f"image::{Path(*self.test_dir.parts[3:])}/topology.svg[{name} topology]\n") spec.write("endif::testgroup[]\n") spec.write("ifndef::testgroup[]\n") - spec.write(f"image::topology.svg[{self.name} topology]\n") + spec.write(f"image::topology.svg[{name} topology]\n") spec.write("endif::testgroup[]\n") spec.write("endif::topdoc[]\n") spec.write("==== Test sequence\n") - spec.writelines([f". {step}\n" for step in self.test_steps]) + spec.writelines([f". {step}\n" for step in test_steps]) spec.write("\n\n<<<\n\n") # need empty lines to pagebreak -def parse_directory_tree(directory): - """P - arse a directory for subdirectories with a test.py - and a topology.dot files - """ - directories=[] - for dirpath, dirnames, filenames in os.walk(directory): - testscript = False - topology = False - # Search for directories containing a test.py and a topology - # and define the directory as a test directory +def parse_suite(directory, root, suitefile): + test_spec = None + readme = None + num_tests = 0 + with open(suitefile, "r") as f: + data = yaml.safe_load(f) - if filenames: - for filename in filenames: - if filename == "test.py": - testscript = True - if filename == "topology.dot": - topology = True - if testscript and topology: - directories.append(dirpath) - return directories + for entry in data: + if entry.get("suite"): + path = os.path.dirname(entry["suite"]) + parse_suite(f"{directory}/{path}", root, f"{directory}/{entry['suite']}") + elif entry.get("case"): + if not entry.get("infamy"): + test_title = None # Set from the docstring in the test case + else: + specification = entry["infamy"].get("specification", True); + if not specification: + continue + test_title = entry["infamy"]["title"] + path = os.path.dirname(entry["case"]) + if readme is None: + readme = open(f"{directory}/{path}/Readme.adoc.tmp", "w") + test_case_id = entry["name"] + test_file = f"{directory}/{entry['case']}" + test_spec = f"{directory}/{path}/{test_case_id}.adoc" + test_case = TestCase(f"{directory}/{path}", root) + test_case.generate_specification(test_title, test_file, test_spec) + readme.write(f"include::{path}{test_case_id}.adoc[]\n\n") + if path != "": + readme.close() + readme = None + os.unlink(f"{directory}/{path}/Readme.adoc") + os.symlink(f"{test_case_id}.adoc", f"{directory}/{path}/Readme.adoc") + if not readme is None: + readme.close() + os.rename(f"{directory}/Readme.adoc.tmp", f"{directory}/Readme.adoc") parser = argparse.ArgumentParser(description="Generate a test specification for a subtree.") -parser.add_argument("-d", "--directory", required=True, help="The directory to parse.") -parser.add_argument("-r", "--root-dir", help="Path that all paths should be relative to") +parser.add_argument("-s", "--suite", required=True, help="The suite file to parse") +parser.add_argument("-r", "--root-dir", required=True, help="Path that all paths should be relative to") args=parser.parse_args() +error_string = "" output_capture = io.StringIO() sys.stderr = output_capture -directories = parse_directory_tree(args.directory) -error_string = "" -for directory in directories: - # This is hacky, graphviz output error only to stdout and return successful(always). - # If everything goes well, output shall be empty, fail on any output - output_capture.truncate(0) - output_capture.seek(0) - test_case = TestCase(directory, args.root_dir) - test_case.generate_specification() - if len(output_capture.getvalue()) > 0: - error_string = output_capture.getvalue() - break +# This is hacky, graphviz output error only to stdout and return successful(always). +# If everything goes well, output shall be empty, fail on any output +output_capture.truncate(0) +output_capture.seek(0) +parse_suite(os.path.dirname(args.suite), args.root_dir, args.suite) sys.stdout = sys.__stdout__ diff --git a/test/test.mk b/test/test.mk index 0bd3e326..317cdf2b 100644 --- a/test/test.mk +++ b/test/test.mk @@ -35,7 +35,7 @@ test-sh: test-spec: @esc_infix_name="$(echo $(INFIX_NAME) | sed 's/\//\\\//g')"; \ sed 's/{REPLACE}/$(subst ",,$(esc_infix_name)) $(INFIX_VERSION)/' $(spec-dir)/Readme.adoc.in > $(spec-dir)/Readme.adoc - @$(spec-dir)/generate_spec.py -d $(test-dir)/case -r $(BR2_EXTERNAL_INFIX_PATH) + @$(spec-dir)/generate_spec.py -s $(test-dir)/case/all.yaml -r $(BR2_EXTERNAL_INFIX_PATH) @asciidoctor-pdf --failure-level INFO --theme $(spec-dir)/theme.yml -a pdf-fontsdir=$(spec-dir)/fonts -o $(test-specification) $(spec-dir)/Readme.adoc # Unit tests run with random (-r) hostname and container name to From 12b61465511221cce6876aa41a04698efe24182e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Fri, 10 Jan 2025 14:04:35 +0100 Subject: [PATCH 3/3] Add new generated specification files --- test/case/ietf_hardware/ietf_hardware.yaml | 2 +- test/case/ietf_hardware/usb/Readme.adoc | 41 +------- test/case/ietf_hardware/usb/usb.adoc | 40 ++++++++ .../ietf_hardware/usb_two_ports/Readme.adoc | 28 +----- .../usb_two_ports/usb_two_ports.adoc | 27 +++++ .../ietf_interfaces/bridge_basic/Readme.adoc | 33 +------ .../bridge_basic/bridge_basic.adoc | 32 ++++++ .../bridge_fwd_dual_dut/Readme.adoc | 45 +-------- .../bridge_fwd_dual_dut.adoc | 44 +++++++++ .../bridge_fwd_sgl_dut/Readme.adoc | 45 +-------- .../bridge_fwd_sgl_dut.adoc | 44 +++++++++ .../bridge_stp_basic/Readme.adoc | 32 +----- .../bridge_stp_basic/bridge_stp_basic.adoc | 31 ++++++ .../ietf_interfaces/bridge_veth/Readme.adoc | 35 +------ .../bridge_veth/bridge_veth.adoc | 34 +++++++ .../ietf_interfaces/bridge_vlan/Readme.adoc | 34 +------ .../bridge_vlan/bridge_vlan.adoc | 33 +++++++ .../bridge_vlan_separation/Readme.adoc | 50 +--------- .../bridge_vlan_separation.adoc | 49 +++++++++ .../ietf_interfaces/dual_bridge/Readme.adoc | 31 +----- .../ietf_interfaces/gre_basic/Readme.adoc | 26 +---- .../ietf_interfaces/gre_basic/gre_basic.adoc | 25 +++++ .../gre_basic/gretap_basic.adoc | 25 +++++ test/case/ietf_interfaces/gre_basic/test.py | 39 ++++---- test/case/ietf_interfaces/gre_basic/test.yaml | 12 +++ .../gretap_bridged/Readme.adoc | 25 +---- .../gretap_bridged/gretap_bridged.adoc | 24 +++++ .../case/ietf_interfaces/ietf_interfaces.yaml | 2 +- .../iface_enable_disable/Readme.adoc | 32 +----- .../iface_enable_disable.adoc | 31 ++++++ .../iface_phys_address/Readme.adoc | 35 +------ .../iface_phys_address.adoc | 34 +++++++ test/case/ietf_interfaces/ifalias/Readme.adoc | 26 +---- .../case/ietf_interfaces/ifalias/ifalias.adoc | 25 +++++ .../ietf_interfaces/igmp_basic/Readme.adoc | 43 +------- .../igmp_basic/igmp_basic.adoc | 42 ++++++++ .../ietf_interfaces/igmp_vlan/Readme.adoc | 50 +--------- .../ietf_interfaces/igmp_vlan/igmp_vlan.adoc | 49 +++++++++ .../ietf_interfaces/ipv4_address/Readme.adoc | 27 +---- .../ipv4_address/ipv4_address.adoc | 26 +++++ .../ietf_interfaces/ipv4_autoconf/Readme.adoc | 31 +----- .../ipv4_autoconf/ipv4_autoconf.adoc | 30 ++++++ .../ietf_interfaces/ipv6_address/Readme.adoc | 26 +---- .../ipv6_address/ipv6_address.adoc | 25 +++++ .../ietf_interfaces/routing_basic/Readme.adoc | 30 +----- .../routing_basic/routing_basic.adoc | 29 ++++++ .../static_multicast_filters/Readme.adoc | 50 +--------- .../static_multicast_filters.adoc | 49 +++++++++ .../verify_all_interface_types/Readme.adoc | 45 +-------- .../verify_all_interface_types.adoc | 44 +++++++++ .../ietf_interfaces/veth_delete/Readme.adoc | 36 +------ .../veth_delete/veth_delete.adoc | 35 +++++++ .../vlan_iface_termination/Readme.adoc | 52 +--------- .../vlan_iface_termination.adoc | 51 ++++++++++ .../ietf_interfaces/vlan_ping/Readme.adoc | 29 +----- .../ietf_interfaces/vlan_ping/vlan_ping.adoc | 28 ++++++ .../case/ietf_interfaces/vlan_qos/Readme.adoc | 43 +------- .../ietf_interfaces/vlan_qos/vlan_qos.adoc | 42 ++++++++ test/case/ietf_routing/ospf_basic/Readme.adoc | 27 +---- .../ietf_routing/ospf_basic/ospf_basic.adoc | 26 +++++ test/case/ietf_routing/ospf_bfd/Readme.adoc | 36 +------ test/case/ietf_routing/ospf_bfd/ospf_bfd.adoc | 35 +++++++ .../ospf_default_route_advertise/Readme.adoc | 58 +---------- .../ospf_default_route_advertise.adoc | 57 +++++++++++ .../ietf_routing/ospf_multiarea/Readme.adoc | 54 +--------- .../ospf_multiarea/ospf_multiarea.adoc | 53 ++++++++++ .../ospf_unnumbered_interface/Readme.adoc | 33 +------ .../ospf_unnumbered_interface.adoc | 32 ++++++ .../ietf_routing/route_pref_255/Readme.adoc | 30 +----- .../route_pref_255/route_pref_255.adoc | 29 ++++++ .../ietf_routing/route_pref_dhcp/Readme.adoc | 34 +------ .../route_pref_dhcp/route_pref_dhcp.adoc | 33 +++++++ .../ietf_routing/route_pref_ospf/Readme.adoc | 36 +------ .../route_pref_ospf/route_pref_ospf.adoc | 35 +++++++ .../ietf_routing/static_routing/Readme.adoc | 31 +----- .../static_routing/static_routing.adoc | 30 ++++++ test/case/ietf_syslog/basic/Readme.adoc | 25 +---- test/case/ietf_syslog/basic/basic.adoc | 24 +++++ test/case/ietf_syslog/remote/Readme.adoc | 26 +---- test/case/ietf_syslog/remote/remote.adoc | 25 +++++ .../ietf_system/add_delete_user/Readme.adoc | 30 +----- .../add_delete_user/add_delete_user.adoc | 29 ++++++ test/case/ietf_system/hostname/Readme.adoc | 34 +------ test/case/ietf_system/hostname/hostname.adoc | 33 +++++++ test/case/ietf_system/ntp_client/Readme.adoc | 26 +---- .../ietf_system/ntp_client/ntp_client.adoc | 25 +++++ test/case/ietf_system/timezone/Readme.adoc | 25 +---- test/case/ietf_system/timezone/timezone.adoc | 24 +++++ .../timezone_utc_offset/Readme.adoc | 25 +---- .../timezone_utc_offset.adoc | 24 +++++ test/case/ietf_system/upgrade/Readme.adoc | 27 +---- test/case/ietf_system/upgrade/upgrade.adoc | 26 +++++ test/case/ietf_system/user_admin/Readme.adoc | 34 +------ .../ietf_system/user_admin/user_admin.adoc | 33 +++++++ .../container_basic/Readme.adoc | 35 +------ .../container_basic/container_basic.adoc | 34 +++++++ .../container_bridge/Readme.adoc | 32 +----- .../container_bridge/container_bridge.adoc | 31 ++++++ .../container_firewall_basic/Readme.adoc | 55 +---------- .../container_firewall_basic.adoc | 54 ++++++++++ .../container_phys/Readme.adoc | 28 +----- .../container_phys/container_phys.adoc | 27 +++++ .../container_veth/Readme.adoc | 38 +------ .../container_veth/container_veth.adoc | 37 +++++++ test/case/infix_dhcp/dhcp_basic/Readme.adoc | 26 +---- .../infix_dhcp/dhcp_basic/dhcp_basic.adoc | 25 +++++ test/case/infix_dhcp/dhcp_router/Readme.adoc | 25 +---- .../infix_dhcp/dhcp_router/dhcp_router.adoc | 24 +++++ test/case/infix_dhcp/dhcp_routes/Readme.adoc | 39 +------- .../infix_dhcp/dhcp_routes/dhcp_routes.adoc | 38 +++++++ .../mdns_allow_deny/Readme.adoc | 33 +------ .../mdns_allow_deny/mdns_allow_deny.adoc | 32 ++++++ .../ssh_key_authentication/Readme.adoc | 26 +---- .../ssh_key_authentication.adoc | 25 +++++ .../ssh_server_config/Readme.adoc | 30 +----- .../ssh_server_config/ssh_server_config.adoc | 29 ++++++ test/case/misc/operational_all/Readme.adoc | 25 +---- .../misc/operational_all/operational_all.adoc | 24 +++++ test/case/use_case/ospf_container/Readme.adoc | 99 +------------------ .../ospf_container/ospf_container.adoc | 98 ++++++++++++++++++ 120 files changed, 2093 insertions(+), 2023 deletions(-) mode change 100644 => 120000 test/case/ietf_hardware/usb/Readme.adoc create mode 100644 test/case/ietf_hardware/usb/usb.adoc mode change 100644 => 120000 test/case/ietf_hardware/usb_two_ports/Readme.adoc create mode 100644 test/case/ietf_hardware/usb_two_ports/usb_two_ports.adoc mode change 100644 => 120000 test/case/ietf_interfaces/bridge_basic/Readme.adoc create mode 100644 test/case/ietf_interfaces/bridge_basic/bridge_basic.adoc mode change 100644 => 120000 test/case/ietf_interfaces/bridge_fwd_dual_dut/Readme.adoc create mode 100644 test/case/ietf_interfaces/bridge_fwd_dual_dut/bridge_fwd_dual_dut.adoc mode change 100644 => 120000 test/case/ietf_interfaces/bridge_fwd_sgl_dut/Readme.adoc create mode 100644 test/case/ietf_interfaces/bridge_fwd_sgl_dut/bridge_fwd_sgl_dut.adoc mode change 100644 => 120000 test/case/ietf_interfaces/bridge_stp_basic/Readme.adoc create mode 100644 test/case/ietf_interfaces/bridge_stp_basic/bridge_stp_basic.adoc mode change 100644 => 120000 test/case/ietf_interfaces/bridge_veth/Readme.adoc create mode 100644 test/case/ietf_interfaces/bridge_veth/bridge_veth.adoc mode change 100644 => 120000 test/case/ietf_interfaces/bridge_vlan/Readme.adoc create mode 100644 test/case/ietf_interfaces/bridge_vlan/bridge_vlan.adoc mode change 100644 => 120000 test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc create mode 100644 test/case/ietf_interfaces/bridge_vlan_separation/bridge_vlan_separation.adoc mode change 100644 => 120000 test/case/ietf_interfaces/dual_bridge/Readme.adoc create mode 100644 test/case/ietf_interfaces/gre_basic/gre_basic.adoc create mode 100644 test/case/ietf_interfaces/gre_basic/gretap_basic.adoc create mode 100644 test/case/ietf_interfaces/gre_basic/test.yaml mode change 100644 => 120000 test/case/ietf_interfaces/gretap_bridged/Readme.adoc create mode 100644 test/case/ietf_interfaces/gretap_bridged/gretap_bridged.adoc mode change 100644 => 120000 test/case/ietf_interfaces/iface_enable_disable/Readme.adoc create mode 100644 test/case/ietf_interfaces/iface_enable_disable/iface_enable_disable.adoc mode change 100644 => 120000 test/case/ietf_interfaces/iface_phys_address/Readme.adoc create mode 100644 test/case/ietf_interfaces/iface_phys_address/iface_phys_address.adoc mode change 100644 => 120000 test/case/ietf_interfaces/ifalias/Readme.adoc create mode 100644 test/case/ietf_interfaces/ifalias/ifalias.adoc mode change 100644 => 120000 test/case/ietf_interfaces/igmp_basic/Readme.adoc create mode 100644 test/case/ietf_interfaces/igmp_basic/igmp_basic.adoc mode change 100644 => 120000 test/case/ietf_interfaces/igmp_vlan/Readme.adoc create mode 100644 test/case/ietf_interfaces/igmp_vlan/igmp_vlan.adoc mode change 100644 => 120000 test/case/ietf_interfaces/ipv4_address/Readme.adoc create mode 100644 test/case/ietf_interfaces/ipv4_address/ipv4_address.adoc mode change 100644 => 120000 test/case/ietf_interfaces/ipv4_autoconf/Readme.adoc create mode 100644 test/case/ietf_interfaces/ipv4_autoconf/ipv4_autoconf.adoc mode change 100644 => 120000 test/case/ietf_interfaces/ipv6_address/Readme.adoc create mode 100644 test/case/ietf_interfaces/ipv6_address/ipv6_address.adoc mode change 100644 => 120000 test/case/ietf_interfaces/routing_basic/Readme.adoc create mode 100644 test/case/ietf_interfaces/routing_basic/routing_basic.adoc mode change 100644 => 120000 test/case/ietf_interfaces/static_multicast_filters/Readme.adoc create mode 100644 test/case/ietf_interfaces/static_multicast_filters/static_multicast_filters.adoc mode change 100644 => 120000 test/case/ietf_interfaces/verify_all_interface_types/Readme.adoc create mode 100644 test/case/ietf_interfaces/verify_all_interface_types/verify_all_interface_types.adoc mode change 100644 => 120000 test/case/ietf_interfaces/veth_delete/Readme.adoc create mode 100644 test/case/ietf_interfaces/veth_delete/veth_delete.adoc mode change 100644 => 120000 test/case/ietf_interfaces/vlan_iface_termination/Readme.adoc create mode 100644 test/case/ietf_interfaces/vlan_iface_termination/vlan_iface_termination.adoc mode change 100644 => 120000 test/case/ietf_interfaces/vlan_ping/Readme.adoc create mode 100644 test/case/ietf_interfaces/vlan_ping/vlan_ping.adoc mode change 100644 => 120000 test/case/ietf_interfaces/vlan_qos/Readme.adoc create mode 100644 test/case/ietf_interfaces/vlan_qos/vlan_qos.adoc mode change 100644 => 120000 test/case/ietf_routing/ospf_basic/Readme.adoc create mode 100644 test/case/ietf_routing/ospf_basic/ospf_basic.adoc mode change 100644 => 120000 test/case/ietf_routing/ospf_bfd/Readme.adoc create mode 100644 test/case/ietf_routing/ospf_bfd/ospf_bfd.adoc mode change 100644 => 120000 test/case/ietf_routing/ospf_default_route_advertise/Readme.adoc create mode 100644 test/case/ietf_routing/ospf_default_route_advertise/ospf_default_route_advertise.adoc mode change 100644 => 120000 test/case/ietf_routing/ospf_multiarea/Readme.adoc create mode 100644 test/case/ietf_routing/ospf_multiarea/ospf_multiarea.adoc mode change 100644 => 120000 test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc create mode 100644 test/case/ietf_routing/ospf_unnumbered_interface/ospf_unnumbered_interface.adoc mode change 100644 => 120000 test/case/ietf_routing/route_pref_255/Readme.adoc create mode 100644 test/case/ietf_routing/route_pref_255/route_pref_255.adoc mode change 100644 => 120000 test/case/ietf_routing/route_pref_dhcp/Readme.adoc create mode 100644 test/case/ietf_routing/route_pref_dhcp/route_pref_dhcp.adoc mode change 100644 => 120000 test/case/ietf_routing/route_pref_ospf/Readme.adoc create mode 100644 test/case/ietf_routing/route_pref_ospf/route_pref_ospf.adoc mode change 100644 => 120000 test/case/ietf_routing/static_routing/Readme.adoc create mode 100644 test/case/ietf_routing/static_routing/static_routing.adoc mode change 100644 => 120000 test/case/ietf_syslog/basic/Readme.adoc create mode 100644 test/case/ietf_syslog/basic/basic.adoc mode change 100644 => 120000 test/case/ietf_syslog/remote/Readme.adoc create mode 100644 test/case/ietf_syslog/remote/remote.adoc mode change 100644 => 120000 test/case/ietf_system/add_delete_user/Readme.adoc create mode 100644 test/case/ietf_system/add_delete_user/add_delete_user.adoc mode change 100644 => 120000 test/case/ietf_system/hostname/Readme.adoc create mode 100644 test/case/ietf_system/hostname/hostname.adoc mode change 100644 => 120000 test/case/ietf_system/ntp_client/Readme.adoc create mode 100644 test/case/ietf_system/ntp_client/ntp_client.adoc mode change 100644 => 120000 test/case/ietf_system/timezone/Readme.adoc create mode 100644 test/case/ietf_system/timezone/timezone.adoc mode change 100644 => 120000 test/case/ietf_system/timezone_utc_offset/Readme.adoc create mode 100644 test/case/ietf_system/timezone_utc_offset/timezone_utc_offset.adoc mode change 100644 => 120000 test/case/ietf_system/upgrade/Readme.adoc create mode 100644 test/case/ietf_system/upgrade/upgrade.adoc mode change 100644 => 120000 test/case/ietf_system/user_admin/Readme.adoc create mode 100644 test/case/ietf_system/user_admin/user_admin.adoc mode change 100644 => 120000 test/case/infix_containers/container_basic/Readme.adoc create mode 100644 test/case/infix_containers/container_basic/container_basic.adoc mode change 100644 => 120000 test/case/infix_containers/container_bridge/Readme.adoc create mode 100644 test/case/infix_containers/container_bridge/container_bridge.adoc mode change 100644 => 120000 test/case/infix_containers/container_firewall_basic/Readme.adoc create mode 100644 test/case/infix_containers/container_firewall_basic/container_firewall_basic.adoc mode change 100644 => 120000 test/case/infix_containers/container_phys/Readme.adoc create mode 100644 test/case/infix_containers/container_phys/container_phys.adoc mode change 100644 => 120000 test/case/infix_containers/container_veth/Readme.adoc create mode 100644 test/case/infix_containers/container_veth/container_veth.adoc mode change 100644 => 120000 test/case/infix_dhcp/dhcp_basic/Readme.adoc create mode 100644 test/case/infix_dhcp/dhcp_basic/dhcp_basic.adoc mode change 100644 => 120000 test/case/infix_dhcp/dhcp_router/Readme.adoc create mode 100644 test/case/infix_dhcp/dhcp_router/dhcp_router.adoc mode change 100644 => 120000 test/case/infix_dhcp/dhcp_routes/Readme.adoc create mode 100644 test/case/infix_dhcp/dhcp_routes/dhcp_routes.adoc mode change 100644 => 120000 test/case/infix_services/mdns_allow_deny/Readme.adoc create mode 100644 test/case/infix_services/mdns_allow_deny/mdns_allow_deny.adoc mode change 100644 => 120000 test/case/infix_services/ssh_key_authentication/Readme.adoc create mode 100644 test/case/infix_services/ssh_key_authentication/ssh_key_authentication.adoc mode change 100644 => 120000 test/case/infix_services/ssh_server_config/Readme.adoc create mode 100644 test/case/infix_services/ssh_server_config/ssh_server_config.adoc mode change 100644 => 120000 test/case/misc/operational_all/Readme.adoc create mode 100644 test/case/misc/operational_all/operational_all.adoc mode change 100644 => 120000 test/case/use_case/ospf_container/Readme.adoc create mode 100644 test/case/use_case/ospf_container/ospf_container.adoc diff --git a/test/case/ietf_hardware/ietf_hardware.yaml b/test/case/ietf_hardware/ietf_hardware.yaml index 5acbf280..e8ba848a 100644 --- a/test/case/ietf_hardware/ietf_hardware.yaml +++ b/test/case/ietf_hardware/ietf_hardware.yaml @@ -2,5 +2,5 @@ - name: usb case: usb/test.py -- name: usb two ports +- name: usb_two_ports case: usb_two_ports/test.py diff --git a/test/case/ietf_hardware/usb/Readme.adoc b/test/case/ietf_hardware/usb/Readme.adoc deleted file mode 100644 index 2c8645b7..00000000 --- a/test/case/ietf_hardware/usb/Readme.adoc +++ /dev/null @@ -1,40 +0,0 @@ -=== USB configuration -==== Description -This test checks if the configuration is consistent with hardware state, -and verifies whether the USB ports are correctly _locked_ (restricted from -use) and _unlocked_ (available for use) when they should. It also verifies -this behavior during reboot. This test does not involve the actual use of -the USB port; it only ensures the configured state is consistent with the -hardware state. - -If this pass you can be certain that the configuration of the USB -port is handled correctly. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_hardware/usb/topology.svg[USB configuration topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::usb/topology.svg[USB configuration topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[USB configuration topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Unlock all USB ports -. Verify that all USB ports are unlocked -. Lock all USB ports -. Verify that all USB ports are locked -. Remove all hardware configuration -. Verify that all USB ports are locked -. Unlock USB ports -. Verify that all USB ports are unlocked -. Save the configuration to startup configuration and reboot -. Verify USB port remain unlocked after reboot - - -<<< - diff --git a/test/case/ietf_hardware/usb/Readme.adoc b/test/case/ietf_hardware/usb/Readme.adoc new file mode 120000 index 00000000..5bd4c61a --- /dev/null +++ b/test/case/ietf_hardware/usb/Readme.adoc @@ -0,0 +1 @@ +usb.adoc \ No newline at end of file diff --git a/test/case/ietf_hardware/usb/usb.adoc b/test/case/ietf_hardware/usb/usb.adoc new file mode 100644 index 00000000..2c8645b7 --- /dev/null +++ b/test/case/ietf_hardware/usb/usb.adoc @@ -0,0 +1,40 @@ +=== USB configuration +==== Description +This test checks if the configuration is consistent with hardware state, +and verifies whether the USB ports are correctly _locked_ (restricted from +use) and _unlocked_ (available for use) when they should. It also verifies +this behavior during reboot. This test does not involve the actual use of +the USB port; it only ensures the configured state is consistent with the +hardware state. + +If this pass you can be certain that the configuration of the USB +port is handled correctly. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_hardware/usb/topology.svg[USB configuration topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::usb/topology.svg[USB configuration topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[USB configuration topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Unlock all USB ports +. Verify that all USB ports are unlocked +. Lock all USB ports +. Verify that all USB ports are locked +. Remove all hardware configuration +. Verify that all USB ports are locked +. Unlock USB ports +. Verify that all USB ports are unlocked +. Save the configuration to startup configuration and reboot +. Verify USB port remain unlocked after reboot + + +<<< + diff --git a/test/case/ietf_hardware/usb_two_ports/Readme.adoc b/test/case/ietf_hardware/usb_two_ports/Readme.adoc deleted file mode 100644 index c9928018..00000000 --- a/test/case/ietf_hardware/usb_two_ports/Readme.adoc +++ /dev/null @@ -1,27 +0,0 @@ -=== USB configuration with two USB ports -==== Description -Test that the USB locked/unlocked configuration is consistent -when having two USB ports. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_hardware/usb_two_ports/topology.svg[USB configuration with two USB ports topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::usb_two_ports/topology.svg[USB configuration with two USB ports topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[USB configuration with two USB ports topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Lock the first USB port and unlock the second USB port -. Verify that the correct port is locked and the correct one is unlocked -. Unlock the first USB port, and lock the second USB port -. Verify that the correct port is locked and the correct one is unlocked - - -<<< - diff --git a/test/case/ietf_hardware/usb_two_ports/Readme.adoc b/test/case/ietf_hardware/usb_two_ports/Readme.adoc new file mode 120000 index 00000000..ee076aa2 --- /dev/null +++ b/test/case/ietf_hardware/usb_two_ports/Readme.adoc @@ -0,0 +1 @@ +usb_two_ports.adoc \ No newline at end of file diff --git a/test/case/ietf_hardware/usb_two_ports/usb_two_ports.adoc b/test/case/ietf_hardware/usb_two_ports/usb_two_ports.adoc new file mode 100644 index 00000000..c9928018 --- /dev/null +++ b/test/case/ietf_hardware/usb_two_ports/usb_two_ports.adoc @@ -0,0 +1,27 @@ +=== USB configuration with two USB ports +==== Description +Test that the USB locked/unlocked configuration is consistent +when having two USB ports. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_hardware/usb_two_ports/topology.svg[USB configuration with two USB ports topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::usb_two_ports/topology.svg[USB configuration with two USB ports topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[USB configuration with two USB ports topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Lock the first USB port and unlock the second USB port +. Verify that the correct port is locked and the correct one is unlocked +. Unlock the first USB port, and lock the second USB port +. Verify that the correct port is locked and the correct one is unlocked + + +<<< + diff --git a/test/case/ietf_interfaces/bridge_basic/Readme.adoc b/test/case/ietf_interfaces/bridge_basic/Readme.adoc deleted file mode 100644 index b43fcef5..00000000 --- a/test/case/ietf_interfaces/bridge_basic/Readme.adoc +++ /dev/null @@ -1,32 +0,0 @@ -=== Bridge basic -==== Description -Test basic connectivity to a bridge - -.... - - PING --> br0 (10.0.0.2) - / - PC -------- target:data - -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/bridge_basic/topology.svg[Bridge basic topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::bridge_basic/topology.svg[Bridge basic topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Bridge basic topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure single bridge with a single physical port, bridge @ IP 10.0.0.2 -. Verify ping 10.0.0.2 is possible from host:data - - -<<< - diff --git a/test/case/ietf_interfaces/bridge_basic/Readme.adoc b/test/case/ietf_interfaces/bridge_basic/Readme.adoc new file mode 120000 index 00000000..f038bcf7 --- /dev/null +++ b/test/case/ietf_interfaces/bridge_basic/Readme.adoc @@ -0,0 +1 @@ +bridge_basic.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/bridge_basic/bridge_basic.adoc b/test/case/ietf_interfaces/bridge_basic/bridge_basic.adoc new file mode 100644 index 00000000..b43fcef5 --- /dev/null +++ b/test/case/ietf_interfaces/bridge_basic/bridge_basic.adoc @@ -0,0 +1,32 @@ +=== Bridge basic +==== Description +Test basic connectivity to a bridge + +.... + + PING --> br0 (10.0.0.2) + / + PC -------- target:data + +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/bridge_basic/topology.svg[Bridge basic topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::bridge_basic/topology.svg[Bridge basic topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Bridge basic topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure single bridge with a single physical port, bridge @ IP 10.0.0.2 +. Verify ping 10.0.0.2 is possible from host:data + + +<<< + diff --git a/test/case/ietf_interfaces/bridge_fwd_dual_dut/Readme.adoc b/test/case/ietf_interfaces/bridge_fwd_dual_dut/Readme.adoc deleted file mode 100644 index cc5c0a5a..00000000 --- a/test/case/ietf_interfaces/bridge_fwd_dual_dut/Readme.adoc +++ /dev/null @@ -1,44 +0,0 @@ -=== Bridge forwarding dual DUTs -==== Description -Ping through two bridges on two different DUTs. - -.... - - .-------------------------. .-------------------------. - | [ DUT1 ] link | | link [ DUT2 ] | - | br0 -----|-------|----- br0 | - | / | | / \ | - | mgmt data1 | | data1 data2 mgmt | - '-------------------------' '-------------------------' - | | | | | - | | | | | -.---------------------------------------------------------------. -| mgmt1 data11 data21 data22 mgmt2 | -| [10.0.0.2] [10.0.0.3] [10.0.0.4] | -| (ns11) (ns20) (ns21) | -| | -| [ HOST ] | -'---------------------------------------------------------------' - -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Bridge forwarding dual DUTs topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure a bridge with triple physical port -. Verify ping 10.0.0.3 and 10.0.0.4 from host:data11 - - -<<< - diff --git a/test/case/ietf_interfaces/bridge_fwd_dual_dut/Readme.adoc b/test/case/ietf_interfaces/bridge_fwd_dual_dut/Readme.adoc new file mode 120000 index 00000000..52ecd5f1 --- /dev/null +++ b/test/case/ietf_interfaces/bridge_fwd_dual_dut/Readme.adoc @@ -0,0 +1 @@ +bridge_fwd_dual_dut.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/bridge_fwd_dual_dut/bridge_fwd_dual_dut.adoc b/test/case/ietf_interfaces/bridge_fwd_dual_dut/bridge_fwd_dual_dut.adoc new file mode 100644 index 00000000..cc5c0a5a --- /dev/null +++ b/test/case/ietf_interfaces/bridge_fwd_dual_dut/bridge_fwd_dual_dut.adoc @@ -0,0 +1,44 @@ +=== Bridge forwarding dual DUTs +==== Description +Ping through two bridges on two different DUTs. + +.... + + .-------------------------. .-------------------------. + | [ DUT1 ] link | | link [ DUT2 ] | + | br0 -----|-------|----- br0 | + | / | | / \ | + | mgmt data1 | | data1 data2 mgmt | + '-------------------------' '-------------------------' + | | | | | + | | | | | +.---------------------------------------------------------------. +| mgmt1 data11 data21 data22 mgmt2 | +| [10.0.0.2] [10.0.0.3] [10.0.0.4] | +| (ns11) (ns20) (ns21) | +| | +| [ HOST ] | +'---------------------------------------------------------------' + +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::bridge_fwd_dual_dut/topology.svg[Bridge forwarding dual DUTs topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Bridge forwarding dual DUTs topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure a bridge with triple physical port +. Verify ping 10.0.0.3 and 10.0.0.4 from host:data11 + + +<<< + diff --git a/test/case/ietf_interfaces/bridge_fwd_sgl_dut/Readme.adoc b/test/case/ietf_interfaces/bridge_fwd_sgl_dut/Readme.adoc deleted file mode 100644 index fc530c39..00000000 --- a/test/case/ietf_interfaces/bridge_fwd_sgl_dut/Readme.adoc +++ /dev/null @@ -1,44 +0,0 @@ -=== Bridge forwarding single DUTs -==== Description -Tests forwarding through a DUT with two bridged interfaces on one DUT. - -.... - -,------------------------------------------, -| | -| br0 | -| / \ | -| target:mgmt target:data1 target:data2 | -'------------------------------------------' - | | | - | | | -,------------------------------------------, -| host:mgmt host:data1 host:data2 | -| [10.0.0.1] [10.0.0.2] | -| (ns0) (ns1) | -| | -| [ HOST ] | -'------------------------------------------' - -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Bridge forwarding single DUTs topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure a bridge with dual physical port -. Verify ping from host:data1 to 10.0.0.2 - - -<<< - diff --git a/test/case/ietf_interfaces/bridge_fwd_sgl_dut/Readme.adoc b/test/case/ietf_interfaces/bridge_fwd_sgl_dut/Readme.adoc new file mode 120000 index 00000000..96cc4f22 --- /dev/null +++ b/test/case/ietf_interfaces/bridge_fwd_sgl_dut/Readme.adoc @@ -0,0 +1 @@ +bridge_fwd_sgl_dut.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/bridge_fwd_sgl_dut/bridge_fwd_sgl_dut.adoc b/test/case/ietf_interfaces/bridge_fwd_sgl_dut/bridge_fwd_sgl_dut.adoc new file mode 100644 index 00000000..fc530c39 --- /dev/null +++ b/test/case/ietf_interfaces/bridge_fwd_sgl_dut/bridge_fwd_sgl_dut.adoc @@ -0,0 +1,44 @@ +=== Bridge forwarding single DUTs +==== Description +Tests forwarding through a DUT with two bridged interfaces on one DUT. + +.... + +,------------------------------------------, +| | +| br0 | +| / \ | +| target:mgmt target:data1 target:data2 | +'------------------------------------------' + | | | + | | | +,------------------------------------------, +| host:mgmt host:data1 host:data2 | +| [10.0.0.1] [10.0.0.2] | +| (ns0) (ns1) | +| | +| [ HOST ] | +'------------------------------------------' + +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::bridge_fwd_sgl_dut/topology.svg[Bridge forwarding single DUTs topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Bridge forwarding single DUTs topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure a bridge with dual physical port +. Verify ping from host:data1 to 10.0.0.2 + + +<<< + diff --git a/test/case/ietf_interfaces/bridge_stp_basic/Readme.adoc b/test/case/ietf_interfaces/bridge_stp_basic/Readme.adoc deleted file mode 100644 index e017893f..00000000 --- a/test/case/ietf_interfaces/bridge_stp_basic/Readme.adoc +++ /dev/null @@ -1,31 +0,0 @@ -=== Bridge STP Basic -==== Description -Verify that a fully connected mesh of 4 DUTs is pruned to a spanning -tree. - -Since the mesh contains 3 redundant paths, can infer that a spanning -tree has been created if all host interfaces can reach each other -while exactly three links are in the blocking state. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/bridge_stp_basic/topology.svg[Bridge STP Basic topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::bridge_stp_basic/topology.svg[Bridge STP Basic topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Bridge STP Basic topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure a bridge with spanning tree eneabled on dut a, b, c, and d -. Add an IP address to each host interface in the 10.0.0.0/24 subnet -. Verify that exactly three links are blocking -. Verify that host:a can reach host:{b,c,d} - - -<<< - diff --git a/test/case/ietf_interfaces/bridge_stp_basic/Readme.adoc b/test/case/ietf_interfaces/bridge_stp_basic/Readme.adoc new file mode 120000 index 00000000..0bae050f --- /dev/null +++ b/test/case/ietf_interfaces/bridge_stp_basic/Readme.adoc @@ -0,0 +1 @@ +bridge_stp_basic.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/bridge_stp_basic/bridge_stp_basic.adoc b/test/case/ietf_interfaces/bridge_stp_basic/bridge_stp_basic.adoc new file mode 100644 index 00000000..e017893f --- /dev/null +++ b/test/case/ietf_interfaces/bridge_stp_basic/bridge_stp_basic.adoc @@ -0,0 +1,31 @@ +=== Bridge STP Basic +==== Description +Verify that a fully connected mesh of 4 DUTs is pruned to a spanning +tree. + +Since the mesh contains 3 redundant paths, can infer that a spanning +tree has been created if all host interfaces can reach each other +while exactly three links are in the blocking state. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/bridge_stp_basic/topology.svg[Bridge STP Basic topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::bridge_stp_basic/topology.svg[Bridge STP Basic topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Bridge STP Basic topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure a bridge with spanning tree eneabled on dut a, b, c, and d +. Add an IP address to each host interface in the 10.0.0.0/24 subnet +. Verify that exactly three links are blocking +. Verify that host:a can reach host:{b,c,d} + + +<<< + diff --git a/test/case/ietf_interfaces/bridge_veth/Readme.adoc b/test/case/ietf_interfaces/bridge_veth/Readme.adoc deleted file mode 100644 index b801d649..00000000 --- a/test/case/ietf_interfaces/bridge_veth/Readme.adoc +++ /dev/null @@ -1,34 +0,0 @@ -=== Bridge with a physical port and a veth -==== Description -This tests the possibility to add software added interfaces, in this case -VETH and bridge it with a physical interface - -.... - -PING --> br0 - / \ - PC- target:data veth0a -- veth0b - 10.0.0.1 10.0.0.2 - -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/bridge_veth/topology.svg[Bridge with a physical port and a veth topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::bridge_veth/topology.svg[Bridge with a physical port and a veth topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Bridge with a physical port and a veth topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure bridged eth port and veth pair with IP 10.0.0.2 -. Verify ping from host:data to 10.0.0.2 - - -<<< - diff --git a/test/case/ietf_interfaces/bridge_veth/Readme.adoc b/test/case/ietf_interfaces/bridge_veth/Readme.adoc new file mode 120000 index 00000000..f22ad7df --- /dev/null +++ b/test/case/ietf_interfaces/bridge_veth/Readme.adoc @@ -0,0 +1 @@ +bridge_veth.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/bridge_veth/bridge_veth.adoc b/test/case/ietf_interfaces/bridge_veth/bridge_veth.adoc new file mode 100644 index 00000000..b801d649 --- /dev/null +++ b/test/case/ietf_interfaces/bridge_veth/bridge_veth.adoc @@ -0,0 +1,34 @@ +=== Bridge with a physical port and a veth +==== Description +This tests the possibility to add software added interfaces, in this case +VETH and bridge it with a physical interface + +.... + +PING --> br0 + / \ + PC- target:data veth0a -- veth0b + 10.0.0.1 10.0.0.2 + +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/bridge_veth/topology.svg[Bridge with a physical port and a veth topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::bridge_veth/topology.svg[Bridge with a physical port and a veth topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Bridge with a physical port and a veth topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure bridged eth port and veth pair with IP 10.0.0.2 +. Verify ping from host:data to 10.0.0.2 + + +<<< + diff --git a/test/case/ietf_interfaces/bridge_vlan/Readme.adoc b/test/case/ietf_interfaces/bridge_vlan/Readme.adoc deleted file mode 100644 index f6b0694a..00000000 --- a/test/case/ietf_interfaces/bridge_vlan/Readme.adoc +++ /dev/null @@ -1,33 +0,0 @@ -=== Bridge VLAN -==== Description -Basic test of VLAN functionality in a bridge, tagged/untagged traffic and a VLAN interface in the bridge. -.... - ¦ ¦ - ¦ vlan10 IP:10.0.0.2 ¦ br0 IP:10.0.0.3 - ¦ / ¦ / - ¦ br0 <-- VLAN filtering ¦ link.10 - ¦ u/ \t ¦ / - PC ------data link -----------------|-- link - ¦ dut1 ¦ dut2 -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/bridge_vlan/topology.svg[Bridge VLAN topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::bridge_vlan/topology.svg[Bridge VLAN topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Bridge VLAN topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure DUTs -. Verify ping from host:data to 10.0.0.2 and 10.0.0.3 - - -<<< - diff --git a/test/case/ietf_interfaces/bridge_vlan/Readme.adoc b/test/case/ietf_interfaces/bridge_vlan/Readme.adoc new file mode 120000 index 00000000..8e63bba6 --- /dev/null +++ b/test/case/ietf_interfaces/bridge_vlan/Readme.adoc @@ -0,0 +1 @@ +bridge_vlan.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/bridge_vlan/bridge_vlan.adoc b/test/case/ietf_interfaces/bridge_vlan/bridge_vlan.adoc new file mode 100644 index 00000000..f6b0694a --- /dev/null +++ b/test/case/ietf_interfaces/bridge_vlan/bridge_vlan.adoc @@ -0,0 +1,33 @@ +=== Bridge VLAN +==== Description +Basic test of VLAN functionality in a bridge, tagged/untagged traffic and a VLAN interface in the bridge. +.... + ¦ ¦ + ¦ vlan10 IP:10.0.0.2 ¦ br0 IP:10.0.0.3 + ¦ / ¦ / + ¦ br0 <-- VLAN filtering ¦ link.10 + ¦ u/ \t ¦ / + PC ------data link -----------------|-- link + ¦ dut1 ¦ dut2 +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/bridge_vlan/topology.svg[Bridge VLAN topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::bridge_vlan/topology.svg[Bridge VLAN topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Bridge VLAN topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure DUTs +. Verify ping from host:data to 10.0.0.2 and 10.0.0.3 + + +<<< + diff --git a/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc b/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc deleted file mode 100644 index 13e59869..00000000 --- a/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc +++ /dev/null @@ -1,49 +0,0 @@ -=== Bridge VLAN separation -==== Description -Test that two VLANs are correctly separated in the bridge - -.... - ,-----------------------------------, ,----------------------------------, - | dut1:link | | dut2:link | - | br0 --------|---|--------- br0 | - | / \ | | / \ | - |dut1:mgmt dut1:data1 dut1:data2 | | dut2:data1 dut2:data2 dut2:mgmt | - '-----------------------------------' '----------------------------------' - | | | | | | - | | | | | | - ,------------------------------------------------------------------------------, - | host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 | - | [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] | - | (ns10) (ns11) (ns20) (ns21) | - | | - | [ HOST ] | - '------------------------------------------------------------------------------' - -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/bridge_vlan_separation/topology.svg[Bridge VLAN separation topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::bridge_vlan_separation/topology.svg[Bridge VLAN separation topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Bridge VLAN separation topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure DUTs -. Verify ping 10.0.0.3 from host:data10 -. Verify ping 10.0.0.4 from host:data11 -. Verify ping not possible host:data10->10.0.0.4, host:data11->10.0.0.3, host:data10->10.0.0.2, host:data11->10.0.0.1 -. Verify MAC broadcast isolation within VLANs -. Send ping to 10.0.0.255 from host:data10 -. Verify broadcast is received on host:data20 -. Verify broadcast is NOT received on host:data11 and host:data21 - - -<<< - diff --git a/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc b/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc new file mode 120000 index 00000000..239034ef --- /dev/null +++ b/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc @@ -0,0 +1 @@ +bridge_vlan_separation.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/bridge_vlan_separation/bridge_vlan_separation.adoc b/test/case/ietf_interfaces/bridge_vlan_separation/bridge_vlan_separation.adoc new file mode 100644 index 00000000..13e59869 --- /dev/null +++ b/test/case/ietf_interfaces/bridge_vlan_separation/bridge_vlan_separation.adoc @@ -0,0 +1,49 @@ +=== Bridge VLAN separation +==== Description +Test that two VLANs are correctly separated in the bridge + +.... + ,-----------------------------------, ,----------------------------------, + | dut1:link | | dut2:link | + | br0 --------|---|--------- br0 | + | / \ | | / \ | + |dut1:mgmt dut1:data1 dut1:data2 | | dut2:data1 dut2:data2 dut2:mgmt | + '-----------------------------------' '----------------------------------' + | | | | | | + | | | | | | + ,------------------------------------------------------------------------------, + | host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 | + | [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] | + | (ns10) (ns11) (ns20) (ns21) | + | | + | [ HOST ] | + '------------------------------------------------------------------------------' + +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/bridge_vlan_separation/topology.svg[Bridge VLAN separation topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::bridge_vlan_separation/topology.svg[Bridge VLAN separation topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Bridge VLAN separation topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure DUTs +. Verify ping 10.0.0.3 from host:data10 +. Verify ping 10.0.0.4 from host:data11 +. Verify ping not possible host:data10->10.0.0.4, host:data11->10.0.0.3, host:data10->10.0.0.2, host:data11->10.0.0.1 +. Verify MAC broadcast isolation within VLANs +. Send ping to 10.0.0.255 from host:data10 +. Verify broadcast is received on host:data20 +. Verify broadcast is NOT received on host:data11 and host:data21 + + +<<< + diff --git a/test/case/ietf_interfaces/dual_bridge/Readme.adoc b/test/case/ietf_interfaces/dual_bridge/Readme.adoc deleted file mode 100644 index 37a64b53..00000000 --- a/test/case/ietf_interfaces/dual_bridge/Readme.adoc +++ /dev/null @@ -1,30 +0,0 @@ -=== Dual bridges on one device -==== Description -Verify that it is possible to ping through a bridge to another bridge via VETH interfaces. - -.... - PING --> br0 br1 10.0.0.2 - / \ / -PC - target:data veth0a - veth0b -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/dual_bridge/topology.svg[Dual bridges on one device topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::dual_bridge/topology.svg[Dual bridges on one device topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Dual bridges on one device topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure two bridges linked and a veth pair -. Verify ping from host:data to 10.0.0.2 - - -<<< - diff --git a/test/case/ietf_interfaces/dual_bridge/Readme.adoc b/test/case/ietf_interfaces/dual_bridge/Readme.adoc new file mode 120000 index 00000000..8add916e --- /dev/null +++ b/test/case/ietf_interfaces/dual_bridge/Readme.adoc @@ -0,0 +1 @@ +dual_bridge.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/gre_basic/Readme.adoc b/test/case/ietf_interfaces/gre_basic/Readme.adoc index f197f2f4..be68d210 100644 --- a/test/case/ietf_interfaces/gre_basic/Readme.adoc +++ b/test/case/ietf_interfaces/gre_basic/Readme.adoc @@ -1,26 +1,4 @@ -=== Basic IP GRE test -==== Description -Test setting up IP GRE tunnels using IPv4 and IPv6, -and then a connectivity test. +include::gre_basic.adoc[] -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/gre_basic/topology.svg[Basic IP GRE test topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::gre_basic/topology.svg[Basic IP GRE test topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Basic IP GRE test topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure DUTs -. Test connectivity host:data to gre 10.0.0.2 -. Test connectivity host:data to gre on right 2001:db8::c0a8:0a02 - - -<<< +include::gretap_basic.adoc[] diff --git a/test/case/ietf_interfaces/gre_basic/gre_basic.adoc b/test/case/ietf_interfaces/gre_basic/gre_basic.adoc new file mode 100644 index 00000000..e178f3e7 --- /dev/null +++ b/test/case/ietf_interfaces/gre_basic/gre_basic.adoc @@ -0,0 +1,25 @@ +=== GRE point-to-point +==== Description +Test setting up IP GRE tunnels using IPv4 and IPv6, +and ends with a connectivity test. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/gre_basic/topology.svg[GRE point-to-point topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::gre_basic/topology.svg[GRE point-to-point topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[GRE point-to-point topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure DUTs +. Verify connectivity host:data to 2001:db8::c0a8:0a02 + + +<<< + diff --git a/test/case/ietf_interfaces/gre_basic/gretap_basic.adoc b/test/case/ietf_interfaces/gre_basic/gretap_basic.adoc new file mode 100644 index 00000000..a2d69d7e --- /dev/null +++ b/test/case/ietf_interfaces/gre_basic/gretap_basic.adoc @@ -0,0 +1,25 @@ +=== GRETAP point-to-point +==== Description +Test setting up IP GRE tunnels using IPv4 and IPv6, +and ends with a connectivity test. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/gre_basic/topology.svg[GRETAP point-to-point topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::gre_basic/topology.svg[GRETAP point-to-point topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[GRETAP point-to-point topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure DUTs +. Verify connectivity host:data to 2001:db8::c0a8:0a02 + + +<<< + diff --git a/test/case/ietf_interfaces/gre_basic/test.py b/test/case/ietf_interfaces/gre_basic/test.py index 1a1a0ef7..64afa853 100755 --- a/test/case/ietf_interfaces/gre_basic/test.py +++ b/test/case/ietf_interfaces/gre_basic/test.py @@ -1,21 +1,25 @@ #!/usr/bin/env python3 """ -Basic IP GRE test +Basic GRE connectivity test Test setting up IP GRE tunnels using IPv4 and IPv6, -and then a connectivity test. +and ends with a connectivity test. """ import infamy +class ArgumentParser(infamy.ArgumentParser): + def __init__(self): + super().__init__() + self.add_argument("--type") + with infamy.Test() as test: with test.step("Set up topology and attach to target DUTs"): - env = infamy.Env() - left = env.attach("left", "mgmt") - right = env.attach("right", "mgmt") - _, leftlink = env.ltop.xlate("left", "link") - _, leftdata = env.ltop.xlate("left", "data") - _, rightlink = env.ltop.xlate("right", "link") + args=ArgumentParser() + env = infamy.Env(args=args) + type = env.args.type + left = env.attach("left", "mgmt") + right = env.attach("right", "mgmt") with test.step("Configure DUTs"): @@ -23,7 +27,7 @@ with infamy.Test() as test: "interfaces": { "interface": [ { - "name": leftlink, + "name": left["link"], "ipv4": { "address": [{ "ip": "192.168.50.1", @@ -40,7 +44,7 @@ with infamy.Test() as test: } }, { - "name": leftdata, + "name": left["data"], "ipv4": { "address": [{ "ip": "192.168.10.1", @@ -58,7 +62,7 @@ with infamy.Test() as test: }, { "name": "gre0", - "type": "infix-if-type:gre", + "type": f"infix-if-type:{type}", "ipv4": { "address": [{ "ip": "192.168.30.1", @@ -74,7 +78,7 @@ with infamy.Test() as test: }, { "name": "gre6", - "type": "infix-if-type:gre", + "type": f"infix-if-type:{type}", "ipv6": { "address": [{ "ip": "2001:db8:3c4d:30::1", @@ -95,7 +99,7 @@ with infamy.Test() as test: "interfaces": { "interface": [ { - "name": rightlink, + "name": right["link"], "ipv4": { "address": [{ "ip": "192.168.50.2", @@ -112,7 +116,7 @@ with infamy.Test() as test: }, { "name": "gre1", - "type": "infix-if-type:gre", + "type": f"infix-if-type:{type}", "ipv4": { "address": [{ "ip": "192.168.30.2", @@ -127,7 +131,7 @@ with infamy.Test() as test: }, { "name": "gre6", - "type": "infix-if-type:gre", + "type": f"infix-if-type:{type}", "ipv6": { "address": [{ "ip": "2001:db8:3c4d:30::2", @@ -171,16 +175,15 @@ with infamy.Test() as test: } }) _, hport = env.ltop.xlate("host", "data") - with test.step("Test connectivity host:data to gre 10.0.0.2"): + with test.step(f"Verify connectivity host:data to 10.0.0.2"): with infamy.IsolatedMacVlan(hport) as ns0: ns0.addip("192.168.10.2") ns0.addroute("192.168.30.0/24", "192.168.10.1") ns0.must_reach("192.168.30.2") - with test.step("Test connectivity host:data to gre on right 2001:db8::c0a8:0a02"): + with test.step("Verify connectivity host:data to 2001:db8::c0a8:0a02"): with infamy.IsolatedMacVlan(hport) as ns0: ns0.addip("2001:db8:3c4d:10::2", prefix_length=64, proto="ipv6") ns0.addroute("2001:db8:3c4d:30::/64", "2001:db8:3c4d:10::1", proto="ipv6") - #breakpoint() ns0.must_reach("2001:db8:3c4d:30::2") test.succeed() diff --git a/test/case/ietf_interfaces/gre_basic/test.yaml b/test/case/ietf_interfaces/gre_basic/test.yaml new file mode 100644 index 00000000..150b311e --- /dev/null +++ b/test/case/ietf_interfaces/gre_basic/test.yaml @@ -0,0 +1,12 @@ +--- +- name: gre_basic + case: test.py + opts: ["--type", "gre"] + infamy: + title: GRE point-to-point + +- name: gretap_basic + case: test.py + opts: ["--type", "gretap"] + infamy: + title: GRETAP point-to-point diff --git a/test/case/ietf_interfaces/gretap_bridged/Readme.adoc b/test/case/ietf_interfaces/gretap_bridged/Readme.adoc deleted file mode 100644 index 6060218a..00000000 --- a/test/case/ietf_interfaces/gretap_bridged/Readme.adoc +++ /dev/null @@ -1,24 +0,0 @@ -=== GRETAP interface bridged with physical -==== Description -Test that GRETAP works as it should and that it possible to bridge it. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/gretap_bridged/topology.svg[GRETAP interface bridged with physical topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::gretap_bridged/topology.svg[GRETAP interface bridged with physical topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[GRETAP interface bridged with physical topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure DUTs -. Test connectivity host:data to right:gre0 at 192.168.10.2 - - -<<< - diff --git a/test/case/ietf_interfaces/gretap_bridged/Readme.adoc b/test/case/ietf_interfaces/gretap_bridged/Readme.adoc new file mode 120000 index 00000000..6fdba522 --- /dev/null +++ b/test/case/ietf_interfaces/gretap_bridged/Readme.adoc @@ -0,0 +1 @@ +gretap_bridged.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/gretap_bridged/gretap_bridged.adoc b/test/case/ietf_interfaces/gretap_bridged/gretap_bridged.adoc new file mode 100644 index 00000000..6060218a --- /dev/null +++ b/test/case/ietf_interfaces/gretap_bridged/gretap_bridged.adoc @@ -0,0 +1,24 @@ +=== GRETAP interface bridged with physical +==== Description +Test that GRETAP works as it should and that it possible to bridge it. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/gretap_bridged/topology.svg[GRETAP interface bridged with physical topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::gretap_bridged/topology.svg[GRETAP interface bridged with physical topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[GRETAP interface bridged with physical topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure DUTs +. Test connectivity host:data to right:gre0 at 192.168.10.2 + + +<<< + diff --git a/test/case/ietf_interfaces/ietf_interfaces.yaml b/test/case/ietf_interfaces/ietf_interfaces.yaml index b5e4b846..550c4b19 100644 --- a/test/case/ietf_interfaces/ietf_interfaces.yaml +++ b/test/case/ietf_interfaces/ietf_interfaces.yaml @@ -69,7 +69,7 @@ case: vlan_iface_termination/test.py - name: gre_basic - case: gre_basic/test.py + suite: gre_basic/test.yaml - name: gretap_bridged case: gretap_bridged/test.py diff --git a/test/case/ietf_interfaces/iface_enable_disable/Readme.adoc b/test/case/ietf_interfaces/iface_enable_disable/Readme.adoc deleted file mode 100644 index d1b29c6b..00000000 --- a/test/case/ietf_interfaces/iface_enable_disable/Readme.adoc +++ /dev/null @@ -1,31 +0,0 @@ -=== Interface status -==== Description -Verify interface status properly propagate changes when an interface -is disabled and then re-enabled. - -Both admin-status and oper-status are verified. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/iface_enable_disable/topology.svg[Interface status topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::iface_enable_disable/topology.svg[Interface status topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Interface status topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure bridge and associated interfaces in target1 -. Disable interface in target2 -. Verify the interface is disabled -. Enable the interface and assign an IP address -. Verify the interface is enabled -. Verify it is possible to ping the interface - - -<<< - diff --git a/test/case/ietf_interfaces/iface_enable_disable/Readme.adoc b/test/case/ietf_interfaces/iface_enable_disable/Readme.adoc new file mode 120000 index 00000000..a892dfe7 --- /dev/null +++ b/test/case/ietf_interfaces/iface_enable_disable/Readme.adoc @@ -0,0 +1 @@ +iface_enable_disable.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/iface_enable_disable/iface_enable_disable.adoc b/test/case/ietf_interfaces/iface_enable_disable/iface_enable_disable.adoc new file mode 100644 index 00000000..d1b29c6b --- /dev/null +++ b/test/case/ietf_interfaces/iface_enable_disable/iface_enable_disable.adoc @@ -0,0 +1,31 @@ +=== Interface status +==== Description +Verify interface status properly propagate changes when an interface +is disabled and then re-enabled. + +Both admin-status and oper-status are verified. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/iface_enable_disable/topology.svg[Interface status topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::iface_enable_disable/topology.svg[Interface status topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Interface status topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure bridge and associated interfaces in target1 +. Disable interface in target2 +. Verify the interface is disabled +. Enable the interface and assign an IP address +. Verify the interface is enabled +. Verify it is possible to ping the interface + + +<<< + diff --git a/test/case/ietf_interfaces/iface_phys_address/Readme.adoc b/test/case/ietf_interfaces/iface_phys_address/Readme.adoc deleted file mode 100644 index be0a44e9..00000000 --- a/test/case/ietf_interfaces/iface_phys_address/Readme.adoc +++ /dev/null @@ -1,34 +0,0 @@ -=== Custom MAC address on interface -==== Description -Verify support for setting and removing a custom MAC address on interfaces. -Both static MAC address and derived from the chassis MAC with, or without, -an offset applied. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/iface_phys_address/topology.svg[Custom MAC address on interface topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::iface_phys_address/topology.svg[Custom MAC address on interface topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Custom MAC address on interface topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Set target:data static MAC address '02:01:00:c0:ff:ee' -. Verify target:data has MAC address '02:01:00:c0:ff:ee' -. Reset target:data MAC address to default -. Verify target:data MAC address is reset to default -. Set target:data to chassis MAC -. Verify target:data has chassis MAC -. Set target:data to chassis MAC + offset -. Verify target:data has chassis MAC + offset -. Reset target:data MAC address to default -. Verify target:data MAC address is reset to default - - -<<< - diff --git a/test/case/ietf_interfaces/iface_phys_address/Readme.adoc b/test/case/ietf_interfaces/iface_phys_address/Readme.adoc new file mode 120000 index 00000000..0a5e97b6 --- /dev/null +++ b/test/case/ietf_interfaces/iface_phys_address/Readme.adoc @@ -0,0 +1 @@ +iface_phys_address.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/iface_phys_address/iface_phys_address.adoc b/test/case/ietf_interfaces/iface_phys_address/iface_phys_address.adoc new file mode 100644 index 00000000..be0a44e9 --- /dev/null +++ b/test/case/ietf_interfaces/iface_phys_address/iface_phys_address.adoc @@ -0,0 +1,34 @@ +=== Custom MAC address on interface +==== Description +Verify support for setting and removing a custom MAC address on interfaces. +Both static MAC address and derived from the chassis MAC with, or without, +an offset applied. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/iface_phys_address/topology.svg[Custom MAC address on interface topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::iface_phys_address/topology.svg[Custom MAC address on interface topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Custom MAC address on interface topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set target:data static MAC address '02:01:00:c0:ff:ee' +. Verify target:data has MAC address '02:01:00:c0:ff:ee' +. Reset target:data MAC address to default +. Verify target:data MAC address is reset to default +. Set target:data to chassis MAC +. Verify target:data has chassis MAC +. Set target:data to chassis MAC + offset +. Verify target:data has chassis MAC + offset +. Reset target:data MAC address to default +. Verify target:data MAC address is reset to default + + +<<< + diff --git a/test/case/ietf_interfaces/ifalias/Readme.adoc b/test/case/ietf_interfaces/ifalias/Readme.adoc deleted file mode 100644 index 02209f91..00000000 --- a/test/case/ietf_interfaces/ifalias/Readme.adoc +++ /dev/null @@ -1,25 +0,0 @@ -=== Interface Description (ifAlias) -==== Description -Verify interface description (ifAlias) can be set on an interface and -then be read back from the operational datastore. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/ifalias/topology.svg[Interface Description (ifAlias) topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ifalias/topology.svg[Interface Description (ifAlias) topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Interface Description (ifAlias) topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Set up interface target:data with description -. Verify description can be read back from operational - - -<<< - diff --git a/test/case/ietf_interfaces/ifalias/Readme.adoc b/test/case/ietf_interfaces/ifalias/Readme.adoc new file mode 120000 index 00000000..de7cff80 --- /dev/null +++ b/test/case/ietf_interfaces/ifalias/Readme.adoc @@ -0,0 +1 @@ +ifalias.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/ifalias/ifalias.adoc b/test/case/ietf_interfaces/ifalias/ifalias.adoc new file mode 100644 index 00000000..02209f91 --- /dev/null +++ b/test/case/ietf_interfaces/ifalias/ifalias.adoc @@ -0,0 +1,25 @@ +=== Interface Description (ifAlias) +==== Description +Verify interface description (ifAlias) can be set on an interface and +then be read back from the operational datastore. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/ifalias/topology.svg[Interface Description (ifAlias) topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ifalias/topology.svg[Interface Description (ifAlias) topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Interface Description (ifAlias) topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set up interface target:data with description +. Verify description can be read back from operational + + +<<< + diff --git a/test/case/ietf_interfaces/igmp_basic/Readme.adoc b/test/case/ietf_interfaces/igmp_basic/Readme.adoc deleted file mode 100644 index db7b60cc..00000000 --- a/test/case/ietf_interfaces/igmp_basic/Readme.adoc +++ /dev/null @@ -1,42 +0,0 @@ -=== IGMP basic -==== Description -Verify that all multicast get flooded when no IGMP join exists in the system and -the flooding stops as soon a join arrives - - .1 - .---------------------------. - | DUT | - '-data1-----data2-----data3-' - | | | - | | | 10.0.0.0/24 - | | | - .-data1-. .-data2-. .-data3-. - | msend | | mrecv | | !memb | - '-------' '-------' '-------' - .2 .3 .4 - HOST - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/igmp_basic/topology.svg[IGMP basic topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::igmp_basic/topology.svg[IGMP basic topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[IGMP basic topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure device -. Start multicast sender on host:data0, group 224.1.1.1 -. Verify that the group 224.1.1.1 is flooded on host:data2 and host:data3 -. Join multicast group 224.1.1.1 on host:data2 -. Verify group 224.1.1.1 is received on host:data2 -. Verify that the group 224.1.1.1 is no longer received on host:data3 - - -<<< - diff --git a/test/case/ietf_interfaces/igmp_basic/Readme.adoc b/test/case/ietf_interfaces/igmp_basic/Readme.adoc new file mode 120000 index 00000000..d1e426bf --- /dev/null +++ b/test/case/ietf_interfaces/igmp_basic/Readme.adoc @@ -0,0 +1 @@ +igmp_basic.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/igmp_basic/igmp_basic.adoc b/test/case/ietf_interfaces/igmp_basic/igmp_basic.adoc new file mode 100644 index 00000000..db7b60cc --- /dev/null +++ b/test/case/ietf_interfaces/igmp_basic/igmp_basic.adoc @@ -0,0 +1,42 @@ +=== IGMP basic +==== Description +Verify that all multicast get flooded when no IGMP join exists in the system and +the flooding stops as soon a join arrives + + .1 + .---------------------------. + | DUT | + '-data1-----data2-----data3-' + | | | + | | | 10.0.0.0/24 + | | | + .-data1-. .-data2-. .-data3-. + | msend | | mrecv | | !memb | + '-------' '-------' '-------' + .2 .3 .4 + HOST + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/igmp_basic/topology.svg[IGMP basic topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::igmp_basic/topology.svg[IGMP basic topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[IGMP basic topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure device +. Start multicast sender on host:data0, group 224.1.1.1 +. Verify that the group 224.1.1.1 is flooded on host:data2 and host:data3 +. Join multicast group 224.1.1.1 on host:data2 +. Verify group 224.1.1.1 is received on host:data2 +. Verify that the group 224.1.1.1 is no longer received on host:data3 + + +<<< + diff --git a/test/case/ietf_interfaces/igmp_vlan/Readme.adoc b/test/case/ietf_interfaces/igmp_vlan/Readme.adoc deleted file mode 100644 index 703e13fb..00000000 --- a/test/case/ietf_interfaces/igmp_vlan/Readme.adoc +++ /dev/null @@ -1,49 +0,0 @@ -=== IGMP VLAN -==== Description -Test tagged IGMP control traffic and that VLAN separation is respected for multicast - -.... - VLAN55 VLAN77 VLAN55 VLAN77 - 10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2 - \ / \ / - \--------------/ VLAN 1,2 T \---------------/ - | DUT1 +---------------------------------+ DUT2 | - | |dut1:link dut2:link| | - +--------------+ +-----+---------+ - dut1:data1| |dut1:data2 dut2:data1| |dut2:data2 - VLAN55 U | | VLAN77 U VLAN55 U | | VLAN77 U - | | | | -+-------+ | +----------+ +------------+ +--------+ -| msend +--+ | mreceive | | mreceive | | msend | -+-------+ +----------+ +------------+ +--------+ - 10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22 -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/igmp_vlan/topology.svg[IGMP VLAN topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::igmp_vlan/topology.svg[IGMP VLAN topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[IGMP VLAN topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure device -. Start multicast sender on host:data11, group 224.2.2.2 -. Start multicast sender on host:data22, group 224.1.1.1 -. Verify group 224.2.2.2 is flooded to host:data21 -. Verify group 224.1.1.1 is flooded to host:data12 -. Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received -. Join multicast group 224.2.2.2 on host:data21 -. Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received -. Verify group 224.2.2.2 is forwarded to host:data21 -. Verify group 224.1.1.1 is forwarded to host:data12 - - -<<< - diff --git a/test/case/ietf_interfaces/igmp_vlan/Readme.adoc b/test/case/ietf_interfaces/igmp_vlan/Readme.adoc new file mode 120000 index 00000000..af62b041 --- /dev/null +++ b/test/case/ietf_interfaces/igmp_vlan/Readme.adoc @@ -0,0 +1 @@ +igmp_vlan.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/igmp_vlan/igmp_vlan.adoc b/test/case/ietf_interfaces/igmp_vlan/igmp_vlan.adoc new file mode 100644 index 00000000..703e13fb --- /dev/null +++ b/test/case/ietf_interfaces/igmp_vlan/igmp_vlan.adoc @@ -0,0 +1,49 @@ +=== IGMP VLAN +==== Description +Test tagged IGMP control traffic and that VLAN separation is respected for multicast + +.... + VLAN55 VLAN77 VLAN55 VLAN77 + 10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2 + \ / \ / + \--------------/ VLAN 1,2 T \---------------/ + | DUT1 +---------------------------------+ DUT2 | + | |dut1:link dut2:link| | + +--------------+ +-----+---------+ + dut1:data1| |dut1:data2 dut2:data1| |dut2:data2 + VLAN55 U | | VLAN77 U VLAN55 U | | VLAN77 U + | | | | ++-------+ | +----------+ +------------+ +--------+ +| msend +--+ | mreceive | | mreceive | | msend | ++-------+ +----------+ +------------+ +--------+ + 10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22 +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/igmp_vlan/topology.svg[IGMP VLAN topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::igmp_vlan/topology.svg[IGMP VLAN topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[IGMP VLAN topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure device +. Start multicast sender on host:data11, group 224.2.2.2 +. Start multicast sender on host:data22, group 224.1.1.1 +. Verify group 224.2.2.2 is flooded to host:data21 +. Verify group 224.1.1.1 is flooded to host:data12 +. Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received +. Join multicast group 224.2.2.2 on host:data21 +. Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received +. Verify group 224.2.2.2 is forwarded to host:data21 +. Verify group 224.1.1.1 is forwarded to host:data12 + + +<<< + diff --git a/test/case/ietf_interfaces/ipv4_address/Readme.adoc b/test/case/ietf_interfaces/ipv4_address/Readme.adoc deleted file mode 100644 index 7a411d5f..00000000 --- a/test/case/ietf_interfaces/ipv4_address/Readme.adoc +++ /dev/null @@ -1,26 +0,0 @@ -=== Interface with IPv4 -==== Description -Test that it is possible to set and remove the IPv4 address on an interface - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/ipv4_address/topology.svg[Interface with IPv4 topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ipv4_address/topology.svg[Interface with IPv4 topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Interface with IPv4 topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure IPv4 address 10.10.10.20/24 on target:mgmt -. Verify '10.10.10.20/24' exists on target:mgmt -. Remove all IPv4 addresses from target:mgmt -. Verify target:mgmt no longer has the address 10.10.10.20 - - -<<< - diff --git a/test/case/ietf_interfaces/ipv4_address/Readme.adoc b/test/case/ietf_interfaces/ipv4_address/Readme.adoc new file mode 120000 index 00000000..e252c2ab --- /dev/null +++ b/test/case/ietf_interfaces/ipv4_address/Readme.adoc @@ -0,0 +1 @@ +ipv4_address.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/ipv4_address/ipv4_address.adoc b/test/case/ietf_interfaces/ipv4_address/ipv4_address.adoc new file mode 100644 index 00000000..7a411d5f --- /dev/null +++ b/test/case/ietf_interfaces/ipv4_address/ipv4_address.adoc @@ -0,0 +1,26 @@ +=== Interface with IPv4 +==== Description +Test that it is possible to set and remove the IPv4 address on an interface + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/ipv4_address/topology.svg[Interface with IPv4 topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ipv4_address/topology.svg[Interface with IPv4 topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Interface with IPv4 topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure IPv4 address 10.10.10.20/24 on target:mgmt +. Verify '10.10.10.20/24' exists on target:mgmt +. Remove all IPv4 addresses from target:mgmt +. Verify target:mgmt no longer has the address 10.10.10.20 + + +<<< + diff --git a/test/case/ietf_interfaces/ipv4_autoconf/Readme.adoc b/test/case/ietf_interfaces/ipv4_autoconf/Readme.adoc deleted file mode 100644 index 2f6e8d0c..00000000 --- a/test/case/ietf_interfaces/ipv4_autoconf/Readme.adoc +++ /dev/null @@ -1,30 +0,0 @@ -=== IPv4 link-local -==== Description -Verifies that link-local (IPv4LL/ZeroConf) address assignment work as -expected. Checks random address, the request-address setting, and -address removal on autoconf disable. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/ipv4_autoconf/topology.svg[IPv4 link-local topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ipv4_autoconf/topology.svg[IPv4 link-local topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[IPv4 link-local topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure interface target:data with IPv4 ZeroConf IP -. Verify link-local address exist on target:data -. Configure target:data with a specific IPv4 ZeroConf IP -. Verify target:data has link-local address 169.254.42.42 -. Remove IPv4 link-local addresses from target:data -. Verify link-local addresses has been removed from target:data - - -<<< - diff --git a/test/case/ietf_interfaces/ipv4_autoconf/Readme.adoc b/test/case/ietf_interfaces/ipv4_autoconf/Readme.adoc new file mode 120000 index 00000000..ee7471c8 --- /dev/null +++ b/test/case/ietf_interfaces/ipv4_autoconf/Readme.adoc @@ -0,0 +1 @@ +ipv4_autoconf.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/ipv4_autoconf/ipv4_autoconf.adoc b/test/case/ietf_interfaces/ipv4_autoconf/ipv4_autoconf.adoc new file mode 100644 index 00000000..2f6e8d0c --- /dev/null +++ b/test/case/ietf_interfaces/ipv4_autoconf/ipv4_autoconf.adoc @@ -0,0 +1,30 @@ +=== IPv4 link-local +==== Description +Verifies that link-local (IPv4LL/ZeroConf) address assignment work as +expected. Checks random address, the request-address setting, and +address removal on autoconf disable. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/ipv4_autoconf/topology.svg[IPv4 link-local topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ipv4_autoconf/topology.svg[IPv4 link-local topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[IPv4 link-local topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure interface target:data with IPv4 ZeroConf IP +. Verify link-local address exist on target:data +. Configure target:data with a specific IPv4 ZeroConf IP +. Verify target:data has link-local address 169.254.42.42 +. Remove IPv4 link-local addresses from target:data +. Verify link-local addresses has been removed from target:data + + +<<< + diff --git a/test/case/ietf_interfaces/ipv6_address/Readme.adoc b/test/case/ietf_interfaces/ipv6_address/Readme.adoc deleted file mode 100644 index 93f5da93..00000000 --- a/test/case/ietf_interfaces/ipv6_address/Readme.adoc +++ /dev/null @@ -1,25 +0,0 @@ -=== Interface IPv6 autoconf for bridges -==== Description -Verify IPv6 autoconf on a bridge is properly set up for global prefix. -See issue #473 for details. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/ipv6_address/topology.svg[Interface IPv6 autoconf for bridges topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ipv6_address/topology.svg[Interface IPv6 autoconf for bridges topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Interface IPv6 autoconf for bridges topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Setting up bridge with IPv6 SLAAC for global prefix on target:data -. Verify using sysctl that 'net.ipv6.conf.br0.autoconf' is 1 on target - - -<<< - diff --git a/test/case/ietf_interfaces/ipv6_address/Readme.adoc b/test/case/ietf_interfaces/ipv6_address/Readme.adoc new file mode 120000 index 00000000..aad67e46 --- /dev/null +++ b/test/case/ietf_interfaces/ipv6_address/Readme.adoc @@ -0,0 +1 @@ +ipv6_address.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/ipv6_address/ipv6_address.adoc b/test/case/ietf_interfaces/ipv6_address/ipv6_address.adoc new file mode 100644 index 00000000..93f5da93 --- /dev/null +++ b/test/case/ietf_interfaces/ipv6_address/ipv6_address.adoc @@ -0,0 +1,25 @@ +=== Interface IPv6 autoconf for bridges +==== Description +Verify IPv6 autoconf on a bridge is properly set up for global prefix. +See issue #473 for details. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/ipv6_address/topology.svg[Interface IPv6 autoconf for bridges topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ipv6_address/topology.svg[Interface IPv6 autoconf for bridges topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Interface IPv6 autoconf for bridges topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Setting up bridge with IPv6 SLAAC for global prefix on target:data +. Verify using sysctl that 'net.ipv6.conf.br0.autoconf' is 1 on target + + +<<< + diff --git a/test/case/ietf_interfaces/routing_basic/Readme.adoc b/test/case/ietf_interfaces/routing_basic/Readme.adoc deleted file mode 100644 index 5c5b681e..00000000 --- a/test/case/ietf_interfaces/routing_basic/Readme.adoc +++ /dev/null @@ -1,29 +0,0 @@ -=== Routing basic -==== Description -Verify routing between interfaces is possible. That enable/disable routing -in configuration has the expected result. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/routing_basic/topology.svg[Routing basic topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::routing_basic/topology.svg[Routing basic topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Routing basic topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Setup host -. Enable forwarding on target:data1 and target:data2 -. Verify ping from host:data1 to 10.0.0.10 -. Verify ping from host:data2 to 192.168.0.10 -. Disable forwarding on target:data1 and target:data2 -. Verify ping does not work host:data1 to 10.0.0.10 and host:data2 to 192.168.0.10 - - -<<< - diff --git a/test/case/ietf_interfaces/routing_basic/Readme.adoc b/test/case/ietf_interfaces/routing_basic/Readme.adoc new file mode 120000 index 00000000..f0fde0f7 --- /dev/null +++ b/test/case/ietf_interfaces/routing_basic/Readme.adoc @@ -0,0 +1 @@ +routing_basic.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/routing_basic/routing_basic.adoc b/test/case/ietf_interfaces/routing_basic/routing_basic.adoc new file mode 100644 index 00000000..5c5b681e --- /dev/null +++ b/test/case/ietf_interfaces/routing_basic/routing_basic.adoc @@ -0,0 +1,29 @@ +=== Routing basic +==== Description +Verify routing between interfaces is possible. That enable/disable routing +in configuration has the expected result. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/routing_basic/topology.svg[Routing basic topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::routing_basic/topology.svg[Routing basic topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Routing basic topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Setup host +. Enable forwarding on target:data1 and target:data2 +. Verify ping from host:data1 to 10.0.0.10 +. Verify ping from host:data2 to 192.168.0.10 +. Disable forwarding on target:data1 and target:data2 +. Verify ping does not work host:data1 to 10.0.0.10 and host:data2 to 192.168.0.10 + + +<<< + diff --git a/test/case/ietf_interfaces/static_multicast_filters/Readme.adoc b/test/case/ietf_interfaces/static_multicast_filters/Readme.adoc deleted file mode 100644 index 9fc1e6ad..00000000 --- a/test/case/ietf_interfaces/static_multicast_filters/Readme.adoc +++ /dev/null @@ -1,49 +0,0 @@ -=== Static multicast filters -==== Description -Verify that static multicast filters work (remember that snooping needs to -enabled when using static multicast filters) - -.... - .1 - .---------------------------. - | DUT | - '-data1-----data2-----data3-' - | | | - | | | 10.0.0.0/24 - | | | - .-data1-. .-data2-. .-data3-. - | msend | | mrecv | | !memb | - '-------' '-------' '-------' - .2 .3 .4 - HOST -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/static_multicast_filters/topology.svg[Static multicast filters topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::static_multicast_filters/topology.svg[Static multicast filters topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Static multicast filters topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure device without static filter -. Start multicast sender on host:data1, group 224.1.1.1 -. Verify that 224.1.1.1 is flooded to host:data2 and host:data3 -. Enable IPv4 multicast filter on host:data2, group 224.1.1.1 -. Verify that the group is still forwarded to host:data2 -. Verify that the group is no longer forwarded to host:data3 -. Start MAC multicast sender on host:data1, group 01:00:00:01:02:03 -. Verify MAC multicast 01:00:00:01:02:03 is flooded to host:data2 and host:data3 -. Enable MAC multicast filter on host:data2, group 01:00:00:01:02:03 -. Verify that the MAC group is still forwarded to host:data2 -. Verify that the MAC group is no longer forwarded to host:data3 - - -<<< - diff --git a/test/case/ietf_interfaces/static_multicast_filters/Readme.adoc b/test/case/ietf_interfaces/static_multicast_filters/Readme.adoc new file mode 120000 index 00000000..d7139d5f --- /dev/null +++ b/test/case/ietf_interfaces/static_multicast_filters/Readme.adoc @@ -0,0 +1 @@ +static_multicast_filters.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/static_multicast_filters/static_multicast_filters.adoc b/test/case/ietf_interfaces/static_multicast_filters/static_multicast_filters.adoc new file mode 100644 index 00000000..9fc1e6ad --- /dev/null +++ b/test/case/ietf_interfaces/static_multicast_filters/static_multicast_filters.adoc @@ -0,0 +1,49 @@ +=== Static multicast filters +==== Description +Verify that static multicast filters work (remember that snooping needs to +enabled when using static multicast filters) + +.... + .1 + .---------------------------. + | DUT | + '-data1-----data2-----data3-' + | | | + | | | 10.0.0.0/24 + | | | + .-data1-. .-data2-. .-data3-. + | msend | | mrecv | | !memb | + '-------' '-------' '-------' + .2 .3 .4 + HOST +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/static_multicast_filters/topology.svg[Static multicast filters topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::static_multicast_filters/topology.svg[Static multicast filters topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Static multicast filters topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure device without static filter +. Start multicast sender on host:data1, group 224.1.1.1 +. Verify that 224.1.1.1 is flooded to host:data2 and host:data3 +. Enable IPv4 multicast filter on host:data2, group 224.1.1.1 +. Verify that the group is still forwarded to host:data2 +. Verify that the group is no longer forwarded to host:data3 +. Start MAC multicast sender on host:data1, group 01:00:00:01:02:03 +. Verify MAC multicast 01:00:00:01:02:03 is flooded to host:data2 and host:data3 +. Enable MAC multicast filter on host:data2, group 01:00:00:01:02:03 +. Verify that the MAC group is still forwarded to host:data2 +. Verify that the MAC group is no longer forwarded to host:data3 + + +<<< + diff --git a/test/case/ietf_interfaces/verify_all_interface_types/Readme.adoc b/test/case/ietf_interfaces/verify_all_interface_types/Readme.adoc deleted file mode 100644 index 90257126..00000000 --- a/test/case/ietf_interfaces/verify_all_interface_types/Readme.adoc +++ /dev/null @@ -1,44 +0,0 @@ -=== Verify that all interface types can be created -==== Description -This test verifies that all interface types can be created and also -checks the configuration when applied sequentially. This method takes -slightly longer than sending the entire configuration at once. - -.... - - lo br-0 br-Q.40 br-D br-X - | | | | | - o o ethQ.10 br-Q veth0a.20 ethX.30 - \ / \ | | - ethQ veth0b veth0a ethX - `---------' -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/verify_all_interface_types/topology.svg[Verify that all interface types can be created topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::verify_all_interface_types/topology.svg[Verify that all interface types can be created topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Verify that all interface types can be created topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure an empty bridge br-0 -. Configure bridge br-X and associated interfaces -. Configure VETH pair -. Configure bridge br-D and associated interfaces -. Configure br-Q and associated interfaces -. Verify interface 'lo' is of type loopback -. Verify interfaces 'ethX' and 'ethQ' are of type 'ethernet' (or etherlike if running Qemu) -. Verify interfaces 'br-0', 'br-X', 'br-D' and 'br-Q' are of type 'bridge' -. Verify interfaces 'veth0a' and 'veth0b' are of type 'veth' -. Verify interfaces 'veth0a.20', 'ethQ.10', 'ethX.30', 'ethQ.10' and 'br-Q.40' are of type 'vlan' - - -<<< - diff --git a/test/case/ietf_interfaces/verify_all_interface_types/Readme.adoc b/test/case/ietf_interfaces/verify_all_interface_types/Readme.adoc new file mode 120000 index 00000000..fe419baa --- /dev/null +++ b/test/case/ietf_interfaces/verify_all_interface_types/Readme.adoc @@ -0,0 +1 @@ +verify_all_interface_types.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/verify_all_interface_types/verify_all_interface_types.adoc b/test/case/ietf_interfaces/verify_all_interface_types/verify_all_interface_types.adoc new file mode 100644 index 00000000..90257126 --- /dev/null +++ b/test/case/ietf_interfaces/verify_all_interface_types/verify_all_interface_types.adoc @@ -0,0 +1,44 @@ +=== Verify that all interface types can be created +==== Description +This test verifies that all interface types can be created and also +checks the configuration when applied sequentially. This method takes +slightly longer than sending the entire configuration at once. + +.... + + lo br-0 br-Q.40 br-D br-X + | | | | | + o o ethQ.10 br-Q veth0a.20 ethX.30 + \ / \ | | + ethQ veth0b veth0a ethX + `---------' +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/verify_all_interface_types/topology.svg[Verify that all interface types can be created topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::verify_all_interface_types/topology.svg[Verify that all interface types can be created topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Verify that all interface types can be created topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure an empty bridge br-0 +. Configure bridge br-X and associated interfaces +. Configure VETH pair +. Configure bridge br-D and associated interfaces +. Configure br-Q and associated interfaces +. Verify interface 'lo' is of type loopback +. Verify interfaces 'ethX' and 'ethQ' are of type 'ethernet' (or etherlike if running Qemu) +. Verify interfaces 'br-0', 'br-X', 'br-D' and 'br-Q' are of type 'bridge' +. Verify interfaces 'veth0a' and 'veth0b' are of type 'veth' +. Verify interfaces 'veth0a.20', 'ethQ.10', 'ethX.30', 'ethQ.10' and 'br-Q.40' are of type 'vlan' + + +<<< + diff --git a/test/case/ietf_interfaces/veth_delete/Readme.adoc b/test/case/ietf_interfaces/veth_delete/Readme.adoc deleted file mode 100644 index 18fb860f..00000000 --- a/test/case/ietf_interfaces/veth_delete/Readme.adoc +++ /dev/null @@ -1,35 +0,0 @@ -=== Verify that VETH pairs can be deleted -==== Description -``` - veth0b veth0a data1 data2 - `---------' -``` - -Each test step to create, add address, or delete an interace is distinct -from any other step. This to trigger a new configuration "generation". - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/veth_delete/topology.svg[Verify that VETH pairs can be deleted topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::veth_delete/topology.svg[Verify that VETH pairs can be deleted topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Verify that VETH pairs can be deleted topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Create VETH pair -. Verify interfaces 'veth0a' and 'veth0b' exist -. Set IP address on target:data1 (dummy op) -. Set IP address on target:data2 (dummy op) -. Reset configuration -. Verify target:data1 and target:data2 still exist -. Verify VETH pair have been removed - - -<<< - diff --git a/test/case/ietf_interfaces/veth_delete/Readme.adoc b/test/case/ietf_interfaces/veth_delete/Readme.adoc new file mode 120000 index 00000000..7892befc --- /dev/null +++ b/test/case/ietf_interfaces/veth_delete/Readme.adoc @@ -0,0 +1 @@ +veth_delete.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/veth_delete/veth_delete.adoc b/test/case/ietf_interfaces/veth_delete/veth_delete.adoc new file mode 100644 index 00000000..18fb860f --- /dev/null +++ b/test/case/ietf_interfaces/veth_delete/veth_delete.adoc @@ -0,0 +1,35 @@ +=== Verify that VETH pairs can be deleted +==== Description +``` + veth0b veth0a data1 data2 + `---------' +``` + +Each test step to create, add address, or delete an interace is distinct +from any other step. This to trigger a new configuration "generation". + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/veth_delete/topology.svg[Verify that VETH pairs can be deleted topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::veth_delete/topology.svg[Verify that VETH pairs can be deleted topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Verify that VETH pairs can be deleted topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Create VETH pair +. Verify interfaces 'veth0a' and 'veth0b' exist +. Set IP address on target:data1 (dummy op) +. Set IP address on target:data2 (dummy op) +. Reset configuration +. Verify target:data1 and target:data2 still exist +. Verify VETH pair have been removed + + +<<< + diff --git a/test/case/ietf_interfaces/vlan_iface_termination/Readme.adoc b/test/case/ietf_interfaces/vlan_iface_termination/Readme.adoc deleted file mode 100644 index 561e4be8..00000000 --- a/test/case/ietf_interfaces/vlan_iface_termination/Readme.adoc +++ /dev/null @@ -1,51 +0,0 @@ -=== VLAN Interface Termination -==== Description -Verify that VLANs stacked on top of an interfaces that are also -attached to a VLAN filtering bridge are always locally terminated. - -.... -.---------------------------. -| target | -| | -| data0.10 br0 data1.10 | -| \ / \ / | -'------data0-----data1------' - | | - | | -.------data0-----data1------. -| / : \ | -| data0.10 : data1.10 | -| : | -| host | -| : | -'---------------------------' -.... - -In this setup, even though VLAN 10 is allowed to ingress and egress on -both `data0` and `data1`, _bridging_ of packets from one to the other -must _not_ be allowed. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/vlan_iface_termination/topology.svg[VLAN Interface Termination topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::vlan_iface_termination/topology.svg[VLAN Interface Termination topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[VLAN Interface Termination topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target -. Configure bridge and VLAN interfaces on target -. Configure IP addresses and VLAN interfaces on host -. Verify that host:data0 reaches host:data1 with untagged packets -. Verify that traffic on VLAN 10 from host:data0 does not reach host:data1 -. Verify that host:data0 can reach target on VLAN 10 -. Verify that host:data1 can reach target on VLAN 10 - - -<<< - diff --git a/test/case/ietf_interfaces/vlan_iface_termination/Readme.adoc b/test/case/ietf_interfaces/vlan_iface_termination/Readme.adoc new file mode 120000 index 00000000..b986458d --- /dev/null +++ b/test/case/ietf_interfaces/vlan_iface_termination/Readme.adoc @@ -0,0 +1 @@ +vlan_iface_termination.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/vlan_iface_termination/vlan_iface_termination.adoc b/test/case/ietf_interfaces/vlan_iface_termination/vlan_iface_termination.adoc new file mode 100644 index 00000000..561e4be8 --- /dev/null +++ b/test/case/ietf_interfaces/vlan_iface_termination/vlan_iface_termination.adoc @@ -0,0 +1,51 @@ +=== VLAN Interface Termination +==== Description +Verify that VLANs stacked on top of an interfaces that are also +attached to a VLAN filtering bridge are always locally terminated. + +.... +.---------------------------. +| target | +| | +| data0.10 br0 data1.10 | +| \ / \ / | +'------data0-----data1------' + | | + | | +.------data0-----data1------. +| / : \ | +| data0.10 : data1.10 | +| : | +| host | +| : | +'---------------------------' +.... + +In this setup, even though VLAN 10 is allowed to ingress and egress on +both `data0` and `data1`, _bridging_ of packets from one to the other +must _not_ be allowed. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/vlan_iface_termination/topology.svg[VLAN Interface Termination topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::vlan_iface_termination/topology.svg[VLAN Interface Termination topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[VLAN Interface Termination topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target +. Configure bridge and VLAN interfaces on target +. Configure IP addresses and VLAN interfaces on host +. Verify that host:data0 reaches host:data1 with untagged packets +. Verify that traffic on VLAN 10 from host:data0 does not reach host:data1 +. Verify that host:data0 can reach target on VLAN 10 +. Verify that host:data1 can reach target on VLAN 10 + + +<<< + diff --git a/test/case/ietf_interfaces/vlan_ping/Readme.adoc b/test/case/ietf_interfaces/vlan_ping/Readme.adoc deleted file mode 100644 index b976123c..00000000 --- a/test/case/ietf_interfaces/vlan_ping/Readme.adoc +++ /dev/null @@ -1,28 +0,0 @@ -=== VLAN ping connectivity -==== Description -Very basic test if the VLAN interface configuration works. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/vlan_ping/topology.svg[VLAN ping connectivity topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::vlan_ping/topology.svg[VLAN ping connectivity topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[VLAN ping connectivity topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Set up VLAN interface on host:data with IP 10.0.0.1 -. Configure VLAN 10 interface on target:data with IP 10.0.0.2 -. Wait for links to come up -. Verify that host:data can reach 10.0.0.2 -. Remove VLAN interface from target:data -. Verify that host:data can no longer reach 10.0.0.2 - - -<<< - diff --git a/test/case/ietf_interfaces/vlan_ping/Readme.adoc b/test/case/ietf_interfaces/vlan_ping/Readme.adoc new file mode 120000 index 00000000..bdc22d63 --- /dev/null +++ b/test/case/ietf_interfaces/vlan_ping/Readme.adoc @@ -0,0 +1 @@ +vlan_ping.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/vlan_ping/vlan_ping.adoc b/test/case/ietf_interfaces/vlan_ping/vlan_ping.adoc new file mode 100644 index 00000000..b976123c --- /dev/null +++ b/test/case/ietf_interfaces/vlan_ping/vlan_ping.adoc @@ -0,0 +1,28 @@ +=== VLAN ping connectivity +==== Description +Very basic test if the VLAN interface configuration works. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/vlan_ping/topology.svg[VLAN ping connectivity topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::vlan_ping/topology.svg[VLAN ping connectivity topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[VLAN ping connectivity topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set up VLAN interface on host:data with IP 10.0.0.1 +. Configure VLAN 10 interface on target:data with IP 10.0.0.2 +. Wait for links to come up +. Verify that host:data can reach 10.0.0.2 +. Remove VLAN interface from target:data +. Verify that host:data can no longer reach 10.0.0.2 + + +<<< + diff --git a/test/case/ietf_interfaces/vlan_qos/Readme.adoc b/test/case/ietf_interfaces/vlan_qos/Readme.adoc deleted file mode 100644 index d54f5de1..00000000 --- a/test/case/ietf_interfaces/vlan_qos/Readme.adoc +++ /dev/null @@ -1,42 +0,0 @@ -=== VLAN Interface Ingress/Egress QoS -==== Description -Inject different packets from the host and verify that the VLAN priority -is handled correctly for traffic ingressing and egressing a VLAN interface. - -The test verifies that ingress PCP priority is mapped correctly to internal -priority ('from pcp' or static '0..7'), and that internal priority is mapped -correctly to PCP on egress ('from internal priority' or static '0..7'). - - { "id": 1, "pcp": 0, "ingress": 0, "egress": 0, "expect": 0 }, - { "id": 2, "pcp": 0, "ingress": 0, "egress": 1, "expect": 1 }, - { "id": 3, "pcp": 0, "ingress": 3, "egress": 0, "expect": 0 }, - { "id": 4, "pcp": 0, "ingress": 4, "egress": "from-priority", "expect": 4 }, - { "id": 5, "pcp": 5, "ingress": "from-pcp", "egress": "from-priority", "expect": 5 }, - { "id": 6, "pcp": 6, "ingress": "from-pcp", "egress": "from-priority", "expect": 6 }, - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_interfaces/vlan_qos/topology.svg[VLAN Interface Ingress/Egress QoS topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::vlan_qos/topology.svg[VLAN Interface Ingress/Egress QoS topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[VLAN Interface Ingress/Egress QoS topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Apply initial config without priority mapping -. Setup host VLANs -. Verify that packet with id=1 egressed with pcp=0 -. Verify that packet with id=2 egressed with pcp=1 -. Verify that packet with id=3 egressed with pcp=0 -. Verify that packet with id=4 egressed with pcp=4 -. Verify that packet with id=5 egressed with pcp=5 -. Verify that packet with id=6 egressed with pcp=6 - - -<<< - diff --git a/test/case/ietf_interfaces/vlan_qos/Readme.adoc b/test/case/ietf_interfaces/vlan_qos/Readme.adoc new file mode 120000 index 00000000..a298e055 --- /dev/null +++ b/test/case/ietf_interfaces/vlan_qos/Readme.adoc @@ -0,0 +1 @@ +vlan_qos.adoc \ No newline at end of file diff --git a/test/case/ietf_interfaces/vlan_qos/vlan_qos.adoc b/test/case/ietf_interfaces/vlan_qos/vlan_qos.adoc new file mode 100644 index 00000000..d54f5de1 --- /dev/null +++ b/test/case/ietf_interfaces/vlan_qos/vlan_qos.adoc @@ -0,0 +1,42 @@ +=== VLAN Interface Ingress/Egress QoS +==== Description +Inject different packets from the host and verify that the VLAN priority +is handled correctly for traffic ingressing and egressing a VLAN interface. + +The test verifies that ingress PCP priority is mapped correctly to internal +priority ('from pcp' or static '0..7'), and that internal priority is mapped +correctly to PCP on egress ('from internal priority' or static '0..7'). + + { "id": 1, "pcp": 0, "ingress": 0, "egress": 0, "expect": 0 }, + { "id": 2, "pcp": 0, "ingress": 0, "egress": 1, "expect": 1 }, + { "id": 3, "pcp": 0, "ingress": 3, "egress": 0, "expect": 0 }, + { "id": 4, "pcp": 0, "ingress": 4, "egress": "from-priority", "expect": 4 }, + { "id": 5, "pcp": 5, "ingress": "from-pcp", "egress": "from-priority", "expect": 5 }, + { "id": 6, "pcp": 6, "ingress": "from-pcp", "egress": "from-priority", "expect": 6 }, + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_interfaces/vlan_qos/topology.svg[VLAN Interface Ingress/Egress QoS topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::vlan_qos/topology.svg[VLAN Interface Ingress/Egress QoS topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[VLAN Interface Ingress/Egress QoS topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Apply initial config without priority mapping +. Setup host VLANs +. Verify that packet with id=1 egressed with pcp=0 +. Verify that packet with id=2 egressed with pcp=1 +. Verify that packet with id=3 egressed with pcp=0 +. Verify that packet with id=4 egressed with pcp=4 +. Verify that packet with id=5 egressed with pcp=5 +. Verify that packet with id=6 egressed with pcp=6 + + +<<< + diff --git a/test/case/ietf_routing/ospf_basic/Readme.adoc b/test/case/ietf_routing/ospf_basic/Readme.adoc deleted file mode 100644 index eb85294e..00000000 --- a/test/case/ietf_routing/ospf_basic/Readme.adoc +++ /dev/null @@ -1,26 +0,0 @@ -=== OSPF Basic -==== Description -Very basic OSPF test just test that OSPF sends HELLO packets between the DUTs -and that they exchange routes, ending with a simple connectivity check. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/ospf_basic/topology.svg[OSPF Basic topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ospf_basic/topology.svg[OSPF Basic topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[OSPF Basic topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure targets -. Wait for OSPF routes -. Test connectivity from PC:data to 192.168.200.1 - - -<<< - diff --git a/test/case/ietf_routing/ospf_basic/Readme.adoc b/test/case/ietf_routing/ospf_basic/Readme.adoc new file mode 120000 index 00000000..2c6367ac --- /dev/null +++ b/test/case/ietf_routing/ospf_basic/Readme.adoc @@ -0,0 +1 @@ +ospf_basic.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/ospf_basic/ospf_basic.adoc b/test/case/ietf_routing/ospf_basic/ospf_basic.adoc new file mode 100644 index 00000000..eb85294e --- /dev/null +++ b/test/case/ietf_routing/ospf_basic/ospf_basic.adoc @@ -0,0 +1,26 @@ +=== OSPF Basic +==== Description +Very basic OSPF test just test that OSPF sends HELLO packets between the DUTs +and that they exchange routes, ending with a simple connectivity check. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/ospf_basic/topology.svg[OSPF Basic topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ospf_basic/topology.svg[OSPF Basic topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[OSPF Basic topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure targets +. Wait for OSPF routes +. Test connectivity from PC:data to 192.168.200.1 + + +<<< + diff --git a/test/case/ietf_routing/ospf_bfd/Readme.adoc b/test/case/ietf_routing/ospf_bfd/Readme.adoc deleted file mode 100644 index ae2b34d5..00000000 --- a/test/case/ietf_routing/ospf_bfd/Readme.adoc +++ /dev/null @@ -1,35 +0,0 @@ -=== OSPF BFD -==== Description -Verify that a router running OSPF, with Bidirectional Forwarding -Detection (BFD) enabled, will detect link faults even when the -physical layer is still operational. - -This can typically happen when one logical link, from OSPF's -perspective, is made up of multiple physical links containing media -converters without link fault forwarding. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/ospf_bfd/topology.svg[OSPF BFD topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ospf_bfd/topology.svg[OSPF BFD topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[OSPF BFD topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Setup TPMR between R1fast and R2fast -. Configure R1 and R2 -. Setup IP addresses and default routes on h1 and h2 -. Wait for R1 and R2 to peer -. Verify connectivity from PC:src to PC:dst via fast link -. Disable forwarding between R1fast and R2fast to trigger fail-over -. Verify connectivity from PC:src to PC:dst via slow link - - -<<< - diff --git a/test/case/ietf_routing/ospf_bfd/Readme.adoc b/test/case/ietf_routing/ospf_bfd/Readme.adoc new file mode 120000 index 00000000..a6c7dd03 --- /dev/null +++ b/test/case/ietf_routing/ospf_bfd/Readme.adoc @@ -0,0 +1 @@ +ospf_bfd.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/ospf_bfd/ospf_bfd.adoc b/test/case/ietf_routing/ospf_bfd/ospf_bfd.adoc new file mode 100644 index 00000000..ae2b34d5 --- /dev/null +++ b/test/case/ietf_routing/ospf_bfd/ospf_bfd.adoc @@ -0,0 +1,35 @@ +=== OSPF BFD +==== Description +Verify that a router running OSPF, with Bidirectional Forwarding +Detection (BFD) enabled, will detect link faults even when the +physical layer is still operational. + +This can typically happen when one logical link, from OSPF's +perspective, is made up of multiple physical links containing media +converters without link fault forwarding. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/ospf_bfd/topology.svg[OSPF BFD topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ospf_bfd/topology.svg[OSPF BFD topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[OSPF BFD topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Setup TPMR between R1fast and R2fast +. Configure R1 and R2 +. Setup IP addresses and default routes on h1 and h2 +. Wait for R1 and R2 to peer +. Verify connectivity from PC:src to PC:dst via fast link +. Disable forwarding between R1fast and R2fast to trigger fail-over +. Verify connectivity from PC:src to PC:dst via slow link + + +<<< + diff --git a/test/case/ietf_routing/ospf_default_route_advertise/Readme.adoc b/test/case/ietf_routing/ospf_default_route_advertise/Readme.adoc deleted file mode 100644 index 006f23e1..00000000 --- a/test/case/ietf_routing/ospf_default_route_advertise/Readme.adoc +++ /dev/null @@ -1,57 +0,0 @@ -=== OSPF Default route advertise -==== Description -Verify _default-route-advertising_ in OSPF, sometimes called 'redistribute origin'. Verify both -always (regardless if a local default route exist or not) and only redistribute -when local default route exist. - -The test is performed by setting a default route on R1 to 192.168.10.2, and setting -_default-route-advertising_ in OSPF, this will result that R2 will see a default route. - -When set interface R1:data down, OSPF will no longer redistribute default route to R2, -unless _always_ is set for _default-route-advertising_. -.... - +-------------------+ Area 0 +------------------+ - | R1 |.1 192.168.50.0/24 .2| R2 | - | 192.169.100.1/32 +------------------------+ 192.168.200.1/32| - | 10.10.10.10/32 |R1:link R2:link | | - +--------------+----+ +---+--------------+ - R1:data |.1 R2:data |.1 - | | - | 192.168.10.0/24 | 192.168.20.0/24 - | | - host:data1 |.2 host:data2 |.2 - +-----+---------------------------------+-------+ - | | - | host | - | | - +-----------------------------------------------+ -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/ospf_default_route_advertise/topology.svg[OSPF Default route advertise topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ospf_default_route_advertise/topology.svg[OSPF Default route advertise topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[OSPF Default route advertise topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure targets -. Verify R2 has a default route and 192.168.100.1/32 from OSPF -. Verify connectivity from PC:data2 to 10.10.10.10 -. Disable link PC:data1 <--> R1:data (take default gateway down) -. Verify R2 does not have a default route but a 192.168.100.1/32 from OSPF -. Verify no connectivity from PC:data2 to 10.10.10.10 -. Enable redistribute default route 'always' on R1 -. Wait for all neighbors to peer -. Verify R2 has a default route and 192.168.100.1/32 from OSPF -. Verify connectivity from PC:data2 to 10.10.10.10 - - -<<< - diff --git a/test/case/ietf_routing/ospf_default_route_advertise/Readme.adoc b/test/case/ietf_routing/ospf_default_route_advertise/Readme.adoc new file mode 120000 index 00000000..66314470 --- /dev/null +++ b/test/case/ietf_routing/ospf_default_route_advertise/Readme.adoc @@ -0,0 +1 @@ +ospf_default_route_advertise.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/ospf_default_route_advertise/ospf_default_route_advertise.adoc b/test/case/ietf_routing/ospf_default_route_advertise/ospf_default_route_advertise.adoc new file mode 100644 index 00000000..006f23e1 --- /dev/null +++ b/test/case/ietf_routing/ospf_default_route_advertise/ospf_default_route_advertise.adoc @@ -0,0 +1,57 @@ +=== OSPF Default route advertise +==== Description +Verify _default-route-advertising_ in OSPF, sometimes called 'redistribute origin'. Verify both +always (regardless if a local default route exist or not) and only redistribute +when local default route exist. + +The test is performed by setting a default route on R1 to 192.168.10.2, and setting +_default-route-advertising_ in OSPF, this will result that R2 will see a default route. + +When set interface R1:data down, OSPF will no longer redistribute default route to R2, +unless _always_ is set for _default-route-advertising_. +.... + +-------------------+ Area 0 +------------------+ + | R1 |.1 192.168.50.0/24 .2| R2 | + | 192.169.100.1/32 +------------------------+ 192.168.200.1/32| + | 10.10.10.10/32 |R1:link R2:link | | + +--------------+----+ +---+--------------+ + R1:data |.1 R2:data |.1 + | | + | 192.168.10.0/24 | 192.168.20.0/24 + | | + host:data1 |.2 host:data2 |.2 + +-----+---------------------------------+-------+ + | | + | host | + | | + +-----------------------------------------------+ +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/ospf_default_route_advertise/topology.svg[OSPF Default route advertise topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ospf_default_route_advertise/topology.svg[OSPF Default route advertise topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[OSPF Default route advertise topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure targets +. Verify R2 has a default route and 192.168.100.1/32 from OSPF +. Verify connectivity from PC:data2 to 10.10.10.10 +. Disable link PC:data1 <--> R1:data (take default gateway down) +. Verify R2 does not have a default route but a 192.168.100.1/32 from OSPF +. Verify no connectivity from PC:data2 to 10.10.10.10 +. Enable redistribute default route 'always' on R1 +. Wait for all neighbors to peer +. Verify R2 has a default route and 192.168.100.1/32 from OSPF +. Verify connectivity from PC:data2 to 10.10.10.10 + + +<<< + diff --git a/test/case/ietf_routing/ospf_multiarea/Readme.adoc b/test/case/ietf_routing/ospf_multiarea/Readme.adoc deleted file mode 100644 index 33698a4f..00000000 --- a/test/case/ietf_routing/ospf_multiarea/Readme.adoc +++ /dev/null @@ -1,53 +0,0 @@ -=== OSPF with multiple areas -==== Description -This test evaluates various OSPF features across three areas (one NSSA area, with no summary) -to ensure that route distribution is deterministic (based on cost). It also tests link -failures using BFD, though BFD is not yet implemented in test framework (Infamy). - -This test also verifies broadcast and point-to-point interface types on /30 network, and -explicit router-id. - -.... - +-------------+ +---------------+ +-------------+ +---------------+ - | R1 | | R2 | | R3 | | R4 | - | 10.0.0.1/32 | | 10.0.0.2/32 | | 10.0.0.3/32 | | 10.0.0.4/32 | - | (lo) | | 11.0.9.1/24 | | (lo) | | (lo) | - +-------------+ | 11.0.10.1/24 | +-------------+ +---------------+ - | 11.0.11.1/24 | - | 11.0.12.1/24 | - | 11.0.13.1/24 | - | 11.0.14.1/24 | - | 11.0.15.1/24 | - | (lo) | - +---------------+ -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/ospf_multiarea/topology.svg[OSPF with multiple areas topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ospf_multiarea/topology.svg[OSPF with multiple areas topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[OSPF with multiple areas topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure targets -. Wait for all neighbors to peer -. Wait for routes from OSPF on all routers -. Verify Area 0.0.0.1 on R3 is NSSA area -. Verify R1:ring2 is of type point-to-point -. Verify R4:ring1 is of type point-to-point -. Verify on R3, there are no routes beyond 10.0.23.1, just a default route -. Testing connectivity through NSSA area, from PC:data3 to 11.0.8.1 -. Verify that the route to 10.0.0.3 from PC:data4, go through 10.0.41.2 -. Break link R1:ring2 --- R4:ring1 -. Verify that the route to 10.0.0.3 from PC:data4, go through 10.0.24.1 - - -<<< - diff --git a/test/case/ietf_routing/ospf_multiarea/Readme.adoc b/test/case/ietf_routing/ospf_multiarea/Readme.adoc new file mode 120000 index 00000000..417502b8 --- /dev/null +++ b/test/case/ietf_routing/ospf_multiarea/Readme.adoc @@ -0,0 +1 @@ +ospf_multiarea.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/ospf_multiarea/ospf_multiarea.adoc b/test/case/ietf_routing/ospf_multiarea/ospf_multiarea.adoc new file mode 100644 index 00000000..33698a4f --- /dev/null +++ b/test/case/ietf_routing/ospf_multiarea/ospf_multiarea.adoc @@ -0,0 +1,53 @@ +=== OSPF with multiple areas +==== Description +This test evaluates various OSPF features across three areas (one NSSA area, with no summary) +to ensure that route distribution is deterministic (based on cost). It also tests link +failures using BFD, though BFD is not yet implemented in test framework (Infamy). + +This test also verifies broadcast and point-to-point interface types on /30 network, and +explicit router-id. + +.... + +-------------+ +---------------+ +-------------+ +---------------+ + | R1 | | R2 | | R3 | | R4 | + | 10.0.0.1/32 | | 10.0.0.2/32 | | 10.0.0.3/32 | | 10.0.0.4/32 | + | (lo) | | 11.0.9.1/24 | | (lo) | | (lo) | + +-------------+ | 11.0.10.1/24 | +-------------+ +---------------+ + | 11.0.11.1/24 | + | 11.0.12.1/24 | + | 11.0.13.1/24 | + | 11.0.14.1/24 | + | 11.0.15.1/24 | + | (lo) | + +---------------+ +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/ospf_multiarea/topology.svg[OSPF with multiple areas topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ospf_multiarea/topology.svg[OSPF with multiple areas topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[OSPF with multiple areas topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure targets +. Wait for all neighbors to peer +. Wait for routes from OSPF on all routers +. Verify Area 0.0.0.1 on R3 is NSSA area +. Verify R1:ring2 is of type point-to-point +. Verify R4:ring1 is of type point-to-point +. Verify on R3, there are no routes beyond 10.0.23.1, just a default route +. Testing connectivity through NSSA area, from PC:data3 to 11.0.8.1 +. Verify that the route to 10.0.0.3 from PC:data4, go through 10.0.41.2 +. Break link R1:ring2 --- R4:ring1 +. Verify that the route to 10.0.0.3 from PC:data4, go through 10.0.24.1 + + +<<< + diff --git a/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc b/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc deleted file mode 100644 index 1067706e..00000000 --- a/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc +++ /dev/null @@ -1,32 +0,0 @@ -=== OSPF unnumbered interfaces -==== Description -This test that a configuration expecting unnumbered interfaces -get that also in OSPF. Also verify that passive interface in -the configuration gets activated in OSPF. - -When this test pass, you can expect unnumbered interfaces, interface type -configuration and passive to function - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/ospf_unnumbered_interface/topology.svg[OSPF unnumbered interfaces topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ospf_unnumbered_interface/topology.svg[OSPF unnumbered interfaces topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[OSPF unnumbered interfaces topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure targets -. Wait for OSPF routes -. Verify interface type on R1:link and R2:link is point-to-point -. Verify there are no OSPF HELLO packets on PC:data -. Test connectivity from PC:data to 192.168.200.1 - - -<<< - diff --git a/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc b/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc new file mode 120000 index 00000000..ef814f1d --- /dev/null +++ b/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc @@ -0,0 +1 @@ +ospf_unnumbered_interface.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/ospf_unnumbered_interface/ospf_unnumbered_interface.adoc b/test/case/ietf_routing/ospf_unnumbered_interface/ospf_unnumbered_interface.adoc new file mode 100644 index 00000000..1067706e --- /dev/null +++ b/test/case/ietf_routing/ospf_unnumbered_interface/ospf_unnumbered_interface.adoc @@ -0,0 +1,32 @@ +=== OSPF unnumbered interfaces +==== Description +This test that a configuration expecting unnumbered interfaces +get that also in OSPF. Also verify that passive interface in +the configuration gets activated in OSPF. + +When this test pass, you can expect unnumbered interfaces, interface type +configuration and passive to function + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/ospf_unnumbered_interface/topology.svg[OSPF unnumbered interfaces topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ospf_unnumbered_interface/topology.svg[OSPF unnumbered interfaces topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[OSPF unnumbered interfaces topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure targets +. Wait for OSPF routes +. Verify interface type on R1:link and R2:link is point-to-point +. Verify there are no OSPF HELLO packets on PC:data +. Test connectivity from PC:data to 192.168.200.1 + + +<<< + diff --git a/test/case/ietf_routing/route_pref_255/Readme.adoc b/test/case/ietf_routing/route_pref_255/Readme.adoc deleted file mode 100644 index 661dcf4b..00000000 --- a/test/case/ietf_routing/route_pref_255/Readme.adoc +++ /dev/null @@ -1,29 +0,0 @@ -=== Route preference: Static Route Activation and Maximum Distance -==== Description -This test configures a device with a static route to a destination with -a moderate routing preference (254), verifying that it becomes active. -Then, the routing preference is increased to the maximum value (255), -which should prevent the route from becoming active. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/route_pref_255/topology.svg[Route preference: Static Route Activation and Maximum Distance topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::route_pref_255/topology.svg[Route preference: Static Route Activation and Maximum Distance topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Route preference: Static Route Activation and Maximum Distance topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure targets with active static route -. Verify that static route with preference 254 is active -. Update static route preference to 255 -. Verify that high-preference static route (255) does not become active - - -<<< - diff --git a/test/case/ietf_routing/route_pref_255/Readme.adoc b/test/case/ietf_routing/route_pref_255/Readme.adoc new file mode 120000 index 00000000..d9c6d3c2 --- /dev/null +++ b/test/case/ietf_routing/route_pref_255/Readme.adoc @@ -0,0 +1 @@ +route_pref_255.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/route_pref_255/route_pref_255.adoc b/test/case/ietf_routing/route_pref_255/route_pref_255.adoc new file mode 100644 index 00000000..661dcf4b --- /dev/null +++ b/test/case/ietf_routing/route_pref_255/route_pref_255.adoc @@ -0,0 +1,29 @@ +=== Route preference: Static Route Activation and Maximum Distance +==== Description +This test configures a device with a static route to a destination with +a moderate routing preference (254), verifying that it becomes active. +Then, the routing preference is increased to the maximum value (255), +which should prevent the route from becoming active. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/route_pref_255/topology.svg[Route preference: Static Route Activation and Maximum Distance topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::route_pref_255/topology.svg[Route preference: Static Route Activation and Maximum Distance topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Route preference: Static Route Activation and Maximum Distance topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure targets with active static route +. Verify that static route with preference 254 is active +. Update static route preference to 255 +. Verify that high-preference static route (255) does not become active + + +<<< + diff --git a/test/case/ietf_routing/route_pref_dhcp/Readme.adoc b/test/case/ietf_routing/route_pref_dhcp/Readme.adoc deleted file mode 100644 index cfe8f427..00000000 --- a/test/case/ietf_routing/route_pref_dhcp/Readme.adoc +++ /dev/null @@ -1,33 +0,0 @@ -=== Route preference: DHCP vs Static -==== Description -This test configures a device with both a DHCP-acquired route on a -dedicated interface and a static route to the same destination on -another interface. - -Initially, DHCP is preferred over Static. Afterwards, the static -route takes precedence by adjusting the routing preference value -to the one lower than DHCP. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/route_pref_dhcp/topology.svg[Route preference: DHCP vs Static topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::route_pref_dhcp/topology.svg[Route preference: DHCP vs Static topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Route preference: DHCP vs Static topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure targets. Assign higher priority to the dhcp route -. Wait for DHCP and static routes -. Verify connectivity from PC:data12 to R2:lo via DHCP -. Assign higher priority to the static route -. Verify connectivity from PC:data12 to R2:lo via static route - - -<<< - diff --git a/test/case/ietf_routing/route_pref_dhcp/Readme.adoc b/test/case/ietf_routing/route_pref_dhcp/Readme.adoc new file mode 120000 index 00000000..80ec01bb --- /dev/null +++ b/test/case/ietf_routing/route_pref_dhcp/Readme.adoc @@ -0,0 +1 @@ +route_pref_dhcp.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/route_pref_dhcp/route_pref_dhcp.adoc b/test/case/ietf_routing/route_pref_dhcp/route_pref_dhcp.adoc new file mode 100644 index 00000000..cfe8f427 --- /dev/null +++ b/test/case/ietf_routing/route_pref_dhcp/route_pref_dhcp.adoc @@ -0,0 +1,33 @@ +=== Route preference: DHCP vs Static +==== Description +This test configures a device with both a DHCP-acquired route on a +dedicated interface and a static route to the same destination on +another interface. + +Initially, DHCP is preferred over Static. Afterwards, the static +route takes precedence by adjusting the routing preference value +to the one lower than DHCP. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/route_pref_dhcp/topology.svg[Route preference: DHCP vs Static topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::route_pref_dhcp/topology.svg[Route preference: DHCP vs Static topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Route preference: DHCP vs Static topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure targets. Assign higher priority to the dhcp route +. Wait for DHCP and static routes +. Verify connectivity from PC:data12 to R2:lo via DHCP +. Assign higher priority to the static route +. Verify connectivity from PC:data12 to R2:lo via static route + + +<<< + diff --git a/test/case/ietf_routing/route_pref_ospf/Readme.adoc b/test/case/ietf_routing/route_pref_ospf/Readme.adoc deleted file mode 100644 index 19311845..00000000 --- a/test/case/ietf_routing/route_pref_ospf/Readme.adoc +++ /dev/null @@ -1,35 +0,0 @@ -=== Route preference: OSPF vs Static -==== Description -This test configures a device with both an OSPF-acquired route on a -dedicated interface and a static route to the same destination on -another interface. The static route has a higher preference value than -OSPF. - -Initially, the device should prefer the OSPF route; if the OSPF route -becomes unavailable, the static route should take over. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/route_pref_ospf/topology.svg[Route preference: OSPF vs Static topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::route_pref_ospf/topology.svg[Route preference: OSPF vs Static topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Route preference: OSPF vs Static topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Set up TPMR between R1ospf and R2ospf -. Configure targets -. Set up persistent MacVlan namespaces -. Wait for OSPF and static routes -. Verify connectivity from PC:data1 to PC:data2 via OSPF -. Simulate OSPF route loss by blocking OSPF interface -. Verify connectivity via static route after OSPF failover - - -<<< - diff --git a/test/case/ietf_routing/route_pref_ospf/Readme.adoc b/test/case/ietf_routing/route_pref_ospf/Readme.adoc new file mode 120000 index 00000000..65bc4ceb --- /dev/null +++ b/test/case/ietf_routing/route_pref_ospf/Readme.adoc @@ -0,0 +1 @@ +route_pref_ospf.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/route_pref_ospf/route_pref_ospf.adoc b/test/case/ietf_routing/route_pref_ospf/route_pref_ospf.adoc new file mode 100644 index 00000000..19311845 --- /dev/null +++ b/test/case/ietf_routing/route_pref_ospf/route_pref_ospf.adoc @@ -0,0 +1,35 @@ +=== Route preference: OSPF vs Static +==== Description +This test configures a device with both an OSPF-acquired route on a +dedicated interface and a static route to the same destination on +another interface. The static route has a higher preference value than +OSPF. + +Initially, the device should prefer the OSPF route; if the OSPF route +becomes unavailable, the static route should take over. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/route_pref_ospf/topology.svg[Route preference: OSPF vs Static topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::route_pref_ospf/topology.svg[Route preference: OSPF vs Static topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Route preference: OSPF vs Static topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Set up TPMR between R1ospf and R2ospf +. Configure targets +. Set up persistent MacVlan namespaces +. Wait for OSPF and static routes +. Verify connectivity from PC:data1 to PC:data2 via OSPF +. Simulate OSPF route loss by blocking OSPF interface +. Verify connectivity via static route after OSPF failover + + +<<< + diff --git a/test/case/ietf_routing/static_routing/Readme.adoc b/test/case/ietf_routing/static_routing/Readme.adoc deleted file mode 100644 index 05d5ad68..00000000 --- a/test/case/ietf_routing/static_routing/Readme.adoc +++ /dev/null @@ -1,30 +0,0 @@ -=== Static routing -==== Description -Verify that it is possible to add static routes, both IPv4 and IPv6, and -that data forwarding works as expected via an intermediate device. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_routing/static_routing/topology.svg[Static routing topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::static_routing/topology.svg[Static routing topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Static routing topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure targets -. Wait for routes -. Configure host addresses and routes -. Verify that R2 is reachable on 192.168.200.1 from PC:data -. Verify that R2 is reachable on 2001:db8:3c4d:200::1 from PC:data -. Remove all static routes from R1 -. Verify R2 is no longer reachable on either IPv4 or IPv6 from PC:data - - -<<< - diff --git a/test/case/ietf_routing/static_routing/Readme.adoc b/test/case/ietf_routing/static_routing/Readme.adoc new file mode 120000 index 00000000..0e8f8830 --- /dev/null +++ b/test/case/ietf_routing/static_routing/Readme.adoc @@ -0,0 +1 @@ +static_routing.adoc \ No newline at end of file diff --git a/test/case/ietf_routing/static_routing/static_routing.adoc b/test/case/ietf_routing/static_routing/static_routing.adoc new file mode 100644 index 00000000..05d5ad68 --- /dev/null +++ b/test/case/ietf_routing/static_routing/static_routing.adoc @@ -0,0 +1,30 @@ +=== Static routing +==== Description +Verify that it is possible to add static routes, both IPv4 and IPv6, and +that data forwarding works as expected via an intermediate device. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_routing/static_routing/topology.svg[Static routing topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::static_routing/topology.svg[Static routing topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Static routing topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure targets +. Wait for routes +. Configure host addresses and routes +. Verify that R2 is reachable on 192.168.200.1 from PC:data +. Verify that R2 is reachable on 2001:db8:3c4d:200::1 from PC:data +. Remove all static routes from R1 +. Verify R2 is no longer reachable on either IPv4 or IPv6 from PC:data + + +<<< + diff --git a/test/case/ietf_syslog/basic/Readme.adoc b/test/case/ietf_syslog/basic/Readme.adoc deleted file mode 100644 index b1f56953..00000000 --- a/test/case/ietf_syslog/basic/Readme.adoc +++ /dev/null @@ -1,24 +0,0 @@ -=== Syslog Basic -==== Description -Add syslog actions to log to local files, then verify new log files have been created. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_syslog/basic/topology.svg[Syslog Basic topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::basic/topology.svg[Syslog Basic topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Syslog Basic topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure syslog on DUT to log to files '/log/bar.log' (absolute path) and 'foo' (non-absolute). -. Verify log files /var/log/foo and /var/log/bar.log have been created - - -<<< - diff --git a/test/case/ietf_syslog/basic/Readme.adoc b/test/case/ietf_syslog/basic/Readme.adoc new file mode 120000 index 00000000..885dcc59 --- /dev/null +++ b/test/case/ietf_syslog/basic/Readme.adoc @@ -0,0 +1 @@ +basic.adoc \ No newline at end of file diff --git a/test/case/ietf_syslog/basic/basic.adoc b/test/case/ietf_syslog/basic/basic.adoc new file mode 100644 index 00000000..b1f56953 --- /dev/null +++ b/test/case/ietf_syslog/basic/basic.adoc @@ -0,0 +1,24 @@ +=== Syslog Basic +==== Description +Add syslog actions to log to local files, then verify new log files have been created. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_syslog/basic/topology.svg[Syslog Basic topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::basic/topology.svg[Syslog Basic topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Syslog Basic topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure syslog on DUT to log to files '/log/bar.log' (absolute path) and 'foo' (non-absolute). +. Verify log files /var/log/foo and /var/log/bar.log have been created + + +<<< + diff --git a/test/case/ietf_syslog/remote/Readme.adoc b/test/case/ietf_syslog/remote/Readme.adoc deleted file mode 100644 index 2cb6b80d..00000000 --- a/test/case/ietf_syslog/remote/Readme.adoc +++ /dev/null @@ -1,25 +0,0 @@ -=== Remote syslog -==== Description -Verify logging to remote, acting as a remote, and RFC5424 log format. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_syslog/remote/topology.svg[Remote syslog topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::remote/topology.svg[Remote syslog topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Remote syslog topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to client and server DUTs -. Configure client DUT as syslog client with server DUT as remote, and configure server DUT as syslog server -. Send security:notice log message from client -. Verify reception of client log message, incl. sorting to /log/security on server - - -<<< - diff --git a/test/case/ietf_syslog/remote/Readme.adoc b/test/case/ietf_syslog/remote/Readme.adoc new file mode 120000 index 00000000..4c41fe25 --- /dev/null +++ b/test/case/ietf_syslog/remote/Readme.adoc @@ -0,0 +1 @@ +remote.adoc \ No newline at end of file diff --git a/test/case/ietf_syslog/remote/remote.adoc b/test/case/ietf_syslog/remote/remote.adoc new file mode 100644 index 00000000..2cb6b80d --- /dev/null +++ b/test/case/ietf_syslog/remote/remote.adoc @@ -0,0 +1,25 @@ +=== Remote syslog +==== Description +Verify logging to remote, acting as a remote, and RFC5424 log format. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_syslog/remote/topology.svg[Remote syslog topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::remote/topology.svg[Remote syslog topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Remote syslog topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to client and server DUTs +. Configure client DUT as syslog client with server DUT as remote, and configure server DUT as syslog server +. Send security:notice log message from client +. Verify reception of client log message, incl. sorting to /log/security on server + + +<<< + diff --git a/test/case/ietf_system/add_delete_user/Readme.adoc b/test/case/ietf_system/add_delete_user/Readme.adoc deleted file mode 100644 index 40b2e37f..00000000 --- a/test/case/ietf_system/add_delete_user/Readme.adoc +++ /dev/null @@ -1,29 +0,0 @@ -=== Add/delete user -==== Description -Verify that it is possible to add/delete a user. The user password is hashed -with yescrypt. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_system/add_delete_user/topology.svg[Add/delete user topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::add_delete_user/topology.svg[Add/delete user topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Add/delete user topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Add new user 'newuser01' with password 'newuser01password' -. Verify user 'newuser01' exist in operational -. Verify user 'newuser01' can login with SSH -. Delete user 'newuser01' -. Verify erasure of user 'newuser01' -. Verify that 'newuser01' is removed from /etc/passwd - - -<<< - diff --git a/test/case/ietf_system/add_delete_user/Readme.adoc b/test/case/ietf_system/add_delete_user/Readme.adoc new file mode 120000 index 00000000..385fa57d --- /dev/null +++ b/test/case/ietf_system/add_delete_user/Readme.adoc @@ -0,0 +1 @@ +add_delete_user.adoc \ No newline at end of file diff --git a/test/case/ietf_system/add_delete_user/add_delete_user.adoc b/test/case/ietf_system/add_delete_user/add_delete_user.adoc new file mode 100644 index 00000000..40b2e37f --- /dev/null +++ b/test/case/ietf_system/add_delete_user/add_delete_user.adoc @@ -0,0 +1,29 @@ +=== Add/delete user +==== Description +Verify that it is possible to add/delete a user. The user password is hashed +with yescrypt. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_system/add_delete_user/topology.svg[Add/delete user topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::add_delete_user/topology.svg[Add/delete user topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Add/delete user topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Add new user 'newuser01' with password 'newuser01password' +. Verify user 'newuser01' exist in operational +. Verify user 'newuser01' can login with SSH +. Delete user 'newuser01' +. Verify erasure of user 'newuser01' +. Verify that 'newuser01' is removed from /etc/passwd + + +<<< + diff --git a/test/case/ietf_system/hostname/Readme.adoc b/test/case/ietf_system/hostname/Readme.adoc deleted file mode 100644 index ec9e8452..00000000 --- a/test/case/ietf_system/hostname/Readme.adoc +++ /dev/null @@ -1,33 +0,0 @@ -=== Set hostname -==== Description -Verify that it is possible to change hostname both normal -and using format %h-%m. - -The %h-%m format expands to -, -where MAC is the last three bytes of the base MAC address. - -e.g. ix-01-01-01. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_system/hostname/topology.svg[Set hostname topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::hostname/topology.svg[Set hostname topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Set hostname topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Set hostname to 'h0stn4m3' -. Verify new hostname 'h0stn4m3' -. Set hostname to '%h-%m' -. Verify hostname is %h-%m in running configuration -. Verify hostname format in operational, according to format - - -<<< - diff --git a/test/case/ietf_system/hostname/Readme.adoc b/test/case/ietf_system/hostname/Readme.adoc new file mode 120000 index 00000000..8f64235d --- /dev/null +++ b/test/case/ietf_system/hostname/Readme.adoc @@ -0,0 +1 @@ +hostname.adoc \ No newline at end of file diff --git a/test/case/ietf_system/hostname/hostname.adoc b/test/case/ietf_system/hostname/hostname.adoc new file mode 100644 index 00000000..ec9e8452 --- /dev/null +++ b/test/case/ietf_system/hostname/hostname.adoc @@ -0,0 +1,33 @@ +=== Set hostname +==== Description +Verify that it is possible to change hostname both normal +and using format %h-%m. + +The %h-%m format expands to -, +where MAC is the last three bytes of the base MAC address. + +e.g. ix-01-01-01. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_system/hostname/topology.svg[Set hostname topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::hostname/topology.svg[Set hostname topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Set hostname topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set hostname to 'h0stn4m3' +. Verify new hostname 'h0stn4m3' +. Set hostname to '%h-%m' +. Verify hostname is %h-%m in running configuration +. Verify hostname format in operational, according to format + + +<<< + diff --git a/test/case/ietf_system/ntp_client/Readme.adoc b/test/case/ietf_system/ntp_client/Readme.adoc deleted file mode 100644 index f9c0f4b6..00000000 --- a/test/case/ietf_system/ntp_client/Readme.adoc +++ /dev/null @@ -1,25 +0,0 @@ -=== Basic NTP client test -==== Description -Verify NTP client with multiple servers, ensure one get selected. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_system/ntp_client/topology.svg[Basic NTP client test topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ntp_client/topology.svg[Basic NTP client test topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Basic NTP client test topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure NTP client on 'target' -. Verify one source is in 'selected' state on 'target' -. Verify three sources exist in NTP client on 'target' - - -<<< - diff --git a/test/case/ietf_system/ntp_client/Readme.adoc b/test/case/ietf_system/ntp_client/Readme.adoc new file mode 120000 index 00000000..0ef39de7 --- /dev/null +++ b/test/case/ietf_system/ntp_client/Readme.adoc @@ -0,0 +1 @@ +ntp_client.adoc \ No newline at end of file diff --git a/test/case/ietf_system/ntp_client/ntp_client.adoc b/test/case/ietf_system/ntp_client/ntp_client.adoc new file mode 100644 index 00000000..f9c0f4b6 --- /dev/null +++ b/test/case/ietf_system/ntp_client/ntp_client.adoc @@ -0,0 +1,25 @@ +=== Basic NTP client test +==== Description +Verify NTP client with multiple servers, ensure one get selected. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_system/ntp_client/topology.svg[Basic NTP client test topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ntp_client/topology.svg[Basic NTP client test topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Basic NTP client test topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure NTP client on 'target' +. Verify one source is in 'selected' state on 'target' +. Verify three sources exist in NTP client on 'target' + + +<<< + diff --git a/test/case/ietf_system/timezone/Readme.adoc b/test/case/ietf_system/timezone/Readme.adoc deleted file mode 100644 index 59d1d27c..00000000 --- a/test/case/ietf_system/timezone/Readme.adoc +++ /dev/null @@ -1,24 +0,0 @@ -=== Set timezone using timezone name -==== Description -Verify that it is possible to set timezone using timezone names. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_system/timezone/topology.svg[Set timezone using timezone name topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::timezone/topology.svg[Set timezone using timezone name topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Set timezone using timezone name topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Set timezone to Australia/Perth -. Verify current time offset is +08:00 - - -<<< - diff --git a/test/case/ietf_system/timezone/Readme.adoc b/test/case/ietf_system/timezone/Readme.adoc new file mode 120000 index 00000000..a27be4c4 --- /dev/null +++ b/test/case/ietf_system/timezone/Readme.adoc @@ -0,0 +1 @@ +timezone.adoc \ No newline at end of file diff --git a/test/case/ietf_system/timezone/timezone.adoc b/test/case/ietf_system/timezone/timezone.adoc new file mode 100644 index 00000000..59d1d27c --- /dev/null +++ b/test/case/ietf_system/timezone/timezone.adoc @@ -0,0 +1,24 @@ +=== Set timezone using timezone name +==== Description +Verify that it is possible to set timezone using timezone names. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_system/timezone/topology.svg[Set timezone using timezone name topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::timezone/topology.svg[Set timezone using timezone name topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Set timezone using timezone name topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set timezone to Australia/Perth +. Verify current time offset is +08:00 + + +<<< + diff --git a/test/case/ietf_system/timezone_utc_offset/Readme.adoc b/test/case/ietf_system/timezone_utc_offset/Readme.adoc deleted file mode 100644 index 937bdcb6..00000000 --- a/test/case/ietf_system/timezone_utc_offset/Readme.adoc +++ /dev/null @@ -1,24 +0,0 @@ -=== Set timezone with UTC offset -==== Description -Verify that it is possible to set timezone using UTC offset - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_system/timezone_utc_offset/topology.svg[Set timezone with UTC offset topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::timezone_utc_offset/topology.svg[Set timezone with UTC offset topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Set timezone with UTC offset topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Set timezone UTC offset to +12 -. Verify current time offset is +12:00 - - -<<< - diff --git a/test/case/ietf_system/timezone_utc_offset/Readme.adoc b/test/case/ietf_system/timezone_utc_offset/Readme.adoc new file mode 120000 index 00000000..23d00aaf --- /dev/null +++ b/test/case/ietf_system/timezone_utc_offset/Readme.adoc @@ -0,0 +1 @@ +timezone_utc_offset.adoc \ No newline at end of file diff --git a/test/case/ietf_system/timezone_utc_offset/timezone_utc_offset.adoc b/test/case/ietf_system/timezone_utc_offset/timezone_utc_offset.adoc new file mode 100644 index 00000000..937bdcb6 --- /dev/null +++ b/test/case/ietf_system/timezone_utc_offset/timezone_utc_offset.adoc @@ -0,0 +1,24 @@ +=== Set timezone with UTC offset +==== Description +Verify that it is possible to set timezone using UTC offset + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_system/timezone_utc_offset/topology.svg[Set timezone with UTC offset topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::timezone_utc_offset/topology.svg[Set timezone with UTC offset topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Set timezone with UTC offset topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set timezone UTC offset to +12 +. Verify current time offset is +12:00 + + +<<< + diff --git a/test/case/ietf_system/upgrade/Readme.adoc b/test/case/ietf_system/upgrade/Readme.adoc deleted file mode 100644 index 47e8c178..00000000 --- a/test/case/ietf_system/upgrade/Readme.adoc +++ /dev/null @@ -1,26 +0,0 @@ -=== Upgrade -==== Description -Verify it is possible to upgrade. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_system/upgrade/topology.svg[Upgrade topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::upgrade/topology.svg[Upgrade topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Upgrade topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Start installation of selected package -. Wait for upgrade to finish -. Verify boot order has changed and reboot -. Verify that the partition is the booted - - -<<< - diff --git a/test/case/ietf_system/upgrade/Readme.adoc b/test/case/ietf_system/upgrade/Readme.adoc new file mode 120000 index 00000000..d15b94f0 --- /dev/null +++ b/test/case/ietf_system/upgrade/Readme.adoc @@ -0,0 +1 @@ +upgrade.adoc \ No newline at end of file diff --git a/test/case/ietf_system/upgrade/upgrade.adoc b/test/case/ietf_system/upgrade/upgrade.adoc new file mode 100644 index 00000000..47e8c178 --- /dev/null +++ b/test/case/ietf_system/upgrade/upgrade.adoc @@ -0,0 +1,26 @@ +=== Upgrade +==== Description +Verify it is possible to upgrade. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_system/upgrade/topology.svg[Upgrade topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::upgrade/topology.svg[Upgrade topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Upgrade topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Start installation of selected package +. Wait for upgrade to finish +. Verify boot order has changed and reboot +. Verify that the partition is the booted + + +<<< + diff --git a/test/case/ietf_system/user_admin/Readme.adoc b/test/case/ietf_system/user_admin/Readme.adoc deleted file mode 100644 index 8fb28b23..00000000 --- a/test/case/ietf_system/user_admin/Readme.adoc +++ /dev/null @@ -1,33 +0,0 @@ -=== Add admin user -==== Description -Test that a non-admin user is not an admin in Linux, and -check that it when added as admin it is also the case in Linux. - -==== Topology -ifdef::topdoc[] -image::../../test/case/ietf_system/user_admin/topology.svg[Add admin user topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::user_admin/topology.svg[Add admin user topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Add admin user topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Add new user 'jacky' with no NACM access -. Verify regular user jacky exists -. Verify user jacky is not in wheel group (in Linux) -. Verify user jacky password is set correctly -. Add user jacky to admin group in NACM -. Verify user jacky is now in wheel group (in Linux) -. Verify user jacky shell now is Bash -. Change user jacky to $factory$ password -. Verify user jacky exists and has new password -. Verify user jacky can log in with SSH - - -<<< - diff --git a/test/case/ietf_system/user_admin/Readme.adoc b/test/case/ietf_system/user_admin/Readme.adoc new file mode 120000 index 00000000..aa61466b --- /dev/null +++ b/test/case/ietf_system/user_admin/Readme.adoc @@ -0,0 +1 @@ +user_admin.adoc \ No newline at end of file diff --git a/test/case/ietf_system/user_admin/user_admin.adoc b/test/case/ietf_system/user_admin/user_admin.adoc new file mode 100644 index 00000000..8fb28b23 --- /dev/null +++ b/test/case/ietf_system/user_admin/user_admin.adoc @@ -0,0 +1,33 @@ +=== Add admin user +==== Description +Test that a non-admin user is not an admin in Linux, and +check that it when added as admin it is also the case in Linux. + +==== Topology +ifdef::topdoc[] +image::../../test/case/ietf_system/user_admin/topology.svg[Add admin user topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::user_admin/topology.svg[Add admin user topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Add admin user topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Add new user 'jacky' with no NACM access +. Verify regular user jacky exists +. Verify user jacky is not in wheel group (in Linux) +. Verify user jacky password is set correctly +. Add user jacky to admin group in NACM +. Verify user jacky is now in wheel group (in Linux) +. Verify user jacky shell now is Bash +. Change user jacky to $factory$ password +. Verify user jacky exists and has new password +. Verify user jacky can log in with SSH + + +<<< + diff --git a/test/case/infix_containers/container_basic/Readme.adoc b/test/case/infix_containers/container_basic/Readme.adoc deleted file mode 100644 index 1967c887..00000000 --- a/test/case/infix_containers/container_basic/Readme.adoc +++ /dev/null @@ -1,34 +0,0 @@ -=== Container basic -==== Description -Verify that a simple web server container can be configured to run -with host networking, on port 80. Operation is verified using a -simple GET request for index.html and checking for a key phrase. - -The RPC actions: stop + start, and restart are also verified. - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_containers/container_basic/topology.svg[Container basic topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::container_basic/topology.svg[Container basic topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Container basic topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Set hostname to 'container-host' -. Create container 'web' from bundled OCI image -. Verify container 'web' has started -. Verify container 'web' is reachable on http://container-host.local:91 -. Stop container 'web' -. Verify container 'web' is stopped -. Restart container 'web' -. Verify container 'web' is reachable on http://container-host.local:91 - - -<<< - diff --git a/test/case/infix_containers/container_basic/Readme.adoc b/test/case/infix_containers/container_basic/Readme.adoc new file mode 120000 index 00000000..895abdfa --- /dev/null +++ b/test/case/infix_containers/container_basic/Readme.adoc @@ -0,0 +1 @@ +container_basic.adoc \ No newline at end of file diff --git a/test/case/infix_containers/container_basic/container_basic.adoc b/test/case/infix_containers/container_basic/container_basic.adoc new file mode 100644 index 00000000..1967c887 --- /dev/null +++ b/test/case/infix_containers/container_basic/container_basic.adoc @@ -0,0 +1,34 @@ +=== Container basic +==== Description +Verify that a simple web server container can be configured to run +with host networking, on port 80. Operation is verified using a +simple GET request for index.html and checking for a key phrase. + +The RPC actions: stop + start, and restart are also verified. + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_containers/container_basic/topology.svg[Container basic topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::container_basic/topology.svg[Container basic topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Container basic topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set hostname to 'container-host' +. Create container 'web' from bundled OCI image +. Verify container 'web' has started +. Verify container 'web' is reachable on http://container-host.local:91 +. Stop container 'web' +. Verify container 'web' is stopped +. Restart container 'web' +. Verify container 'web' is reachable on http://container-host.local:91 + + +<<< + diff --git a/test/case/infix_containers/container_bridge/Readme.adoc b/test/case/infix_containers/container_bridge/Readme.adoc deleted file mode 100644 index 1c3e6f69..00000000 --- a/test/case/infix_containers/container_bridge/Readme.adoc +++ /dev/null @@ -1,31 +0,0 @@ -=== Container with bridge network -==== Description -Verify connectivity with a simple web server container from behind a -docker0 bridge. As an added twist, this test also verifies content -mounts, i.e., custom index.html from running-config. - -This also verifies port forwarding from container internal port to a -port accessed from the host. - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_containers/container_bridge/topology.svg[Container with bridge network topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::container_bridge/topology.svg[Container with bridge network topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Container with bridge network topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Create container 'web-docker0' from bundled OCI image -. Verify container 'web-docker0' has started -. Verify basic DUT connectivity, host:data can ping DUT 10.0.0.2 -. Verify container 'web-docker0' is reachable on http://10.0.0.2:8080 - - -<<< - diff --git a/test/case/infix_containers/container_bridge/Readme.adoc b/test/case/infix_containers/container_bridge/Readme.adoc new file mode 120000 index 00000000..eccc28dc --- /dev/null +++ b/test/case/infix_containers/container_bridge/Readme.adoc @@ -0,0 +1 @@ +container_bridge.adoc \ No newline at end of file diff --git a/test/case/infix_containers/container_bridge/container_bridge.adoc b/test/case/infix_containers/container_bridge/container_bridge.adoc new file mode 100644 index 00000000..1c3e6f69 --- /dev/null +++ b/test/case/infix_containers/container_bridge/container_bridge.adoc @@ -0,0 +1,31 @@ +=== Container with bridge network +==== Description +Verify connectivity with a simple web server container from behind a +docker0 bridge. As an added twist, this test also verifies content +mounts, i.e., custom index.html from running-config. + +This also verifies port forwarding from container internal port to a +port accessed from the host. + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_containers/container_bridge/topology.svg[Container with bridge network topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::container_bridge/topology.svg[Container with bridge network topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Container with bridge network topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Create container 'web-docker0' from bundled OCI image +. Verify container 'web-docker0' has started +. Verify basic DUT connectivity, host:data can ping DUT 10.0.0.2 +. Verify container 'web-docker0' is reachable on http://10.0.0.2:8080 + + +<<< + diff --git a/test/case/infix_containers/container_firewall_basic/Readme.adoc b/test/case/infix_containers/container_firewall_basic/Readme.adoc deleted file mode 100644 index a26af115..00000000 --- a/test/case/infix_containers/container_firewall_basic/Readme.adoc +++ /dev/null @@ -1,54 +0,0 @@ -=== Basic Firewall Container -==== Description -Verify that an nftables container can be used for IP masquerading and -port forwarding to another container running a basic web server. - -.... - <--- Docker containers ---> -.-------------. .----------------------. .--------..---------------. -| | mgmt |------------| mgmt | | | | fire || | web | -| host | data |------------| ext0 | target | int0 | | wall || eth0 | server | -'-------------'.42 .1'----------------------' '--------''---------------' - \ .1 .2 / - 192.168.0.0/24 \ 10.0.0.0/24 / - `-- VETH pair --' -.... - -The web server container is connected to the target on an internal -network, using a VETH pair, serving HTTP on port 91. - -The firewall container sets up a port forward with IP masquerding -to/from `ext0:8080` to 10.0.0.2:91. - -Correct operation is verified using HTTP GET requests for internal port -91 and external port 8080, to ensure the web page, with a known key -phrase, is only reachable from the public interface `ext0`, on -192.168.0.1:8080. - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_containers/container_firewall_basic/topology.svg[Basic Firewall Container topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::container_firewall_basic/topology.svg[Basic Firewall Container topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Basic Firewall Container topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Set hostname to 'container-host' -. Create VETH pair for web server container -. Create firewall container from bundled OCI image -. Create web server container from bundled OCI image -. Verify firewall container has started -. Verify web container has started -. Verify connectivity, host can reach target:ext0 -. Verify 'web' is NOT reachable on http://container-host.local:91 -. Verify 'web' is reachable on http://container-host.local:8080 - - -<<< - diff --git a/test/case/infix_containers/container_firewall_basic/Readme.adoc b/test/case/infix_containers/container_firewall_basic/Readme.adoc new file mode 120000 index 00000000..d52fc4b5 --- /dev/null +++ b/test/case/infix_containers/container_firewall_basic/Readme.adoc @@ -0,0 +1 @@ +container_firewall_basic.adoc \ No newline at end of file diff --git a/test/case/infix_containers/container_firewall_basic/container_firewall_basic.adoc b/test/case/infix_containers/container_firewall_basic/container_firewall_basic.adoc new file mode 100644 index 00000000..a26af115 --- /dev/null +++ b/test/case/infix_containers/container_firewall_basic/container_firewall_basic.adoc @@ -0,0 +1,54 @@ +=== Basic Firewall Container +==== Description +Verify that an nftables container can be used for IP masquerading and +port forwarding to another container running a basic web server. + +.... + <--- Docker containers ---> +.-------------. .----------------------. .--------..---------------. +| | mgmt |------------| mgmt | | | | fire || | web | +| host | data |------------| ext0 | target | int0 | | wall || eth0 | server | +'-------------'.42 .1'----------------------' '--------''---------------' + \ .1 .2 / + 192.168.0.0/24 \ 10.0.0.0/24 / + `-- VETH pair --' +.... + +The web server container is connected to the target on an internal +network, using a VETH pair, serving HTTP on port 91. + +The firewall container sets up a port forward with IP masquerding +to/from `ext0:8080` to 10.0.0.2:91. + +Correct operation is verified using HTTP GET requests for internal port +91 and external port 8080, to ensure the web page, with a known key +phrase, is only reachable from the public interface `ext0`, on +192.168.0.1:8080. + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_containers/container_firewall_basic/topology.svg[Basic Firewall Container topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::container_firewall_basic/topology.svg[Basic Firewall Container topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Basic Firewall Container topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Set hostname to 'container-host' +. Create VETH pair for web server container +. Create firewall container from bundled OCI image +. Create web server container from bundled OCI image +. Verify firewall container has started +. Verify web container has started +. Verify connectivity, host can reach target:ext0 +. Verify 'web' is NOT reachable on http://container-host.local:91 +. Verify 'web' is reachable on http://container-host.local:8080 + + +<<< + diff --git a/test/case/infix_containers/container_phys/Readme.adoc b/test/case/infix_containers/container_phys/Readme.adoc deleted file mode 100644 index d05489dd..00000000 --- a/test/case/infix_containers/container_phys/Readme.adoc +++ /dev/null @@ -1,27 +0,0 @@ -=== Container with physical interface -==== Description -Verify connectivity with a simple web server container that's been -given a physical interface instead of an end of a VETH pair. - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_containers/container_phys/topology.svg[Container with physical interface topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::container_phys/topology.svg[Container with physical interface topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Container with physical interface topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Create container 'web-phys' from bundled OCI image -. Verify container 'web-phys' has started -. Verify host:data can ping 10.0.0.2 -. Verify container 'web-phys' is reachable on http://10.0.0.2:91 - - -<<< - diff --git a/test/case/infix_containers/container_phys/Readme.adoc b/test/case/infix_containers/container_phys/Readme.adoc new file mode 120000 index 00000000..f4db88d3 --- /dev/null +++ b/test/case/infix_containers/container_phys/Readme.adoc @@ -0,0 +1 @@ +container_phys.adoc \ No newline at end of file diff --git a/test/case/infix_containers/container_phys/container_phys.adoc b/test/case/infix_containers/container_phys/container_phys.adoc new file mode 100644 index 00000000..d05489dd --- /dev/null +++ b/test/case/infix_containers/container_phys/container_phys.adoc @@ -0,0 +1,27 @@ +=== Container with physical interface +==== Description +Verify connectivity with a simple web server container that's been +given a physical interface instead of an end of a VETH pair. + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_containers/container_phys/topology.svg[Container with physical interface topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::container_phys/topology.svg[Container with physical interface topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Container with physical interface topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Create container 'web-phys' from bundled OCI image +. Verify container 'web-phys' has started +. Verify host:data can ping 10.0.0.2 +. Verify container 'web-phys' is reachable on http://10.0.0.2:91 + + +<<< + diff --git a/test/case/infix_containers/container_veth/Readme.adoc b/test/case/infix_containers/container_veth/Readme.adoc deleted file mode 100644 index d50ac7f7..00000000 --- a/test/case/infix_containers/container_veth/Readme.adoc +++ /dev/null @@ -1,37 +0,0 @@ -=== Container with VETH pair -==== Description -Verify connectivity with a simple web server container from behind a -regular bridge, a VETH pair connects the container to the bridge. - -.... - .-------------. .---------------. .--------. - | | mgmt |---------| mgmt | | | web- | - | host | data |---------| data | target | | server | - '-------------' '---------------' '--------' - | / - br0 / - `----- veth0 -----' -.... - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_containers/container_veth/topology.svg[Container with VETH pair topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::container_veth/topology.svg[Container with VETH pair topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Container with VETH pair topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Create 'web-br0-veth' container from bundled OCI image -. Verify container 'web-br0-veth' has started -. Verify basic DUT connectivity, host:data can ping DUT 10.0.0.2 -. Verify container 'web-br0-veth' is reachable on http://10.0.0.2:91 - - -<<< - diff --git a/test/case/infix_containers/container_veth/Readme.adoc b/test/case/infix_containers/container_veth/Readme.adoc new file mode 120000 index 00000000..360cb99a --- /dev/null +++ b/test/case/infix_containers/container_veth/Readme.adoc @@ -0,0 +1 @@ +container_veth.adoc \ No newline at end of file diff --git a/test/case/infix_containers/container_veth/container_veth.adoc b/test/case/infix_containers/container_veth/container_veth.adoc new file mode 100644 index 00000000..d50ac7f7 --- /dev/null +++ b/test/case/infix_containers/container_veth/container_veth.adoc @@ -0,0 +1,37 @@ +=== Container with VETH pair +==== Description +Verify connectivity with a simple web server container from behind a +regular bridge, a VETH pair connects the container to the bridge. + +.... + .-------------. .---------------. .--------. + | | mgmt |---------| mgmt | | | web- | + | host | data |---------| data | target | | server | + '-------------' '---------------' '--------' + | / + br0 / + `----- veth0 -----' +.... + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_containers/container_veth/topology.svg[Container with VETH pair topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::container_veth/topology.svg[Container with VETH pair topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Container with VETH pair topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Create 'web-br0-veth' container from bundled OCI image +. Verify container 'web-br0-veth' has started +. Verify basic DUT connectivity, host:data can ping DUT 10.0.0.2 +. Verify container 'web-br0-veth' is reachable on http://10.0.0.2:91 + + +<<< + diff --git a/test/case/infix_dhcp/dhcp_basic/Readme.adoc b/test/case/infix_dhcp/dhcp_basic/Readme.adoc deleted file mode 100644 index f24b6645..00000000 --- a/test/case/infix_dhcp/dhcp_basic/Readme.adoc +++ /dev/null @@ -1,25 +0,0 @@ -=== DHCP Basic -==== Description -This is a very basic DHCP test that requests an IPv4 lease -from a DHCP server and checks that the lease is set on the -interface. - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_dhcp/dhcp_basic/topology.svg[DHCP Basic topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::dhcp_basic/topology.svg[DHCP Basic topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[DHCP Basic topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Initialize -. Verify client get DHCP lease for 10.0.0.42 on client:data - - -<<< - diff --git a/test/case/infix_dhcp/dhcp_basic/Readme.adoc b/test/case/infix_dhcp/dhcp_basic/Readme.adoc new file mode 120000 index 00000000..736b3464 --- /dev/null +++ b/test/case/infix_dhcp/dhcp_basic/Readme.adoc @@ -0,0 +1 @@ +dhcp_basic.adoc \ No newline at end of file diff --git a/test/case/infix_dhcp/dhcp_basic/dhcp_basic.adoc b/test/case/infix_dhcp/dhcp_basic/dhcp_basic.adoc new file mode 100644 index 00000000..f24b6645 --- /dev/null +++ b/test/case/infix_dhcp/dhcp_basic/dhcp_basic.adoc @@ -0,0 +1,25 @@ +=== DHCP Basic +==== Description +This is a very basic DHCP test that requests an IPv4 lease +from a DHCP server and checks that the lease is set on the +interface. + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_dhcp/dhcp_basic/topology.svg[DHCP Basic topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::dhcp_basic/topology.svg[DHCP Basic topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[DHCP Basic topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Verify client get DHCP lease for 10.0.0.42 on client:data + + +<<< + diff --git a/test/case/infix_dhcp/dhcp_router/Readme.adoc b/test/case/infix_dhcp/dhcp_router/Readme.adoc deleted file mode 100644 index c6f59f9d..00000000 --- a/test/case/infix_dhcp/dhcp_router/Readme.adoc +++ /dev/null @@ -1,24 +0,0 @@ -=== DHCP router -==== Description -Verify that the DHCP client receives default gateway (DHCP option 3, router) -and that route exists in operational datastore. - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_dhcp/dhcp_router/topology.svg[DHCP router topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::dhcp_router/topology.svg[DHCP router topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[DHCP router topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Initialize -. Verify client to set up default route via 192.168.0.254 - - -<<< - diff --git a/test/case/infix_dhcp/dhcp_router/Readme.adoc b/test/case/infix_dhcp/dhcp_router/Readme.adoc new file mode 120000 index 00000000..ac7364f5 --- /dev/null +++ b/test/case/infix_dhcp/dhcp_router/Readme.adoc @@ -0,0 +1 @@ +dhcp_router.adoc \ No newline at end of file diff --git a/test/case/infix_dhcp/dhcp_router/dhcp_router.adoc b/test/case/infix_dhcp/dhcp_router/dhcp_router.adoc new file mode 100644 index 00000000..c6f59f9d --- /dev/null +++ b/test/case/infix_dhcp/dhcp_router/dhcp_router.adoc @@ -0,0 +1,24 @@ +=== DHCP router +==== Description +Verify that the DHCP client receives default gateway (DHCP option 3, router) +and that route exists in operational datastore. + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_dhcp/dhcp_router/topology.svg[DHCP router topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::dhcp_router/topology.svg[DHCP router topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[DHCP router topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Verify client to set up default route via 192.168.0.254 + + +<<< + diff --git a/test/case/infix_dhcp/dhcp_routes/Readme.adoc b/test/case/infix_dhcp/dhcp_routes/Readme.adoc deleted file mode 100644 index 007ad217..00000000 --- a/test/case/infix_dhcp/dhcp_routes/Readme.adoc +++ /dev/null @@ -1,38 +0,0 @@ -=== DHCP option 121 vs option 3 -==== Description -Verify that DHCP option 121 (classless static routes) is used over the -older option 3 (default gateway) in the DHCP client, when both are sent -by the server, see RFC3442. Use the routing RIB in the operational -datastore to verify. - -Installing routes from a DHCP server should not affect already existing -(static) routes. To verify this, a static canary route (20.0.0.0/24 via -192.168.0.2) is installed before starting the DHCP client. As a twist, -this canary route has a next-hop (192.168.0.2) which is not reachable -until a DHCP lease has been acquired. - -The DHCP server is set up to hand out both a default router (option 3) -via 192.168.0.1 and a default route (option 121) via 192.168.0.254. - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_dhcp/dhcp_routes/topology.svg[DHCP option 121 vs option 3 topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::dhcp_routes/topology.svg[DHCP option 121 vs option 3 topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[DHCP option 121 vs option 3 topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Setting up canary route, 20.0.0.0/24 via 192.168.0.2 -. Enabling DHCP client, allow option 3 and 121 -. Verify 'client' has a route 10.0.0.0/24 via 192.168.0.254 (option 121) -. Verify 'client' has default route via 192.168.0.254 (not use option 3) -. Verify 'client' still has canary route to 20.0.0.0/24 via 192.168.0.2 - - -<<< - diff --git a/test/case/infix_dhcp/dhcp_routes/Readme.adoc b/test/case/infix_dhcp/dhcp_routes/Readme.adoc new file mode 120000 index 00000000..d179a9f4 --- /dev/null +++ b/test/case/infix_dhcp/dhcp_routes/Readme.adoc @@ -0,0 +1 @@ +dhcp_routes.adoc \ No newline at end of file diff --git a/test/case/infix_dhcp/dhcp_routes/dhcp_routes.adoc b/test/case/infix_dhcp/dhcp_routes/dhcp_routes.adoc new file mode 100644 index 00000000..007ad217 --- /dev/null +++ b/test/case/infix_dhcp/dhcp_routes/dhcp_routes.adoc @@ -0,0 +1,38 @@ +=== DHCP option 121 vs option 3 +==== Description +Verify that DHCP option 121 (classless static routes) is used over the +older option 3 (default gateway) in the DHCP client, when both are sent +by the server, see RFC3442. Use the routing RIB in the operational +datastore to verify. + +Installing routes from a DHCP server should not affect already existing +(static) routes. To verify this, a static canary route (20.0.0.0/24 via +192.168.0.2) is installed before starting the DHCP client. As a twist, +this canary route has a next-hop (192.168.0.2) which is not reachable +until a DHCP lease has been acquired. + +The DHCP server is set up to hand out both a default router (option 3) +via 192.168.0.1 and a default route (option 121) via 192.168.0.254. + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_dhcp/dhcp_routes/topology.svg[DHCP option 121 vs option 3 topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::dhcp_routes/topology.svg[DHCP option 121 vs option 3 topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[DHCP option 121 vs option 3 topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Setting up canary route, 20.0.0.0/24 via 192.168.0.2 +. Enabling DHCP client, allow option 3 and 121 +. Verify 'client' has a route 10.0.0.0/24 via 192.168.0.254 (option 121) +. Verify 'client' has default route via 192.168.0.254 (not use option 3) +. Verify 'client' still has canary route to 20.0.0.0/24 via 192.168.0.2 + + +<<< + diff --git a/test/case/infix_services/mdns_allow_deny/Readme.adoc b/test/case/infix_services/mdns_allow_deny/Readme.adoc deleted file mode 100644 index f2caa8b4..00000000 --- a/test/case/infix_services/mdns_allow_deny/Readme.adoc +++ /dev/null @@ -1,32 +0,0 @@ -=== mDNS allow/deny interfaces -==== Description -Verify the mDNS responder interface allow/deny configuration. Both -settings can be used independently and in concert. We verify operation -with three scenarios: - - 1. Allow p2, no mDNS traffic should be received on p1 and p3 - 2. Deny p2, mDNS traffic should only be received on p1 and p3 - 3. Allow p1 and p3, deny p2 and p3, traffic only on p1 - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_services/mdns_allow_deny/topology.svg[mDNS allow/deny interfaces topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::mdns_allow_deny/topology.svg[mDNS allow/deny interfaces topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[mDNS allow/deny interfaces topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Configure device -. Allow mDNS on a single interface: p2 -. Deny mDNS on a single interface: p2 -. Allow mDNS on p1, p3 deny on p2, p3 - - -<<< - diff --git a/test/case/infix_services/mdns_allow_deny/Readme.adoc b/test/case/infix_services/mdns_allow_deny/Readme.adoc new file mode 120000 index 00000000..fd21b3d9 --- /dev/null +++ b/test/case/infix_services/mdns_allow_deny/Readme.adoc @@ -0,0 +1 @@ +mdns_allow_deny.adoc \ No newline at end of file diff --git a/test/case/infix_services/mdns_allow_deny/mdns_allow_deny.adoc b/test/case/infix_services/mdns_allow_deny/mdns_allow_deny.adoc new file mode 100644 index 00000000..f2caa8b4 --- /dev/null +++ b/test/case/infix_services/mdns_allow_deny/mdns_allow_deny.adoc @@ -0,0 +1,32 @@ +=== mDNS allow/deny interfaces +==== Description +Verify the mDNS responder interface allow/deny configuration. Both +settings can be used independently and in concert. We verify operation +with three scenarios: + + 1. Allow p2, no mDNS traffic should be received on p1 and p3 + 2. Deny p2, mDNS traffic should only be received on p1 and p3 + 3. Allow p1 and p3, deny p2 and p3, traffic only on p1 + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_services/mdns_allow_deny/topology.svg[mDNS allow/deny interfaces topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::mdns_allow_deny/topology.svg[mDNS allow/deny interfaces topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[mDNS allow/deny interfaces topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Configure device +. Allow mDNS on a single interface: p2 +. Deny mDNS on a single interface: p2 +. Allow mDNS on p1, p3 deny on p2, p3 + + +<<< + diff --git a/test/case/infix_services/ssh_key_authentication/Readme.adoc b/test/case/infix_services/ssh_key_authentication/Readme.adoc deleted file mode 100644 index 3772331e..00000000 --- a/test/case/infix_services/ssh_key_authentication/Readme.adoc +++ /dev/null @@ -1,25 +0,0 @@ -=== Generate ssh key pair -==== Description -Verify that 'guest' user can fetch data using only the 'public' key - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_services/ssh_key_authentication/topology.svg[Generate ssh key pair topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ssh_key_authentication/topology.svg[Generate ssh key pair topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Generate ssh key pair topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Connect to the target device -. Create a guest user on the target device -. Write private key to a temporary file -. Verify it is possible to fetch syslog data using public key - - -<<< - diff --git a/test/case/infix_services/ssh_key_authentication/Readme.adoc b/test/case/infix_services/ssh_key_authentication/Readme.adoc new file mode 120000 index 00000000..1819df3a --- /dev/null +++ b/test/case/infix_services/ssh_key_authentication/Readme.adoc @@ -0,0 +1 @@ +ssh_key_authentication.adoc \ No newline at end of file diff --git a/test/case/infix_services/ssh_key_authentication/ssh_key_authentication.adoc b/test/case/infix_services/ssh_key_authentication/ssh_key_authentication.adoc new file mode 100644 index 00000000..3772331e --- /dev/null +++ b/test/case/infix_services/ssh_key_authentication/ssh_key_authentication.adoc @@ -0,0 +1,25 @@ +=== Generate ssh key pair +==== Description +Verify that 'guest' user can fetch data using only the 'public' key + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_services/ssh_key_authentication/topology.svg[Generate ssh key pair topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ssh_key_authentication/topology.svg[Generate ssh key pair topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Generate ssh key pair topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Connect to the target device +. Create a guest user on the target device +. Write private key to a temporary file +. Verify it is possible to fetch syslog data using public key + + +<<< + diff --git a/test/case/infix_services/ssh_server_config/Readme.adoc b/test/case/infix_services/ssh_server_config/Readme.adoc deleted file mode 100644 index 118881d8..00000000 --- a/test/case/infix_services/ssh_server_config/Readme.adoc +++ /dev/null @@ -1,29 +0,0 @@ -=== SSH server configuration -==== Description -Test SSH server functionality with pre-defined key pair: -1. Enable/Disable SSH service. -2. Configure listen address and port. -3. Validate connectivity using static key pair. - -==== Topology -ifdef::topdoc[] -image::../../test/case/infix_services/ssh_server_config/topology.svg[SSH server configuration topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ssh_server_config/topology.svg[SSH server configuration topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[SSH server configuration topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Setup topology and attach to the target -. Configure SSH server -. Verify SSH public keys -. Verify it is not possible to access SSH on other IP address -. Disable SSH server - - -<<< - diff --git a/test/case/infix_services/ssh_server_config/Readme.adoc b/test/case/infix_services/ssh_server_config/Readme.adoc new file mode 120000 index 00000000..d7c2e770 --- /dev/null +++ b/test/case/infix_services/ssh_server_config/Readme.adoc @@ -0,0 +1 @@ +ssh_server_config.adoc \ No newline at end of file diff --git a/test/case/infix_services/ssh_server_config/ssh_server_config.adoc b/test/case/infix_services/ssh_server_config/ssh_server_config.adoc new file mode 100644 index 00000000..118881d8 --- /dev/null +++ b/test/case/infix_services/ssh_server_config/ssh_server_config.adoc @@ -0,0 +1,29 @@ +=== SSH server configuration +==== Description +Test SSH server functionality with pre-defined key pair: +1. Enable/Disable SSH service. +2. Configure listen address and port. +3. Validate connectivity using static key pair. + +==== Topology +ifdef::topdoc[] +image::../../test/case/infix_services/ssh_server_config/topology.svg[SSH server configuration topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ssh_server_config/topology.svg[SSH server configuration topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[SSH server configuration topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Setup topology and attach to the target +. Configure SSH server +. Verify SSH public keys +. Verify it is not possible to access SSH on other IP address +. Disable SSH server + + +<<< + diff --git a/test/case/misc/operational_all/Readme.adoc b/test/case/misc/operational_all/Readme.adoc deleted file mode 100644 index 8f1b05e0..00000000 --- a/test/case/misc/operational_all/Readme.adoc +++ /dev/null @@ -1,24 +0,0 @@ -=== Get operational -==== Description -Basic test just to get operational from test-config without errors. - -==== Topology -ifdef::topdoc[] -image::../../test/case/misc/operational_all/topology.svg[Get operational topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::operational_all/topology.svg[Get operational topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[Get operational topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUT -. Copy test-config to running configuration -. Get all Operational data from 'target', verify there are no errors - - -<<< - diff --git a/test/case/misc/operational_all/Readme.adoc b/test/case/misc/operational_all/Readme.adoc new file mode 120000 index 00000000..2c4ebf82 --- /dev/null +++ b/test/case/misc/operational_all/Readme.adoc @@ -0,0 +1 @@ +operational_all.adoc \ No newline at end of file diff --git a/test/case/misc/operational_all/operational_all.adoc b/test/case/misc/operational_all/operational_all.adoc new file mode 100644 index 00000000..8f1b05e0 --- /dev/null +++ b/test/case/misc/operational_all/operational_all.adoc @@ -0,0 +1,24 @@ +=== Get operational +==== Description +Basic test just to get operational from test-config without errors. + +==== Topology +ifdef::topdoc[] +image::../../test/case/misc/operational_all/topology.svg[Get operational topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::operational_all/topology.svg[Get operational topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[Get operational topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT +. Copy test-config to running configuration +. Get all Operational data from 'target', verify there are no errors + + +<<< + diff --git a/test/case/use_case/ospf_container/Readme.adoc b/test/case/use_case/ospf_container/Readme.adoc deleted file mode 100644 index a4b49793..00000000 --- a/test/case/use_case/ospf_container/Readme.adoc +++ /dev/null @@ -1,98 +0,0 @@ -=== OSPF Container -==== Description -This use-case test verifies connectivity in an OSPF network to services -running as hosted containers inside each router. - -NOTE: The _Controller_, _ABR_, and `data` connections are simulated by -the test PC. The `ringN` ports are connected to other DUTs via the test -PC, which can act as a link breaker. - -.Use-case overview. -[#img-overview] -ifdef::topdoc[] -image::../../test/case/use_case/ospf_container/overview.svg[] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ospf_container/overview.svg[] -endif::testgroup[] -ifndef::testgroup[] -image::overview.svg[] -endif::testgroup[] -endif::topdoc[] - -The DUTs are connected in a routed topology inside their own OSPF area. -A single area border router (ABR) is used to access the controller -network in OSPF area 0. Each router also has "test point" connections -where the controller can attach other than its connection in area 0. - - - The ringN ports are intended to be connected to neighboring DUTs, but - may at each end of the bus be used as test points - - The data ports are intended to be test points for verifying - connectivity with container B via br1 - - The uplink ports are for connecting to the ABR, at least one of the - DUTs should not have a connection to the ABR, this to verify routing - via another DUT - - Area 1 is 10.1.Rn.0/16, and each router is assigned a /24 - -Each DUT hosts one application container and one system container, all -have the same setup, with only different subnets assigned. A third -container is used to manipulate the firewall of each DUT, providing port -forwarding and masquerading. - -Devices attached to the first bridge, `br0`, are supposed to be easily -accesible using IPv4, so internally they use IPv4 too, and to avoid any -risk of clashing with external IP subnets, IPv4 link-local addresses are -employed: `br0` request 169.254.1.1, so the second container (B) always -can reach it, the first container (A) reqquest 169.254.1.2 and the -second (B) request 169.254.1.3. The network for devices attached to the -second bridge, `br1`, only use IPv6 link-local addresses. - -.Internal network setup, here router R1 on subnet 10.1.1.1/24. -[#img-setup] -ifdef::topdoc[] -image::../../test/case/use_case/ospf_container/internal-network.svg[Internal networks] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ospf_container/internal-network.svg[Internal networks] -endif::testgroup[] -ifndef::testgroup[] -image::internal-network.svg[Internal networks] -endif::testgroup[] -endif::topdoc[] - - - *Container A* runs a very basic web server, it runs on port 80 inside - the container, and `br0`, but is accessible outside on port 8080. - The controller connects to each of these servers from OSPF area 0. - For the controller to be able to distinguish between the servers, - they all serve slightly different content - - *Container B* runs a complete system with an SSH server. During the - test, the controller connects to this container using the `data` port - to ensure the container can access all other parts of the network. - To distinguish between the different container B's, each container - will have a unique hostname derived from the chassis MAC address - -==== Topology -ifdef::topdoc[] -image::../../test/case/use_case/ospf_container/topology.svg[OSPF Container topology] -endif::topdoc[] -ifndef::topdoc[] -ifdef::testgroup[] -image::ospf_container/topology.svg[OSPF Container topology] -endif::testgroup[] -ifndef::testgroup[] -image::topology.svg[OSPF Container topology] -endif::testgroup[] -endif::topdoc[] -==== Test sequence -. Set up topology and attach to target DUTs -. Configure DUTs -. Wait for all routers to peer -. Verify ABR:data can access container A on R1 (10.1.1.101) -. Verify ABR:data can access container A on R2 (10.1.2.101) -. Verify ABR:data can access container A on R3 (10.1.3.101) - - -<<< - diff --git a/test/case/use_case/ospf_container/Readme.adoc b/test/case/use_case/ospf_container/Readme.adoc new file mode 120000 index 00000000..4a180a39 --- /dev/null +++ b/test/case/use_case/ospf_container/Readme.adoc @@ -0,0 +1 @@ +ospf_container.adoc \ No newline at end of file diff --git a/test/case/use_case/ospf_container/ospf_container.adoc b/test/case/use_case/ospf_container/ospf_container.adoc new file mode 100644 index 00000000..a4b49793 --- /dev/null +++ b/test/case/use_case/ospf_container/ospf_container.adoc @@ -0,0 +1,98 @@ +=== OSPF Container +==== Description +This use-case test verifies connectivity in an OSPF network to services +running as hosted containers inside each router. + +NOTE: The _Controller_, _ABR_, and `data` connections are simulated by +the test PC. The `ringN` ports are connected to other DUTs via the test +PC, which can act as a link breaker. + +.Use-case overview. +[#img-overview] +ifdef::topdoc[] +image::../../test/case/use_case/ospf_container/overview.svg[] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ospf_container/overview.svg[] +endif::testgroup[] +ifndef::testgroup[] +image::overview.svg[] +endif::testgroup[] +endif::topdoc[] + +The DUTs are connected in a routed topology inside their own OSPF area. +A single area border router (ABR) is used to access the controller +network in OSPF area 0. Each router also has "test point" connections +where the controller can attach other than its connection in area 0. + + - The ringN ports are intended to be connected to neighboring DUTs, but + may at each end of the bus be used as test points + - The data ports are intended to be test points for verifying + connectivity with container B via br1 + - The uplink ports are for connecting to the ABR, at least one of the + DUTs should not have a connection to the ABR, this to verify routing + via another DUT + - Area 1 is 10.1.Rn.0/16, and each router is assigned a /24 + +Each DUT hosts one application container and one system container, all +have the same setup, with only different subnets assigned. A third +container is used to manipulate the firewall of each DUT, providing port +forwarding and masquerading. + +Devices attached to the first bridge, `br0`, are supposed to be easily +accesible using IPv4, so internally they use IPv4 too, and to avoid any +risk of clashing with external IP subnets, IPv4 link-local addresses are +employed: `br0` request 169.254.1.1, so the second container (B) always +can reach it, the first container (A) reqquest 169.254.1.2 and the +second (B) request 169.254.1.3. The network for devices attached to the +second bridge, `br1`, only use IPv6 link-local addresses. + +.Internal network setup, here router R1 on subnet 10.1.1.1/24. +[#img-setup] +ifdef::topdoc[] +image::../../test/case/use_case/ospf_container/internal-network.svg[Internal networks] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ospf_container/internal-network.svg[Internal networks] +endif::testgroup[] +ifndef::testgroup[] +image::internal-network.svg[Internal networks] +endif::testgroup[] +endif::topdoc[] + + - *Container A* runs a very basic web server, it runs on port 80 inside + the container, and `br0`, but is accessible outside on port 8080. + The controller connects to each of these servers from OSPF area 0. + For the controller to be able to distinguish between the servers, + they all serve slightly different content + - *Container B* runs a complete system with an SSH server. During the + test, the controller connects to this container using the `data` port + to ensure the container can access all other parts of the network. + To distinguish between the different container B's, each container + will have a unique hostname derived from the chassis MAC address + +==== Topology +ifdef::topdoc[] +image::../../test/case/use_case/ospf_container/topology.svg[OSPF Container topology] +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::ospf_container/topology.svg[OSPF Container topology] +endif::testgroup[] +ifndef::testgroup[] +image::topology.svg[OSPF Container topology] +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUTs +. Configure DUTs +. Wait for all routers to peer +. Verify ABR:data can access container A on R1 (10.1.1.101) +. Verify ABR:data can access container A on R2 (10.1.2.101) +. Verify ABR:data can access container A on R3 (10.1.3.101) + + +<<< +