summaryrefslogtreecommitdiffstats
path: root/routing/routing-api/src/main/yang
diff options
context:
space:
mode:
Diffstat (limited to 'routing/routing-api/src/main/yang')
-rw-r--r--routing/routing-api/src/main/yang/hc2vpp-ietf-ipv4-unicast-routing@2017-09-17.yang446
-rwxr-xr-xrouting/routing-api/src/main/yang/hc2vpp-ietf-ipv4-unicast-routing@2018-03-13.yang395
-rwxr-xr-xrouting/routing-api/src/main/yang/hc2vpp-ietf-ipv6-router-advertisements@2018-03-13.yang501
-rw-r--r--routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-unicast-routing@2017-09-17.yang848
-rwxr-xr-xrouting/routing-api/src/main/yang/hc2vpp-ietf-ipv6-unicast-routing@2018-03-13.yang420
-rw-r--r--routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-02-27.yang725
-rwxr-xr-xrouting/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-12-04.yang793
-rw-r--r--routing/routing-api/src/main/yang/hc2vpp-ietf-routing@2014-05-24.yang1035
-rwxr-xr-xrouting/routing-api/src/main/yang/hc2vpp-ietf-routing@2018-03-13.yang740
-rw-r--r--routing/routing-api/src/main/yang/vpp-ipv4-unicast-routing@2018-03-19.yang78
-rw-r--r--routing/routing-api/src/main/yang/vpp-ipv6-unicast-routing@2018-03-19.yang78
-rw-r--r--routing/routing-api/src/main/yang/vpp-routing-ra@2018-03-19.yang (renamed from routing/routing-api/src/main/yang/vpp-routing-ra@2017-05-02.yang)23
-rw-r--r--routing/routing-api/src/main/yang/vpp-routing-types@2018-04-06.yang (renamed from routing/routing-api/src/main/yang/vpp-routing-table-lookup@2017-09-17.yang)47
-rw-r--r--routing/routing-api/src/main/yang/vpp-routing@2018-03-19.yang (renamed from routing/routing-api/src/main/yang/vpp-routing@2017-09-17.yang)29
14 files changed, 3065 insertions, 3093 deletions
diff --git a/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv4-unicast-routing@2017-09-17.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv4-unicast-routing@2017-09-17.yang
deleted file mode 100644
index 5357d1544..000000000
--- a/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv4-unicast-routing@2017-09-17.yang
+++ /dev/null
@@ -1,446 +0,0 @@
-module hc2vpp-ietf-ipv4-unicast-routing {
-
- namespace "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing";
-
- prefix "v4ur";
-
- import vpp-routing-table-lookup {
- prefix "vpp-tl";
- }
-
- import hc2vpp-ietf-routing {
- prefix "rt";
- revision-date 2014-05-24;
- }
-
- import ietf-inet-types {
- prefix "inet";
- }
-
- //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
- import vpp-routing {
- prefix vpp-r;
- }
-
- organization
- "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netmod/>
- WG List: <mailto:netmod@ietf.org>
-
- WG Chair: Thomas Nadeau
- <mailto:tnadeau@lucidvision.com>
-
- WG Chair: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>
-
- Editor: Ladislav Lhotka
- <mailto:lhotka@nic.cz>";
-
- description
- "This YANG module augments the 'ietf-routing' module with basic
- configuration and operational state data for IPv4 unicast
- routing.
-
- Copyright (c) 2014 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
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC XXXX; see the
- RFC itself for full legal notices.";
-
- revision 2017-09-17 {
- description
- "Table lookup support";
- }
-
- revision 2014-05-24 {
- description
- "Initial revision.";
- reference
- "RFC XXXX: A YANG Data Model for Routing Management";
- }
-
- /* Identities */
-
- identity ipv4-unicast {
- base rt:ipv4;
- description
- "This identity represents the IPv4 unicast address family.";
- }
-
- /* Operational state data */
-
- augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
- when "../../rt:address-family = 'v4ur:ipv4-unicast'" {
- description
- "This augment is valid only for IPv4 unicast.";
- }
- description
- "This leaf augments an IPv4 unicast route.";
- leaf destination-prefix {
- type inet:ipv4-prefix;
- description
- "IPv4 destination prefix.";
- }
- }
-
- augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
- + "rt:next-hop-options/rt:simple-next-hop" {
- when "../../rt:address-family = 'v4ur:ipv4-unicast'" {
- description
- "This augment is valid only for IPv4 unicast.";
- }
- description
- "This leaf augments the 'simple-next-hop' case of IPv4 unicast
- routes.";
- leaf next-hop {
- type inet:ipv4-address;
- description
- "IPv4 address of the next-hop.";
- }
- }
-
- augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
- + "rt:next-hop-options/rt:next-hop-list/rt:next-hop-list/"
- + "rt:next-hop" {
- when "../../../../rt:address-family = 'v4ur:ipv4-unicast'" {
- description
- "This augment is valid only for IPv4 unicast.";
- }
- if-feature rt:multipath-routes;
- description
- "This leaf augments the 'next-hop-list' case of IPv4 unicast
- routes.";
- leaf address {
- type inet:ipv4-address;
- description
- "IPv4 address of the next-hop.";
- }
- }
-
- //NODE Added same augmentation for operation state
- augment "/rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes" {
- description
- "This augment defines the configuration of the 'static'
- pseudo-protocol with data specific to IPv4 unicast.";
- container ipv4 {
- description
- "Configuration of a 'static' pseudo-protocol instance
- consists of a list of routes.";
- list route {
- key "id";
- ordered-by "user";
- description
- "A user-ordered list of static routes.";
- leaf id {
- type uint32 {
- //WARNING - range changed from 1..max to be mappable on vpp table ids
- range "0..max";
- }
- description
- "Unique numeric identifier of the route.
-
- This value is unrelated to system-assigned 'id'
- parameters of routes in RIBs.";
- }
- leaf description {
- type string;
- description
- "Textual description of the route.";
- }
- leaf destination-prefix {
- type inet:ipv4-prefix;
- mandatory "true";
- description
- "IPv4 destination prefix.";
- }
- choice next-hop-options {
- mandatory "true";
- description
- "Options for expressing the next-hop in static routes.";
- case special-next-hop {
- uses rt:special-next-hop-grouping;
- }
- // TODO - HONEYCOMB-398/HC2VPP-237
- case table-lookup {
- container table-lookup-params {
- uses vpp-tl:table-lookup-case-params;
- }
- }
-
- case simple-next-hop {
- leaf next-hop {
- type inet:ipv4-address;
- description
- "IPv4 address of the next-hop.";
- }
-
- //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
- + "rt:name";
- }
- description
- "Name of the outgoing interface.
-
- Only interfaces configured for the ancestor routing
- instance can be given.";
- }
- }
- case next-hop-list {
- if-feature rt:multipath-routes;
- container next-hop-list {
- description
- "Configuration of multiple next-hops.";
- list next-hop {
- key "id";
- description
- "An entry of a next-hop list.";
- leaf id {
- type uint32;
- description
- "Unique numeric identifier of the entry.
-
- This value is unrelated to system-assigned 'id'
- parameters of next-hops in RIBs.";
- }
- leaf address {
- type inet:ipv4-address;
- description
- "IPv4 address of the next-hop.";
- }
- //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:interfaces/"
- + "rt:interface/rt:name";
- }
- description
- "Name of the outgoing interface.
-
- Only interfaces configured for the ancestor
- routing instance can be given.";
- }
- uses rt:next-hop-classifiers {
- refine "priority" {
- default "primary";
- }
- refine "weight" {
- default "0";
- }
- }
- }
- }
- }
- }
-
- //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
- container vpp-ipv4-route-state{
- uses vpp-r:vpp-route-attributes;
- }
- }
- }
- }
-
-
- /* Configuration data */
-
- augment "/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes" {
- description
- "This augment defines the configuration of the 'static'
- pseudo-protocol with data specific to IPv4 unicast.";
- container ipv4 {
- description
- "Configuration of a 'static' pseudo-protocol instance
- consists of a list of routes.";
- list route {
- key "id";
- ordered-by "user";
- description
- "A user-ordered list of static routes.";
- leaf id {
- type uint32 {
- //WARNING - range changed from 1..max to be mappable on vpp table ids
- range "0..max";
- }
- description
- "Unique numeric identifier of the route.
-
- This value is unrelated to system-assigned 'id'
- parameters of routes in RIBs.";
- }
- leaf description {
- type string;
- description
- "Textual description of the route.";
- }
- leaf destination-prefix {
- type inet:ipv4-prefix;
- mandatory "true";
- description
- "IPv4 destination prefix.";
- }
- choice next-hop-options {
- mandatory "true";
- description
- "Options for expressing the next-hop in static routes.";
- case special-next-hop {
- uses rt:special-next-hop-grouping;
- }
- case simple-next-hop {
- leaf next-hop {
- type inet:ipv4-address;
- description
- "IPv4 address of the next-hop.";
- }
-
- //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
- + "rt:name";
- }
- description
- "Name of the outgoing interface.
-
- Only interfaces configured for the ancestor routing
- instance can be given.";
- }
- }
-
- // TODO - HONEYCOMB-398/HC2VPP-237
- case table-lookup {
- container table-lookup-params {
- uses vpp-tl:table-lookup-case-params;
- }
- }
-
- case next-hop-list {
- if-feature rt:multipath-routes;
- container next-hop-list {
- description
- "Configuration of multiple next-hops.";
- list next-hop {
- key "id";
- description
- "An entry of a next-hop list.";
- leaf id {
- type uint32;
- description
- "Unique numeric identifier of the entry.
-
- This value is unrelated to system-assigned 'id'
- parameters of next-hops in RIBs.";
- }
- leaf address {
- type inet:ipv4-address;
- description
- "IPv4 address of the next-hop.";
- }
- //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:interfaces/"
- + "rt:interface/rt:name";
- }
- description
- "Name of the outgoing interface.
-
- Only interfaces configured for the ancestor
- routing instance can be given.";
- }
- uses rt:next-hop-classifiers {
- refine "priority" {
- default "primary";
- }
- refine "weight" {
- default "0";
- }
- }
- }
- }
- }
- }
-
- //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
- container vpp-ipv4-route{
- uses vpp-r:vpp-route-attributes;
- }
- }
- }
- }
-
- /* RPC methods */
-
- augment "/rt:active-route/rt:input/rt:destination-address" {
- when "rt:address-family='v4ur:ipv4-unicast'" {
- description
- "This augment is valid only for IPv4 unicast.";
- }
- description
- "This leaf augments the 'rt:destination-address' parameter of
- the 'rt:active-route' operation.";
- leaf address {
- type inet:ipv4-address;
- description
- "IPv4 destination address.";
- }
- }
-
- augment "/rt:active-route/rt:output/rt:route" {
- when "rt:address-family='v4ur:ipv4-unicast'" {
- description
- "This augment is valid only for IPv4 unicast.";
- }
- description
- "This leaf augments the reply to the 'rt:active-route'
- operation.";
- leaf destination-prefix {
- type inet:ipv4-prefix;
- description
- "IPv4 destination prefix.";
- }
- }
-
- augment "/rt:active-route/rt:output/rt:route/rt:next-hop-options/"
- + "rt:simple-next-hop" {
- when "rt:address-family='v4ur:ipv4-unicast'" {
- description
- "This augment is valid only for IPv4 unicast.";
- }
- description
- "This leaf augments the 'simple-next-hop' case in the reply to
- the 'rt:active-route' operation.";
- leaf next-hop {
- type inet:ipv4-address;
- description
- "IPv4 address of the next-hop.";
- }
- }
-
- augment "/rt:active-route/rt:output/rt:route/rt:next-hop-options/"
- + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
- when "../../rt:address-family='v4ur:ipv4-unicast'" {
- description
- "This augment is valid only for IPv4 unicast.";
- }
- if-feature rt:multipath-routes;
- description
- "This leaf augments the 'next-hop-list' case in the reply to
- the 'rt:active-route' operation.";
- leaf address {
- type inet:ipv4-address;
- description
- "IPv4 address of the next-hop.";
- }
- }
-} \ No newline at end of file
diff --git a/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv4-unicast-routing@2018-03-13.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv4-unicast-routing@2018-03-13.yang
new file mode 100755
index 000000000..8d2f94848
--- /dev/null
+++ b/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv4-unicast-routing@2018-03-13.yang
@@ -0,0 +1,395 @@
+module hc2vpp-ietf-ipv4-unicast-routing {
+ yang-version "1.1";
+ namespace
+ "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing";
+ prefix "v4ur";
+
+ /*
+ 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-ipv4-unicast-routing once bugs are fixed.
+ */
+
+ import hc2vpp-ietf-routing {
+ prefix "rt";
+ description
+ "An 'ietf-routing' module version that is compatible with
+ the Network Management Datastore Architecture (NMDA)
+ is required.";
+ }
+
+ import ietf-inet-types {
+ prefix "inet";
+ }
+ organization
+ "IETF NETMOD (Network Modeling) Working Group";
+ contact
+ "WG Web: <https://datatracker.ietf.org/wg/netmod/>
+ WG List: <mailto:rtgwg@ietf.org>
+
+ Editor: Ladislav Lhotka
+ <mailto:lhotka@nic.cz>
+ Acee Lindem
+ <mailto:acee@cisco.com>
+ Yingzhen Qu
+ <mailto:yingzhen.qu@huawei.com>";
+
+ description
+ "This YANG module augments the 'ietf-routing' module with basic
+ parameters for IPv4 unicast routing. The model fully conforms
+ to the Network Management Datastore Architecture (NMDA).
+
+ Copyright (c) 2018 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 8349; see
+ the RFC itself for full legal notices.";
+
+ revision 2018-03-13 {
+ description
+ "Network Management Datastore Architecture (NMDA) revision.";
+ reference
+ "RFC 8349: A YANG Data Model for Routing Management
+ (NMDA Version)";
+ }
+
+ revision 2016-11-04 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8022: A YANG Data Model for Routing Management";
+ }
+
+ /* Identities */
+
+ identity ipv4-unicast {
+ base rt:ipv4;
+ description
+ "This identity represents the IPv4 unicast address family.";
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "This leaf augments an IPv4 unicast route.";
+ leaf destination-prefix {
+ type inet:ipv4-prefix;
+ description
+ "IPv4 destination prefix.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "Augments the 'simple-next-hop' case in IPv4 unicast routes.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/"
+ + "rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "This leaf augments the 'next-hop-list' case of IPv4 unicast
+ routes.";
+ leaf address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+
+ /*
+ TODO(HC2VPP-298):
+ needed to comment out action which caused problems probapby simmilar to:
+ https://jira.opendaylight.org/browse/YANGTOOLS-841
+
+ augment
+ "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" {
+ when "derived-from-or-self(../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast RIBs.";
+ }
+ description
+ "This augment adds the input parameter of the 'active-route'
+ action.";
+ leaf destination-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 destination address.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "This augment adds the destination prefix to the reply of the
+ 'active-route' action.";
+ leaf destination-prefix {
+ type inet:ipv4-prefix;
+ description
+ "IPv4 destination prefix.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "Augments the 'simple-next-hop' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ description
+ "Augments the 'next-hop-list' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ */
+
+ augment "/rt:routing/rt:control-plane-protocols/"
+ + "rt:control-plane-protocol/rt:static-routes" {
+ description
+ "This augment defines the 'static' pseudo-protocol
+ with data specific to IPv4 unicast.";
+ container ipv4 {
+ description
+ "Support for a 'static' pseudo-protocol instance
+ consists of a list of routes.";
+ list route {
+ key "destination-prefix";
+ description
+ "A list of static routes.";
+ leaf destination-prefix {
+ type inet:ipv4-prefix;
+ mandatory true;
+ description
+ "IPv4 destination prefix.";
+ }
+ leaf description {
+ type string;
+ description
+ "Textual description of the route.";
+ }
+ container next-hop {
+ description
+ "Support for next-hop.";
+ uses rt:next-hop-content {
+ augment "next-hop-options/simple-next-hop" {
+ description
+ "Augments the 'simple-next-hop' case in IPv4 static
+ routes.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ augment "next-hop-options/next-hop-list/next-hop-list/"
+ + "next-hop" {
+ description
+ "Augments the 'next-hop-list' case in IPv4 static
+ routes.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * The subsequent data nodes are obviated and obsoleted
+ * by the Network Management Datastore Architecture
+ * as described in RFC 8342.
+ */
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ status obsolete;
+ description
+ "This leaf augments an IPv4 unicast route.";
+ leaf destination-prefix {
+ type inet:ipv4-prefix;
+ status obsolete;
+ description
+ "IPv4 destination prefix.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" {
+ when "derived-from-or-self(
+ ../../../rt:address-family, 'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ status obsolete;
+ description
+ "Augments the 'simple-next-hop' case in IPv4 unicast routes.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ status obsolete;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/"
+ + "rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family,
+ 'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ status obsolete;
+ description
+ "This leaf augments the 'next-hop-list' case of IPv4 unicast
+ routes.";
+ leaf address {
+ type inet:ipv4-address;
+ status obsolete;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ /*
+ TODO(HC2VPP-298):
+ needed to comment out action 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" {
+ when "derived-from-or-self(../rt:address-family,
+ 'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast RIBs.";
+ }
+ status obsolete;
+ description
+ "This augment adds the input parameter of the 'active-route'
+ action.";
+ leaf destination-address {
+ type inet:ipv4-address;
+ status obsolete;
+ description
+ "IPv4 destination address.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route" {
+ when "derived-from-or-self(../../rt:address-family,
+ 'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ status obsolete;
+ description
+ "This augment adds the destination prefix to the reply of the
+ 'active-route' action.";
+ leaf destination-prefix {
+ type inet:ipv4-prefix;
+ status obsolete;
+ description
+ "IPv4 destination prefix.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family,
+ 'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ status obsolete;
+ description
+ "Augments the 'simple-next-hop' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ status obsolete;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family,
+ 'v4ur:ipv4-unicast')" {
+ description
+ "This augment is valid only for IPv4 unicast.";
+ }
+ status obsolete;
+ description
+ "Augments the 'next-hop-list' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv4-address;
+ status obsolete;
+ description
+ "IPv4 address of the next hop.";
+ }
+ }
+ */
+}
diff --git a/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-router-advertisements@2018-03-13.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-router-advertisements@2018-03-13.yang
new file mode 100755
index 000000000..9c33ffc94
--- /dev/null
+++ b/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-router-advertisements@2018-03-13.yang
@@ -0,0 +1,501 @@
+submodule hc2vpp-ietf-ipv6-router-advertisements {
+ yang-version "1.1";
+
+ belongs-to hc2vpp-ietf-ipv6-unicast-routing {
+ prefix "v6ur";
+ }
+
+ import ietf-inet-types {
+ prefix "inet";
+ }
+
+ import ietf-interfaces {
+ prefix "if";
+ description
+ "An 'ietf-interfaces' module version that is compatible with
+ the Network Management Datastore Architecture (NMDA)
+ is required.";
+ }
+
+ import ietf-ip {
+ prefix "ip";
+ description
+ "An 'ietf-ip' module version that is compatible with
+ the Network Management Datastore Architecture (NMDA)
+ is required.";
+ }
+
+ organization
+ "IETF NETMOD (Network Modeling) Working Group";
+ contact
+ "WG Web: <https://datatracker.ietf.org/wg/netmod/>
+ WG List: <mailto:rtgwg@ietf.org>
+
+ Editor: Ladislav Lhotka
+ <mailto:lhotka@nic.cz>
+ Acee Lindem
+ <mailto:acee@cisco.com>
+ Yingzhen Qu
+ <mailto:yingzhen.qu@huawei.com>";
+
+ description
+ "This YANG module augments the 'ietf-ip' module with
+ parameters for IPv6 Router Advertisements. The model fully
+ conforms to the Network Management Datastore
+ Architecture (NMDA).
+
+ Copyright (c) 2018 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 8349; see
+ the RFC itself for full legal notices.";
+
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)";
+
+ revision 2018-03-13 {
+ description
+ "Network Management Datastore Architecture (NMDA) revision.";
+ reference
+ "RFC 8349: A YANG Data Model for Routing Management
+ (NMDA Version)";
+ }
+
+ revision 2016-11-04 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8022: A YANG Data Model for Routing Management";
+ }
+
+ augment "/if:interfaces/if:interface/ip:ipv6" {
+ description
+ "Augments interface configuration with parameters of IPv6
+ Router Advertisements.";
+ container ipv6-router-advertisements {
+ description
+ "Support for IPv6 Router Advertisements.";
+ leaf send-advertisements {
+ type boolean;
+ default "false";
+ description
+ "A flag indicating whether or not the router sends
+ periodic Router Advertisements and responds to
+ Router Solicitations.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvSendAdvertisements";
+ }
+ leaf max-rtr-adv-interval {
+ type uint16 {
+ range "4..65535";
+ }
+ units "seconds";
+ default "600";
+ description
+ "The maximum time allowed between sending unsolicited
+ multicast Router Advertisements from the interface.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - MaxRtrAdvInterval";
+ }
+ leaf min-rtr-adv-interval {
+ type uint16 {
+ range "3..1350";
+ }
+ units "seconds";
+ must ". <= 0.75 * ../max-rtr-adv-interval" {
+ description
+ "The value MUST NOT be greater than 75% of
+ 'max-rtr-adv-interval'.";
+ }
+ description
+ "The minimum time allowed between sending unsolicited
+ multicast Router Advertisements from the interface.
+
+ The default value to be used operationally if this
+ leaf is not configured is determined as follows:
+
+ - if max-rtr-adv-interval >= 9 seconds, the default
+ value is 0.33 * max-rtr-adv-interval;
+
+ - otherwise, it is 0.75 * max-rtr-adv-interval.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - MinRtrAdvInterval";
+ }
+ leaf managed-flag {
+ type boolean;
+ default "false";
+ description
+ "The value to be placed in the 'Managed address
+ configuration' flag field in the Router
+ Advertisement.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvManagedFlag";
+ }
+ leaf other-config-flag {
+ type boolean;
+ default "false";
+ description
+ "The value to be placed in the 'Other configuration'
+ flag field in the Router Advertisement.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvOtherConfigFlag";
+ }
+ leaf link-mtu {
+ type uint32;
+ default "0";
+ description
+ "The value to be placed in MTU options sent by the
+ router. A value of zero indicates that no MTU options
+ are sent.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvLinkMTU";
+ }
+ leaf reachable-time {
+ type uint32 {
+ range "0..3600000";
+ }
+ units "milliseconds";
+ default "0";
+ description
+ "The value to be placed in the Reachable Time field in
+ the Router Advertisement messages sent by the router.
+ A value of zero means unspecified (by this router).";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvReachableTime";
+ }
+ leaf retrans-timer {
+ type uint32;
+ units "milliseconds";
+ default "0";
+ description
+ "The value to be placed in the Retrans Timer field in
+ the Router Advertisement messages sent by the router.
+ A value of zero means unspecified (by this router).";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvRetransTimer";
+ }
+ leaf cur-hop-limit {
+ type uint8;
+ description
+ "The value to be placed in the Cur Hop Limit field in
+ the Router Advertisement messages sent by the router.
+ A value of zero means unspecified (by this router).
+
+ If this parameter is not configured, the device SHOULD
+ use the IANA-specified value for the default IPv4
+ Time to Live (TTL) parameter that was in effect at the
+ time of implementation.";
+ reference
+ "RFC 3232: Assigned Numbers: RFC 1700 is Replaced by
+ an On-line Database
+ RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvCurHopLimit
+ IANA: IP Parameters
+ (https://www.iana.org/assignments/ip-parameters)";
+ }
+ leaf default-lifetime {
+ type uint16 {
+ range "0..65535";
+ }
+ units "seconds";
+ description
+ "The value to be placed in the Router Lifetime field of
+ Router Advertisements sent from the interface, in
+ seconds. It MUST be either zero or between
+ max-rtr-adv-interval and 9000 seconds. A value of zero
+ indicates that the router is not to be used as a
+ default router. These limits may be overridden by
+ specific documents that describe how IPv6 operates over
+ different link layers.
+
+ If this parameter is not configured, the device SHOULD
+ use a value of 3 * max-rtr-adv-interval.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvDefaultLifetime";
+ }
+ container prefix-list {
+ description
+ "Support for prefixes to be placed in Prefix
+ Information options in Router Advertisement messages
+ sent from the interface.
+
+ Prefixes that are advertised by default but do not
+ have their entries in the child 'prefix' list are
+ advertised with the default values of all parameters.
+
+ The link-local prefix SHOULD NOT be included in the
+ list of advertised prefixes.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+ - AdvPrefixList";
+ list prefix {
+ key "prefix-spec";
+ description
+ "Support for an advertised prefix entry.";
+ leaf prefix-spec {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 address prefix.";
+ }
+ choice control-adv-prefixes {
+ default "advertise";
+ description
+ "Either (1) the prefix is explicitly removed from the
+ set of advertised prefixes or (2) the parameters with
+ which the prefix is advertised are specified (default
+ case).";
+ leaf no-advertise {
+ type empty;
+ description
+ "The prefix will not be advertised.
+
+ This can be used for removing the prefix from
+ the default set of advertised prefixes.";
+ }
+ case advertise {
+ leaf valid-lifetime {
+ type uint32;
+ units "seconds";
+ default "2592000";
+ description
+ "The value to be placed in the Valid Lifetime
+ in the Prefix Information option. The
+ designated value of all 1's (0xffffffff)
+ represents infinity.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6
+ (IPv6) - AdvValidLifetime";
+ }
+ leaf on-link-flag {
+ type boolean;
+ default "true";
+ description
+ "The value to be placed in the on-link flag
+ ('L-bit') field in the Prefix Information
+ option.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6
+ (IPv6) - AdvOnLinkFlag";
+ }
+ leaf preferred-lifetime {
+ type uint32;
+ units "seconds";
+ must ". <= ../valid-lifetime" {
+ description
+ "This value MUST NOT be greater than
+ valid-lifetime.";
+ }
+ default "604800";
+ description
+ "The value to be placed in the Preferred
+ Lifetime in the Prefix Information option.
+ The designated value of all 1's (0xffffffff)
+ represents infinity.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6
+ (IPv6) - AdvPreferredLifetime";
+ }
+ leaf autonomous-flag {
+ type boolean;
+ default "true";
+ description
+ "The value to be placed in the Autonomous Flag
+ field in the Prefix Information option.";
+ reference
+ "RFC 4861: Neighbor Discovery for IP version 6
+ (IPv6) - AdvAutonomousFlag";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * The subsequent data nodes are obviated and obsoleted
+ * by the Network Management Datastore Architecture
+ * as described in RFC 8342.
+ */
+ augment "/if:interfaces-state/if:interface/ip:ipv6" {
+ status obsolete;
+ description
+ "Augments interface state data with parameters of IPv6
+ Router Advertisements.";
+ container ipv6-router-advertisements {
+ status obsolete;
+ description
+ "Parameters of IPv6 Router Advertisements.";
+ leaf send-advertisements {
+ type boolean;
+ status obsolete;
+ description
+ "A flag indicating whether or not the router sends
+ periodic Router Advertisements and responds to
+ Router Solicitations.";
+ }
+ leaf max-rtr-adv-interval {
+ type uint16 {
+ range "4..1800";
+ }
+ units "seconds";
+ status obsolete;
+ description
+ "The maximum time allowed between sending unsolicited
+ multicast Router Advertisements from the interface.";
+ }
+ leaf min-rtr-adv-interval {
+ type uint16 {
+ range "3..1350";
+ }
+ units "seconds";
+ status obsolete;
+ description
+ "The minimum time allowed between sending unsolicited
+ multicast Router Advertisements from the interface.";
+ }
+ leaf managed-flag {
+ type boolean;
+ status obsolete;
+ description
+ "The value that is placed in the 'Managed address
+ configuration' flag field in the Router Advertisement.";
+ }
+ leaf other-config-flag {
+ type boolean;
+ status obsolete;
+ description
+ "The value that is placed in the 'Other configuration' flag
+ field in the Router Advertisement.";
+ }
+ leaf link-mtu {
+ type uint32;
+ status obsolete;
+ description
+ "The value that is placed in MTU options sent by the
+ router. A value of zero indicates that no MTU options
+ are sent.";
+ }
+ leaf reachable-time {
+ type uint32 {
+ range "0..3600000";
+ }
+ units "milliseconds";
+ status obsolete;
+ description
+ "The value that is placed in the Reachable Time field in
+ the Router Advertisement messages sent by the router. A
+ value of zero means unspecified (by this router).";
+ }
+ leaf retrans-timer {
+ type uint32;
+ units "milliseconds";
+ status obsolete;
+ description
+ "The value that is placed in the Retrans Timer field in the
+ Router Advertisement messages sent by the router. A value
+ of zero means unspecified (by this router).";
+ }
+ leaf cur-hop-limit {
+ type uint8;
+ status obsolete;
+ description
+ "The value that is placed in the Cur Hop Limit field in the
+ Router Advertisement messages sent by the router. A value
+ of zero means unspecified (by this router).";
+ }
+ leaf default-lifetime {
+ type uint16 {
+ range "0..9000";
+ }
+ units "seconds";
+ status obsolete;
+ description
+ "The value that is placed in the Router Lifetime field of
+ Router Advertisements sent from the interface, in seconds.
+ A value of zero indicates that the router is not to be
+ used as a default router.";
+ }
+ container prefix-list {
+ status obsolete;
+ description
+ "A list of prefixes that are placed in Prefix Information
+ options in Router Advertisement messages sent from the
+ interface.
+
+ By default, these are all prefixes that the router
+ advertises via routing protocols as being on-link for the
+ interface from which the advertisement is sent.";
+ list prefix {
+ key "prefix-spec";
+ status obsolete;
+ description
+ "Advertised prefix entry and its parameters.";
+ leaf prefix-spec {
+ type inet:ipv6-prefix;
+ status obsolete;
+ description
+ "IPv6 address prefix.";
+ }
+ leaf valid-lifetime {
+ type uint32;
+ units "seconds";
+ status obsolete;
+ description
+ "The value that is placed in the Valid Lifetime in the
+ Prefix Information option. The designated value of
+ all 1's (0xffffffff) represents infinity.
+
+ An implementation SHOULD keep this value constant in
+ consecutive advertisements, except when it is
+ explicitly changed in configuration.";
+ }
+ leaf on-link-flag {
+ type boolean;
+ status obsolete;
+ description
+ "The value that is placed in the on-link flag ('L-bit')
+ field in the Prefix Information option.";
+ }
+ leaf preferred-lifetime {
+ type uint32;
+ units "seconds";
+ status obsolete;
+ description
+ "The value that is placed in the Preferred Lifetime in
+ the Prefix Information option, in seconds. The
+ designated value of all 1's (0xffffffff) represents
+ infinity.
+
+ An implementation SHOULD keep this value constant in
+ consecutive advertisements, except when it is
+ explicitly changed in configuration.";
+ }
+ leaf autonomous-flag {
+ type boolean;
+ status obsolete;
+ description
+ "The value that is placed in the Autonomous Flag field
+ in the Prefix Information option.";
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-unicast-routing@2017-09-17.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-unicast-routing@2017-09-17.yang
deleted file mode 100644
index 9d955dfaf..000000000
--- a/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-unicast-routing@2017-09-17.yang
+++ /dev/null
@@ -1,848 +0,0 @@
-module hc2vpp-ietf-ipv6-unicast-routing {
-
- namespace "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing";
-
- prefix "v6ur";
-
- import vpp-routing-table-lookup {
- prefix "vpp-tl";
- }
-
- import hc2vpp-ietf-routing {
- prefix "rt";
- revision-date 2014-05-24;
- }
-
- import ietf-inet-types {
- prefix "inet";
- }
-
- import ietf-interfaces {
- prefix "if";
- }
-
- import ietf-ip {
- prefix "ip";
- }
-
- //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
- import vpp-routing {
- prefix vpp-r;
- }
-
- organization
- "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netmod/>
- WG List: <mailto:netmod@ietf.org>
-
- WG Chair: Thomas Nadeau
- <mailto:tnadeau@lucidvision.com>
-
- WG Chair: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>
-
- Editor: Ladislav Lhotka
- <mailto:lhotka@nic.cz>";
-
- description
- "This YANG module augments the 'ietf-routing' module with basic
- configuration and operational state data for IPv6 unicast
- routing.
-
- Copyright (c) 2014 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
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC XXXX; see the
- RFC itself for full legal notices.";
-
- revision 2017-09-17 {
- description
- "Table lookup support";
- }
-
- revision 2014-05-25 {
- description
- "Initial revision.";
- reference
- "RFC XXXX: A YANG Data Model for Routing Management";
- }
-
- /* Identities */
-
- identity ipv6-unicast {
- base rt:ipv6;
- description
- "This identity represents the IPv6 unicast address family.";
- }
-
- /* Operational state data */
-
- augment "/rt:routing-state/rt:routing-instance/rt:interfaces/"
- + "rt:interface" {
- description
- "IPv6-specific parameters of router interfaces.";
- container ipv6-router-advertisements {
- description
- "Parameters of IPv6 Router Advertisements.";
- leaf send-advertisements {
- type boolean;
- description
- "A flag indicating whether or not the router sends periodic
- Router Advertisements and responds to Router
- Solicitations.";
- }
- leaf max-rtr-adv-interval {
- type uint16 {
- range "4..1800";
- }
- units "seconds";
- description
- "The maximum time allowed between sending unsolicited
- multicast Router Advertisements from the interface.";
- }
- leaf min-rtr-adv-interval {
- type uint16 {
- range "3..1350";
- }
- units "seconds";
- description
- "The minimum time allowed between sending unsolicited
- multicast Router Advertisements from the interface.";
- }
- leaf managed-flag {
- type boolean;
- description
- "The value that is placed in the 'Managed address
- configuration' flag field in the Router Advertisement.";
- }
- leaf other-config-flag {
- type boolean;
- description
- "The value that is placed in the 'Other configuration' flag
- field in the Router Advertisement.";
- }
- leaf link-mtu {
- type uint32;
- description
- "The value that is placed in MTU options sent by the
- router. A value of zero indicates that no MTU options are
- sent.";
- }
- leaf reachable-time {
- type uint32 {
- range "0..3600000";
- }
- units "milliseconds";
- description
- "The value that is placed in the Reachable Time field in
- the Router Advertisement messages sent by the router. A
- value of zero means unspecified (by this router).";
- }
- leaf retrans-timer {
- type uint32;
- units "milliseconds";
- description
- "The value that is placed in the Retrans Timer field in the
- Router Advertisement messages sent by the router. A value
- of zero means unspecified (by this router).";
- }
- leaf cur-hop-limit {
- type uint8;
- description
- "The value that is placed in the Cur Hop Limit field in the
- Router Advertisement messages sent by the router. A value
- of zero means unspecified (by this router).";
- }
- leaf default-lifetime {
- type uint16 {
- range "0..9000";
- }
- units "seconds";
- description
- "The value that is placed in the Router Lifetime field of
- Router Advertisements sent from the interface, in seconds.
- A value of zero indicates that the router is not to be
- used as a default router.";
- }
- container prefix-list {
- description
- "A list of prefixes that are placed in Prefix Information
- options in Router Advertisement messages sent from the
- interface.
-
- By default, these are all prefixes that the router
- advertises via routing protocols as being on-link for the
- interface from which the advertisement is sent.";
- list prefix {
- key "prefix-spec";
- description
- "Advertised prefix entry and its parameters.";
- leaf prefix-spec {
- type inet:ipv6-prefix;
- description
- "IPv6 address prefix.";
- }
- leaf valid-lifetime {
- type uint32;
- units "seconds";
- description
- "The value that is placed in the Valid Lifetime in the
- Prefix Information option. The designated value of all
- 1's (0xffffffff) represents infinity.";
- }
- leaf on-link-flag {
- type boolean;
- description
- "The value that is placed in the on-link flag ('L-bit')
- field in the Prefix Information option.";
- }
- leaf preferred-lifetime {
- type uint32;
- units "seconds";
- description
- "The value that is placed in the Preferred Lifetime in
- the Prefix Information option, in seconds. The
- designated value of all 1's (0xffffffff) represents
- infinity.";
- }
- leaf autonomous-flag {
- type boolean;
- description
- "The value that is placed in the Autonomous Flag field
- in the Prefix Information option.";
- }
- }
- }
- }
- }
-
- augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
- when "../../rt:address-family = 'v6ur:ipv6-unicast'" {
- description
- "This augment is valid only for IPv6 unicast.";
- }
- description
- "This leaf augments an IPv6 unicast route.";
- leaf destination-prefix {
- type inet:ipv6-prefix;
- description
- "IPv6 destination prefix.";
- }
- }
-
- augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
- + "rt:next-hop-options/rt:simple-next-hop" {
- when "../../rt:address-family = 'v6ur:ipv6-unicast'" {
- description
- "This augment is valid only for IPv6 unicast.";
- }
- description
- "This leaf augments the 'simple-next-hop' case of IPv6 unicast
- routes.";
- leaf next-hop {
- type inet:ipv6-address;
- description
- "IPv6 address of the next-hop.";
- }
- }
-
- augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
- + "rt:next-hop-options/rt:next-hop-list/rt:next-hop-list/"
- + "rt:next-hop" {
- when "../../../../rt:address-family = 'v6ur:ipv6-unicast'" {
- description
- "This augment is valid only for IPv6 unicast.";
- }
- if-feature rt:multipath-routes;
- description
- "This leaf augments the 'next-hop-list' case of IPv6 unicast
- routes.";
- leaf address {
- type inet:ipv6-address;
- description
- "IPv6 address of the next-hop.";
- }
- }
-
- /* Configuration data */
-
- augment
- "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface" {
- when "/if:interfaces/if:interface[if:name=current()/rt:name]/"
- + "ip:ipv6/ip:enabled='true'" {
- description
- "This augment is only valid for router interfaces with
- enabled IPv6.";
- }
- description
- "Configuration of IPv6-specific parameters of router
- interfaces.";
- container ipv6-router-advertisements {
- description
- "Configuration of IPv6 Router Advertisements.";
- leaf send-advertisements {
- type boolean;
- default "false";
- description
- "A flag indicating whether or not the router sends periodic
- Router Advertisements and responds to Router
- Solicitations.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvSendAdvertisements.";
- }
- leaf max-rtr-adv-interval {
- type uint16 {
- range "4..1800";
- }
- units "seconds";
- default "600";
- description
- "The maximum time allowed between sending unsolicited
- multicast Router Advertisements from the interface.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- MaxRtrAdvInterval.";
- }
- leaf min-rtr-adv-interval {
- type uint16 {
- range "3..1350";
- }
- units "seconds";
- must ". <= 0.75 * ../max-rtr-adv-interval" {
- description
- "The value MUST NOT be greater than 75 % of
- 'max-rtr-adv-interval'.";
- }
- description
- "The minimum time allowed between sending unsolicited
- multicast Router Advertisements from the interface.
-
- The default value to be used operationally if this leaf is
- not configured is determined as follows:
-
- - if max-rtr-adv-interval >= 9 seconds, the default value
- is 0.33 * max-rtr-adv-interval;
-
- - otherwise it is 0.75 * max-rtr-adv-interval.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- MinRtrAdvInterval.";
- }
- leaf managed-flag {
- type boolean;
- default "false";
- description
- "The value to be placed in the 'Managed address
- configuration' flag field in the Router Advertisement.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvManagedFlag.";
- }
- leaf other-config-flag {
- type boolean;
- default "false";
- description
- "The value to be placed in the 'Other configuration' flag
- field in the Router Advertisement.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvOtherConfigFlag.";
- }
- leaf link-mtu {
- type uint32;
- default "0";
- description
- "The value to be placed in MTU options sent by the router.
- A value of zero indicates that no MTU options are sent.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvLinkMTU.";
- }
- leaf reachable-time {
- type uint32 {
- range "0..3600000";
- }
- units "milliseconds";
- default "0";
- description
- "The value to be placed in the Reachable Time field in the
- Router Advertisement messages sent by the router. A value
- of zero means unspecified (by this router).";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvReachableTime.";
- }
- leaf retrans-timer {
- type uint32;
- units "milliseconds";
- default "0";
- description
- "The value to be placed in the Retrans Timer field in the
- Router Advertisement messages sent by the router. A value
- of zero means unspecified (by this router).";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvRetransTimer.";
- }
- leaf cur-hop-limit {
- type uint8;
- description
- "The value to be placed in the Cur Hop Limit field in the
- Router Advertisement messages sent by the router. A value
- of zero means unspecified (by this router).
-
- If this parameter is not configured, the device SHOULD use
- the value specified in IANA Assigned Numbers that was in
- effect at the time of implementation.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvCurHopLimit.
-
- IANA: IP Parameters,
- http://www.iana.org/assignments/ip-parameters";
- }
- leaf default-lifetime {
- type uint16 {
- range "0..9000";
- }
- units "seconds";
- description
- "The value to be placed in the Router Lifetime field of
- Router Advertisements sent from the interface, in seconds.
- It MUST be either zero or between max-rtr-adv-interval and
- 9000 seconds. A value of zero indicates that the router is
- not to be used as a default router. These limits may be
- overridden by specific documents that describe how IPv6
- operates over different link layers.
-
- If this parameter is not configured, the device SHOULD use
- a value of 3 * max-rtr-adv-interval.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvDefaultLifeTime.";
- }
- container prefix-list {
- description
- "Configuration of prefixes to be placed in Prefix
- Information options in Router Advertisement messages sent
- from the interface.
-
- Prefixes that are advertised by default but do not have
- their entries in the child 'prefix' list are advertised
- with the default values of all parameters.
-
- The link-local prefix SHOULD NOT be included in the list
- of advertised prefixes.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) -
- AdvPrefixList.";
- list prefix {
- key "prefix-spec";
- description
- "Configuration of an advertised prefix entry.";
- leaf prefix-spec {
- type inet:ipv6-prefix;
- description
- "IPv6 address prefix.";
- }
- choice control-adv-prefixes {
- default "advertise";
- description
- "The prefix either may be explicitly removed from the
- set of advertised prefixes, or parameters with which
- it is advertised may be specified (default case).";
- leaf no-advertise {
- type empty;
- description
- "The prefix will not be advertised.
-
- This can be used for removing the prefix from the
- default set of advertised prefixes.";
- }
- case advertise {
- leaf valid-lifetime {
- type uint32;
- units "seconds";
- default "2592000";
- description
- "The value to be placed in the Valid Lifetime in
- the Prefix Information option. The designated
- value of all 1's (0xffffffff) represents
- infinity.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6
- (IPv6) - AdvValidLifetime.";
- }
- leaf on-link-flag {
- type boolean;
- default "true";
- description
- "The value to be placed in the on-link flag
- ('L-bit') field in the Prefix Information
- option.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6
- (IPv6) - AdvOnLinkFlag.";
- }
- leaf preferred-lifetime {
- type uint32;
- units "seconds";
- must ". <= ../valid-lifetime" {
- description
- "This value MUST NOT be greater than
- valid-lifetime.";
- }
- default "604800";
- description
- "The value to be placed in the Preferred Lifetime
- in the Prefix Information option. The designated
- value of all 1's (0xffffffff) represents
- infinity.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6
- (IPv6) - AdvPreferredLifetime.";
- }
- leaf autonomous-flag {
- type boolean;
- default "true";
- description
- "The value to be placed in the Autonomous Flag
- field in the Prefix Information option.";
- reference
- "RFC 4861: Neighbor Discovery for IP version 6
- (IPv6) - AdvAutonomousFlag.";
- }
- }
- }
- }
- }
- }
- }
-
- //NOTE - added same augmentation for operational state
-
- augment "/rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes" {
- description
- "This augment defines the configuration of the 'static'
- pseudo-protocol with data specific to IPv6 unicast.";
- container ipv6 {
- description
- "Configuration of a 'static' pseudo-protocol instance
- consists of a list of routes.";
- list route {
- key "id";
- ordered-by "user";
- description
- "A user-ordered list of static routes.";
- leaf id {
- type uint32 {
- //WARNING - range changed from 1..max to be mappable on vpp table ids
- range "0..max";
- }
- description
- "Unique numeric identifier of the route.
-
- This value is unrelated to system-assigned 'id'
- parameters of routes in RIBs.";
- }
- leaf description {
- type string;
- description
- "Textual description of the route.";
- }
- leaf destination-prefix {
- type inet:ipv6-prefix;
- mandatory "true";
- description
- "IPv6 destination prefix.";
- }
- choice next-hop-options {
- mandatory "true";
- description
- "Options for expressing the next-hop in static routes.";
- case special-next-hop {
- //WARNING - changed, see ietf-routing.yang
- uses rt:special-next-hop-grouping;
- }
-
- // TODO - HONEYCOMB-398/HC2VPP-237
- case table-lookup {
- container table-lookup-params {
- uses vpp-tl:table-lookup-case-params;
- }
- }
-
- case simple-next-hop {
- leaf next-hop {
- type inet:ipv6-address;
- description
- "IPv6 address of the next-hop.";
- }
- //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
- + "rt:name";
- }
- description
- "Name of the outgoing interface.
-
- Only interfaces configured for the ancestor routing
- instance can be given.";
- }
- }
- case next-hop-list {
- if-feature rt:multipath-routes;
- container next-hop-list {
- description
- "Configuration of multiple next-hops.";
- list next-hop {
- key "id";
- description
- "An entry of a next-hop list.";
- leaf id {
- type uint32;
- description
- "Unique numeric identifier of the entry.
-
- This value is unrelated to system-assigned 'id'
- parameters of next-hops in RIBs.";
- }
- leaf address {
- type inet:ipv6-address;
- description
- "IPv6 address of the next-hop.";
- }
- //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
- + "rt:name";
- }
- description
- "Name of the outgoing interface.
-
- Only interfaces configured for the ancestor
- routing instance can be given.";
- }
- uses rt:next-hop-classifiers {
- refine "priority" {
- default "primary";
- }
- refine "weight" {
- default "0";
- }
- }
- }
- }
- }
- }
-
- //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
- container vpp-ipv6-route-state{
- uses vpp-r:vpp-route-attributes;
- }
- }
- }
- }
-
- augment "/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes" {
- description
- "This augment defines the configuration of the 'static'
- pseudo-protocol with data specific to IPv6 unicast.";
- container ipv6 {
- description
- "Configuration of a 'static' pseudo-protocol instance
- consists of a list of routes.";
- list route {
- key "id";
- ordered-by "user";
- description
- "A user-ordered list of static routes.";
- leaf id {
- type uint32 {
- //WARNING - range changed from 1..max to be mappable on vpp table ids
- range "0..max";
- }
- description
- "Unique numeric identifier of the route.
-
- This value is unrelated to system-assigned 'id'
- parameters of routes in RIBs.";
- }
- leaf description {
- type string;
- description
- "Textual description of the route.";
- }
- leaf destination-prefix {
- type inet:ipv6-prefix;
- mandatory "true";
- description
- "IPv6 destination prefix.";
- }
- choice next-hop-options {
- mandatory "true";
- description
- "Options for expressing the next-hop in static routes.";
- case special-next-hop {
- //WARNING - changed, see ietf-routing.yang
- uses rt:special-next-hop-grouping;
- }
-
- // TODO - HONEYCOMB-398/HC2VPP-237
- case table-lookup {
- container table-lookup-params {
- uses vpp-tl:table-lookup-case-params;
- }
- }
-
- case simple-next-hop {
- leaf next-hop {
- type inet:ipv6-address;
- description
- "IPv6 address of the next-hop.";
- }
- //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
- + "rt:name";
- }
- description
- "Name of the outgoing interface.
-
- Only interfaces configured for the ancestor routing
- instance can be given.";
- }
- }
- case next-hop-list {
- if-feature rt:multipath-routes;
- container next-hop-list {
- description
- "Configuration of multiple next-hops.";
- list next-hop {
- key "id";
- description
- "An entry of a next-hop list.";
- leaf id {
- type uint32;
- description
- "Unique numeric identifier of the entry.
-
- This value is unrelated to system-assigned 'id'
- parameters of next-hops in RIBs.";
- }
- leaf address {
- type inet:ipv6-address;
- description
- "IPv6 address of the next-hop.";
- }
- //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
- + "rt:name";
- }
- description
- "Name of the outgoing interface.
-
- Only interfaces configured for the ancestor
- routing instance can be given.";
- }
- uses rt:next-hop-classifiers {
- refine "priority" {
- default "primary";
- }
- refine "weight" {
- default "0";
- }
- }
- }
- }
- }
- }
-
- //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
- container vpp-ipv6-route{
- uses vpp-r:vpp-route-attributes;
- }
- }
- }
- }
-
- /* RPC methods */
-
- augment "/rt:active-route/rt:input/rt:destination-address" {
- when "rt:address-family='v6ur:ipv6-unicast'" {
- description
- "This augment is valid only for IPv6 unicast.";
- }
- description
- "This leaf augments the 'rt:destination-address' parameter of
- the 'rt:active-route' operation.";
- leaf address {
- type inet:ipv6-address;
- description
- "IPv6 destination address.";
- }
- }
-
- augment "/rt:active-route/rt:output/rt:route" {
- when "rt:address-family='v6ur:ipv6-unicast'" {
- description
- "This augment is valid only for IPv6 unicast.";
- }
- description
- "This leaf augments the reply to the 'rt:active-route'
- operation.";
- leaf destination-prefix {
- type inet:ipv6-prefix;
- description
- "IPv6 destination prefix.";
- }
- }
-
- augment "/rt:active-route/rt:output/rt:route/rt:next-hop-options/"
- + "rt:simple-next-hop" {
- when "rt:address-family='v6ur:ipv6-unicast'" {
- description
- "This augment is valid only for IPv6 unicast.";
- }
- description
- "This leaf augments the 'simple-next-hop' case in the reply to
- the 'rt:active-route' operation.";
- leaf next-hop {
- type inet:ipv6-address;
- description
- "IPv6 address of the next-hop.";
- }
- }
-
- augment "/rt:active-route/rt:output/rt:route/rt:next-hop-options/"
- + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
- when "../../rt:address-family='v6ur:ipv6-unicast'" {
- description
- "This augment is valid only for IPv6 unicast.";
- }
- if-feature rt:multipath-routes;
- description
- "This leaf augments the 'next-hop-list' case in the reply to
- the 'rt:active-route' operation.";
- leaf address {
- type inet:ipv6-address;
- description
- "IPv6 address of the next-hop.";
- }
- }
-} \ No newline at end of file
diff --git a/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-unicast-routing@2018-03-13.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-unicast-routing@2018-03-13.yang
new file mode 100755
index 000000000..664bce29f
--- /dev/null
+++ b/routing/routing-api/src/main/yang/hc2vpp-ietf-ipv6-unicast-routing@2018-03-13.yang
@@ -0,0 +1,420 @@
+module hc2vpp-ietf-ipv6-unicast-routing {
+ yang-version "1.1";
+ namespace
+ "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing";
+ prefix "v6ur";
+
+ /*
+ 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-ipv6-unicast-routing once bugs are fixed.
+ */
+
+ import hc2vpp-ietf-routing {
+ prefix "rt";
+ description
+ "An 'ietf-routing' module version that is compatible with
+ the Network Management Datastore Architecture (NMDA)
+ is required.";
+ }
+
+ import ietf-inet-types {
+ prefix "inet";
+ description
+ "An 'ietf-interfaces' module version that is compatible with
+ the Network Management Datastore Architecture (NMDA)
+ is required.";
+ }
+
+ /*
+ Copied ietf-ip import from hc2vpp-ietf-ipv6-router-advertisements as a workaround
+ for https://jira.opendaylight.org/browse/YANGTOOLS-876.
+
+ TODO: Remove ietf-ip import once YANGTOOLS-876 is fixed and HC adapts to proper yangtools version.
+ Bug fix will be available in yangtools 2.0.4 version.
+ */
+ import ietf-ip {
+ prefix "ip";
+ description
+ "An 'ietf-ip' module version that is compatible with
+ the Network Management Datastore Architecture (NMDA)
+ is required.";
+ }
+
+ include hc2vpp-ietf-ipv6-router-advertisements {
+ revision-date 2018-03-13;
+ }
+
+ organization
+ "IETF NETMOD (Network Modeling) Working Group";
+ contact
+ "WG Web: <https://datatracker.ietf.org/wg/netmod/>
+ WG List: <mailto:rtgwg@ietf.org>
+
+ Editor: Ladislav Lhotka
+ <mailto:lhotka@nic.cz>
+ Acee Lindem
+ <mailto:acee@cisco.com>
+ Yingzhen Qu
+ <mailto:yingzhen.qu@huawei.com>";
+
+ description
+ "This YANG module augments the 'ietf-routing' module with basic
+ parameters for IPv6 unicast routing. The model fully conforms
+ to the Network Management Datastore Architecture (NMDA).
+
+ Copyright (c) 2018 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 8349; see
+ the RFC itself for full legal notices.";
+
+ revision 2018-03-13 {
+ description
+ "Network Management Datastore Architecture (NMDA) revision.";
+ reference
+ "RFC 8349: A YANG Data Model for Routing Management
+ (NMDA Version)";
+ }
+
+ /* Identities */
+
+ revision 2016-11-04 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8022: A YANG Data Model for Routing Management";
+ }
+
+ identity ipv6-unicast {
+ base rt:ipv6;
+ description
+ "This identity represents the IPv6 unicast address family.";
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "This leaf augments an IPv6 unicast route.";
+ leaf destination-prefix {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 destination prefix.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "Augments the 'simple-next-hop' case in IPv6 unicast routes.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/"
+ + "rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "This leaf augments the 'next-hop-list' case of IPv6 unicast
+ routes.";
+ leaf address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ /*
+ TODO(HC2VPP-298):
+ needed to comment out action which caused problems probapby simmilar to:
+ https://jira.opendaylight.org/browse/YANGTOOLS-841
+
+ augment
+ "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" {
+ when "derived-from-or-self(../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast RIBs.";
+ }
+ description
+ "This augment adds the input parameter of the 'active-route'
+ action.";
+ leaf destination-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 destination address.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route" {
+ when "derived-from-or-self(../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "This augment adds the destination prefix to the reply of the
+ 'active-route' action.";
+ leaf destination-prefix {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 destination prefix.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "Augments the 'simple-next-hop' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+
+ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family, "
+ + "'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ description
+ "Augments the 'next-hop-list' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ */
+
+ /* Data node augmentations */
+
+ augment "/rt:routing/rt:control-plane-protocols/"
+ + "rt:control-plane-protocol/rt:static-routes" {
+ description
+ "This augment defines the 'static' pseudo-protocol
+ with data specific to IPv6 unicast.";
+ container ipv6 {
+ description
+ "Support for a 'static' pseudo-protocol instance
+ consists of a list of routes.";
+ list route {
+ key "destination-prefix";
+ description
+ "A list of static routes.";
+ leaf destination-prefix {
+ type inet:ipv6-prefix;
+ mandatory true;
+ description
+ "IPv6 destination prefix.";
+ }
+ leaf description {
+ type string;
+ description
+ "Textual description of the route.";
+ }
+ container next-hop {
+ description
+ "Next hop for the route.";
+ uses rt:next-hop-content {
+ augment "next-hop-options/simple-next-hop" {
+ description
+ "Augments the 'simple-next-hop' case in IPv6 static
+ routes.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ augment "next-hop-options/next-hop-list/next-hop-list/"
+ + "next-hop" {
+ description
+ "Augments the 'next-hop-list' case in IPv6 static
+ routes.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * The subsequent data nodes are obviated and obsoleted
+ * by the Network Management Datastore Architecture
+ * as described in RFC 8342.
+ */
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
+ when "derived-from-or-self(../../rt:address-family,
+ 'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ status obsolete;
+ description
+ "This leaf augments an IPv6 unicast route.";
+ leaf destination-prefix {
+ type inet:ipv6-prefix;
+ status obsolete;
+ description
+ "IPv6 destination prefix.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family,
+ 'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ status obsolete;
+ description
+ "Augments the 'simple-next-hop' case in IPv6 unicast routes.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ status obsolete;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
+ + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/"
+ + "rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family,
+ 'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ status obsolete;
+ description
+ "This leaf augments the 'next-hop-list' case of IPv6 unicast
+ routes.";
+ leaf address {
+ type inet:ipv6-address;
+ status obsolete;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ /*
+ TODO(HC2VPP-298):
+ needed to comment out action 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" {
+ when "derived-from-or-self(../rt:address-family,
+ 'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast RIBs.";
+ }
+ status obsolete;
+ description
+ "This augment adds the input parameter of the 'active-route'
+ action.";
+ leaf destination-address {
+ type inet:ipv6-address;
+ status obsolete;
+ description
+ "IPv6 destination address.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route" {
+ when "derived-from-or-self(../../rt:address-family,
+ 'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ status obsolete;
+ description
+ "This augment adds the destination prefix to the reply of the
+ 'active-route' action.";
+ leaf destination-prefix {
+ type inet:ipv6-prefix;
+ status obsolete;
+ description
+ "IPv6 destination prefix.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:simple-next-hop" {
+ when "derived-from-or-self(../../../rt:address-family,
+ 'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ status obsolete;
+ description
+ "Augments the 'simple-next-hop' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ status obsolete;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/"
+ + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/"
+ + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
+ when "derived-from-or-self(../../../../../rt:address-family,
+ 'v6ur:ipv6-unicast')" {
+ description
+ "This augment is valid only for IPv6 unicast.";
+ }
+ status obsolete;
+ description
+ "Augments the 'next-hop-list' case in the reply to the
+ 'active-route' action.";
+ leaf next-hop-address {
+ type inet:ipv6-address;
+ status obsolete;
+ description
+ "IPv6 address of the next hop.";
+ }
+ }
+ */
+}
diff --git a/routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-02-27.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-02-27.yang
deleted file mode 100644
index 6d0f853a8..000000000
--- a/routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-02-27.yang
+++ /dev/null
@@ -1,725 +0,0 @@
-module hc2vpp-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 Routing Area Working Group (rtgwg)";
-
- contact
- "Routing Area Working Group - <rtgwg@ietf.org>";
-
- description
- "This module contains a collection of YANG data types
- considered generally useful for routing protocols.";
-
- revision 2017-02-27 {
- description
- "Initial revision.";
- reference
- "RFC TBD: Routing YANG Data Types";
- }
-
- /*** 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.";
- }
-
- // address-family
- identity address-family {
- description
- "Base identity from which identities describing address
- families are derived.";
- }
-
- identity ipv4 {
- base address-family;
- description
- "This identity represents IPv4 address family.";
- }
-
- identity ipv6 {
- base address-family;
- description
- "This identity represents IPv6 address family.";
- }
-
- //The rest of the values deinfed in the IANA registry
-
- identity nsap {
- base address-family;
- description
- "Address family from IANA registry.";
- }
- identity hdlc {
- base address-family;
- description
- "(8-bit multidrop)
- Address family from IANA registry.";
- }
- identity bbn1822 {
- base address-family;
- description
- "AHIP (BBN report #1822)
- Address family from IANA registry.";
- }
- identity ieee802 {
- base address-family;
- description
- "(includes all 802 media plus Ethernet canonical format)
- Address family from IANA registry.";
- }
- identity e163 {
- base address-family;
- description
- "Address family from IANA registry.";
- }
- identity e164 {
- base address-family;
- description
- "SMDS, Frame Relay, ATM
- Address family from IANA registry.";
- }
- identity f69 {
- base address-family;
- description
- "(Telex)
- Address family from IANA registry.";
- }
- identity x121 {
- base address-family;
- description
- "(X.25, Frame Relay)
- Address family from IANA registry.";
- }
- identity ipx {
- base address-family;
- description
- "Address family from IANA registry.";
- }
- identity appletalk {
- base address-family;
- description
- "Address family from IANA registry.";
- }
- identity decnet-iv {
- base address-family;
- description
- "Decnet IV
- Address family from IANA registry.";
- }
- identity vines {
- base address-family;
- description
- "Banyan Vines
- Address family from IANA registry.";
- }
- identity e164-nsap {
- base address-family;
- description
- "E.164 with NSAP format subaddress
- Address family from IANA registry.";
- }
- identity dns {
- base address-family;
- description
- "Domain Name System
- Address family from IANA registry.";
- }
- identity dn {
- base address-family;
- description
- "Distinguished Name
- Address family from IANA registry.";
- }
- identity as-num {
- base address-family;
- description
- "AS Number
- Address family from IANA registry.";
- }
- identity xtp-v4 {
- base address-family;
- description
- "XTP over IPv4
- Address family from IANA registry.";
- }
- identity xtp-v6 {
- base address-family;
- description
- "XTP over IPv6
- Address family from IANA registry.";
- }
- identity xtp {
- base address-family;
- description
- "XTP native mode XTP
- Address family from IANA registry.";
- }
- identity fc-port {
- base address-family;
- description
- "Fibre Channel World-Wide Port Name
- Address family from IANA registry.";
- }
- identity fc-node {
- base address-family;
- description
- "Fibre Channel World-Wide Node Name
- Address family from IANA registry.";
- }
- identity gwid {
- base address-family;
- description
- "Address family from IANA registry.";
- }
- identity l2vpn {
- base address-family;
- description
- "Address family from IANA registry.";
- }
- identity mpls-tp-section-eid {
- base address-family;
- description
- "MPLS-TP Section Endpoint Identifier
- Address family from IANA registry.";
- }
- identity mpls-tp-lsp-eid {
- base address-family;
- description
- "MPLS-TP LSP Endpoint Identifier
- Address family from IANA registry.";
- }
- identity mpls-tp-pwe-eid {
- base address-family;
- description
- "MPLS-TP Pseudowire Endpoint Identifier
- Address family from IANA registry.";
- }
- identity mt-v4 {
- base address-family;
- description
- "Multi-Topology IPv4.
- Address family from IANA registry.";
- }
- identity mt-v6 {
- base address-family;
- description
- "Multi-Topology IPv6.
- Address family from IANA registry.";
- }
-
- /*** collection of types related to VPN ***/
- typedef route-target {
- type string {
- pattern
- '(0:(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|'
- + '[0-5]?\d{0,3}\d):(429496729[0-5]|42949672[0-8]\d|'
- + '4294967[01]\d{2}|429496[0-6]\d{3}|42949[0-5]\d{4}|'
- + '4294[0-8]\d{5}|429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|'
- + '[0-3]?\d{0,8}\d))|'
- + '(1:(((\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|'
- + '1\d{2}|2[0-4]\d|25[0-5])):(6553[0-5]|655[0-2]\d|'
- + '65[0-4]\d{2}|6[0-4]\d{3}|[0-5]?\d{0,3}\d))|'
- + '(2:(429496729[0-5]|42949672[0-8]\d|4294967[01]\d{2}|'
- + '429496[0-6]\d{3}|42949[0-5]\d{4}|4294[0-8]\d{5}|'
- + '429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|[0-3]?\d{0,8}\d):'
- + '(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|'
- + '[0-5]?\d{0,3}\d))';
- }
- 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 three fields:
- a 2-octet type field, an administrator field,
- and an assigned number field.
- According to the data formats for type 0, 1, and 2 defined in
- RFC4360 and RFC5668, 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.
-
- Some valid examples are: 0:100:100, 1:1.1.1.1:100, and
- 2:1234567890:203.";
- reference
- "RFC4360: BGP Extended Communities Attribute.
- RFC5668: 4-Octet AS Specific BGP Extended Community.";
- }
-
- 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
- "RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs).";
- }
-
- typedef route-distinguisher {
- type string {
- pattern
- '(0:(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|'
- + '[0-5]?\d{0,3}\d):(429496729[0-5]|42949672[0-8]\d|'
- + '4294967[01]\d{2}|429496[0-6]\d{3}|42949[0-5]\d{4}|'
- + '4294[0-8]\d{5}|429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|'
- + '[0-3]?\d{0,8}\d))|'
- + '(1:(((\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|'
- + '1\d{2}|2[0-4]\d|25[0-5])):(6553[0-5]|655[0-2]\d|'
- + '65[0-4]\d{2}|6[0-4]\d{3}|[0-5]?\d{0,3}\d))|'
- + '(2:(429496729[0-5]|42949672[0-8]\d|4294967[01]\d{2}|'
- + '429496[0-6]\d{3}|42949[0-5]\d{4}|4294[0-8]\d{5}|'
- + '429[0-3]\d{6}|42[0-8]\d{7}|4[01]\d{8}|[0-3]?\d{0,8}\d):'
- + '(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|'
- + '[0-5]?\d{0,3}\d))|'
- + '(([3-9a-fA-F]|[1-9a-fA-F][\da-fA-F]{1,3}):'
- + '[\da-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 consists of three fields: A 2-octet type field,
- an administrator field, and an assigned number field.
- According to the data formats for type 0, 1, and 2 defined in
- RFC4364, 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.
- 2-octet-other-hex-number:6-octet-hex-number
-
- Some valid examples are: 0:100:100, 1:1.1.1.1:100, and
- 2:1234567890:203.";
- reference
- "RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs).";
- }
-
- /*** 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 from 224.0.0.0 to 239.255.255.255.";
- reference
- "RFC1112: 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
- "RFC4291: IP Version 6 Addressing Architecture. Sec 2.7.
- RFC7346: 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 an IP multicast group address and is IP
- version neutral. The format of the textual representation
- implies the IP version.";
- }
-
- typedef ipv4-multicast-source-address {
- type union {
- type enumeration {
- enum 'any' {
- /*
- ODL does not support * as enum name (how it should be named to java identifier?)
- 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 'any' {
- /*
- ODL does not support * as enum name (how it should be named to java identifier?)
- 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(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|'
- + '1[01]\d|0?\d?\d)?)';
- }
- 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-significand
- character sequences specified in IEEE 754 and C99,
- restricted to be normalized, non-negative, and non-fraction:
- 0x1.hhhhhhp{+}d or 0X1.HHHHHHP{+}D
- where 'h' and 'H' are hexadecimal digits, '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 power
- of two.
- Some examples are: 0x0p0, 0x1p10, and 0x1.abcde2p+20";
- reference
- "IEEE Std 754-2008: IEEE Standard for Floating-Point
- Arithmetic.";
- }
-
- 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.";
- }
-
- /*** collection of types related to MPLS/GMPLS ***/
- typedef generalized-label {
- type binary;
- description
- "Generalized label. Nodes sending and receiving the
- Generalized Label know the kinds of link they are
- using. Hence, the Generalized Label does not identify
- its type. Instead, nodes are expected to know from
- the context and type of label to expect.";
- reference "RFC3471: Section 3.2";
- }
-
- identity mpls-label-special-purpose-value {
- description
- "Base identity for deriving identities describing
- special-purpose Multiprotocol Label Switching (MPLS) label
- values.";
- reference
- "RFC7274: 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
- "RFC3032: 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
- "RFC3032: 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
- "RFC3032: 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
- "RFC3032: 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
- "RFC6790: 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 Label
- (GAL).";
- reference
- "RFC5586: 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
- "RFC3429: 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
- "RFC7274: Allocating and Retiring Special-Purpose MPLS Labels.
- Sections 3.1 and 5.";
- }
-
- typedef mpls-label-special-purpose {
- type identityref {
- base mpls-label-special-purpose-value;
- }
- description
- "This type represents the special-purpose Multiprotocol Label
- Switching (MPLS) label values.";
- reference
- "RFC3032: MPLS Label Stack Encoding.
- RFC7274: Allocating and Retiring Special-Purpose MPLS
- Labels.";
- }
-
- typedef mpls-label-general-use {
- type uint32 {
- range "16..1048575";
- }
- description
- "The 20 bits label values in an MPLS label stack entry,
- specified in RFC3032. 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
- "RFC3032: 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 bits label values in an MPLS label stack entry,
- specified in RFC3032. This label value does not include
- the encodings of Traffic Class and TTL (time to live).";
- reference
- "RFC3032: MPLS Label Stack Encoding.";
- }
-
- /*
- * Groupings
- */
- grouping mpls-label-stack {
- description
- "A grouping that specifies an MPLS 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 sequence of an MPLS label stack entries.
- An entry with smaller ID value is precedes an entry in
- the label stack with a smaller ID.";
- }
- leaf label {
- type rt-types:mpls-label;
- description
- "Label value.";
- }
- leaf ttl {
- type uint8;
- description
- "Time to Live (TTL).";
- reference
- "RFC3032: MPLS Label Stack Encoding.";
- }
- leaf traffic-class {
- type uint8 {
- range "0..7";
- }
- description
- "Traffic Class (TC).";
- reference
- "RFC5462: Multiprotocol Label Switching (MPLS) Label
- Stack Entry: 'EXP' Field Renamed to 'Traffic Class'
- Field.";
- }
- }
- }
- } // mpls-label-stack
-
- grouping vpn-route-targets {
- description
- "A grouping that specifies Route Target import-export rules
- used in the BGP enabled Virtual Private Networks (VPNs).";
- reference
- "RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs).
- RFC4664: 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.";
- }
- }
- } // vpn-route-targets
-}
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
new file mode 100755
index 000000000..a0d6e19ed
--- /dev/null
+++ b/routing/routing-api/src/main/yang/hc2vpp-ietf-routing-types@2017-12-04.yang
@@ -0,0 +1,793 @@
+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: <https://datatracker.ietf.org/wg/rtgwg/>
+ WG List: <mailto:rtgwg@ietf.org>
+
+ Editors: Xufeng Liu
+ <mailto:Xufeng_Liu@jabail.com>
+ Yingzhen Qu
+ <mailto:yingzhen.qu@huawei.com>
+ Acee Lindem
+ <mailto:acee@cisco.com>
+ Christian Hopps
+ <mailto:chopps@chopps.org>
+ Lou Berger
+ <mailto:lberger@labn.com>";
+
+ 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 <ipv6-address:2-octet-number>.
+
+ 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 <ipv6-address:2-octet-number>.
+
+ 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 {
+ /* Needed to change '*' to 'any' otherwise it will fail to build java classes from this enum
+ bug in mdsal reported here: https://jira.opendaylight.org/browse/MDSAL-332
+ TODO(HC2VPP-298): change back to '*' when resolved
+ */
+ enum any {
+ description
+ "Any source address.";
+ }
+ }
+ type inet:ipv4-address;
+ }
+ description
+ "Multicast source IPv4 address type.";
+ }
+
+ typedef ipv6-multicast-source-address {
+ type union {
+ type enumeration {
+ /* Needed to change '*' to 'any' otherwise it will fail to build java classes from this enum
+ bug in mdsal reported here: https://jira.opendaylight.org/browse/MDSAL-332
+ TODO(HC2VPP-298): change back to '*' when resolved
+ */
+ enum any {
+ 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/hc2vpp-ietf-routing@2014-05-24.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-routing@2014-05-24.yang
deleted file mode 100644
index 63d163b27..000000000
--- a/routing/routing-api/src/main/yang/hc2vpp-ietf-routing@2014-05-24.yang
+++ /dev/null
@@ -1,1035 +0,0 @@
-module hc2vpp-ietf-routing {
-
- namespace "urn:ietf:params:xml:ns:yang:ietf-routing";
-
- prefix "rt";
-
- import ietf-yang-types {
- prefix "yang";
- }
-
- import ietf-interfaces {
- prefix "if";
- }
-
- organization
- "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
- contact
- "WG Web: <http://tools.ietf.org/wg/netmod/>
- WG List: <mailto:netmod@ietf.org>
-
- WG Chair: Thomas Nadeau
- <mailto:tnadeau@lucidvision.com>
-
- WG Chair: Juergen Schoenwaelder
- <mailto:j.schoenwaelder@jacobs-university.de>
-
- Editor: Ladislav Lhotka
- <mailto:lhotka@nic.cz>";
-
- description
- "This YANG module defines essential components for the management
- of a routing subsystem.
-
- Copyright (c) 2014 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
- (http://trustee.ietf.org/license-info).
-
- This version of this YANG module is part of RFC XXXX; see the
- RFC itself for full legal notices.";
-
- revision 2014-05-24 {
- description
- "Initial revision.";
- reference
- "RFC XXXX: A YANG Data Model for Routing Management";
- }
-
- /* Features */
-
- feature multiple-ribs {
- description
- "This feature indicates that the device supports multiple RIBS
- per address family, and the framework for passing routes
- between RIBs.
-
- Devices that do not support this feature MUST provide exactly
- one system-controlled RIB per supported address family. These
- RIBs then appear as entries of the list
- /routing-state/ribs/rib.";
- }
-
- feature multipath-routes {
- description
- "This feature indicates that the device supports multipath
- routes that have a list of next-hops.";
- }
-
- /* Identities */
-
- identity address-family {
- description
- "Base identity from which identities describing address
- families are derived.";
- }
-
- identity ipv4 {
- base address-family;
- description
- "This identity represents IPv4 address family.";
- }
-
- identity ipv6 {
- base address-family;
- description
- "This identity represents IPv6 address family.";
- }
-
- identity routing-instance-type {
- description
- "Base identity from which identities describing routing
- instance types are derived.
-
- It is primarily intended for discriminating among different
- types of logical routers or router virtualization.";
- }
-
- identity standard-routing-instance {
- base routing-instance-type;
- description
- "This identity represents a default routing instance.";
- }
-
- identity routing-protocol {
- description
- "Base identity from which routing protocol identities are
- derived.";
- }
-
- identity direct {
- base routing-protocol;
- description
- "Routing pseudo-protocol which provides routes to directly
- connected networks.";
- }
-
- identity static {
- base routing-protocol;
- description
- "Static routing pseudo-protocol.";
- }
-
- identity route-filter {
- description
- "Base identity from which all route filters are derived.";
- }
-
- identity deny-all-route-filter {
- base route-filter;
- description
- "Route filter that blocks all routes.";
- }
-
- identity allow-all-route-filter {
- base route-filter;
- description
- "Route filter that permits all routes.";
- }
-
- /* Type Definitions */
-
- typedef routing-instance-ref {
- type leafref {
- path "/rt:routing/rt:routing-instance/rt:name";
- }
- description
- "This type is used for leafs that reference a routing instance
- configuration.";
- }
-
- typedef routing-instance-state-ref {
- type leafref {
- path "/rt:routing-state/rt:routing-instance/rt:name";
- }
- description
- "This type is used for leafs that reference state data of a
- routing instance.";
- }
-
- typedef rib-ref {
- type leafref {
- path "/rt:routing/rt:ribs/rt:rib/rt:name";
- }
- description
- "This type is used for leafs that reference a RIB
- configuration.";
- }
-
- typedef rib-state-ref {
- type leafref {
- path "/rt:routing-state/rt:ribs/rt:rib/rt:name";
- }
- description
- "This type is used for leafs that reference a RIB in state
- data.";
- }
-
- typedef route-filter-ref {
- type leafref {
- path "/rt:routing/rt:route-filters/rt:route-filter/rt:name";
- }
- description
- "This type is used for leafs that reference a route filter
- configuration.";
- }
-
- typedef route-filter-state-ref {
- type leafref {
- path "/rt:routing-state/rt:route-filters/rt:route-filter/"
- + "rt:name";
- }
- description
- "This type is used for leafs that reference a route filter in
- state data.";
- }
-
- /* Groupings */
-
- grouping address-family-grouping {
- description
- "This grouping provides a leaf identifying an address
- family.";
- leaf address-family {
- type identityref {
- base address-family;
- }
- mandatory "true";
- description
- "Address family.";
- }
- }
-
- grouping state-entry-id {
- description
- "This grouping defines a unique identifier for entries in
- several operational state lists.";
- leaf id {
- type uint64;
- description
- "Unique numerical identifier of a list entry in operational
- state. It may be used by protocols or tools that inspect
- and/or manipulate operational state data and prefer
- fixed-size integers as list entry handles.
-
- These identifiers are always ephemeral, i.e., they may
- change after a reboot.";
- }
- }
-
- grouping router-id {
- description
- "This grouping provides the definition of router ID.";
- leaf router-id {
- type yang:dotted-quad;
- description
- "Router ID - 32-bit number in the form of a dotted quad. Some
- protocols use this parameter for identifying a router to its
- neighbors.";
- }
- }
-
- grouping outgoing-interface {
- description
- "This grouping defines the outgoing interface for use in
- next-hops.";
- leaf outgoing-interface {
- type leafref {
- path "/rt:routing-state/rt:routing-instance/rt:interfaces/"
- + "rt:interface/rt:name";
- }
- description
- "Name of the outgoing interface.";
- }
- }
-
- // TODO(HC2VPP-273): renamed due to https://jira.opendaylight.org/browse/MDSAL-1
- // (having same name for grouping and it's leaf ends up in Java compilation error)
- //
- // Change grouping name back after switching to Binding Specificiation v2 (HONEYCOMB-420).
- //
- // grouping special-next-hop {
- grouping special-next-hop-grouping {
- description
- "This grouping provides the leaf for specifying special
- next-hop options.";
- leaf special-next-hop {
- type enumeration {
- enum blackhole {
- description
- "Silently discard the packet.";
- }
- enum unreachable {
- description
- "Discard the packet and notify the sender with an error
- message indicating that the destination host is
- unreachable.";
- }
- enum prohibit {
- description
- "Discard the packet and notify the sender with an error
- message indicating that the communication is
- administratively prohibited.";
- }
- enum receive {
- description
- "The packet will be received by the local network
- device.";
- }
- }
- description
- "Special next-hop options.";
- }
- }
-
- grouping next-hop-classifiers {
- description
- "This grouping provides two next-hop classifiers.";
- leaf priority {
- type enumeration {
- enum primary {
- value "1";
- description
- "Primary next-hop.";
- }
- enum backup {
- value "2";
- description
- "Backup next-hop.";
- }
- }
- description
- "Simple priority for distinguishing between primary and
- backup next-hops.
-
- Backup next-hops are used if and only if no primary
- next-hops are reachable.";
- }
- leaf weight {
- type uint8;
- must ". = 0 or not(../../next-hop/weight = 0)" {
- error-message "Illegal combination of zero and non-zero "
- + "next-hop weights.";
- description
- "Next-hop weights must be either all zero (equal
- load-balancing) or all non-zero.";
- }
- description
- "This parameter specifies the weight of the next-hop for load
- balancing. The number specifies the relative fraction of the
- traffic that will use the corresponding next-hop.
-
- A value of 0 represents equal load-balancing.
-
- If both primary and backup next-hops are present, then the
- weights for each priority level are used separately.";
- }
- }
-
- grouping next-hop-content {
- description
- "Generic parameters of next-hops in routes.";
- choice next-hop-options {
- mandatory "true";
- description
- "Options for expressing the next-hop in routes.";
- case special-next-hop {
- uses special-next-hop-grouping;
- }
- case simple-next-hop {
- uses outgoing-interface;
- }
- case next-hop-list {
- if-feature multipath-routes;
- container next-hop-list {
- description
- "Container for multiple next-hops.";
- list next-hop {
- key "id";
- description
- "An entry of a next-hop list.";
- uses state-entry-id;
- uses outgoing-interface;
- uses next-hop-classifiers;
- }
- }
- }
- }
- }
-
- grouping route-metadata {
- description
- "Route metadata.";
- leaf source-protocol {
- type identityref {
- base routing-protocol;
- }
- mandatory "true";
- description
- "Type of the routing protocol from which the route
- originated.";
- }
- leaf last-updated {
- type yang:date-and-time;
- description
- "Time stamp of the last modification of the route. If the
- route was never modified, it is the time when the route was
- inserted into the RIB.";
- }
- }
-
- /* Operational state data */
-
- container routing-state {
- config "false";
- description
- "Operational state of the routing subsystem.";
- list routing-instance {
- key "name";
- unique "id";
- description
- "Each list entry is a container for operational state data of
- a routing instance.
-
- An implementation MAY create one or more system-controlled
- instances, other user-controlled instances MAY be created by
- configuration.";
- leaf name {
- type string;
- description
- "The name of the routing instance.
-
- For system-controlled instances the name is persistent,
- i.e., it SHOULD NOT change across reboots.";
- }
- uses state-entry-id {
- refine "id" {
- mandatory "true";
- }
- }
- leaf type {
- type identityref {
- base routing-instance-type;
- }
- description
- "The routing instance type, primarily intended for
- discriminating among different types of logical routers,
- route virtualization, master-slave arrangements etc.,
- while keeping all routing instances in the same flat
- list.";
- }
- uses router-id {
- description
- "Global router ID.
-
- An implementation may choose a value if none is
- configured.
-
- Routing protocols that use router ID MAY override this
- global parameter.";
- }
- container default-ribs {
- description
- "Default RIBs used by the routing instance.";
- list default-rib {
- key "address-family";
- description
- "Each list entry specifies the default RIB for one
- address family.
-
- The default RIB is operationally connected to all
- routing protocols for which a connected RIB has not been
- explicitly configured.
-
- The 'direct' pseudo-protocol is always connected to the
- default RIBs.";
- uses address-family-grouping;
- leaf rib-name {
- type rib-state-ref;
- mandatory "true";
- description
- "Name of an existing RIB to be used as the default RIB
- for the given routing instance and address family.";
- }
- }
- }
- container interfaces {
- description
- "Network layer interfaces belonging to the routing
- instance.";
- list interface {
- key "name";
- description
- "List of network layer interfaces assigned to the routing
- instance.";
- leaf name {
- type if:interface-state-ref;
- description
- "A reference to the name of a configured network layer
- interface.";
- }
- }
- }
- container routing-protocols {
- description
- "Container for the list of routing protocol instances.";
- list routing-protocol {
- key "name";
- description
- "Operational state of a routing protocol instance.
-
- An implementation MUST provide exactly one
- system-controlled instance of the type 'direct'. Other
- instances MAY be created by configuration.";
- leaf name {
- type string;
- description
- "The name of the routing protocol instance.
-
- For system-controlled instances this name is
- persistent, i.e., it SHOULD NOT change across
- reboots.";
- }
- leaf type {
- type identityref {
- base routing-protocol;
- }
- mandatory "true";
- description
- "Type of the routing protocol.";
- }
- container connected-ribs {
- description
- "Container for connected RIBs.";
- list connected-rib {
- key "rib-name";
- description
- "List of RIBs to which the routing protocol instance
- is connected (at most one RIB per address
- family).";
- leaf rib-name {
- type rib-state-ref;
- description
- "Name of an existing RIB.";
- }
- leaf import-filter {
- type route-filter-state-ref;
- description
- "Reference to a route filter that is used for
- filtering routes passed from this routing protocol
- instance to the RIB specified by the 'rib-name'
- sibling node.
-
- If this leaf is not present, the behavior is
- protocol-specific, but typically it means that all
- routes are accepted.";
- }
- leaf export-filter {
- type route-filter-state-ref;
- description
- "Reference to a route filter that is used for
- filtering routes passed from the RIB specified by
- the 'rib-name' sibling node to this routing
- protocol instance.
-
- If this leaf is not present, the behavior is
- protocol-specific - typically it means that all
- routes are accepted.
-
- The 'direct' and 'static' pseudo-protocols accept
- no routes from any RIB.";
- }
- }
- }
-
- //NOTE -added to allow operational state for static-routes
- container static-routes {
- when "../type='rt:static'" {
- description
- "This container is only valid for the 'static'
- routing protocol.";
- }
- description
- "Configuration of the 'static' pseudo-protocol.
-
- Address family specific modules augment this node with
- their lists of routes.";
- }
- }
- }
- }
- container ribs {
- description
- "Container for RIBs.";
- list rib {
- key "name";
- unique "id";
- description
- "Each entry represents a RIB identified by the 'name' key.
- All routes in a RIB MUST belong to the same address
- family.
-
- The server MUST provide a system-controlled default RIB
- for each address family, and MAY provide other
- system-controlled RIBs. Additional RIBs MAY be created in
- the configuration.";
- leaf name {
- type string;
- description
- "The name of the RIB.";
- }
- uses state-entry-id {
- refine "id" {
- mandatory "true";
- }
- }
- uses address-family-grouping;
- container routes {
- description
- "Current contents of the RIB.";
- list route {
- key "id";
- description
- "A RIB route entry. This data node MUST be augmented
- with information specific for routes of each address
- family.";
- uses state-entry-id;
- uses next-hop-content;
- uses route-metadata;
- }
- }
- container recipient-ribs {
- if-feature multiple-ribs;
- description
- "Container for recipient RIBs.";
- list recipient-rib {
- key "rib-name";
- description
- "List of RIBs that receive routes from this RIB.";
- leaf rib-name {
- type rib-state-ref;
- description
- "The name of the recipient RIB.";
- }
- leaf filter {
- type route-filter-state-ref;
- description
- "A route filter which is applied to the routes passed
- to the recipient RIB.";
- }
- }
- }
- }
- }
- container route-filters {
- description
- "Container for route filters.";
- list route-filter {
- key "name";
- description
- "Route filters are used for filtering and/or manipulating
- routes that are passed between a routing protocol and a
- RIB and vice versa, or between two RIBs.
-
- It is expected that other modules augment this list with
- contents specific for a particular route filter type.";
- leaf name {
- type string;
- description
- "The name of the route filter.";
- }
- leaf type {
- type identityref {
- base route-filter;
- }
- mandatory "true";
- description
- "Type of the route-filter - an identity derived from the
- 'route-filter' base identity.";
- }
- }
- }
- }
-
- /* Configuration Data */
-
- container routing {
- description
- "Configuration parameters for the routing subsystem.";
- list routing-instance {
- key "name";
- description
- "Configuration of a routing instance.";
- leaf name {
- type string;
- description
- "The name of the routing instance.
-
- For system-controlled entries, the value of this leaf must
- be the same as the name of the corresponding entry in
- state data.
-
- For user-controlled entries, an arbitrary name can be
- used.";
- }
- leaf type {
- type identityref {
- base routing-instance-type;
- }
- default "rt:standard-routing-instance";
- description
- "The type of the routing instance.";
- }
- leaf enabled {
- type boolean;
- default "true";
- description
- "Enable/disable the routing instance.
-
- If this parameter is false, the parent routing instance is
- disabled and does not appear in operational state data,
- despite any other configuration that might be present.";
- }
- uses router-id {
- description
- "Configuration of the global router ID.";
- }
- leaf description {
- type string;
- description
- "Textual description of the routing instance.";
- }
- container default-ribs {
- if-feature multiple-ribs;
- description
- "Configuration of the default RIBs used by the routing
- instance.
-
- The default RIB for an addressed family if by default
- connected to all routing protocol instances supporting
- that address family, and always receives direct routes.";
- list default-rib {
- must "address-family=/routing/ribs/rib[name=current()/"
- + "rib-name]/address-family" {
- error-message "Address family mismatch.";
- description
- "The entry's address family MUST match that of the
- referenced RIB.";
- }
- key "address-family";
- description
- "Each list entry configures the default RIB for one
- address family.";
- uses address-family-grouping;
- leaf rib-name {
- type string;
- mandatory "true";
- description
- "Name of an existing RIB to be used as the default RIB
- for the given routing instance and address family.";
- }
- }
- }
- container interfaces {
- description
- "Configuration of the routing instance's interfaces.";
- list interface {
- key "name";
- description
- "List of network layer interfaces assigned to the routing
- instance.";
- leaf name {
- type if:interface-ref;
- description
- "A reference to the name of a configured network layer
- interface.";
- }
- }
- }
- container routing-protocols {
- description
- "Configuration of routing protocol instances.";
- list routing-protocol {
- key "name";
- description
- "Each entry contains configuration of a routing protocol
- instance.";
- leaf name {
- type string;
- description
- "An arbitrary name of the routing protocol instance.";
- }
- leaf description {
- type string;
- description
- "Textual description of the routing protocol
- instance.";
- }
- leaf enabled {
- type boolean;
- default "true";
- description
- "Enable/disable the routing protocol instance.
-
- If this parameter is false, the parent routing
- protocol instance is disabled and does not appear in
- operational state data, despite any other
- configuration that might be present.";
- }
- leaf type {
- type identityref {
- base routing-protocol;
- }
- mandatory "true";
- description
- "Type of the routing protocol - an identity derived
- from the 'routing-protocol' base identity.";
- }
- container connected-ribs {
- description
- "Configuration of connected RIBs.";
- list connected-rib {
- must "not(/routing/ribs/rib[name=current()/"
- + "preceding-sibling::connected-rib/"
- + "rib-name and address-family=/routing/ribs/"
- + "rib[name=current()/rib-name]/address-family])" {
- error-message
- "Duplicate address family for connected RIBs.";
- description
- "For each address family, there MUST NOT be more
- than one connected RIB.";
- }
- key "rib-name";
- description
- "List of RIBs to which the routing protocol instance
- is connected (at most one RIB per address family).
-
- If no connected RIB is configured for an address
- family, the routing protocol is connected to the
- default RIB for that address family.";
- leaf rib-name {
- type rib-ref;
- must "../../../type != 'rt:direct' or "
- + "../../../../../default-ribs/ "
- + "default-rib/rib-name=." {
- error-message "The 'direct' protocol can be "
- + "connected only to a default RIB.";
- description
- "For the 'direct' pseudo-protocol, the connected
- RIB must always be a default RIB.";
- }
- description
- "Name of an existing RIB.";
- }
- leaf import-filter {
- type route-filter-ref;
- description
- "Configuration of import filter.";
- }
- leaf export-filter {
- type route-filter-ref;
- description
- "Configuration of export filter.";
- }
- }
- }
- container static-routes {
- when "../type='rt:static'" {
- description
- "This container is only valid for the 'static'
- routing protocol.";
- }
- description
- "Configuration of the 'static' pseudo-protocol.
-
- Address family specific modules augment this node with
- their lists of routes.";
- }
- }
- }
- }
- container ribs {
- description
- "Configured RIBs.";
- list rib {
- key "name";
- description
- "Each entry represents a configured RIB identified by the
- 'name' key.
-
- Entries having the same key as a system-controlled entry
- of the list /routing-state/ribs/rib are used for
- configuring parameters of that entry. Other entries define
- additional user-controlled RIBs.";
- leaf name {
- type string;
- description
- "The name of the RIB.
-
- For system-controlled entries, the value of this leaf
- must be the same as the name of the corresponding entry
- in state data.
-
- For user-controlled entries, an arbitrary name can be
- used.";
- }
- uses address-family-grouping;
- leaf description {
- type string;
- description
- "Textual description of the RIB.";
- }
- container recipient-ribs {
- if-feature multiple-ribs;
- description
- "Configuration of recipient RIBs.";
- list recipient-rib {
- must "rib-name != ../../name" {
- error-message
- "Source and recipient RIBs are identical.";
- description
- "A RIB MUST NOT appear among its recipient RIBs.";
- }
- must "/routing/ribs/rib[name=current()/rib-name]/"
- + "address-family=../../address-family" {
- error-message "Address family mismatch.";
- description
- "Address family of the recipient RIB MUST match that
- of the source RIB.";
- }
- key "rib-name";
- description
- "Each entry configures a recipient RIB.";
- leaf rib-name {
- type rib-ref;
- description
- "The name of the recipient RIB.";
- }
- leaf filter {
- type route-filter-ref;
- description
- "A route filter which is applied to the routes passed
- to the recipient RIB.";
- }
- }
- }
- }
- }
- container route-filters {
- description
- "Configuration of route filters.";
- list route-filter {
- key "name";
- description
- "Each entry configures a named route filter.";
- leaf name {
- type string;
- description
- "The name of the route filter.";
- }
- leaf description {
- type string;
- description
- "Textual description of the route filter.";
- }
- leaf type {
- type identityref {
- base route-filter;
- }
- mandatory "true";
- description
- "Type of the route filter..";
- }
- }
- }
- }
-
- /* RPC methods */
-
- rpc active-route {
- description
- "Return the active route that a routing-instance uses for
- sending packets to a destination address.";
- input {
- leaf routing-instance-name {
- type routing-instance-state-ref;
- mandatory "true";
- description
- "Name of the routing instance whose forwarding information
- base is being queried.
-
- If the routing instance with name equal to the value of
- this parameter doesn't exist, then this operation SHALL
- fail with error-tag 'data-missing' and error-app-tag
- 'routing-instance-not-found'.";
- }
- container destination-address {
- description
- "Network layer destination address.
-
- Address family specific modules MUST augment this
- container with a leaf named 'address'.";
- uses address-family-grouping;
- }
- }
- output {
- container route {
- description
- "The active route for the specified destination.
-
- If the routing instance has no active route for the
- destination address, no output is returned - the server
- SHALL send an <rpc-reply> containing a single element
- <ok>.
-
- Address family specific modules MUST augment this list
- with appropriate route contents.";
- uses address-family-grouping;
- uses next-hop-content;
- uses route-metadata;
- }
- }
- }
-
- rpc route-count {
- description
- "Return the current number of routes in a RIB.";
- input {
- leaf rib-name {
- type rib-state-ref;
- mandatory "true";
- description
- "Name of the RIB.
-
- If the RIB with name equal to the value of this parameter
- doesn't exist, then this operation SHALL fail with
- error-tag 'data-missing' and error-app-tag
- 'rib-not-found'.";
- }
- }
- output {
- leaf number-of-routes {
- type uint64;
- mandatory "true";
- description
- "Number of routes in the RIB.";
- }
- }
- }
-} \ No newline at end of file
diff --git a/routing/routing-api/src/main/yang/hc2vpp-ietf-routing@2018-03-13.yang b/routing/routing-api/src/main/yang/hc2vpp-ietf-routing@2018-03-13.yang
new file mode 100755
index 000000000..837ce7f67
--- /dev/null
+++ b/routing/routing-api/src/main/yang/hc2vpp-ietf-routing@2018-03-13.yang
@@ -0,0 +1,740 @@
+module hc2vpp-ietf-routing {
+ yang-version "1.1";
+ namespace "urn:ietf:params:xml:ns:yang:ietf-routing";
+ prefix "rt";
+
+ /*
+ 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 once bugs are fixed.
+ */
+
+ import ietf-yang-types {
+ prefix "yang";
+ }
+
+ import ietf-interfaces {
+ prefix "if";
+ description
+ "An 'ietf-interfaces' module version that is compatible with
+ the Network Management Datastore Architecture (NMDA)
+ is required.";
+ }
+
+ /*
+ TODO remove vpp-routing-types when HONEYCOMB-398 is resolved
+ */
+ import vpp-routing-types {
+ prefix vpp-routing-types;
+ }
+
+ organization
+ "IETF NETMOD (Network Modeling) Working Group";
+ contact
+ "WG Web: <https://datatracker.ietf.org/wg/netmod/>
+ WG List: <mailto:rtgwg@ietf.org>
+
+ Editor: Ladislav Lhotka
+ <mailto:lhotka@nic.cz>
+ Acee Lindem
+ <mailto:acee@cisco.com>
+ Yingzhen Qu
+ <mailto:yingzhen.qu@huawei.com>";
+
+ description
+ "This YANG module defines essential components for the management
+ of a routing subsystem. The model fully conforms to the Network
+ Management Datastore Architecture (NMDA).
+
+ Copyright (c) 2018 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 8349; see
+ the RFC itself for full legal notices.";
+
+ revision 2018-03-13 {
+ description
+ "Network Management Datastore Architecture (NMDA) revision.";
+ reference
+ "RFC 8349: A YANG Data Model for Routing Management
+ (NMDA Version)";
+ }
+
+ revision 2016-11-04 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 8022: A YANG Data Model for Routing Management";
+ }
+
+ /* Features */
+ feature multiple-ribs {
+ description
+ "This feature indicates that the server supports
+ user-defined RIBs.
+
+ Servers that do not advertise this feature SHOULD provide
+ exactly one system-controlled RIB per supported address family
+ and also make it the default RIB. This RIB then appears as an
+ entry in the list '/routing/ribs/rib'.";
+ }
+
+ feature router-id {
+ description
+ "This feature indicates that the server supports an explicit
+ 32-bit router ID that is used by some routing protocols.
+
+ Servers that do not advertise this feature set a router ID
+ algorithmically, usually to one of the configured IPv4
+ addresses. However, this algorithm is implementation
+ specific.";
+ }
+
+ /* 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 address-family-identity {
+ description
+ "Base identity from which identities describing address
+ families are derived.";
+ }
+
+ /*
+ 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 ipv4 {
+ base rt:address-family-identity;
+ description
+ "This identity represents an IPv4 address family.";
+ }
+
+ /*
+ 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 ipv6 {
+ base rt:address-family-identity;
+ description
+ "This identity represents an IPv6 address family.";
+ }
+
+ identity control-plane-protocol {
+ description
+ "Base identity from which control-plane protocol identities are
+ derived.";
+ }
+
+ identity routing-protocol {
+ base control-plane-protocol;
+ description
+ "Identity from which Layer 3 routing protocol identities are
+ derived.";
+ }
+
+ identity direct {
+ base routing-protocol;
+ description
+ "Routing pseudo-protocol that provides routes to directly
+ connected networks.";
+ }
+
+ identity static {
+ base routing-protocol;
+ description
+ "'Static' routing pseudo-protocol.";
+ }
+
+ /* Type Definitions */
+
+ typedef route-preference {
+ type uint32;
+ description
+ "This type is used for route preferences.";
+ }
+
+ /* Groupings */
+
+ grouping address-family {
+ description
+ "This grouping provides a leaf identifying an address
+ family.";
+ leaf address-family {
+ type identityref {
+ /*
+ 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
+ */
+ base rt:address-family-identity;
+ }
+ mandatory true;
+ description
+ "Address family.";
+ }
+ }
+
+ grouping router-id {
+ description
+ "This grouping provides a router ID.";
+ leaf router-id {
+ type yang:dotted-quad;
+ description
+ "A 32-bit number in the form of a dotted quad that is used by
+ some routing protocols identifying a router.";
+ reference
+ "RFC 2328: OSPF Version 2";
+ }
+ }
+
+ grouping special-next-hop {
+ description
+ "This grouping provides a leaf with an enumeration of special
+ next hops.";
+ /*
+ added "-enum" to resolve class naming conflicts
+ bug in mdsal reported here: https://jira.opendaylight.org/browse/MDSAL-332
+ TODO(HC2VPP-298): remove "-enum" postfix when resolved
+ */
+ leaf special-next-hop-enum {
+ type enumeration {
+ enum blackhole {
+ description
+ "Silently discard the packet.";
+ }
+ enum unreachable {
+ description
+ "Discard the packet and notify the sender with an error
+ message indicating that the destination host is
+ unreachable.";
+ }
+ enum prohibit {
+ description
+ "Discard the packet and notify the sender with an error
+ message indicating that the communication is
+ administratively prohibited.";
+ }
+ enum receive {
+ description
+ "The packet will be received by the local system.";
+ }
+ }
+ description
+ "Options for special next hops.";
+ }
+ }
+
+ grouping next-hop-content {
+ description
+ "Generic parameters of next hops in static routes.";
+ choice next-hop-options {
+ mandatory true;
+ description
+ "Options for next hops in static routes.
+
+ It is expected that further cases will be added through
+ augments from other modules.";
+ case simple-next-hop {
+ description
+ "This case represents a simple next hop consisting of the
+ next-hop address and/or outgoing interface.
+
+ Modules for address families MUST augment this case with a
+ leaf containing a next-hop address of that address
+ family.";
+ leaf outgoing-interface {
+ type if:interface-ref;
+ description
+ "Name of the outgoing interface.";
+ }
+ }
+ case special-next-hop {
+ uses special-next-hop;
+ }
+ case next-hop-list {
+ container next-hop-list {
+ description
+ "Container for multiple next hops.";
+ list next-hop {
+ key "index";
+ description
+ "An entry in a next-hop list.
+
+ Modules for address families MUST augment this list
+ with a leaf containing a next-hop address of that
+ address family.";
+ leaf index {
+ type string;
+ description
+ "A user-specified identifier utilized to uniquely
+ reference the next-hop entry in the next-hop list.
+ The value of this index has no semantic meaning
+ other than for referencing the entry.";
+ }
+ leaf outgoing-interface {
+ type if:interface-ref;
+ description
+ "Name of the outgoing interface.";
+ }
+ }
+ }
+ }
+ // table lookup case for VPP
+ // TODO - HONEYCOMB-398/HC2VPP-237 - move table lookup case to separate module
+ case table-lookup-case {
+ uses vpp-routing-types:table-lookup-case-params;
+ }
+ }
+ }
+
+ grouping next-hop-state-content {
+ description
+ "Generic state parameters of next hops.";
+ choice next-hop-options {
+ mandatory true;
+ description
+ "Options for next hops.
+
+ It is expected that further cases will be added through
+ augments from other modules, e.g., for recursive
+ next hops.";
+ case simple-next-hop {
+ description
+ "This case represents a simple next hop consisting of the
+ next-hop address and/or outgoing interface.
+
+ Modules for address families MUST augment this case with a
+ leaf containing a next-hop address of that address
+ family.";
+ leaf outgoing-interface {
+ type if:interface-ref;
+ description
+ "Name of the outgoing interface.";
+ }
+ }
+ case special-next-hop {
+ uses special-next-hop;
+ }
+ case next-hop-list {
+ container next-hop-list {
+ description
+ "Container for multiple next hops.";
+ list next-hop {
+ description
+ "An entry in a next-hop list.
+
+ Modules for address families MUST augment this list
+ with a leaf containing a next-hop address of that
+ address family.";
+ leaf outgoing-interface {
+ type if:interface-ref;
+ description
+ "Name of the outgoing interface.";
+ }
+ }
+ }
+ }
+ }
+ }
+
+ grouping route-metadata {
+ description
+ "Common route metadata.";
+ leaf source-protocol {
+ type identityref {
+ base routing-protocol;
+ }
+ mandatory true;
+ description
+ "Type of the routing protocol from which the route
+ originated.";
+ }
+ leaf active {
+ type empty;
+ description
+ "The presence of this leaf indicates that the route is
+ preferred among all routes in the same RIB that have the
+ same destination prefix.";
+ }
+ leaf last-updated {
+ type yang:date-and-time;
+ description
+ "Timestamp of the last modification of the route. If the
+ route was never modified, it is the time when the route was
+ inserted into the RIB.";
+ }
+ }
+
+ /* Data nodes */
+
+ container routing {
+ description
+ "Configuration parameters for the routing subsystem.";
+ uses router-id {
+ if-feature "router-id";
+ description
+ "Support for the global router ID. Routing protocols
+ that use a router ID can use this parameter or override it
+ with another value.";
+ }
+ container interfaces {
+ config false;
+ description
+ "Network-layer interfaces used for routing.";
+ leaf-list interface {
+ type if:interface-ref;
+ description
+ "Each entry is a reference to the name of a configured
+ network-layer interface.";
+ }
+ }
+ container control-plane-protocols {
+ description
+ "Support for control-plane protocol instances.";
+ list control-plane-protocol {
+ key "type name";
+ description
+ "Each entry contains a control-plane protocol instance.";
+ leaf type {
+ type identityref {
+ base control-plane-protocol;
+ }
+ description
+ "Type of the control-plane protocol -- an identity
+ derived from the 'control-plane-protocol'
+ base identity.";
+ }
+ leaf name {
+ type string;
+ description
+ "An arbitrary name of the control-plane protocol
+ instance.";
+ }
+ leaf description {
+ type string;
+ description
+ "Textual description of the control-plane protocol
+ instance.";
+ }
+ container static-routes {
+ when "derived-from-or-self(../type, 'rt:static')" {
+ description
+ "This container is only valid for the 'static' routing
+ protocol.";
+ }
+ description
+ "Support for the 'static' pseudo-protocol.
+
+ Address-family-specific modules augment this node with
+ their lists of routes.";
+ }
+ }
+ }
+ container ribs {
+ description
+ "Support for RIBs.";
+ list rib {
+ key "name";
+ description
+ "Each entry contains a configuration for a RIB identified
+ by the 'name' key.
+
+ Entries having the same key as a system-controlled entry
+ in the list '/routing/ribs/rib' are used for
+ configuring parameters of that entry. Other entries
+ define additional user-controlled RIBs.";
+ leaf name {
+ type string;
+ description
+ "The name of the RIB.
+
+ For system-controlled entries, the value of this leaf
+ must be the same as the name of the corresponding entry
+ in the operational state.
+
+ For user-controlled entries, an arbitrary name can be
+ used.";
+ }
+ uses address-family {
+ description
+ "The address family of the system-controlled RIB.";
+ }
+
+ leaf default-rib {
+ if-feature "multiple-ribs";
+ type boolean;
+ default "true";
+ config false;
+ description
+ "This flag has the value of 'true' if and only if the RIB
+ is the default RIB for the given address family.
+
+ By default, control-plane protocols place their routes
+ in the default RIBs.";
+ }
+ container routes {
+ config false;
+ description
+ "Current contents of the RIB.";
+ list route {
+ description
+ "A RIB route entry. This data node MUST be augmented
+ with information specific to routes of each address
+ family.";
+ leaf route-preference {
+ type route-preference;
+ description
+ "This route attribute, also known as 'administrative
+ distance', allows for selecting the preferred route
+ among routes with the same destination prefix. A
+ smaller value indicates a route that is
+ more preferred.";
+ }
+ container next-hop {
+ description
+ "Route's next-hop attribute.";
+ uses next-hop-state-content;
+ }
+ uses route-metadata;
+ }
+ }
+ /*
+ TODO(HC2VPP-298):
+ needed to comment out action which caused problems probapby simmilar to:
+ https://jira.opendaylight.org/browse/YANGTOOLS-841
+
+ action active-route {
+ description
+ "Return the active RIB route that is used for the
+ destination address.
+
+ Address-family-specific modules MUST augment input
+ parameters with a leaf named 'destination-address'.";
+ output {
+ container route {
+ description
+ "The active RIB route for the specified destination.
+
+ If no route exists in the RIB for the destination
+ address, no output is returned.
+
+ Address-family-specific modules MUST augment this
+ container with appropriate route contents.";
+ container next-hop {
+ description
+ "Route's next-hop attribute.";
+ uses next-hop-state-content;
+ }
+ uses route-metadata;
+ }
+ }
+ }
+ */
+ leaf description {
+ type string;
+ description
+ "Textual description of the RIB.";
+ }
+ }
+ }
+ }
+
+ /*
+ * The subsequent data nodes are obviated and obsoleted
+ * by the Network Management Datastore Architecture
+ * as described in RFC 8342.
+ */
+
+ container routing-state {
+ config false;
+ status obsolete;
+ description
+ "State data of the routing subsystem.";
+ uses router-id {
+ status obsolete;
+ description
+ "Global router ID.
+
+ It may be either configured or assigned algorithmically by
+ the implementation.";
+ }
+ container interfaces {
+ status obsolete;
+ description
+ "Network-layer interfaces used for routing.";
+ leaf-list interface {
+ type if:interface-state-ref;
+ status obsolete;
+ description
+ "Each entry is a reference to the name of a configured
+ network-layer interface.";
+ }
+ }
+ container control-plane-protocols {
+ status obsolete;
+ description
+ "Container for the list of routing protocol instances.";
+ list control-plane-protocol {
+ key "type name";
+ status obsolete;
+ description
+ "State data of a control-plane protocol instance.
+
+ An implementation MUST provide exactly one
+ system-controlled instance of the 'direct'
+ pseudo-protocol. Instances of other control-plane
+ protocols MAY be created by configuration.";
+ leaf type {
+ type identityref {
+ base control-plane-protocol;
+ }
+ status obsolete;
+ description
+ "Type of the control-plane protocol.";
+ }
+ leaf name {
+ type string;
+ status obsolete;
+ description
+ "The name of the control-plane protocol instance.
+
+ For system-controlled instances, this name is
+ persistent, i.e., it SHOULD NOT change across
+ reboots.";
+ }
+ }
+ }
+ container ribs {
+ status obsolete;
+ description
+ "Container for RIBs.";
+ list rib {
+ key "name";
+ min-elements 1;
+ status obsolete;
+ description
+ "Each entry represents a RIB identified by the 'name'
+ key. All routes in a RIB MUST belong to the same address
+ family.
+
+ An implementation SHOULD provide one system-controlled
+ default RIB for each supported address family.";
+ leaf name {
+ type string;
+ status obsolete;
+ description
+ "The name of the RIB.";
+ }
+ uses address-family {
+ status obsolete;
+ description
+ "The address family of the RIB.";
+ }
+ leaf default-rib {
+ if-feature "multiple-ribs";
+ type boolean;
+ default "true";
+ status obsolete;
+ description
+ "This flag has the value of 'true' if and only if the
+ RIB is the default RIB for the given address family.
+
+ By default, control-plane protocols place their routes
+ in the default RIBs.";
+ }
+ container routes {
+ status obsolete;
+ description
+ "Current contents of the RIB.";
+ list route {
+ status obsolete;
+ description
+ "A RIB route entry. This data node MUST be augmented
+ with information specific to routes of each address
+ family.";
+ leaf route-preference {
+ type route-preference;
+ status obsolete;
+ description
+ "This route attribute, also known as 'administrative
+ distance', allows for selecting the preferred route
+ among routes with the same destination prefix. A
+ smaller value indicates a route that is
+ more preferred.";
+ }
+ container next-hop {
+ status obsolete;
+ description
+ "Route's next-hop attribute.";
+ uses next-hop-state-content {
+ status obsolete;
+ description
+ "Route's next-hop attribute operational state.";
+ }
+ }
+ uses route-metadata {
+ status obsolete;
+ description
+ "Route metadata.";
+ }
+ }
+ }
+ /*
+ TODO(HC2VPP-298):
+ needed to comment out action which caused problems probapby simmilar to:
+ https://jira.opendaylight.org/browse/YANGTOOLS-841
+
+ action active-route {
+ status obsolete;
+ description
+ "Return the active RIB route that is used for the
+ destination address.
+
+ Address-family-specific modules MUST augment input
+ parameters with a leaf named 'destination-address'.";
+ output {
+ container route {
+ status obsolete;
+ description
+ "The active RIB route for the specified
+ destination.
+
+ If no route exists in the RIB for the destination
+ address, no output is returned.
+
+ Address-family-specific modules MUST augment this
+ container with appropriate route contents.";
+ container next-hop {
+ status obsolete;
+ description
+ "Route's next-hop attribute.";
+ uses next-hop-state-content {
+ status obsolete;
+ description
+ "Active route state data.";
+ }
+ }
+ uses route-metadata {
+ status obsolete;
+ description
+ "Active route metadata.";
+ }
+ }
+ }
+ }
+ */
+ }
+ }
+ }
+}
diff --git a/routing/routing-api/src/main/yang/vpp-ipv4-unicast-routing@2018-03-19.yang b/routing/routing-api/src/main/yang/vpp-ipv4-unicast-routing@2018-03-19.yang
new file mode 100644
index 000000000..d4147cc4b
--- /dev/null
+++ b/routing/routing-api/src/main/yang/vpp-ipv4-unicast-routing@2018-03-19.yang
@@ -0,0 +1,78 @@
+module vpp-ipv4-unicast-routing {
+
+ namespace "urn:ietf:params:xml:ns:yang:vpp-ipv4-unicast-routing";
+ prefix "vpp-v4ur";
+
+ import yang-ext {
+ prefix "ext";
+ }
+
+ import vpp-classifier {
+ prefix "classifier";
+ }
+
+ import hc2vpp-ietf-routing {
+ prefix "ietf-r";
+ revision-date 2018-03-13;
+ }
+
+ import hc2vpp-ietf-ipv4-unicast-routing {
+ prefix "v4ur";
+ revision-date 2018-03-13;
+ }
+
+ import vpp-routing {
+ prefix "vpp-rt";
+ revision-date 2018-03-19;
+ }
+
+ import vpp-routing-types {
+ prefix "vpp-rt-tp";
+ revision-date 2018-04-06;
+ }
+
+ organization
+ "FD.io - The Fast Data Project";
+
+ contact
+ "Hc2vpp Wiki <https://wiki.fd.io/view/Hc2vpp>
+ Mailing List <hc2vpp@lists.fd.io>";
+
+ description
+ "This module contains a collection of YANG definitions
+ that extend hc2vpp-ietf-routing module
+ with VPP specific ipv4 unicast routing features.
+
+ Copyright (c) 2018 Bell Canada, Pantheon.tech 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.";
+
+ revision 2018-03-19 {
+ description "Initial revision";
+ }
+
+ augment "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:static-routes/" +
+ "v4ur:ipv4/v4ur:route/v4ur:next-hop/v4ur:next-hop-options/v4ur:next-hop-list/v4ur:next-hop-list/v4ur:next-hop"
+ {
+ ext:augment-identifier "vpp-ipv4-next-hop-augmentation";
+ uses vpp-rt-tp:vpp-next-hop-attributes;
+ }
+
+ augment "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:static-routes/v4ur:ipv4/v4ur:route"
+ {
+ ext:augment-identifier "vpp-ipv4-route-attributes-augmentation";
+ container vpp-ipv4-route{
+ uses vpp-rt:vpp-route-attributes;
+ }
+ }
+}
diff --git a/routing/routing-api/src/main/yang/vpp-ipv6-unicast-routing@2018-03-19.yang b/routing/routing-api/src/main/yang/vpp-ipv6-unicast-routing@2018-03-19.yang
new file mode 100644
index 000000000..dcad55e80
--- /dev/null
+++ b/routing/routing-api/src/main/yang/vpp-ipv6-unicast-routing@2018-03-19.yang
@@ -0,0 +1,78 @@
+module vpp-ipv6-unicast-routing {
+
+ namespace "urn:ietf:params:xml:ns:yang:vpp-ipv6-unicast-routing";
+ prefix "vpp-v6ur";
+
+ import yang-ext {
+ prefix "ext";
+ }
+
+ import vpp-classifier {
+ prefix "classifier";
+ }
+
+ import hc2vpp-ietf-routing {
+ prefix "ietf-r";
+ revision-date 2018-03-13;
+ }
+
+ import hc2vpp-ietf-ipv6-unicast-routing {
+ prefix "v6ur";
+ revision-date 2018-03-13;
+ }
+
+ import vpp-routing {
+ prefix "vpp-rt";
+ revision-date 2018-03-19;
+ }
+
+ import vpp-routing-types {
+ prefix "vpp-rt-tp";
+ revision-date 2018-04-06;
+ }
+
+ organization
+ "FD.io - The Fast Data Project";
+
+ contact
+ "Hc2vpp Wiki <https://wiki.fd.io/view/Hc2vpp>
+ Mailing List <hc2vpp@lists.fd.io>";
+
+ description
+ "This module contains a collection of YANG definitions
+ that extend hc2vpp-ietf-routing module
+ with VPP specific ipv6 unicast routing features.
+
+ Copyright (c) 2018 Bell Canada, Pantheon.tech 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.";
+
+ revision 2018-03-19 {
+ description "Initial revision";
+ }
+
+ augment "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:static-routes/" +
+ "v6ur:ipv6/v6ur:route/v6ur:next-hop/v6ur:next-hop-options/v6ur:next-hop-list/v6ur:next-hop-list/v6ur:next-hop"
+ {
+ ext:augment-identifier "vpp-ipv6-next-hop-augmentation";
+ uses vpp-rt-tp:vpp-next-hop-attributes;
+ }
+
+ augment "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:static-routes/v6ur:ipv6/v6ur:route"
+ {
+ ext:augment-identifier "vpp-ipv6-route-attributes-augmentation";
+ container vpp-ipv6-route{
+ uses vpp-rt:vpp-route-attributes;
+ }
+ }
+}
diff --git a/routing/routing-api/src/main/yang/vpp-routing-ra@2017-05-02.yang b/routing/routing-api/src/main/yang/vpp-routing-ra@2018-03-19.yang
index 87dfdbd57..5be3f6d38 100644
--- a/routing/routing-api/src/main/yang/vpp-routing-ra@2017-05-02.yang
+++ b/routing/routing-api/src/main/yang/vpp-routing-ra@2018-03-19.yang
@@ -9,10 +9,20 @@ module vpp-routing-ra {
import hc2vpp-ietf-routing {
prefix "ietf-r";
+ revision-date 2018-03-13;
}
import hc2vpp-ietf-ipv6-unicast-routing {
prefix "v6ur";
+ revision-date 2018-03-13;
+ }
+
+ import ietf-ip {
+ prefix "ip";
+ }
+
+ import ietf-interfaces {
+ prefix "if";
}
organization
@@ -41,6 +51,11 @@ module vpp-routing-ra {
See the License for the specific language governing permissions and
limitations under the License.";
+ revision 2018-03-19 {
+ description
+ "Update hc2vpp-ietf-routing revision-date to 2018-03-13";
+ }
+
revision 2017-05-02 {
description "Changed namespace";
}
@@ -117,16 +132,14 @@ module vpp-routing-ra {
"https://docs.fd.io/vpp/17.04/clicmd_src_vnet_ip.html#clicmd_ip6_nd";
}
- augment "/ietf-r:routing/ietf-r:routing-instance/ietf-r:interfaces/ietf-r:interface/"
- + "v6ur:ipv6-router-advertisements" {
+ augment "/if:interfaces/if:interface/ip:ipv6/v6ur:ipv6-router-advertisements" {
ext:augment-identifier "ipv6-router-advertisements-vpp-augmentation";
uses ipv6-router-advertisements-vpp-attributes;
}
- augment "/ietf-r:routing/ietf-r:routing-instance/ietf-r:interfaces/ietf-r:interface/"
- + "v6ur:ipv6-router-advertisements/v6ur:prefix-list/v6ur:prefix" {
+ augment "/if:interfaces/if:interface/ip:ipv6/v6ur:ipv6-router-advertisements/v6ur:prefix-list/v6ur:prefix" {
// TODO control-adv-prefixes/advertise case should be target node (change after yangtools issues are solved)
ext:augment-identifier "control-adv-prefixes-vpp-augmentation";
uses control-adv-prefixes-vpp-attributes;
}
-} \ No newline at end of file
+}
diff --git a/routing/routing-api/src/main/yang/vpp-routing-table-lookup@2017-09-17.yang b/routing/routing-api/src/main/yang/vpp-routing-types@2018-04-06.yang
index 4e646f996..bba228b73 100644
--- a/routing/routing-api/src/main/yang/vpp-routing-table-lookup@2017-09-17.yang
+++ b/routing/routing-api/src/main/yang/vpp-routing-types@2018-04-06.yang
@@ -1,11 +1,7 @@
-module vpp-routing-table-lookup {
+module vpp-routing-types {
- namespace "urn:ietf:params:xml:ns:yang:vpp-routing-table-lookup";
- prefix "vpp-routing";
-
- import vpp-routing {
- prefix "vpp-r";
- }
+ namespace "urn:ietf:params:xml:ns:yang:vpp-routing-types";
+ prefix "vpp-routing-types";
organization
"FD.io - The Fast Data Project";
@@ -15,10 +11,11 @@ module vpp-routing-table-lookup {
Mailing List <hc2vpp@lists.fd.io>";
description
- "This module extends hc2vpp-ietf-routing module
- with VPP table lookup option.
+ "This module contains a collection of YANG definitions
+ that extend hc2vpp-ietf-routing-types module
+ with VPP specific data.
- Copyright (c) 2017 Cisco and/or its affiliates.
+ Copyright (c) 2018 Bell Canada, Pantheon.tech 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.
@@ -32,18 +29,32 @@ module vpp-routing-table-lookup {
See the License for the specific language governing permissions and
limitations under the License.";
- revision 2017-09-17 {
- description "Initial revision";
+ revision 2018-04-06 {
+ description "Initial revision.";
+ }
+
+ /*** Collection of types related to VPP routing ***/
+
+ typedef vni-reference {
+ type uint32;
+ description "Vrf index reference";
+ }
+
+ /*** Groupings ***/
+
+ grouping vpp-next-hop-attributes {
+ leaf weight{
+ type uint8;
+ description "Weight classification for next hop in list of next hops";
+ }
}
grouping table-lookup-case-params {
leaf secondary-vrf {
- type vpp-r:vni-reference;
- mandatory true;
- description "Secondary vrf used to lookup in";
+ type vni-reference;
+ mandatory true;
+ description "Secondary vrf used to lookup in";
}
// uses special deaggregation address every time : 0.0.0.0
}
-
- //TODO - HONEYCOMB-398/HC2VPP-237 - move table lookup case here
-} \ No newline at end of file
+}
diff --git a/routing/routing-api/src/main/yang/vpp-routing@2017-09-17.yang b/routing/routing-api/src/main/yang/vpp-routing@2018-03-19.yang
index 2088fec38..aad069bdf 100644
--- a/routing/routing-api/src/main/yang/vpp-routing@2017-09-17.yang
+++ b/routing/routing-api/src/main/yang/vpp-routing@2018-03-19.yang
@@ -13,6 +13,12 @@ module vpp-routing {
import hc2vpp-ietf-routing {
prefix "ietf-r";
+ revision-date 2018-03-13;
+ }
+
+ import vpp-routing-types {
+ prefix vpp-routing-types;
+ revision-date 2018-04-06;
}
organization
@@ -41,6 +47,10 @@ module vpp-routing {
See the License for the specific language governing permissions and
limitations under the License.";
+ revision 2018-03-19 {
+ description "Update hc2vpp-ietf-routing revision-date to 2018-03-13";
+ }
+
revision 2017-09-17 {
description "Support for table lookup option moved to separate model.";
}
@@ -49,11 +59,6 @@ module vpp-routing {
description "Initial revision.";
}
- typedef vni-reference{
- type uint32;
- description "Vrf index reference";
- }
-
grouping vpp-route-attributes {
leaf classify-table{
// classify_table_index + is_classify flag
@@ -65,25 +70,17 @@ module vpp-routing {
grouping vpp-routing-protocol-attributes{
//vrf_id
leaf primary-vrf{
- type vni-reference;
+ type vpp-routing-types:vni-reference;
mandatory true;
description "Main vrf associated to route";
}
}
- augment /ietf-r:routing/ietf-r:routing-instance/ietf-r:routing-protocols/ietf-r:routing-protocol{
+ augment /ietf-r:routing/ietf-r:control-plane-protocols/ietf-r:control-plane-protocol{
ext:augment-identifier "routing-protocol-vpp-attr";
container vpp-protocol-attributes {
presence "Config attributes";
uses vpp-routing-protocol-attributes;
}
}
-
- augment /ietf-r:routing-state/ietf-r:routing-instance/ietf-r:routing-protocols/ietf-r:routing-protocol{
- ext:augment-identifier "routing-protocol-state-vpp-attr";
- container vpp-protocol-state-attributes {
- presence "Operational attributes";
- uses vpp-routing-protocol-attributes;
- }
- }
-} \ No newline at end of file
+}