summaryrefslogtreecommitdiffstats
path: root/tests/topotests/bgp_instance_del_test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/bgp_instance_del_test')
-rw-r--r--tests/topotests/bgp_instance_del_test/__init__.py0
l---------tests/topotests/bgp_instance_del_test/ce11
l---------tests/topotests/bgp_instance_del_test/ce21
l---------tests/topotests/bgp_instance_del_test/ce31
l---------tests/topotests/bgp_instance_del_test/ce41
l---------tests/topotests/bgp_instance_del_test/customize.py1
l---------tests/topotests/bgp_instance_del_test/r11
l---------tests/topotests/bgp_instance_del_test/r21
l---------tests/topotests/bgp_instance_del_test/r31
l---------tests/topotests/bgp_instance_del_test/r41
l---------tests/topotests/bgp_instance_del_test/scripts1
-rwxr-xr-xtests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py99
12 files changed, 109 insertions, 0 deletions
diff --git a/tests/topotests/bgp_instance_del_test/__init__.py b/tests/topotests/bgp_instance_del_test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/__init__.py
diff --git a/tests/topotests/bgp_instance_del_test/ce1 b/tests/topotests/bgp_instance_del_test/ce1
new file mode 120000
index 0000000..0924eb5
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/ce1
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/ce1 \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/ce2 b/tests/topotests/bgp_instance_del_test/ce2
new file mode 120000
index 0000000..8c7a677
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/ce2
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/ce2 \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/ce3 b/tests/topotests/bgp_instance_del_test/ce3
new file mode 120000
index 0000000..0abb8e5
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/ce3
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/ce3 \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/ce4 b/tests/topotests/bgp_instance_del_test/ce4
new file mode 120000
index 0000000..ddee1ef
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/ce4
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/ce4 \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/customize.py b/tests/topotests/bgp_instance_del_test/customize.py
new file mode 120000
index 0000000..99fcf39
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/customize.py
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/customize.py \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/r1 b/tests/topotests/bgp_instance_del_test/r1
new file mode 120000
index 0000000..16babfa
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/r1
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/r1 \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/r2 b/tests/topotests/bgp_instance_del_test/r2
new file mode 120000
index 0000000..e25b932
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/r2
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/r2 \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/r3 b/tests/topotests/bgp_instance_del_test/r3
new file mode 120000
index 0000000..0d7c189
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/r3
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/r3 \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/r4 b/tests/topotests/bgp_instance_del_test/r4
new file mode 120000
index 0000000..2d667d3
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/r4
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/r4 \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/scripts b/tests/topotests/bgp_instance_del_test/scripts
new file mode 120000
index 0000000..c46bf1f
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/scripts
@@ -0,0 +1 @@
+../bgp_l3vpn_to_bgp_vrf/scripts \ No newline at end of file
diff --git a/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py b/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py
new file mode 100755
index 0000000..0c7e84a
--- /dev/null
+++ b/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+
+#
+# Part of NetDEF Topology Tests
+#
+# Copyright (c) 2018, LabN Consulting, L.L.C.
+# Authored by Lou Berger <lberger@labn.net>
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+import os
+import sys
+import pytest
+
+sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
+
+from lib.ltemplate import *
+
+
+pytestmark = [pytest.mark.bgpd, pytest.mark.ldpd, pytest.mark.ospfd]
+
+
+def test_check_linux_vrf():
+ CliOnFail = None
+ # For debugging, uncomment the next line
+ # CliOnFail = 'tgen.mininet_cli'
+ CheckFunc = "ltemplateVersionCheck('4.1', iproute2='4.9')"
+ # uncomment next line to start cli *before* script is run
+ # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
+ ltemplateTest("scripts/check_linux_vrf.py", False, CliOnFail, CheckFunc)
+
+
+def test_adjacencies():
+ CliOnFail = None
+ # For debugging, uncomment the next line
+ # CliOnFail = 'tgen.mininet_cli'
+ CheckFunc = "ltemplateVersionCheck('4.1')"
+ # uncomment next line to start cli *before* script is run
+ # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
+ ltemplateTest("scripts/adjacencies.py", False, CliOnFail, CheckFunc)
+
+
+def SKIP_test_add_routes():
+ CliOnFail = None
+ # For debugging, uncomment the next line
+ # CliOnFail = 'tgen.mininet_cli'
+ CheckFunc = "ltemplateVersionCheck('4.1')"
+ # uncomment next line to start cli *before* script is run
+ # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
+ ltemplateTest("scripts/add_routes.py", False, CliOnFail, CheckFunc)
+
+
+def test_check_routes():
+ CliOnFail = None
+ # For debugging, uncomment the next line
+ # CliOnFail = 'tgen.mininet_cli'
+ CheckFunc = "ltemplateVersionCheck('4.1')"
+ # uncomment next line to start cli *before* script is run
+ # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
+ ltemplateTest("scripts/check_routes.py", False, CliOnFail, CheckFunc)
+
+
+# manual data path setup test - remove once have bgp/zebra vrf path working
+def test_check_linux_mpls():
+ CliOnFail = None
+ # For debugging, uncomment the next line
+ # CliOnFail = 'tgen.mininet_cli'
+ CheckFunc = "ltemplateVersionCheck('4.1', iproute2='4.9')"
+ # uncomment next line to start cli *before* script is run
+ # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True, iproute2=\'4.9\')'
+ ltemplateTest("scripts/check_linux_mpls.py", False, CliOnFail, CheckFunc)
+
+
+def test_del_bgp_instances():
+ CliOnFail = None
+ # For debugging, uncomment the next line
+ # CliOnFail = 'tgen.mininet_cli'
+ CheckFunc = "ltemplateVersionCheck('4.1')"
+ # uncomment next line to start cli *before* script is run
+ # CheckFunc = 'ltemplateVersionCheck(\'4.1\', cli=True)'
+ ltemplateTest("scripts/del_bgp_instances.py", False, CliOnFail, CheckFunc)
+
+
+if __name__ == "__main__":
+ retval = pytest.main(["-s"])
+ sys.exit(retval)