summaryrefslogtreecommitdiffstats
path: root/routing/routing-impl/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'routing/routing-impl/src/test/resources')
-rw-r--r--routing/routing-impl/src/test/resources/init/config-data.json109
-rw-r--r--routing/routing-impl/src/test/resources/init/state-data.json109
-rw-r--r--routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json31
-rw-r--r--routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json30
-rw-r--r--routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json17
-rw-r--r--routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json16
-rw-r--r--routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json13
-rw-r--r--routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json13
-rw-r--r--routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json13
-rw-r--r--routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json13
-rw-r--r--routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithClassifier.json31
-rw-r--r--routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithoutClassifier.json30
-rw-r--r--routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithClassifier.json17
-rw-r--r--routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithoutClassifier.json16
-rw-r--r--routing/routing-impl/src/test/resources/ipv6/specialHopRouteBlackhole.json13
-rw-r--r--routing/routing-impl/src/test/resources/ipv6/specialHopRouteProhibited.json13
-rw-r--r--routing/routing-impl/src/test/resources/ipv6/specialHopRouteReceive.json13
-rw-r--r--routing/routing-impl/src/test/resources/ipv6/specialHopRouteUnreachable.json13
-rw-r--r--routing/routing-impl/src/test/resources/routing.json4
19 files changed, 514 insertions, 0 deletions
diff --git a/routing/routing-impl/src/test/resources/init/config-data.json b/routing/routing-impl/src/test/resources/init/config-data.json
new file mode 100644
index 000000000..05a888b30
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/init/config-data.json
@@ -0,0 +1,109 @@
+{
+ "routing": {
+ "routing-instance": {
+ "name": "routing-3",
+ "router-id": "192.168.2.1",
+ "routing-protocols": {
+ "routing-protocol": [
+ {
+ "name": "test-routing-protocol",
+ "type": "static",
+ "vpp-protocol-attributes": {
+ "primary-vrf": "1"
+ },
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.3/32",
+ "next-hop": "192.168.2.8",
+ "outgoing-interface": "local0",
+ "vpp-ipv4-route": {
+ "secondary-vrf": "1"
+ }
+ },
+ {
+ "id": 2,
+ "destination-prefix": "192.168.2.4/32",
+ "vpp-ipv4-route": {
+ "secondary-vrf": "1"
+ },
+ "next-hop-list": {
+ "next-hop": [
+ {
+ "id": "1",
+ "address": "192.168.2.5",
+ "outgoing-interface": "local0",
+ "weight": "1"
+ },
+ {
+ "id": "2",
+ "address": "192.168.2.6",
+ "outgoing-interface": "local0",
+ "weight": "2"
+ }
+ ]
+ }
+ },
+ {
+ "id": 3,
+ "destination-prefix": "192.168.2.5/32",
+ "special-next-hop": "receive"
+ }
+ ]
+ },
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64",
+ "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002",
+ "outgoing-interface": "GigabitEthernet0/8/0",
+ "vpp-ipv6-route": {
+ "secondary-vrf": "1"
+ }
+ },
+ {
+ "id": 2,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0008/64",
+ "vpp-ipv6-route": {
+ "secondary-vrf": "1"
+ },
+ "next-hop-list": {
+ "next-hop": [
+ {
+ "id": "1",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0003",
+ "outgoing-interface": "GigabitEthernet0/8/0",
+ "weight": "1"
+ },
+ {
+ "id": "2",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0004",
+ "outgoing-interface": "GigabitEthernet0/8/0",
+ "weight": "2"
+ },
+ {
+ "id": "3",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0005",
+ "outgoing-interface": "GigabitEthernet0/8/0",
+ "weight": "3"
+ }
+ ]
+ }
+ },
+ {
+ "id": 3,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0005/32",
+ "special-next-hop": "receive"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/init/state-data.json b/routing/routing-impl/src/test/resources/init/state-data.json
new file mode 100644
index 000000000..7830c8e0a
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/init/state-data.json
@@ -0,0 +1,109 @@
+{
+ "routing-state": {
+ "routing-instance": {
+ "name": "routing-3",
+ "router-id": "192.168.2.1",
+ "routing-protocols": {
+ "routing-protocol": [
+ {
+ "name": "test-routing-protocol",
+ "type": "static",
+ "vpp-protocol-state-attributes": {
+ "primary-vrf": "1"
+ },
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.3/32",
+ "next-hop": "192.168.2.8",
+ "outgoing-interface": "local0",
+ "vpp-ipv4-route-state": {
+ "secondary-vrf": "1"
+ }
+ },
+ {
+ "id": 2,
+ "destination-prefix": "192.168.2.4/32",
+ "vpp-ipv4-route-state": {
+ "secondary-vrf": "1"
+ },
+ "next-hop-list": {
+ "next-hop": [
+ {
+ "id": "1",
+ "address": "192.168.2.5",
+ "outgoing-interface": "local0",
+ "weight": "1"
+ },
+ {
+ "id": "2",
+ "address": "192.168.2.6",
+ "outgoing-interface": "local0",
+ "weight": "2"
+ }
+ ]
+ }
+ },
+ {
+ "id": 3,
+ "destination-prefix": "192.168.2.5/32",
+ "special-next-hop": "receive"
+ }
+ ]
+ },
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64",
+ "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002",
+ "outgoing-interface": "GigabitEthernet0/8/0",
+ "vpp-ipv6-route-state": {
+ "secondary-vrf": "1"
+ }
+ },
+ {
+ "id": 2,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0008/64",
+ "vpp-ipv6-route-state": {
+ "secondary-vrf": "1"
+ },
+ "next-hop-list": {
+ "next-hop": [
+ {
+ "id": "1",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0003",
+ "outgoing-interface": "GigabitEthernet0/8/0",
+ "weight": "1"
+ },
+ {
+ "id": "2",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0004",
+ "outgoing-interface": "GigabitEthernet0/8/0",
+ "weight": "2"
+ },
+ {
+ "id": "3",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0005",
+ "outgoing-interface": "GigabitEthernet0/8/0",
+ "weight": "3"
+ }
+ ]
+ }
+ },
+ {
+ "id": 3,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0005/32",
+ "special-next-hop": "receive"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json
new file mode 100644
index 000000000..99c987e03
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json
@@ -0,0 +1,31 @@
+{
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.1/24",
+ "vpp-ipv4-route": {
+ "classify-table": "classify-table-one"
+ },
+ "next-hop-list": {
+ "next-hop": [
+ {
+ "id": "1",
+ "address": "192.168.2.1",
+ "outgoing-interface": "iface",
+ "weight": "2"
+ },
+ {
+ "id": "2",
+ "address": "192.168.2.2",
+ "outgoing-interface": "iface",
+ "weight": "3"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json
new file mode 100644
index 000000000..d4d4a0693
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json
@@ -0,0 +1,30 @@
+{
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.1/24",
+ "vpp-ipv4-route": {
+ },
+ "next-hop-list": {
+ "next-hop": [
+ {
+ "id": "1",
+ "address": "192.168.2.1",
+ "outgoing-interface": "iface",
+ "weight": "2"
+ },
+ {
+ "id": "2",
+ "address": "192.168.2.2",
+ "outgoing-interface": "iface",
+ "weight": "3"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json
new file mode 100644
index 000000000..d00d9a06a
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json
@@ -0,0 +1,17 @@
+{
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.1/24",
+ "vpp-ipv4-route": {
+ "classify-table": "classify-table-one"
+ },
+ "next-hop": "192.168.2.2",
+ "outgoing-interface": "iface"
+ }
+ ]
+ }
+ }
+}
diff --git a/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json
new file mode 100644
index 000000000..0ef7cf765
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json
@@ -0,0 +1,16 @@
+{
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.1/24",
+ "vpp-ipv4-route": {
+ },
+ "next-hop": "192.168.2.2",
+ "outgoing-interface": "iface"
+ }
+ ]
+ }
+ }
+}
diff --git a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json
new file mode 100644
index 000000000..b2ddc238b
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json
@@ -0,0 +1,13 @@
+{
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.1/24",
+ "special-next-hop": "blackhole"
+ }
+ ]
+ }
+ }
+}
diff --git a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json
new file mode 100644
index 000000000..fe9faf44c
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json
@@ -0,0 +1,13 @@
+{
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.1/24",
+ "special-next-hop": "prohibit"
+ }
+ ]
+ }
+ }
+}
diff --git a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json
new file mode 100644
index 000000000..c967aa542
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json
@@ -0,0 +1,13 @@
+{
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.1/24",
+ "special-next-hop": "receive"
+ }
+ ]
+ }
+ }
+}
diff --git a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json
new file mode 100644
index 000000000..bae467fbd
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json
@@ -0,0 +1,13 @@
+{
+ "static-routes": {
+ "ipv4": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "192.168.2.1/24",
+ "special-next-hop": "unreachable"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithClassifier.json
new file mode 100644
index 000000000..c8b1e208e
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithClassifier.json
@@ -0,0 +1,31 @@
+{
+ "static-routes": {
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64",
+ "vpp-ipv6-route": {
+ "classify-table": "classify-table-one"
+ },
+ "next-hop-list": {
+ "next-hop": [
+ {
+ "id": "1",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002",
+ "outgoing-interface": "iface",
+ "weight": "2"
+ },
+ {
+ "id": "2",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002",
+ "outgoing-interface": "iface",
+ "weight": "2"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithoutClassifier.json
new file mode 100644
index 000000000..2e44ebcf5
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv6/multiHopRouteWithoutClassifier.json
@@ -0,0 +1,30 @@
+{
+ "static-routes": {
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64",
+ "vpp-ipv6-route": {
+ },
+ "next-hop-list": {
+ "next-hop": [
+ {
+ "id": "1",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002",
+ "outgoing-interface": "iface",
+ "weight": "2"
+ },
+ {
+ "id": "2",
+ "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002",
+ "outgoing-interface": "iface",
+ "weight": "2"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithClassifier.json
new file mode 100644
index 000000000..c011a8d01
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithClassifier.json
@@ -0,0 +1,17 @@
+{
+ "static-routes": {
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64",
+ "vpp-ipv6-route": {
+ "classify-table": "classify-table-one"
+ },
+ "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002",
+ "outgoing-interface": "iface"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithoutClassifier.json
new file mode 100644
index 000000000..1cb663ca7
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv6/simpleHopRouteWithoutClassifier.json
@@ -0,0 +1,16 @@
+{
+ "static-routes": {
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64",
+ "vpp-ipv6-route": {
+ },
+ "next-hop": "2001:0db8:0a0b:12f0:0000:0000:0000:0002",
+ "outgoing-interface": "iface"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteBlackhole.json b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteBlackhole.json
new file mode 100644
index 000000000..1cc319107
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteBlackhole.json
@@ -0,0 +1,13 @@
+{
+ "static-routes": {
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24",
+ "special-next-hop": "blackhole"
+ }
+ ]
+ }
+ }
+}
diff --git a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteProhibited.json b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteProhibited.json
new file mode 100644
index 000000000..d69e817d7
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteProhibited.json
@@ -0,0 +1,13 @@
+{
+ "static-routes": {
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24",
+ "special-next-hop": "prohibit"
+ }
+ ]
+ }
+ }
+}
diff --git a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteReceive.json b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteReceive.json
new file mode 100644
index 000000000..50d447de0
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteReceive.json
@@ -0,0 +1,13 @@
+{
+ "static-routes": {
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24",
+ "special-next-hop": "receive"
+ }
+ ]
+ }
+ }
+}
diff --git a/routing/routing-impl/src/test/resources/ipv6/specialHopRouteUnreachable.json b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteUnreachable.json
new file mode 100644
index 000000000..c874549d1
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/ipv6/specialHopRouteUnreachable.json
@@ -0,0 +1,13 @@
+{
+ "static-routes": {
+ "ipv6": {
+ "route": [
+ {
+ "id": 1,
+ "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/24",
+ "special-next-hop": "unreachable"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/routing/routing-impl/src/test/resources/routing.json b/routing/routing-impl/src/test/resources/routing.json
new file mode 100644
index 000000000..95f85414f
--- /dev/null
+++ b/routing/routing-impl/src/test/resources/routing.json
@@ -0,0 +1,4 @@
+{
+ "default-routing-instance-name": "vpp-routing-instance",
+ "learned-route-name-prefix": "learned-route"
+} \ No newline at end of file