summaryrefslogtreecommitdiffstats
path: root/mpls/api/src/main/yang
diff options
context:
space:
mode:
Diffstat (limited to 'mpls/api/src/main/yang')
-rwxr-xr-x[-rw-r--r--]mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang (renamed from mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang)290
-rw-r--r--mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang2
2 files changed, 205 insertions, 87 deletions
diff --git a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang
index ae8688bbd..9da4bb942 100644..100755
--- a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang
+++ b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang
@@ -8,10 +8,13 @@ module hc2vpp-ietf-mpls-static {
prefix mpls;
}
-/*
- TODO: changed to modified version of ietf-routing that we use
- Set back to ietf-routing after HC2VPP-253 is resolved.
-*/
+ /*
+ TODO: HC2VPP-307 - Remove workarounds for ODL bugs from ietf-mpls YANG.
+ */
+ /*
+ TODO: changed to modified version of ietf-routing that we use
+ Set back to ietf-routing after HC2VPP-298 is resolved.
+ */
import hc2vpp-ietf-routing {
prefix "rt";
}
@@ -53,7 +56,6 @@ module hc2vpp-ietf-mpls-static {
WG Chair: Ross Callon
<mailto:rcallon@juniper.net>
-
WG Chair: George Swallow
<mailto:swallow.ietf@gmail.com>
@@ -93,9 +95,9 @@ module hc2vpp-ietf-mpls-static {
/*
TODO: 2017-07-02 defines grouping in-segment but does not use it.
- Bump to newer version after the issue is resolved.
+ Bump to newer version after HC2VPP-306 is resolved.
*/
- revision "2017-03-10" {
+ revision "2017-07-02" {
description
"Latest revision:
- Addressed MPLS-RT review comments";
@@ -112,6 +114,35 @@ module hc2vpp-ietf-mpls-static {
configured static LSP.";
}
+ typedef mpls-operations-type {
+ type enumeration {
+ enum impose-and-forward {
+ description
+ "Operation impose outgoing label(s) and forward to
+ next-hop";
+ }
+ enum pop-and-forward {
+ description
+ "Operation pop incoming label and forward to next-hop";
+ }
+ enum pop-impose-and-forward {
+ description
+ "Operation pop incoming label, impose one or more
+ outgoing label(s) and forward to next-hop";
+ }
+ enum swap-and-forward {
+ description
+ "Operation swap incoming label, with outgoing label and
+ forward to next-hop";
+ }
+ enum pop-and-lookup {
+ description
+ "Operation pop incoming label and perform a lookup";
+ }
+ }
+ description "MPLS operations types";
+ }
+
grouping path-basic_config {
description "common definitions for statics";
@@ -134,6 +165,53 @@ module hc2vpp-ietf-mpls-static {
}
}
+ grouping path-outgoing-labels_config {
+ description "Path outgoing labels grouping";
+ leaf index {
+ type uint8 {
+ range "0..255";
+ }
+ description
+ "Index of the label. Index 0 indicates
+ top of the label stack";
+ }
+ leaf label {
+ type rt-types:mpls-label;
+ description
+ "The outgoing MPLS labels to impose";
+ }
+ }
+
+ grouping path-outgoing-labels {
+ description "Path outgoing labels grouping";
+ container outgoing-labels {
+ description "List of outgoing labels";
+ list outgoing-labels {
+ key "index";
+ description "Outgoing label list";
+ leaf index {
+ type leafref {
+ path "../config/index";
+ }
+ description
+ "Index of the label. Index 0 indicates
+ top of the label stack";
+ }
+ container config {
+ description
+ "Configuration intended parameters";
+ uses path-outgoing-labels_config;
+ }
+ container state {
+ config false;
+ description
+ "Configuration applied parameters and state";
+ uses path-outgoing-labels_config;
+ }
+ }
+ }
+ }
+
grouping path-properties_config {
description
"MPLS path properties";
@@ -155,13 +233,6 @@ module hc2vpp-ietf-mpls-static {
"The address of the next-hop";
}
- leaf-list outgoing-labels {
- type rt-types:mpls-label;
- ordered-by user;
- description
- "The outgoing MPLS labels to impose";
- }
-
leaf outgoing-interface {
type if:interface-ref;
description
@@ -197,103 +268,148 @@ module hc2vpp-ietf-mpls-static {
}
}
- grouping static-lsp_config {
- description "common definitions for static LSPs";
-
- container in-segment {
- description
- "MPLS incoming segment";
- choice type {
- description
- "Basic FEC choice";
- case ip-prefix {
- leaf ip-prefix {
- type inet:ip-prefix;
- description "An IP prefix";
+ grouping static-lsp-paths {
+ description "Static LSP path grouping";
+ choice out-segment {
+ description "The MPLS out-segment type choice";
+ case simple-path {
+ container simple-path {
+ description "Simple path container";
+ container config {
+ description
+ "Holds the intended configuration";
+ uses path-basic_config;
}
- }
- case mpls-label {
- leaf incoming-label {
- type rt-types:mpls-label;
- description "label value on the incoming packet";
+ container state {
+ config false;
+ description
+ "Holds the state and inuse configuration";
+ uses path-basic_config;
}
}
- /*
- Currently not supported. Commented out due to ODL issues (MDSAL-182, YANGTOOLS-677).
- case tunnel {
- leaf tunnel {
- type te:tunnel-ref;
- description "TE tunnel FEC mapping";
+ }
+ case multiple-paths {
+ container paths {
+ description "List of outgoing paths";
+ list path {
+ key path-index;
+ description
+ "The list of MPLS paths associated with the FEC";
+ leaf path-index {
+ type leafref {
+ path "../config/path-index";
+ }
+ description "Index of the path";
+ }
+ container config {
+ description
+ "Holds the intended configuration";
+ uses path-properties_config;
+ }
+ container state {
+ config false;
+ description
+ "Holds the state and inuse configuration";
+ uses path-properties_config;
+ }
}
+ uses path-outgoing-labels;
}
- */
- }
- leaf incoming-interface {
- type if:interface-ref;
- description
- "Optional incoming interface if FEC is restricted
- to traffic incoming on a specific interface";
}
}
+ }
- leaf operation {
- type enumeration {
- enum impose-and-forward {
- description
- "Operation impose outgoing label(s) and forward to
- next-hop";
- }
- enum pop-and-forward {
- description
- "Operation pop incoming label and forward to next-hop";
- }
- enum pop-impose-and-forward {
- description
- "Operation pop incoming label, impose one or more
- outgoing label(s) and forward to next-hop";
+ grouping in-segment_config {
+ description "In-segment grouping";
+ choice type {
+ description
+ "Basic FEC choice";
+ case ip-prefix {
+ leaf ip-prefix {
+ type inet:ip-prefix;
+ description "An IP prefix";
}
- enum swap-and-forward {
- description
- "Operation swap incoming label, with outgoing label and
- forward to next-hop";
+ }
+ case mpls-label {
+ leaf incoming-label {
+ type rt-types:mpls-label;
+ description "label value on the incoming packet";
}
- enum pop-and-lookup {
- description
- "Operation pop incoming label and perform a lookup";
+ }
+ /* Import TE generic types */
+ /*
+ Yangtools has some issues with ietf-te model.
+ There is no plan to support tunnels currently, so we simply comment this out.
+ TODO: remove comment after following issues are resolved:
+ https://jira.opendaylight.org/browse/MDSAL-182
+ https://jira.opendaylight.org/browse/YANGTOOLS-677
+
+ case tunnel {
+ leaf tunnel {
+ type te:tunnel-ref;
+ description "TE tunnel FEC mapping";
}
}
+ */
+ }
+ leaf incoming-interface {
+ type if:interface-ref;
description
- "The MPLS operation to be executed on the incoming packet";
+ "Optional incoming interface if FEC is restricted
+ to traffic incoming on a specific interface";
}
+ }
- choice out-segment {
- description "The MPLS out-segment type choice";
- case simple-path {
- uses path-basic_config;
+ grouping in-segment {
+ description "In-segment grouping";
+ container in-segment {
+ description
+ "MPLS incoming segment";
+ container config {
+ description
+ "Holds the intended configuration";
+ uses in-segment_config;
}
- case path-list {
- list paths {
- key path-index;
- description
- "The list of MPLS paths associated with the FEC";
- uses path-properties_config;
- }
+ container state {
+ config false;
+ description
+ "Holds the state and inuse configuration";
+ uses in-segment_config;
}
}
}
- grouping static-lsp {
- description "grouping for top level list of static LSPs";
+ grouping static-lsp-top_config {
+ description "Static LSP configuration grouping";
+ /*
+ TODO: 2017-07-02 defines grouping in-segment but was not used - HC2VPP-306.
+ Added it here as it was in static-lsp-config in 2017-03-10 revision.
+ This will probably be fixed in next version of this model.
+ */
+ uses in-segment;
+ leaf name {
+ type string;
+ description "name to identify the LSP";
+ }
+ leaf operation {
+ type mpls-operations-type;
+ description
+ "The MPLS operation to be executed on the incoming packet";
+ }
+ }
+
+ grouping static-lsp-top {
+ description "common definitions for static LSPs";
container config {
description
"Holds the intended configuration";
- uses static-lsp_config;
+ uses static-lsp-top_config;
}
container state {
config false;
description
"Holds the state and inuse configuration";
- uses static-lsp_config;
+ uses static-lsp-top_config;
}
}
@@ -305,12 +421,14 @@ module hc2vpp-ietf-mpls-static {
list static-lsp {
key name;
description "list of defined static LSPs";
-
leaf name {
- type string;
+ type leafref {
+ path "../config/name";
+ }
description "name to identify the LSP";
}
- uses static-lsp;
+ uses static-lsp-top;
+ uses static-lsp-paths;
}
}
}
diff --git a/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang b/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang
index c417046c0..8b5aa5ee8 100644
--- a/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang
+++ b/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang
@@ -15,7 +15,7 @@ module vpp-mpls {
import hc2vpp-ietf-mpls-static {
prefix "mpls-static";
- revision-date 2017-03-10;
+ revision-date 2017-07-02;
}
import yang-ext {