From 8f9fe3ca424abc56d212a96af4ec5750a29e7673 Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Fri, 4 May 2018 16:13:09 +0200 Subject: HC2VPP-253 - Bump routing models This patch updates (for support of SRv6 and MPLS) routing models to: - hc2vpp-ietf-routing@2018-03-13.yang (RFC 8349, https://tools.ietf.org/html/rfc8349) - hc2vpp-ietf-ipv4-unicast-routing@2018-03-13.yang (RFC 8349) - hc2vpp-ietf-ipv6-unicast-routing@2018-03-13.yang (RFC 8349) - hc2vpp-ietf-ipv6-router-advertisements@2018-03-13 (RFC 8349) - hc2vpp-ietf-routing-types@2017-12-04 (RFC 8294 ,https://tools.ietf.org/html/rfc8294) Due to odl bugs these models were changed, see HC2VPP-298 for more details. Significant changes in updated models: - Routing instance was removed, we used vpp-routing-instance as single instance before, which is no longer needed. - Routing-protocol and Routing-protocols were refactored to Control-plane-protocol/s. Control-protocol now uses type and name as key - Route Key was changed from id to ipPrefix - Next-hop and Next-Hop-list were refactored See attached routing_postman_collection.json for updated data structures and examples for both IPv4 and IPv6 routes. For router advertisements see routing_advertisments_postman_collection.json Another fixes in this patch: - fixes in MPLS module due to Routing model updates - fixes doc module due to changes in Routing model Change-Id: I33704a50061aef97dfbd73a7701ff6fe5274d6f0 Signed-off-by: Michal Cmarada --- .../yang/hc2vpp-ietf-mpls-static@2017-03-10.yang | 8 ++++---- .../src/main/yang/hc2vpp-ietf-mpls@2017-07-02.yang | 22 ++++++++++------------ mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang | 4 ++-- .../io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java | 2 +- .../java/io/fd/hc2vpp/mpls/MplsSwapWriter.java | 2 +- .../java/io/fd/hc2vpp/mpls/MplsWriterFactory.java | 2 +- .../io/fd/hc2vpp/mpls/ImposeAndForwardTest.java | 4 ++-- .../hc2vpp/mpls/MplsInterfaceCustomizerTest.java | 4 ++-- .../io/fd/hc2vpp/mpls/PopAndIpv4LookupTest.java | 4 ++-- .../io/fd/hc2vpp/mpls/PopAndMplsLookupTest.java | 4 ++-- .../java/io/fd/hc2vpp/mpls/SwapAndForwardTest.java | 4 ++-- 11 files changed, 29 insertions(+), 31 deletions(-) (limited to 'mpls') diff --git a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang index 143d87022..ae8688bbd 100644 --- a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang +++ b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang @@ -91,10 +91,10 @@ module hc2vpp-ietf-mpls-static { "This YANG module augments the 'ietf-routing' module with basic configuration and operational state data for MPLS static"; -/* -TODO: 2017-07-02 defines grouping in-segment but does not use it. -Bump to newer version after the issue is resolved. -*/ + /* + TODO: 2017-07-02 defines grouping in-segment but does not use it. + Bump to newer version after the issue is resolved. + */ revision "2017-03-10" { description "Latest revision: diff --git a/mpls/api/src/main/yang/hc2vpp-ietf-mpls@2017-07-02.yang b/mpls/api/src/main/yang/hc2vpp-ietf-mpls@2017-07-02.yang index 7aa1a5c35..16ac32cb9 100644 --- a/mpls/api/src/main/yang/hc2vpp-ietf-mpls@2017-07-02.yang +++ b/mpls/api/src/main/yang/hc2vpp-ietf-mpls@2017-07-02.yang @@ -78,9 +78,13 @@ module hc2vpp-ietf-mpls { } /* Identities */ - + /* + added "-identity" to resolve class naming conflicts + bug in mdsal reported here: https://jira.opendaylight.org/browse/MDSAL-332 + TODO(HC2VPP-298): remove "-identity" postfix when resolved + */ identity mpls { - base rt:address-family; + base rt:address-family-identity; description "This identity represents the MPLS address family."; } @@ -350,9 +354,6 @@ module hc2vpp-ietf-mpls { "MPLS local label."; } } -/* - TODO: we use older routing model which does not define next-hop container under route. - Uncomment following augmentation after HC2VPP-253 is resolved. augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { @@ -370,13 +371,10 @@ module hc2vpp-ietf-mpls { uses nhlfe-contents; } - */ - -/* - TODO(HC2VPP-253): we use older routing model which does not define active-route - as action but as an RPC. - Even after bump to ietf-routing@2016-08-18, we would fail due to - https://jira.opendaylight.org/browse/YANGTOOLS-822 + /* + TODO(HC2VPP-298): + needed to comment out action augmentations which caused problems. probapby simmilar to: + https://jira.opendaylight.org/browse/YANGTOOLS-841 augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/rt:input" { diff --git a/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang b/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang index c58478102..c417046c0 100644 --- a/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang +++ b/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang @@ -10,7 +10,7 @@ module vpp-mpls { import hc2vpp-ietf-routing { prefix "rt"; - revision-date 2014-05-24; + revision-date 2018-03-13; } import hc2vpp-ietf-mpls-static { @@ -110,4 +110,4 @@ module vpp-mpls { description "Augments static-lsp list entry with lookup options available in VPP."; } -} \ No newline at end of file +} diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java index 40efd75d6..5e384305c 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java @@ -41,7 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.out.segment.SimplePath; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.out.segment.path.list.Paths; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev170227.MplsLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsSwapWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsSwapWriter.java index 28aba7aa8..72d9c65ae 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsSwapWriter.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsSwapWriter.java @@ -34,7 +34,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.OutSegment; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.out.segment.SimplePath; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev170227.MplsLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsWriterFactory.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsWriterFactory.java index 918cc5cc6..d81d6fae3 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsWriterFactory.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsWriterFactory.java @@ -36,7 +36,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.Routing1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.interfaces.mpls.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.routing.Mpls; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.Routing; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev180313.Routing; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.StaticLspVppLookupAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.vpp.label.lookup.attributes.LabelLookup; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/ImposeAndForwardTest.java b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/ImposeAndForwardTest.java index 6eb559da8..ca687b502 100644 --- a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/ImposeAndForwardTest.java +++ b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/ImposeAndForwardTest.java @@ -50,8 +50,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLspKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.Routing1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.routing.Mpls; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.Routing; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev170227.MplsLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev180313.Routing; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class ImposeAndForwardTest extends WriterCustomizerTest implements ByteDataTranslator, MplsLabelTranslator { diff --git a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/MplsInterfaceCustomizerTest.java b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/MplsInterfaceCustomizerTest.java index 21551292b..1a86102cc 100644 --- a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/MplsInterfaceCustomizerTest.java +++ b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/MplsInterfaceCustomizerTest.java @@ -37,7 +37,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.interfaces.mpls.InterfaceKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.interfaces.mpls._interface.ConfigBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.routing.Mpls; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.Routing; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev180313.Routing; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class MplsInterfaceCustomizerTest extends WriterCustomizerTest implements ByteDataTranslator { @@ -107,4 +107,4 @@ public class MplsInterfaceCustomizerTest extends WriterCustomizerTest implements request.swIfIndex = IF_INDEX; return request; } -} \ No newline at end of file +} diff --git a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/PopAndIpv4LookupTest.java b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/PopAndIpv4LookupTest.java index 61e1c6d58..434f3b91d 100644 --- a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/PopAndIpv4LookupTest.java +++ b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/PopAndIpv4LookupTest.java @@ -41,8 +41,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLspKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.Routing1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.routing.Mpls; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.Routing; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev170227.MplsLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev180313.Routing; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.LookupType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.StaticLspVppLookupAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.StaticLspVppLookupAugmentationBuilder; diff --git a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/PopAndMplsLookupTest.java b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/PopAndMplsLookupTest.java index f5a76974a..a6bc3432a 100644 --- a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/PopAndMplsLookupTest.java +++ b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/PopAndMplsLookupTest.java @@ -41,8 +41,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLspKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.Routing1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.routing.Mpls; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.Routing; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev170227.MplsLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev180313.Routing; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.LookupType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.StaticLspVppLookupAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.StaticLspVppLookupAugmentationBuilder; diff --git a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/SwapAndForwardTest.java b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/SwapAndForwardTest.java index 5b0e124f0..4a962dd9f 100644 --- a/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/SwapAndForwardTest.java +++ b/mpls/impl/src/test/java/io/fd/hc2vpp/mpls/SwapAndForwardTest.java @@ -44,8 +44,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLspKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.Routing1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.routing.Mpls; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.Routing; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev170227.MplsLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev180313.Routing; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class SwapAndForwardTest extends WriterCustomizerTest implements ByteDataTranslator, MplsLabelTranslator { -- cgit 1.2.3-korg