From 32aa07e5517fba7f78ae79d2ba83b56f72a53293 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Thu, 1 Dec 2016 18:15:52 +0100 Subject: HONEYCOMB-58 - Routing Plugin Structure Read/Write support for ipv4/6 static routes. Restriction due to vpp implementation described in readme. Change-Id: I328f406a9b7cb8781f8becf98eca293cebe66859 Signed-off-by: Jan Srnicek --- .../ipv4/multiHopRouteWithClassifier.json | 31 ++++++++++++++++++++++ .../ipv4/multiHopRouteWithoutClassifier.json | 30 +++++++++++++++++++++ .../ipv4/simpleHopRouteWithClassifier.json | 17 ++++++++++++ .../ipv4/simpleHopRouteWithoutClassifier.json | 16 +++++++++++ .../resources/ipv4/specialHopRouteBlackhole.json | 13 +++++++++ .../resources/ipv4/specialHopRouteProhibited.json | 13 +++++++++ .../resources/ipv4/specialHopRouteReceive.json | 13 +++++++++ .../resources/ipv4/specialHopRouteUnreachable.json | 13 +++++++++ 8 files changed, 146 insertions(+) create mode 100644 routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json (limited to 'routing/routing-impl/src/test/resources/ipv4') 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 -- cgit 1.2.3-korg