From 765cb29e4c12c48fca6326c434b985e655bafc1a Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Thu, 12 Jan 2017 10:46:28 +0100 Subject: HONEYCOMB-325 - Null pointer while routing attr not defined Fixes multiple null pointers Change-Id: Iaa1df9a8b0a886d1835fe7cb87bcf7cf5130c6f5 Signed-off-by: Jan Srnicek --- .../ipv4/multiHopRouteWithClassifier.json | 31 ---------------------- .../ipv4/multiHopRouteWithoutClassifier.json | 30 --------------------- .../ipv4/multihop/multiHopRouteWithClassifier.json | 31 ++++++++++++++++++++++ .../multihop/multiHopRouteWithNoRouteAttrs.json | 28 +++++++++++++++++++ .../multihop/multiHopRouteWithoutClassifier.json | 30 +++++++++++++++++++++ .../ipv4/simpleHopRouteWithClassifier.json | 17 ------------ .../ipv4/simpleHopRouteWithoutClassifier.json | 16 ----------- .../ipv4/simplehop/simpleHopRouteNoRouteAttrs.json | 14 ++++++++++ .../simplehop/simpleHopRouteWithClassifier.json | 17 ++++++++++++ .../simplehop/simpleHopRouteWithoutClassifier.json | 16 +++++++++++ .../resources/ipv4/specialHopRouteBlackhole.json | 13 --------- .../resources/ipv4/specialHopRouteProhibited.json | 13 --------- .../resources/ipv4/specialHopRouteReceive.json | 13 --------- .../resources/ipv4/specialHopRouteUnreachable.json | 13 --------- .../ipv4/specialhop/specialHopRouteBlackhole.json | 13 +++++++++ .../ipv4/specialhop/specialHopRouteProhibited.json | 13 +++++++++ .../ipv4/specialhop/specialHopRouteReceive.json | 13 +++++++++ .../specialhop/specialHopRouteUnreachable.json | 13 +++++++++ 18 files changed, 188 insertions(+), 146 deletions(-) delete mode 100644 routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithoutClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithClassifier.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithoutClassifier.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json delete mode 100644 routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteBlackhole.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteProhibited.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteReceive.json create mode 100644 routing/routing-impl/src/test/resources/ipv4/specialhop/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 deleted file mode 100644 index 99c987e03..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithClassifier.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "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 deleted file mode 100644 index d4d4a0693..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/multiHopRouteWithoutClassifier.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "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/multihop/multiHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithClassifier.json new file mode 100644 index 000000000..99c987e03 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/multihop/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/multihop/multiHopRouteWithNoRouteAttrs.json b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json new file mode 100644 index 000000000..71cefa6cb --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json @@ -0,0 +1,28 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "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/multihop/multiHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithoutClassifier.json new file mode 100644 index 000000000..d4d4a0693 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/multihop/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 deleted file mode 100644 index d00d9a06a..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithClassifier.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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 deleted file mode 100644 index 0ef7cf765..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/simpleHopRouteWithoutClassifier.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "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/simplehop/simpleHopRouteNoRouteAttrs.json b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json new file mode 100644 index 000000000..d987bb6b1 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json @@ -0,0 +1,14 @@ +{ + "static-routes": { + "ipv4": { + "route": [ + { + "id": 1, + "destination-prefix": "192.168.2.1/24", + "next-hop": "192.168.2.2", + "outgoing-interface": "iface" + } + ] + } + } +} diff --git a/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithClassifier.json b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithClassifier.json new file mode 100644 index 000000000..d00d9a06a --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/simplehop/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/simplehop/simpleHopRouteWithoutClassifier.json b/routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithoutClassifier.json new file mode 100644 index 000000000..0ef7cf765 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/simplehop/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 deleted file mode 100644 index b2ddc238b..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteBlackhole.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "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 deleted file mode 100644 index fe9faf44c..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteProhibited.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "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 deleted file mode 100644 index c967aa542..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteReceive.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "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 deleted file mode 100644 index bae467fbd..000000000 --- a/routing/routing-impl/src/test/resources/ipv4/specialHopRouteUnreachable.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "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/ipv4/specialhop/specialHopRouteBlackhole.json b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteBlackhole.json new file mode 100644 index 000000000..b2ddc238b --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/specialhop/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/specialhop/specialHopRouteProhibited.json b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteProhibited.json new file mode 100644 index 000000000..fe9faf44c --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/specialhop/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/specialhop/specialHopRouteReceive.json b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteReceive.json new file mode 100644 index 000000000..c967aa542 --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/specialhop/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/specialhop/specialHopRouteUnreachable.json b/routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteUnreachable.json new file mode 100644 index 000000000..bae467fbd --- /dev/null +++ b/routing/routing-impl/src/test/resources/ipv4/specialhop/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