From 35799fa6ff3feb89ebb2ff9e0b8ad1e2ad699428 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 17 Jul 2018 08:57:41 +0200 Subject: Remove workarounds from ietf-routing-types related to MDSAL-269 Change-Id: Iadd17a3a44a20711e58c272934fb15dfe89bf2be Signed-off-by: Marek Gradzki --- .../yang/hc2vpp-ietf-mpls-static@2017-07-02.yang | 2 +- .../src/main/yang/hc2vpp-ietf-mpls@2017-07-02.yang | 2 +- .../io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java | 9 +- .../io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java | 6 +- .../java/io/fd/hc2vpp/mpls/MplsLabelReader.java | 70 ++ .../java/io/fd/hc2vpp/mpls/MplsSwapWriter.java | 2 +- .../io/fd/hc2vpp/mpls/ImposeAndForwardTest.java | 7 +- .../io/fd/hc2vpp/mpls/PopAndIpv4LookupTest.java | 6 +- .../io/fd/hc2vpp/mpls/PopAndMplsLookupTest.java | 3 +- .../java/io/fd/hc2vpp/mpls/SwapAndForwardTest.java | 8 +- .../yang/hc2vpp-ietf-routing-types@2017-12-04.yang | 785 --------------------- .../main/yang/ietf-routing-types@2017-12-04.yang | 772 ++++++++++++++++++++ .../yang/hc2vpp-ietf-srv6-base@2018-03-01.yang | 4 +- 13 files changed, 868 insertions(+), 808 deletions(-) create mode 100644 mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLabelReader.java delete mode 100755 routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-12-04.yang create mode 100755 routing/routing-api/src/main/yang/ietf-routing-types@2017-12-04.yang diff --git a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang index 9da4bb942..17e9cb599 100755 --- a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang +++ b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang @@ -19,7 +19,7 @@ module hc2vpp-ietf-mpls-static { prefix "rt"; } - import hc2vpp-ietf-routing-types { + import ietf-routing-types { prefix "rt-types"; } 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 5ca6981ee..a4dd23149 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 @@ -16,7 +16,7 @@ module hc2vpp-ietf-mpls { prefix "if"; } - import hc2vpp-ietf-routing-types { + import ietf-routing-types { prefix "rt-types"; } 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 6a09b3eb7..3402f8526 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 @@ -50,7 +50,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; * * @see ip_add_del_route definition */ -final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLabelTranslator { +final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLabelReader, MplsLabelTranslator { private final FutureJVppCore vppApi; private final NamingContext interfaceContext; @@ -119,7 +119,7 @@ final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLab final MplsLabel outgoingLabel = path.getSimplePath().getConfig().getOutgoingLabel(); checkArgument(outgoingLabel != null, "Configuring impose-and-forward, but outgoing-label is missing."); - request.nextHopOutLabelStack = new FibMplsLabel[] {translate(outgoingLabel.getValue())}; + request.nextHopOutLabelStack = new FibMplsLabel[] {translate(getLabelValue(outgoingLabel))}; request.nextHopNOutLabels = 1; return path.getSimplePath().getConfig().getOutgoingInterface(); @@ -145,8 +145,9 @@ final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLab checkArgument(numberOfLabels > 0 && numberOfLabels < MAX_LABELS, "Number of labels (%s) not in range (0, %s].", numberOfLabels, MAX_LABELS, numberOfLabels); request.nextHopNOutLabels = (byte) numberOfLabels; - request.nextHopOutLabelStack = labels.stream().map(label -> translate(label.getConfig().getLabel().getValue())) - .toArray(FibMplsLabel[]::new); + request.nextHopOutLabelStack = labels.stream() + .map(label -> translate(getLabelValue(label.getConfig().getLabel()))) + .toArray(FibMplsLabel[]::new); return paths.getPath().get(0).getConfig().getOutgoingInterface(); } diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java index e15e50a7d..110d3714e 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java @@ -27,12 +27,12 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati /** * Mixin that translates {@link InSegment} of {@link MplsLabel} type to {@link MplsRouteAddDel} message. */ -interface MplsInSegmentTranslator { +interface MplsInSegmentTranslator extends MplsLabelReader { + default void translate(@Nonnull final InSegment inSegment, @Nonnull final MplsRouteAddDel request) { checkArgument(inSegment != null, "Missing in-segment"); final Type type = inSegment.getConfig().getType(); checkArgument(type instanceof MplsLabel, "Expecting in-segment of type mpls-label, but %s given.", type); - final Long label = ((MplsLabel) type).getIncomingLabel().getValue(); - request.mrLabel = label.intValue(); + request.mrLabel = getLabelValue(((MplsLabel) type).getIncomingLabel()); } } diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLabelReader.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLabelReader.java new file mode 100644 index 000000000..0644cc869 --- /dev/null +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLabelReader.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.fd.hc2vpp.mpls; + +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.EntropyLabelIndicator; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.ExtensionLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.GalLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.ImplicitNullLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.Ipv4ExplicitNullLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.Ipv6ExplicitNullLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabelSpecialPurposeValue; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.OamAlertLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.RouterAlertLabel; + +/** + * Mixin that reads integer value of {@link MplsLabel}. + */ +interface MplsLabelReader { + + default int getLabelValue(final MplsLabel label) { + if (label.getMplsLabelGeneralUse() != null) { + return label.getMplsLabelGeneralUse().getValue().intValue(); + } else if (label.getMplsLabelSpecialPurpose() != null ) { + final Class specialLabel = + label.getMplsLabelSpecialPurpose(); + // Encoding of labels 0-3 + // https://tools.ietf.org/html/rfc3032#section-2.1 + if (Ipv4ExplicitNullLabel.class.equals(specialLabel)) { + return 0; + } else if (RouterAlertLabel.class.equals(specialLabel)) { + return 1; + } else if (Ipv6ExplicitNullLabel.class.equals(specialLabel)) { + return 2; + } else if (ImplicitNullLabel.class.equals(specialLabel)) { + return 3; + } else if (EntropyLabelIndicator.class.equals(specialLabel)) { + // https://tools.ietf.org/html/rfc6790#section-3 + return 7; + } else if (GalLabel.class.equals(specialLabel)) { + // https://tools.ietf.org/html/rfc5586#section-4 + return 13; + } else if (OamAlertLabel.class.equals(specialLabel)) { + // https://tools.ietf.org/html/rfc3429#section-3 + return 14; + } else if (ExtensionLabel.class.equals(specialLabel)) { + // https://tools.ietf.org/html/rfc7274#section-3.1 + return 15; + } else { + throw new IllegalArgumentException("Unsupported special purpose MPLS label: " + specialLabel); + } + } else { + throw new IllegalArgumentException("Unsupported MPLS label: " + label); + } + } +} 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 c8b47b8da..170cffd40 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 @@ -85,7 +85,7 @@ final class MplsSwapWriter implements LspWriter, Ipv4Translator, MplsInSegmentTr final MplsLabel outgoingLabel = path.getSimplePath().getConfig().getOutgoingLabel(); checkArgument(outgoingLabel != null, "Configuring swap-and-forward, but outgoing-label is missing."); - request.mrNextHopOutLabelStack = new FibMplsLabel[] {translate(outgoingLabel.getValue())}; + request.mrNextHopOutLabelStack = new FibMplsLabel[] {translate(getLabelValue(outgoingLabel))}; request.mrNextHopNOutLabels = 1; final String outgoingInterface = path.getSimplePath().getConfig().getOutgoingInterface(); 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 12312af37..bcd888bef 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 @@ -54,6 +54,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.routing.Mpls; 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.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabelGeneralUse; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class ImposeAndForwardTest extends WriterCustomizerTest implements ByteDataTranslator, MplsLabelTranslator { @@ -91,7 +92,7 @@ public class ImposeAndForwardTest extends WriterCustomizerTest implements ByteDa new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.simple.path.simple.path.ConfigBuilder() .setNextHop(nextHop) .setOutgoingInterface(IF_NAME) - .setOutgoingLabel(new MplsLabel(label)) + .setOutgoingLabel(new MplsLabel(new MplsLabelGeneralUse(label))) .build()).build()) .build()) .build(); @@ -133,13 +134,13 @@ public class ImposeAndForwardTest extends WriterCustomizerTest implements ByteDa new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.outgoing.labels.OutgoingLabelsBuilder() .setIndex((short) 0) .setConfig(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.outgoing.labels.outgoing.labels.ConfigBuilder() - .setLabel(new MplsLabel(102L)) + .setLabel(new MplsLabel(new MplsLabelGeneralUse(102L))) .build()) .build(), new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.outgoing.labels.OutgoingLabelsBuilder() .setIndex((short) 1) .setConfig(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.outgoing.labels.outgoing.labels.ConfigBuilder() - .setLabel(new MplsLabel(104L)) + .setLabel(new MplsLabel(new MplsLabelGeneralUse(104L))) .build()) .build())) .build()) 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 627c3294f..8ee6f1b5d 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 @@ -43,6 +43,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.routing.Mpls; 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.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabelGeneralUse; 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; @@ -76,9 +77,8 @@ public class PopAndIpv4LookupTest extends WriterCustomizerTest implements ByteDa new InSegmentBuilder() .setConfig( new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment.in.segment.ConfigBuilder() - .setType(new MplsLabelBuilder() - .setIncomingLabel(new MplsLabel((long) LOCAL_LABEL)) - .build()) + .setType(new MplsLabelBuilder().setIncomingLabel( + new MplsLabel(new MplsLabelGeneralUse((long) LOCAL_LABEL))).build()) .build()) .build() 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 ab069100b..1b347e263 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 @@ -43,6 +43,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.routing.Mpls; 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.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabelGeneralUse; 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; @@ -76,7 +77,7 @@ public class PopAndMplsLookupTest extends WriterCustomizerTest implements ByteDa new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment.in.segment.ConfigBuilder() .setType( new MplsLabelBuilder() - .setIncomingLabel(new MplsLabel((long) LOCAL_LABEL)) + .setIncomingLabel(new MplsLabel(new MplsLabelGeneralUse((long) LOCAL_LABEL))) .build()) .build()) .build() 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 677bb0914..0ed07097e 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 @@ -46,6 +46,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.routing.Mpls; 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.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabelGeneralUse; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class SwapAndForwardTest extends WriterCustomizerTest implements ByteDataTranslator, MplsLabelTranslator { @@ -77,8 +78,9 @@ public class SwapAndForwardTest extends WriterCustomizerTest implements ByteData new InSegmentBuilder() .setConfig( new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment.in.segment.ConfigBuilder() - .setType(new MplsLabelBuilder().setIncomingLabel(new MplsLabel((long) LOCAL_LABEL)) - .build()) + .setType(new MplsLabelBuilder() + .setIncomingLabel(new MplsLabel(new MplsLabelGeneralUse((long) LOCAL_LABEL))) + .build()) .build()) .build() ) @@ -92,7 +94,7 @@ public class SwapAndForwardTest extends WriterCustomizerTest implements ByteData new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.simple.path.simple.path.ConfigBuilder() .setNextHop(IpAddressBuilder.getDefaultInstance("10.10.24.4")) .setOutgoingInterface(IF_NAME) - .setOutgoingLabel(new MplsLabel((long) OUT_LABEL)) + .setOutgoingLabel(new MplsLabel(new MplsLabelGeneralUse((long) OUT_LABEL))) .build()) .build()) .build()) diff --git a/routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-12-04.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-12-04.yang deleted file mode 100755 index 46917a120..000000000 --- a/routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-12-04.yang +++ /dev/null @@ -1,785 +0,0 @@ -module hc2vpp-ietf-routing-types { - - namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; - prefix rt-types; - - /* - This models was modified due to ODL bugs described here: https://jira.fd.io/browse/HC2VPP-298. - Affected sections are renamed or commented, see comments below. - TODO: revert these changes and rename model to ietf-routing-types once bugs are fixed. - */ - - import ietf-yang-types { - prefix yang; - } - import ietf-inet-types { - prefix inet; - } - - organization - "IETF RTGWG - Routing Area Working Group"; - contact - "WG Web: - WG List: - - Editors: Xufeng Liu - - Yingzhen Qu - - Acee Lindem - - Christian Hopps - - Lou Berger - "; - - description - "This module contains a collection of YANG data types - considered generally useful for routing protocols. - - Copyright (c) 2017 IETF Trust and the persons - identified as authors of the code. All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, is permitted pursuant to, and subject - to the license terms contained in, the Simplified BSD License - set forth in Section 4.c of the IETF Trust's Legal Provisions - Relating to IETF Documents - (https://trustee.ietf.org/license-info). - - This version of this YANG module is part of RFC 8294; see - the RFC itself for full legal notices."; - revision 2017-12-04 { - description "Initial revision."; - reference - "RFC 8294: Common YANG Data Types for the Routing Area. - Section 3."; - } - - /*** Identities related to MPLS/GMPLS ***/ - - identity mpls-label-special-purpose-value { - description - "Base identity for deriving identities describing - special-purpose Multiprotocol Label Switching (MPLS) label - values."; - reference - "RFC 7274: Allocating and Retiring Special-Purpose MPLS - Labels."; - } - - identity ipv4-explicit-null-label { - base mpls-label-special-purpose-value; - description - "This identity represents the IPv4 Explicit NULL Label."; - reference - "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; - } - - identity router-alert-label { - base mpls-label-special-purpose-value; - description - "This identity represents the Router Alert Label."; - reference - "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; - } - - identity ipv6-explicit-null-label { - base mpls-label-special-purpose-value; - description - "This identity represents the IPv6 Explicit NULL Label."; - reference - "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; - } - - identity implicit-null-label { - base mpls-label-special-purpose-value; - description - "This identity represents the Implicit NULL Label."; - reference - "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; - } - - identity entropy-label-indicator { - base mpls-label-special-purpose-value; - description - "This identity represents the Entropy Label Indicator."; - reference - "RFC 6790: The Use of Entropy Labels in MPLS Forwarding. - Sections 3 and 10.1."; - } - - identity gal-label { - base mpls-label-special-purpose-value; - description - "This identity represents the Generic Associated Channel - (G-ACh) Label (GAL)."; - reference - "RFC 5586: MPLS Generic Associated Channel. - Sections 4 and 10."; - } - - identity oam-alert-label { - base mpls-label-special-purpose-value; - description - "This identity represents the OAM Alert Label."; - reference - "RFC 3429: Assignment of the 'OAM Alert Label' for - Multiprotocol Label Switching Architecture (MPLS) - Operation and Maintenance (OAM) Functions. - Sections 3 and 6."; - } - - identity extension-label { - base mpls-label-special-purpose-value; - description - "This identity represents the Extension Label."; - reference - "RFC 7274: Allocating and Retiring Special-Purpose MPLS - Labels. Sections 3.1 and 5."; - } - - /*** Collection of types related to routing ***/ - - typedef router-id { - type yang:dotted-quad; - description - "A 32-bit number in the dotted-quad format assigned to each - router. This number uniquely identifies the router within - an Autonomous System."; - } - - /*** Collection of types related to VPNs ***/ - - typedef route-target { - type string { - pattern - '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' - + '42949672[0-8][0-9]|' - + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' - + '42949[0-5][0-9]{4}|' - + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' - + '42[0-8][0-9]{7}|4[01][0-9]{8}|' - + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' - + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' - + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' - + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' - + '655[0-2][0-9]|' - + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' - + '(2:(429496729[0-5]|42949672[0-8][0-9]|' - + '4294967[01][0-9]{2}|' - + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' - + '4294[0-8][0-9]{5}|' - + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' - + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' - + '(6(:[a-fA-F0-9]{2}){6})|' - + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' - + '[0-9a-fA-F]{1,12})'; - } - - description - "A Route Target is an 8-octet BGP extended community - initially identifying a set of sites in a BGP VPN - (RFC 4364). However, it has since taken on a more general - role in BGP route filtering. A Route Target consists of two - or three fields: a 2-octet Type field, an administrator - field, and, optionally, an assigned number field. - - According to the data formats for types 0, 1, 2, and 6 as - defined in RFC 4360, RFC 5668, and RFC 7432, the encoding - pattern is defined as: - - 0:2-octet-asn:4-octet-number - 1:4-octet-ipv4addr:2-octet-number - 2:4-octet-asn:2-octet-number - 6:6-octet-mac-address - - Additionally, a generic pattern is defined for future - Route Target types: - - 2-octet-other-hex-number:6-octet-hex-number - - Some valid examples are 0:100:100, 1:1.1.1.1:100, - 2:1234567890:203, and 6:26:00:08:92:78:00."; - reference - "RFC 4360: BGP Extended Communities Attribute. - RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). - RFC 5668: 4-Octet AS Specific BGP Extended Community. - RFC 7432: BGP MPLS-Based Ethernet VPN."; - } - - typedef ipv6-route-target { - type string { - pattern - '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' - + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' - + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' - + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' - + ':' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; - pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' - + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' - + ':' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; - } - description - "An IPv6 Route Target is a 20-octet BGP IPv6 Address - Specific Extended Community serving the same function - as a standard 8-octet Route Target, except that it only - allows an IPv6 address as the global administrator. - The format is . - - Two valid examples are 2001:db8::1:6544 and - 2001:db8::5eb1:791:6b37:17958."; - reference - "RFC 5701: IPv6 Address Specific BGP Extended Community - Attribute."; - } - - typedef route-target-type { - type enumeration { - enum import { - value 0; - description - "The Route Target applies to route import."; - } - enum export { - value 1; - description - "The Route Target applies to route export."; - } - - enum both { - value 2; - description - "The Route Target applies to both route import and - route export."; - } - } - description - "Indicates the role a Route Target takes in route filtering."; - reference - "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; - } - - typedef route-distinguisher { - type string { - pattern - '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' - + '42949672[0-8][0-9]|' - + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' - + '42949[0-5][0-9]{4}|' - + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' - + '42[0-8][0-9]{7}|4[01][0-9]{8}|' - + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' - + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' - + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' - + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' - + '655[0-2][0-9]|' - + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' - + '(2:(429496729[0-5]|42949672[0-8][0-9]|' - + '4294967[01][0-9]{2}|' - + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' - + '4294[0-8][0-9]{5}|' - + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' - + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' - + '(6(:[a-fA-F0-9]{2}){6})|' - + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' - + '[0-9a-fA-F]{1,12})'; - } - - description - "A Route Distinguisher is an 8-octet value used to - distinguish routes from different BGP VPNs (RFC 4364). - A Route Distinguisher will have the same format as a - Route Target as per RFC 4360 and will consist of - two or three fields: a 2-octet Type field, an administrator - field, and, optionally, an assigned number field. - - According to the data formats for types 0, 1, 2, and 6 as - defined in RFC 4360, RFC 5668, and RFC 7432, the encoding - pattern is defined as: - - 0:2-octet-asn:4-octet-number - 1:4-octet-ipv4addr:2-octet-number - 2:4-octet-asn:2-octet-number - 6:6-octet-mac-address - - Additionally, a generic pattern is defined for future - route discriminator types: - - 2-octet-other-hex-number:6-octet-hex-number - - Some valid examples are 0:100:100, 1:1.1.1.1:100, - 2:1234567890:203, and 6:26:00:08:92:78:00."; - reference - "RFC 4360: BGP Extended Communities Attribute. - RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). - RFC 5668: 4-Octet AS Specific BGP Extended Community. - RFC 7432: BGP MPLS-Based Ethernet VPN."; - } - - typedef route-origin { - type string { - pattern - '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' - + '42949672[0-8][0-9]|' - + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' - + '42949[0-5][0-9]{4}|' - + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' - + '42[0-8][0-9]{7}|4[01][0-9]{8}|' - + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' - + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' - + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' - + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' - + '655[0-2][0-9]|' - + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' - + '(2:(429496729[0-5]|42949672[0-8][0-9]|' - + '4294967[01][0-9]{2}|' - + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' - + '4294[0-8][0-9]{5}|' - + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' - + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' - + '(6(:[a-fA-F0-9]{2}){6})|' - + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' - + '[0-9a-fA-F]{1,12})'; - } - description - "A Route Origin is an 8-octet BGP extended community - identifying the set of sites where the BGP route - originated (RFC 4364). A Route Origin will have the same - format as a Route Target as per RFC 4360 and will consist - of two or three fields: a 2-octet Type field, an - administrator field, and, optionally, an assigned number - field. - - According to the data formats for types 0, 1, 2, and 6 as - defined in RFC 4360, RFC 5668, and RFC 7432, the encoding - pattern is defined as: - - 0:2-octet-asn:4-octet-number - 1:4-octet-ipv4addr:2-octet-number - 2:4-octet-asn:2-octet-number - 6:6-octet-mac-address - Additionally, a generic pattern is defined for future - Route Origin types: - - 2-octet-other-hex-number:6-octet-hex-number - - Some valid examples are 0:100:100, 1:1.1.1.1:100, - 2:1234567890:203, and 6:26:00:08:92:78:00."; - reference - "RFC 4360: BGP Extended Communities Attribute. - RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). - RFC 5668: 4-Octet AS Specific BGP Extended Community. - RFC 7432: BGP MPLS-Based Ethernet VPN."; - } - - typedef ipv6-route-origin { - type string { - pattern - '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' - + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' - + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' - + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' - + ':' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; - pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' - + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' - + ':' - + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' - + '6[0-4][0-9]{3}|' - + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; - } - description - "An IPv6 Route Origin is a 20-octet BGP IPv6 Address - Specific Extended Community serving the same function - as a standard 8-octet route, except that it only allows - an IPv6 address as the global administrator. The format - is . - - Two valid examples are 2001:db8::1:6544 and - 2001:db8::5eb1:791:6b37:17958."; - reference - "RFC 5701: IPv6 Address Specific BGP Extended Community - Attribute."; - } - - /*** Collection of types common to multicast ***/ - - typedef ipv4-multicast-group-address { - type inet:ipv4-address { - pattern '(2((2[4-9])|(3[0-9]))\.).*'; - } - description - "This type represents an IPv4 multicast group address, - which is in the range of 224.0.0.0 to 239.255.255.255."; - reference - "RFC 1112: Host Extensions for IP Multicasting."; - } - - typedef ipv6-multicast-group-address { - type inet:ipv6-address { - pattern '(([fF]{2}[0-9a-fA-F]{2}):).*'; - } - description - "This type represents an IPv6 multicast group address, - which is in the range of ff00::/8."; - reference - "RFC 4291: IP Version 6 Addressing Architecture. Section 2.7. - RFC 7346: IPv6 Multicast Address Scopes."; - } - - typedef ip-multicast-group-address { - type union { - type ipv4-multicast-group-address; - type ipv6-multicast-group-address; - } - description - "This type represents a version-neutral IP multicast group - address. The format of the textual representation implies - the IP version."; - } - - typedef ipv4-multicast-source-address { - type union { - type enumeration { - enum '*' { - description - "Any source address."; - } - } - type inet:ipv4-address; - } - description - "Multicast source IPv4 address type."; - } - - typedef ipv6-multicast-source-address { - type union { - type enumeration { - enum '*' { - description - "Any source address."; - } - } - type inet:ipv6-address; - } - description - "Multicast source IPv6 address type."; - } - - /*** Collection of types common to protocols ***/ - - typedef bandwidth-ieee-float32 { - type string { - pattern - '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' - + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' - + '1[01][0-9]|0?[0-9]?[0-9])?)'; - } - description - "Bandwidth in IEEE 754 floating-point 32-bit binary format: - (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), - where Exponent uses 8 bits and Fraction uses 23 bits. - The units are octets per second. - The encoding format is the external hexadecimal-significant - character sequences specified in IEEE 754 and ISO/IEC C99. - The format is restricted to be normalized, non-negative, and - non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0, - where 'h' and 'H' are hexadecimal digits and 'd' and 'D' are - integers in the range of [0..127]. - When six hexadecimal digits are used for 'hhhhhh' or - 'HHHHHH', the least significant digit must be an even - number. 'x' and 'X' indicate hexadecimal; 'p' and 'P' - indicate a power of two. Some examples are 0x0p0, 0x1p10, - and 0x1.abcde2p+20."; - reference - "IEEE Std 754-2008: IEEE Standard for Floating-Point - Arithmetic. - ISO/IEC C99: Information technology - Programming - Languages - C."; - } - - typedef link-access-type { - type enumeration { - enum broadcast { - description - "Specify broadcast multi-access network."; - } - enum non-broadcast-multiaccess { - description - "Specify Non-Broadcast Multi-Access (NBMA) network."; - } - enum point-to-multipoint { - description - "Specify point-to-multipoint network."; - } - enum point-to-point { - description - "Specify point-to-point network."; - } - } - description - "Link access type."; - } - - typedef timer-multiplier { - type uint8; - description - "The number of timer value intervals that should be - interpreted as a failure."; - } - - typedef timer-value-seconds16 { - type union { - type uint16 { - range "1..65535"; - } - type enumeration { - enum infinity { - description - "The timer is set to infinity."; - } - enum not-set { - description - "The timer is not set."; - } - } - } - units "seconds"; - description - "Timer value type, in seconds (16-bit range)."; - } - - typedef timer-value-seconds32 { - type union { - type uint32 { - range "1..4294967295"; - } - type enumeration { - enum infinity { - description - "The timer is set to infinity."; - } - enum not-set { - description - "The timer is not set."; - } - } - } - units "seconds"; - description - "Timer value type, in seconds (32-bit range)."; - } - - typedef timer-value-milliseconds { - type union { - type uint32 { - range "1..4294967295"; - } - type enumeration { - enum infinity { - description - "The timer is set to infinity."; - } - enum not-set { - description - "The timer is not set."; - } - } - } - units "milliseconds"; - description - "Timer value type, in milliseconds."; - } - - typedef percentage { - type uint8 { - range "0..100"; - } - description - "Integer indicating a percentage value."; - } - - typedef timeticks64 { - type uint64; - description - "This type is based on the timeticks type defined in - RFC 6991, but with 64-bit width. It represents the time, - modulo 2^64, in hundredths of a second between two epochs."; - reference - "RFC 6991: Common YANG Data Types."; - } - - typedef uint24 { - type uint32 { - range "0..16777215"; - } - description - "24-bit unsigned integer."; - } - - /*** Collection of types related to MPLS/GMPLS ***/ - - typedef generalized-label { - type binary; - description - "Generalized Label. Nodes sending and receiving the - Generalized Label are aware of the link-specific - label context and type."; - reference - "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) - Signaling Functional Description. Section 3.2."; - } - - typedef mpls-label-special-purpose { - type identityref { - base mpls-label-special-purpose-value; - } - description - "This type represents the special-purpose MPLS label values."; - reference - "RFC 3032: MPLS Label Stack Encoding. - RFC 7274: Allocating and Retiring Special-Purpose MPLS - Labels."; - } - - typedef mpls-label-general-use { - type uint32 { - range "16..1048575"; - } - description - "The 20-bit label value in an MPLS label stack as specified - in RFC 3032. This label value does not include the - encodings of Traffic Class and TTL (Time to Live). - The label range specified by this type is for general use, - with special-purpose MPLS label values excluded."; - reference - "RFC 3032: MPLS Label Stack Encoding."; - } - - typedef mpls-label { - /* - TODO: binding generator creates invalid type bindings, so we changed type to uint32. - Change back after https://jira.opendaylight.org/browse/MDSAL-269 is resolved. - type union { - type mpls-label-special-purpose; - type mpls-label-general-use; - } - */ - type uint32 { - range "0..1048575"; - } - description - "The 20-bit label value in an MPLS label stack as specified - in RFC 3032. This label value does not include the - encodings of Traffic Class and TTL."; - reference - "RFC 3032: MPLS Label Stack Encoding."; - } - - /*** Groupings **/ - - grouping mpls-label-stack { - description - "This grouping specifies an MPLS label stack. The label - stack is encoded as a list of label stack entries. The - list key is an identifier that indicates the relative - ordering of each entry, with the lowest-value identifier - corresponding to the top of the label stack."; - container mpls-label-stack { - description - "Container for a list of MPLS label stack entries."; - list entry { - key "id"; - description - "List of MPLS label stack entries."; - leaf id { - type uint8; - description - "Identifies the entry in a sequence of MPLS label - stack entries. An entry with a smaller identifier - value precedes an entry with a larger identifier - value in the label stack. The value of this ID has - no semantic meaning other than relative ordering - and referencing the entry."; - } - leaf label { - type rt-types:mpls-label; - description - "Label value."; - } - - leaf ttl { - type uint8; - description - "Time to Live (TTL)."; - reference - "RFC 3032: MPLS Label Stack Encoding."; - } - leaf traffic-class { - type uint8 { - range "0..7"; - } - description - "Traffic Class (TC)."; - reference - "RFC 5462: Multiprotocol Label Switching (MPLS) Label - Stack Entry: 'EXP' Field Renamed to 'Traffic Class' - Field."; - } - } - } - } - - grouping vpn-route-targets { - description - "A grouping that specifies Route Target import-export rules - used in BGP-enabled VPNs."; - reference - "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). - RFC 4664: Framework for Layer 2 Virtual Private Networks - (L2VPNs)."; - list vpn-target { - key "route-target"; - description - "List of Route Targets."; - leaf route-target { - type rt-types:route-target; - description - "Route Target value."; - } - leaf route-target-type { - type rt-types:route-target-type; - mandatory true; - description - "Import/export type of the Route Target."; - } - } - } -} diff --git a/routing/routing-api/src/main/yang/ietf-routing-types@2017-12-04.yang b/routing/routing-api/src/main/yang/ietf-routing-types@2017-12-04.yang new file mode 100755 index 000000000..7680cc530 --- /dev/null +++ b/routing/routing-api/src/main/yang/ietf-routing-types@2017-12-04.yang @@ -0,0 +1,772 @@ +module ietf-routing-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; + prefix rt-types; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: + WG List: + + Editors: Xufeng Liu + + Yingzhen Qu + + Acee Lindem + + Christian Hopps + + Lou Berger + "; + + description + "This module contains a collection of YANG data types + considered generally useful for routing protocols. + + Copyright (c) 2017 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8294; see + the RFC itself for full legal notices."; + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 3."; + } + + /*** Identities related to MPLS/GMPLS ***/ + + identity mpls-label-special-purpose-value { + description + "Base identity for deriving identities describing + special-purpose Multiprotocol Label Switching (MPLS) label + values."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + identity ipv4-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv4 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity router-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Router Alert Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity ipv6-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv6 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity implicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Implicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity entropy-label-indicator { + base mpls-label-special-purpose-value; + description + "This identity represents the Entropy Label Indicator."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding. + Sections 3 and 10.1."; + } + + identity gal-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Generic Associated Channel + (G-ACh) Label (GAL)."; + reference + "RFC 5586: MPLS Generic Associated Channel. + Sections 4 and 10."; + } + + identity oam-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the OAM Alert Label."; + reference + "RFC 3429: Assignment of the 'OAM Alert Label' for + Multiprotocol Label Switching Architecture (MPLS) + Operation and Maintenance (OAM) Functions. + Sections 3 and 6."; + } + + identity extension-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Extension Label."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels. Sections 3.1 and 5."; + } + + /*** Collection of types related to routing ***/ + + typedef router-id { + type yang:dotted-quad; + description + "A 32-bit number in the dotted-quad format assigned to each + router. This number uniquely identifies the router within + an Autonomous System."; + } + + /*** Collection of types related to VPNs ***/ + + typedef route-target { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Target is an 8-octet BGP extended community + initially identifying a set of sites in a BGP VPN + (RFC 4364). However, it has since taken on a more general + role in BGP route filtering. A Route Target consists of two + or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + Route Target types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-target { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Target is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet Route Target, except that it only + allows an IPv6 address as the global administrator. + The format is . + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + typedef route-target-type { + type enumeration { + enum import { + value 0; + description + "The Route Target applies to route import."; + } + enum export { + value 1; + description + "The Route Target applies to route export."; + } + + enum both { + value 2; + description + "The Route Target applies to both route import and + route export."; + } + } + description + "Indicates the role a Route Target takes in route filtering."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; + } + + typedef route-distinguisher { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Distinguisher is an 8-octet value used to + distinguish routes from different BGP VPNs (RFC 4364). + A Route Distinguisher will have the same format as a + Route Target as per RFC 4360 and will consist of + two or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + route discriminator types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef route-origin { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A Route Origin is an 8-octet BGP extended community + identifying the set of sites where the BGP route + originated (RFC 4364). A Route Origin will have the same + format as a Route Target as per RFC 4360 and will consist + of two or three fields: a 2-octet Type field, an + administrator field, and, optionally, an assigned number + field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + Additionally, a generic pattern is defined for future + Route Origin types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-origin { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Origin is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet route, except that it only allows + an IPv6 address as the global administrator. The format + is . + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + /*** Collection of types common to multicast ***/ + + typedef ipv4-multicast-group-address { + type inet:ipv4-address { + pattern '(2((2[4-9])|(3[0-9]))\.).*'; + } + description + "This type represents an IPv4 multicast group address, + which is in the range of 224.0.0.0 to 239.255.255.255."; + reference + "RFC 1112: Host Extensions for IP Multicasting."; + } + + typedef ipv6-multicast-group-address { + type inet:ipv6-address { + pattern '(([fF]{2}[0-9a-fA-F]{2}):).*'; + } + description + "This type represents an IPv6 multicast group address, + which is in the range of ff00::/8."; + reference + "RFC 4291: IP Version 6 Addressing Architecture. Section 2.7. + RFC 7346: IPv6 Multicast Address Scopes."; + } + + typedef ip-multicast-group-address { + type union { + type ipv4-multicast-group-address; + type ipv6-multicast-group-address; + } + description + "This type represents a version-neutral IP multicast group + address. The format of the textual representation implies + the IP version."; + } + + typedef ipv4-multicast-source-address { + type union { + type enumeration { + enum '*' { + description + "Any source address."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IPv4 address type."; + } + + typedef ipv6-multicast-source-address { + type union { + type enumeration { + enum '*' { + description + "Any source address."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IPv6 address type."; + } + + /*** Collection of types common to protocols ***/ + + typedef bandwidth-ieee-float32 { + type string { + pattern + '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01][0-9]|0?[0-9]?[0-9])?)'; + } + description + "Bandwidth in IEEE 754 floating-point 32-bit binary format: + (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), + where Exponent uses 8 bits and Fraction uses 23 bits. + The units are octets per second. + The encoding format is the external hexadecimal-significant + character sequences specified in IEEE 754 and ISO/IEC C99. + The format is restricted to be normalized, non-negative, and + non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0, + where 'h' and 'H' are hexadecimal digits and 'd' and 'D' are + integers in the range of [0..127]. + When six hexadecimal digits are used for 'hhhhhh' or + 'HHHHHH', the least significant digit must be an even + number. 'x' and 'X' indicate hexadecimal; 'p' and 'P' + indicate a power of two. Some examples are 0x0p0, 0x1p10, + and 0x1.abcde2p+20."; + reference + "IEEE Std 754-2008: IEEE Standard for Floating-Point + Arithmetic. + ISO/IEC C99: Information technology - Programming + Languages - C."; + } + + typedef link-access-type { + type enumeration { + enum broadcast { + description + "Specify broadcast multi-access network."; + } + enum non-broadcast-multiaccess { + description + "Specify Non-Broadcast Multi-Access (NBMA) network."; + } + enum point-to-multipoint { + description + "Specify point-to-multipoint network."; + } + enum point-to-point { + description + "Specify point-to-point network."; + } + } + description + "Link access type."; + } + + typedef timer-multiplier { + type uint8; + description + "The number of timer value intervals that should be + interpreted as a failure."; + } + + typedef timer-value-seconds16 { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (16-bit range)."; + } + + typedef timer-value-seconds32 { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (32-bit range)."; + } + + typedef timer-value-milliseconds { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "milliseconds"; + description + "Timer value type, in milliseconds."; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value."; + } + + typedef timeticks64 { + type uint64; + description + "This type is based on the timeticks type defined in + RFC 6991, but with 64-bit width. It represents the time, + modulo 2^64, in hundredths of a second between two epochs."; + reference + "RFC 6991: Common YANG Data Types."; + } + + typedef uint24 { + type uint32 { + range "0..16777215"; + } + description + "24-bit unsigned integer."; + } + + /*** Collection of types related to MPLS/GMPLS ***/ + + typedef generalized-label { + type binary; + description + "Generalized Label. Nodes sending and receiving the + Generalized Label are aware of the link-specific + label context and type."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description. Section 3.2."; + } + + typedef mpls-label-special-purpose { + type identityref { + base mpls-label-special-purpose-value; + } + description + "This type represents the special-purpose MPLS label values."; + reference + "RFC 3032: MPLS Label Stack Encoding. + RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + typedef mpls-label-general-use { + type uint32 { + range "16..1048575"; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL (Time to Live). + The label range specified by this type is for general use, + with special-purpose MPLS label values excluded."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + typedef mpls-label { + type union { + type mpls-label-special-purpose; + type mpls-label-general-use; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + /*** Groupings **/ + + grouping mpls-label-stack { + description + "This grouping specifies an MPLS label stack. The label + stack is encoded as a list of label stack entries. The + list key is an identifier that indicates the relative + ordering of each entry, with the lowest-value identifier + corresponding to the top of the label stack."; + container mpls-label-stack { + description + "Container for a list of MPLS label stack entries."; + list entry { + key "id"; + description + "List of MPLS label stack entries."; + leaf id { + type uint8; + description + "Identifies the entry in a sequence of MPLS label + stack entries. An entry with a smaller identifier + value precedes an entry with a larger identifier + value in the label stack. The value of this ID has + no semantic meaning other than relative ordering + and referencing the entry."; + } + leaf label { + type rt-types:mpls-label; + description + "Label value."; + } + + leaf ttl { + type uint8; + description + "Time to Live (TTL)."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + leaf traffic-class { + type uint8 { + range "0..7"; + } + description + "Traffic Class (TC)."; + reference + "RFC 5462: Multiprotocol Label Switching (MPLS) Label + Stack Entry: 'EXP' Field Renamed to 'Traffic Class' + Field."; + } + } + } + } + + grouping vpn-route-targets { + description + "A grouping that specifies Route Target import-export rules + used in BGP-enabled VPNs."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs)."; + list vpn-target { + key "route-target"; + description + "List of Route Targets."; + leaf route-target { + type rt-types:route-target; + description + "Route Target value."; + } + leaf route-target-type { + type rt-types:route-target-type; + mandatory true; + description + "Import/export type of the Route Target."; + } + } + } +} diff --git a/srv6/srv6-api/src/main/yang/hc2vpp-ietf-srv6-base@2018-03-01.yang b/srv6/srv6-api/src/main/yang/hc2vpp-ietf-srv6-base@2018-03-01.yang index 4d41b4566..3a60767ee 100644 --- a/srv6/srv6-api/src/main/yang/hc2vpp-ietf-srv6-base@2018-03-01.yang +++ b/srv6/srv6-api/src/main/yang/hc2vpp-ietf-srv6-base@2018-03-01.yang @@ -15,12 +15,10 @@ module hc2vpp-ietf-srv6-base { prefix "yang"; } - // TODO: hc2vpp-298 - Renamed imports, because hc2vpp uses modified versions of these models. - import hc2vpp-ietf-routing-types { + import ietf-routing-types { prefix "rt-types"; } - // TODO: hc2vpp-298 - Renamed imports, because hc2vpp uses modified versions of these models. import hc2vpp-ietf-routing { prefix "rt"; -- cgit 1.2.3-korg