Adding OpenConfig YANG models.
Change-Id: I0a2fdd5826e80933cf4b9ae939ff3051acec02aa
diff --git a/models/openconfig/src/main/yang/mpls/openconfig-mpls-igp.yang b/models/openconfig/src/main/yang/mpls/openconfig-mpls-igp.yang
new file mode 100644
index 0000000..309be68
--- /dev/null
+++ b/models/openconfig/src/main/yang/mpls/openconfig-mpls-igp.yang
@@ -0,0 +1,98 @@
+submodule openconfig-mpls-igp {
+
+ yang-version "1";
+
+ belongs-to "openconfig-mpls" {
+ prefix "oc-mpls";
+ }
+
+
+ // import some basic types
+ import openconfig-mpls-ldp { prefix oc-ldp; }
+ import openconfig-extensions { prefix oc-ext; }
+
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "Configuration generic configuration parameters for IGP-congruent
+ LSPs";
+
+ oc-ext:openconfig-version "2.4.0";
+
+ revision "2017-06-21" {
+ description
+ "Add TC bits typedef.";
+ reference "2.4.0";
+ }
+
+ revision "2017-03-22" {
+ description
+ "Add RSVP calculated-absolute-subscription-bw";
+ reference "2.3.0";
+ }
+
+ revision "2017-01-26" {
+ description
+ "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
+ reference "2.2.0";
+ }
+
+ revision "2016-12-15" {
+ description
+ "Add additional MPLS parameters";
+ reference "2.1.0";
+ }
+
+ revision "2016-09-01" {
+ description
+ "Revisions based on implementation feedback";
+ reference "2.0.0";
+ }
+
+ revision "2016-08-08" {
+ description
+ "Public release of MPLS models";
+ reference "1.0.1";
+ }
+
+ // grouping statements
+
+
+ grouping igp-lsp-common {
+ description
+ "common definitions for IGP-congruent LSPs";
+
+ }
+
+
+ grouping igp-lsp-setup {
+ description
+ "signaling protocol definitions for IGP-based LSPs";
+
+ container path-setup-protocol {
+ description
+ "select and configure the signaling method for
+ the LSP";
+
+ // uses path-setup-common;
+ uses oc-ldp:igp-lsp-ldp-setup;
+ }
+ }
+
+
+ // data definition statements
+
+ // augment statements
+
+ // rpc statements
+
+ // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/mpls/openconfig-mpls-ldp.yang b/models/openconfig/src/main/yang/mpls/openconfig-mpls-ldp.yang
new file mode 100644
index 0000000..b055d05
--- /dev/null
+++ b/models/openconfig/src/main/yang/mpls/openconfig-mpls-ldp.yang
@@ -0,0 +1,102 @@
+module openconfig-mpls-ldp {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/ldp";
+
+ prefix "ldp";
+
+ // import some basic types
+ import openconfig-extensions { prefix oc-ext; }
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "Configuration of Label Distribution Protocol global and LSP-
+ specific parameters for IGP-congruent LSPs";
+
+ oc-ext:openconfig-version "2.4.0";
+
+ revision "2017-06-21" {
+ description
+ "Add TC bits typedef.";
+ reference "2.4.0";
+ }
+
+ revision "2017-03-22" {
+ description
+ "Add RSVP calculated-absolute-subscription-bw";
+ reference "2.3.0";
+ }
+
+ revision "2017-01-26" {
+ description
+ "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
+ reference "2.2.0";
+ }
+
+ revision "2016-12-15" {
+ description
+ "Add additional MPLS parameters";
+ reference "2.1.0";
+ }
+
+ revision "2016-09-01" {
+ description
+ "Revisions based on implementation feedback";
+ reference "2.0.0";
+ }
+
+ revision "2016-08-08" {
+ description
+ "Public release of MPLS models";
+ reference "1.0.1";
+ }
+
+ // grouping statements
+
+ grouping ldp-global {
+ description
+ "global LDP signaling configuration";
+
+ container ldp {
+ description
+ "LDP global signaling configuration";
+ }
+ }
+
+
+ grouping igp-tunnel-ldp {
+ description
+ "common defintiions for LDP-signaled LSP tunnel
+ types";
+ }
+
+ grouping igp-lsp-ldp-setup {
+ description
+ "grouping for LDP setup attributes";
+
+ container ldp {
+ description
+ "LDP signaling setup for IGP-congruent LSPs";
+
+ uses igp-tunnel-ldp;
+
+ }
+ }
+
+ // data definition statements
+
+ // augment statements
+
+ // rpc statements
+
+ // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/mpls/openconfig-mpls-rsvp.yang b/models/openconfig/src/main/yang/mpls/openconfig-mpls-rsvp.yang
new file mode 100644
index 0000000..900b498
--- /dev/null
+++ b/models/openconfig/src/main/yang/mpls/openconfig-mpls-rsvp.yang
@@ -0,0 +1,1140 @@
+module openconfig-mpls-rsvp {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/rsvp";
+
+ prefix "oc-rsvp";
+
+ // import some basic types
+ import openconfig-inet-types { prefix inet; }
+ import openconfig-mpls-types { prefix oc-mplst; }
+ import openconfig-yang-types { prefix yang; }
+ import openconfig-types { prefix oc-types; }
+ import openconfig-extensions { prefix oc-ext; }
+ import openconfig-interfaces { prefix oc-if; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "Configuration for RSVP-TE signaling, including global protocol
+ parameters and LSP-specific configuration for constrained-path
+ LSPs";
+
+ oc-ext:openconfig-version "2.4.0";
+
+ revision "2017-06-21" {
+ description
+ "Add TC bits typedef.";
+ reference "2.4.0";
+ }
+
+ revision "2017-03-22" {
+ description
+ "Add RSVP calculated-absolute-subscription-bw";
+ reference "2.3.0";
+ }
+
+ revision "2017-01-26" {
+ description
+ "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
+ reference "2.2.0";
+ }
+
+ revision "2016-12-15" {
+ description
+ "Add additional MPLS parameters";
+ reference "2.1.0";
+ }
+
+ revision "2016-09-01" {
+ description
+ "Revisions based on implementation feedback";
+ reference "2.0.0";
+ }
+
+ revision "2016-08-08" {
+ description
+ "Public release of MPLS models";
+ reference "1.0.1";
+ }
+
+ // grouping statements
+
+ grouping mpls-rsvp-soft-preemption_config {
+ description
+ "Configuration for MPLS soft preemption";
+ leaf enable {
+ type boolean;
+ default false;
+ description
+ "Enables soft preemption on a node.";
+ }
+
+ leaf soft-preemption-timeout {
+ type uint16 {
+ range 0..max;
+ }
+ default 30;
+ description
+ "Timeout value for soft preemption to revert
+ to hard preemption. The default timeout for
+ soft-preemption is 30 seconds - after which
+ the local system reverts to hard pre-emption.";
+ reference "RFC5712 MPLS-TE soft preemption";
+ }
+ }
+
+ grouping mpls-rsvp-soft-preemption {
+ description
+ "Top level group for MPLS soft preemption";
+ container soft-preemption {
+ description
+ "Protocol options relating to RSVP
+ soft preemption";
+ container config {
+ description
+ "Configuration parameters relating to RSVP
+ soft preemption support";
+ uses mpls-rsvp-soft-preemption_config;
+ }
+ container state {
+ config false;
+ description
+ "State parameters relating to RSVP
+ soft preemption support";
+ uses mpls-rsvp-soft-preemption_config;
+ }
+ }
+ }
+
+ grouping mpls-rsvp-hellos_config {
+ description
+ "RSVP protocol options configuration.";
+
+ leaf hello-interval {
+ type uint16 {
+ range 1000..60000;
+ }
+ units milliseconds;
+ default 9000;
+ description
+ "set the interval in ms between RSVP hello
+ messages";
+ reference
+ "RFC 3209: RSVP-TE: Extensions to RSVP for
+ LSP Tunnels.
+ RFC 5495: Description of the Resource
+ Reservation Protocol - Traffic-Engineered
+ (RSVP-TE) Graceful Restart Procedures";
+ }
+
+ leaf refresh-reduction {
+ type boolean;
+ default true;
+ description
+ "enables all RSVP refresh reduction message
+ bundling, RSVP message ID, reliable message delivery
+ and summary refresh";
+ reference
+ "RFC 2961 RSVP Refresh Overhead Reduction
+ Extensions";
+ }
+ }
+
+ grouping mpls-rsvp-hellos {
+ description
+ "Top level grouping for RSVP hellos parameters";
+ // TODO: confirm that the described semantics are supported
+ // on various implementations. Finer grain configuration
+ // will be vendor-specific
+
+ container hellos {
+ description
+ "Top level container for RSVP hello parameters";
+
+ container config {
+ description
+ "Configuration parameters relating to RSVP
+ hellos";
+ uses mpls-rsvp-hellos_config;
+ }
+ container state {
+ config false;
+ description
+ "State information associated with RSVP hellos";
+ uses mpls-rsvp-hellos_config;
+ }
+ }
+ }
+
+ grouping mpls-rsvp-subscription_config {
+ description
+ "RSVP subscription configuration";
+
+ leaf subscription {
+ type oc-types:percentage;
+ description
+ "percentage of the interface bandwidth that
+ RSVP can reserve";
+ }
+ }
+
+ grouping mpls-rsvp-subscription_state {
+ description
+ "Operational state parameters relating to the
+ bandwidth subscription on an interface";
+
+ leaf calculated-absolute-subscription-bw {
+ type uint64;
+ units "kbps";
+ description
+ "The calculated absolute value of the bandwidth
+ which is reservable to RSVP-TE on the interface
+ prior to any adjustments that may be made from
+ external sources.";
+ }
+ }
+
+ grouping mpls-rsvp-subscription {
+ description
+ "Top level group for RSVP subscription options";
+
+ container subscription {
+ description
+ "Bandwidth percentage reservable by RSVP
+ on an interface";
+
+ container config {
+ description
+ "Configuration parameters relating to RSVP
+ subscription options";
+ uses mpls-rsvp-subscription_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters relating to RSVP
+ subscription options";
+ uses mpls-rsvp-subscription_config;
+ uses mpls-rsvp-subscription_state;
+ }
+ }
+ }
+
+ grouping mpls-rsvp-graceful-restart_config {
+ description
+ "Configuration parameters relating to RSVP Graceful-Restart";
+
+ leaf enable {
+ type boolean;
+ default false;
+ description
+ "Enables graceful restart on the node.";
+ }
+
+ leaf restart-time {
+ type uint32;
+ description
+ "Graceful restart time (seconds).";
+ reference
+ "RFC 5495: Description of the Resource
+ Reservation Protocol - Traffic-Engineered
+ (RSVP-TE) Graceful Restart Procedures";
+ }
+ leaf recovery-time {
+ type uint32;
+ description
+ "RSVP state recovery time";
+ }
+ }
+
+ grouping mpls-rsvp-graceful-restart {
+ description
+ "Top level group for RSVP graceful-restart
+ parameters";
+
+ container graceful-restart {
+ description
+ "Operational state and configuration parameters relating to
+ graceful-restart for RSVP";
+
+ container config {
+ description
+ "Configuration parameters relating to
+ graceful-restart";
+ uses mpls-rsvp-graceful-restart_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State information associated with
+ RSVP graceful-restart";
+ uses mpls-rsvp-graceful-restart_config;
+ }
+ }
+ }
+
+ grouping mpls-rsvp-authentication_config {
+ description
+ "RSVP authentication parameters container.";
+
+ leaf enable {
+ type boolean;
+ default false;
+ description
+ "Enables RSVP authentication on the node.";
+ }
+
+ leaf authentication-key {
+ type string {
+ // Juniper supports 1..16 while
+ // Cisco has a much bigger range, up to 60.
+ length "1..32";
+ }
+ description
+ "authenticate RSVP signaling
+ messages";
+ reference
+ "RFC 2747: RSVP Cryptographic Authentication";
+ }
+ }
+
+ grouping mpls-rsvp-authentication {
+ description
+ "Top level group for RSVP authentication,
+ as per RFC2747";
+
+ container authentication {
+ description
+ "Configuration and state parameters relating to RSVP
+ authentication as per RFC2747";
+
+ container config {
+ description
+ "Configuration parameters relating
+ to authentication";
+ uses mpls-rsvp-authentication_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State information associated
+ with authentication";
+ uses mpls-rsvp-authentication_config;
+ }
+ }
+ }
+
+ grouping mpls-rsvp-protection_config {
+ description
+ "RSVP facility (link/node) protection configuration";
+
+ leaf link-protection-style-requested {
+ type identityref {
+ base oc-mplst:PROTECTION_TYPE;
+ }
+ default oc-mplst:LINK_NODE_PROTECTION_REQUESTED;
+ description
+ "Style of mpls frr protection desired:
+ link, link-node, or unprotected";
+ }
+
+ leaf bypass-optimize-interval {
+ type uint16;
+ units seconds;
+ description
+ "interval between periodic optimization
+ of the bypass LSPs";
+ // note: this is interface specific on juniper
+ // on iox, this is global. need to resolve.
+ }
+ // to be completed, things like enabling link protection,
+ // optimization times, etc.
+ }
+
+ grouping mpls-rsvp-link-protection {
+ description
+ "Top level group for RSVP protection";
+ container protection {
+ description
+ "link-protection (NHOP) related configuration";
+
+ container config {
+ description
+ "Configuration for link-protection";
+ uses mpls-rsvp-protection_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State for link-protection";
+ uses mpls-rsvp-protection_config;
+ }
+ }
+ }
+
+ grouping mpls-rsvp-statistics {
+ description
+ "Top level grouping for RSVP protocol state";
+
+ uses mpls-rsvp-protocol-state;
+ }
+
+ grouping rsvp-global {
+ description
+ "Global RSVP protocol configuration";
+ container rsvp-te {
+ description
+ "RSVP-TE global signaling protocol configuration";
+
+ uses mpls-rsvp-session-state;
+
+ container neighbors {
+ description
+ "Configuration and state for RSVP neighbors connecting
+ to the device";
+
+ list neighbor {
+ key "address";
+
+ config false;
+
+ description
+ "List of RSVP neighbors of the local system";
+
+ leaf address {
+ type leafref {
+ path "../state/address";
+ }
+ description
+ "Reference to the address of the RSVP neighbor";
+ }
+
+ container state {
+ config false;
+ description
+ "Operational state parameters relating to the
+ RSVP neighbor";
+ uses mpls-rsvp-neighbor-state;
+ }
+ }
+ }
+
+ container global {
+ description
+ "Platform wide RSVP configuration and state";
+ uses mpls-rsvp-graceful-restart;
+ uses mpls-rsvp-soft-preemption;
+ uses mpls-rsvp-hellos;
+
+ container state {
+ config false;
+ description
+ "Platform wide RSVP state, including counters";
+ // TODO - reconcile global and per-interface
+ // protocol-related statistics
+
+ container counters {
+ config false;
+ description
+ "Platform wide RSVP statistics and counters";
+ uses mpls-rsvp-global-protocol-state;
+ uses mpls-rsvp-statistics;
+ }
+ }
+ }
+
+ container interface-attributes {
+ // interfaces, bw percentages, hello timers, etc goes here";
+ description
+ "Attributes relating to RSVP-TE enabled interfaces";
+
+ list interface {
+ key "interface-id";
+ description
+ "list of per-interface RSVP configurations";
+
+ leaf interface-id {
+ type leafref {
+ path "../config/interface-id";
+ }
+ description
+ "reference to the interface-id data";
+ }
+
+
+ container config {
+ description
+ "Configuration of per-interface RSVP parameters";
+ uses mpls-rsvp-interfaces-config;
+ }
+
+ container state {
+ config false;
+ description
+ "Per-interface RSVP protocol and state information";
+
+ uses mpls-rsvp-interfaces-state;
+ uses mpls-rsvp-interfaces-config;
+
+ container counters {
+ config false;
+ description
+ "Interface specific RSVP statistics and counters";
+ uses mpls-rsvp-protocol-state;
+ }
+ }
+
+ uses oc-if:interface-ref;
+ uses mpls-rsvp-interface-reservations;
+ uses mpls-rsvp-hellos;
+ uses mpls-rsvp-authentication;
+ uses mpls-rsvp-subscription;
+ uses mpls-rsvp-link-protection;
+ }
+ }
+ }
+ }
+
+ grouping rsvp-p2p-tunnel-attributes_config {
+ description
+ "properties of RSPP point-to-point paths";
+
+ leaf source {
+ when "/mpls/lsps/constrained-path/tunnel/config" +
+ "/signaling-protocol = 'PATH_SETUP_RSVP'" {
+ description
+ "When the signaling protocol is RSVP-TE ";
+ }
+ type inet:ip-address;
+ description
+ "RSVP-TE tunnel source address";
+ }
+
+ leaf soft-preemption {
+ when "/mpls/lsps/constrained-path/tunnel/config" +
+ "/signaling-protocol = 'PATH_SETUP_RSVP'" {
+ description
+ "When the signaling protocol is RSVP-TE ";
+ }
+ type boolean;
+ default false;
+ description
+ "Enables RSVP soft-preemption on this LSP";
+ }
+
+ uses rsvp-priorities_config;
+ }
+
+ grouping rsvp-priorities_config {
+ description
+ "Configuration paramters related to RSVP-TE priorities";
+
+ leaf setup-priority {
+ when "/mpls/lsps/constrained-path/tunnel/config" +
+ "/signaling-protocol = 'PATH_SETUP_RSVP'" {
+ description
+ "When the signaling protocol is RSVP-TE ";
+ }
+ type uint8 {
+ range 0..7;
+ }
+ default 7;
+ description
+ "RSVP-TE preemption priority during LSP setup, lower is
+ higher priority; default 7 indicates that LSP will not
+ preempt established LSPs during setup";
+ reference "RFC 3209 - RSVP-TE: Extensions to RSVP for
+ LSP Tunnels";
+ }
+
+ leaf hold-priority {
+ when "/mpls/lsps/constrained-path/tunnel/config" +
+ "/signaling-protocol = 'PATH_SETUP_RSVP'" {
+ description
+ "When the signaling protocol is RSVP-TE ";
+ }
+ type uint8 {
+ range 0..7;
+ }
+ default 0;
+ description
+ "preemption priority once the LSP is established,
+ lower is higher priority; default 0 indicates other LSPs
+ will not preempt the LSPs once established";
+ reference "RFC 3209 - RSVP-TE: Extensions to RSVP for
+ LSP Tunnels";
+ }
+ }
+
+ grouping rsvp-p2p-path-attributes_config {
+ description
+ "properties of RSPP point-to-point paths";
+
+ uses rsvp-priorities_config;
+
+ leaf retry-timer {
+ when "/mpls/lsps/constrained-path/tunnel/config" +
+ "/signaling-protocol = 'PATH_SETUP_RSVP'" {
+ description
+ "When the signaling protocol is RSVP-TE ";
+ }
+ type uint16 {
+ range 1..600;
+ }
+ units seconds;
+ description
+ "sets the time between attempts to establish the
+ LSP";
+ }
+ }
+
+ grouping mpls-rsvp-neighbor-state {
+ description
+ "State information for RSVP neighbors";
+
+ leaf address {
+ type inet:ip-address;
+ description
+ "Address of RSVP neighbor";
+ }
+
+ leaf detected-interface {
+ type string;
+ description
+ "Interface where RSVP neighbor was detected";
+ }
+
+ leaf neighbor-status {
+ type enumeration {
+ enum UP {
+ description
+ "RSVP hello messages are detected from the neighbor";
+ }
+ enum DOWN {
+ description
+ "RSVP neighbor not detected as up, due to a
+ communication failure or IGP notification
+ the neighbor is unavailable";
+ }
+ }
+ description
+ "Enumuration of possible RSVP neighbor states";
+ }
+
+ leaf refresh-reduction {
+ type boolean;
+ description
+ "Suppport of neighbor for RSVP refresh reduction";
+ reference
+ "RFC 2961 RSVP Refresh Overhead Reduction
+ Extensions";
+ }
+
+ }
+
+ grouping mpls-rsvp-session-state {
+ description
+ "State information for RSVP TE sessions";
+
+ container sessions {
+ description
+ "Enclosing container for sessions";
+
+ list session {
+ key "local-index";
+ config false;
+
+ description
+ "List of RSVP sessions";
+
+ leaf local-index {
+ type leafref {
+ path "../state/local-index";
+ }
+ description
+ "Reference to the local index for the RSVP
+ session";
+ }
+
+ uses mpls-rsvp-record-route-object-top;
+
+ container state {
+ description
+ "Operational state parameters relating to the
+ RSVP session";
+
+ leaf local-index {
+ type uint64;
+ description
+ "The index used to identify the RSVP session
+ on the local network element. This index is
+ generated by the device and is unique only
+ to the local network element.";
+ }
+
+ leaf source-address {
+ type inet:ip-address;
+ description
+ "Origin address of RSVP session";
+ }
+
+ leaf destination-address {
+ type inet:ip-address;
+ description
+ "Destination address of RSVP session";
+ }
+
+ leaf tunnel-id {
+ type uint16;
+ description
+ "The tunnel ID is an identifier used in the
+ RSVP session, which remains constant over
+ the life of the tunnel.";
+ reference "RFC 3209";
+ }
+
+ leaf lsp-id {
+ type uint16;
+ description
+ "The LSP ID distinguishes between two LSPs
+ originated from the same headend, and is
+ commonly used to distinguish RSVP sessions
+ during make before break operations.";
+ reference "RFC 3209";
+ }
+
+ leaf session-name {
+ type string;
+ description
+ "The signaled name of this RSVP session.";
+ }
+
+ leaf status {
+ type enumeration {
+ enum UP {
+ description
+ "RSVP session is up";
+ }
+ enum DOWN {
+ description
+ "RSVP session is down";
+ }
+ }
+ description
+ "Enumeration of RSVP session states";
+ }
+
+ leaf type {
+ type identityref {
+ base oc-mplst:LSP_ROLE;
+ }
+ description
+ "The type/role of the RSVP session, signifing
+ the session's role on the current device, such as
+ a transit session vs. an ingress session.";
+ }
+
+ leaf protection-requested {
+ type identityref {
+ base oc-mplst:PROTECTION_TYPE;
+ }
+ description
+ "The type of protection requested for the RSVP session";
+ }
+
+ leaf label-in {
+ type oc-mplst:mpls-label;
+ description
+ "Incoming MPLS label associated with this RSVP session";
+ }
+
+ leaf label-out {
+ type oc-mplst:mpls-label;
+ description
+ "Outgoing MPLS label associated with this RSVP session";
+ }
+
+ container sender-tspec {
+ description
+ "Operational state statistics relating to the SENDER_TSPEC
+ received for the RSVP session";
+
+ leaf rate {
+ type oc-types:ieeefloat32;
+ units "Bps";
+ description
+ "The rate at which the head-end device generates traffic,
+ expressed in bytes per second.";
+ reference
+ "RFC2210: RSVP with INTSERV";
+ }
+
+ leaf size {
+ type oc-types:ieeefloat32;
+ units "bytes per second";
+ description
+ "The size of the token bucket that is used to determine
+ the rate at which the head-end device generates traffic,
+ expressed in bytes per second.";
+ reference
+ "RFC2210: RSVP with INTSERV";
+ }
+
+ leaf peak-data-rate {
+ type union {
+ type oc-types:ieeefloat32;
+ type enumeration {
+ enum INFINITY {
+ description
+ "The head-end device has no maximum data rate.";
+ }
+ }
+ }
+ units "bytes per second";
+ description
+ "The maximum traffic generation rate that the head-end
+ device sends traffic at.";
+ reference
+ "RFC2210: RSVP with INTSERV";
+ }
+ }
+ }
+ }
+ }
+ } //rsvp-session-state
+
+ grouping mpls-rsvp-interfaces-config {
+ description
+ "RSVP configuration information relevant to an interface";
+
+ leaf interface-id {
+ type oc-if:interface-id;
+ description
+ "Identifier for the interface";
+ }
+ }
+
+ grouping mpls-rsvp-interfaces-state {
+ description
+ "RSVP state information relevant to an interface";
+
+ // Placeholder grouping
+ }
+
+ grouping mpls-rsvp-interface-reservations {
+ description
+ "Operational state related to interface bandwidth
+ reservations";
+
+ container bandwidth-reservations {
+ description
+ "Enclosing container for bandwidth reservation";
+ list bandwidth-reservation {
+ key "priority";
+ config false;
+ description
+ "Available and reserved bandwidth by priority on
+ the interface.";
+
+ leaf priority {
+ type leafref {
+ path "../state/priority";
+ }
+ description "Reference to the RSVP priority level";
+ }
+
+ container state {
+ description
+ "Operational state parameters relating to a
+ bandwidth reservation at a certain priority";
+
+ leaf priority {
+ type union {
+ type uint8 {
+ range 0..7;
+ }
+ type enumeration {
+ enum ALL {
+ description
+ "The ALL keyword represents the overall
+ state of the interface - i.e., the union
+ of all of the priority levels";
+ }
+ }
+ }
+ description
+ "RSVP priority level for LSPs traversing the interface";
+ }
+
+ leaf available-bandwidth {
+ type oc-mplst:bandwidth-mbps;
+ description
+ "Bandwidth currently available with the priority level,
+ or for the entire interface when the priority is set to
+ ALL";
+ }
+
+ leaf reserved-bandwidth {
+ type oc-mplst:bandwidth-mbps;
+ description
+ "Bandwidth currently reserved within the priority level,
+ or the sum of all priority levels when the keyword is set
+ to ALL";
+ }
+
+ leaf active-reservations-count {
+ type yang:gauge64;
+ description
+ "Number of active RSVP reservations in the associated
+ priority, or the sum of all reservations when the priority
+ level is set to ALL";
+ }
+
+ leaf highwater-mark {
+ type oc-mplst:bandwidth-mbps;
+ description
+ "Maximum bandwidth reserved on the interface within the
+ priority, or across all priorities in the case that the
+ priority level is set to ALL";
+ }
+ }
+ }
+ }
+ }
+
+ grouping mpls-rsvp-global-protocol-state {
+ description
+ "RSVP protocol statistics which may not apply
+ on an interface, but are significant globally.";
+
+ leaf path-timeouts {
+ type yang:counter64;
+ description
+ "TODO";
+ }
+
+ leaf reservation-timeouts {
+ type yang:counter64;
+ description
+ "TODO";
+ }
+
+ leaf rate-limited-messages {
+ type yang:counter64;
+ description
+ "RSVP messages dropped due to rate limiting";
+ }
+ }
+
+ grouping mpls-rsvp-protocol-state {
+ description
+ "RSVP protocol statistics and message counters";
+
+ leaf in-path-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP Path messages";
+ }
+
+ leaf in-path-error-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP Path Error messages";
+ }
+
+ leaf in-path-tear-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP Path Tear messages";
+ }
+
+ leaf in-reservation-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP Resv messages";
+ }
+
+ leaf in-reservation-error-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP Resv Error messages";
+ }
+
+ leaf in-reservation-tear-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP Resv Tear messages";
+ }
+
+ leaf in-hello-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP hello messages";
+ }
+
+ leaf in-srefresh-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP summary refresh messages";
+ }
+
+ leaf in-ack-messages {
+ type yang:counter64;
+ description
+ "Number of received RSVP refresh reduction ack
+ messages";
+ }
+
+ leaf out-path-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP PATH messages";
+ }
+
+ leaf out-path-error-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP Path Error messages";
+ }
+
+ leaf out-path-tear-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP Path Tear messages";
+ }
+
+ leaf out-reservation-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP Resv messages";
+ }
+
+ leaf out-reservation-error-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP Resv Error messages";
+ }
+
+ leaf out-reservation-tear-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP Resv Tear messages";
+ }
+
+ leaf out-hello-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP hello messages";
+ }
+
+ leaf out-srefresh-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP summary refresh messages";
+ }
+
+ leaf out-ack-messages {
+ type yang:counter64;
+ description
+ "Number of sent RSVP refresh reduction ack messages";
+ }
+ }
+
+ grouping mpls-rsvp-record-route-object-top {
+ description
+ "Top-level structure grouping for list of record route
+ objects.";
+
+ container record-route-objects {
+ description
+ "Enclosing container for MPLS RRO objects associated with the
+ traffic engineered tunnel.";
+
+ list record-route-object {
+
+ key "index";
+ config false;
+ description
+ "Read-only list of record route objects associated with the
+ traffic engineered tunnel. Each entry in the list
+ may contain a hop IP address, MPLS label allocated
+ at the hop, and the flags associated with the entry.";
+
+ leaf index {
+ type leafref {
+ path "../state/index";
+ }
+ description
+ "Reference to the index of the record route object.
+ The index is used to indicate the ordering of hops in
+ the path.";
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Information related to RRO objects. The hop, label, and
+ optional flags are present for each entry in the list.";
+
+ uses mpls-rsvp-record-route-object-state;
+ }
+ }
+ }
+ }
+
+ grouping mpls-rsvp-record-route-object-state {
+ description
+ "Grouping to hold information relating to record route
+ objects relevant to a traffic engineering LSP.";
+
+ leaf index {
+ type uint8;
+ description
+ "Index of object in the list. Used for ordering.";
+ }
+
+ leaf address {
+ type inet:ip-address;
+ description
+ "IP router hop for RRO entry";
+ }
+
+ leaf reported-label {
+ type oc-mplst:mpls-label;
+ description
+ "Label reported for RRO hop";
+ }
+
+ leaf reported-flags {
+ type uint8;
+ description
+ "Subobject flags for MPLS label";
+ }
+ }
+
+
+
+ // data definition statements
+
+ // augment statements
+
+ // rpc statements
+
+ // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/mpls/openconfig-mpls-sr.yang b/models/openconfig/src/main/yang/mpls/openconfig-mpls-sr.yang
new file mode 100644
index 0000000..aa2befc
--- /dev/null
+++ b/models/openconfig/src/main/yang/mpls/openconfig-mpls-sr.yang
@@ -0,0 +1,107 @@
+module openconfig-mpls-sr {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/mpls-sr";
+
+ prefix "oc-mpls-sr";
+
+
+ // import some basic types
+ import openconfig-extensions { prefix oc-ext; }
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "Configuration for MPLS with segment routing-based LSPs,
+ including global parameters, and LSP-specific configuration for
+ both constrained-path and IGP-congruent LSPs";
+
+ oc-ext:openconfig-version "2.4.0";
+
+ revision "2017-06-21" {
+ description
+ "Add TC bits typedef.";
+ reference "2.4.0";
+ }
+
+ revision "2017-03-22" {
+ description
+ "Add RSVP calculated-absolute-subscription-bw";
+ reference "2.3.0";
+ }
+
+ revision "2017-01-26" {
+ description
+ "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
+ reference "2.2.0";
+ }
+
+ revision "2016-12-15" {
+ description
+ "Add additional MPLS parameters";
+ reference "2.1.0";
+ }
+
+ revision "2016-09-01" {
+ description
+ "Revisions based on implementation feedback";
+ reference "2.0.0";
+ }
+
+ revision "2016-08-08" {
+ description
+ "Public release of MPLS models";
+ reference "1.0.1";
+ }
+
+ grouping sr-path-attributes_config {
+ description
+ "Configuration parameters relating to SR-TE LSPs";
+
+ leaf sid-selection-mode {
+ type enumeration {
+ enum ADJ_SID_ONLY {
+ description
+ "The SR-TE tunnel should only use adjacency SIDs
+ to build the SID stack to be pushed for the LSP";
+ }
+ enum MIXED_MODE {
+ description
+ "The SR-TE tunnel can use a mix of adjacency
+ and prefix SIDs to build the SID stack to be pushed
+ to the LSP";
+ }
+ }
+ default MIXED_MODE;
+ description
+ "The restrictions placed on the SIDs to be selected by the
+ calculation method for the explicit path when it is
+ instantiated for a SR-TE LSP";
+ }
+
+ leaf sid-protection-required {
+ type boolean;
+ default "false";
+ description
+ "When this value is set to true, only SIDs that are
+ protected are to be selected by the calculating method
+ when the explicit path is instantiated by a SR-TE LSP.";
+ }
+ }
+
+ // data definition statements
+
+ // augment statements
+
+ // rpc statements
+
+ // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/mpls/openconfig-mpls-static.yang b/models/openconfig/src/main/yang/mpls/openconfig-mpls-static.yang
new file mode 100644
index 0000000..182c0dc
--- /dev/null
+++ b/models/openconfig/src/main/yang/mpls/openconfig-mpls-static.yang
@@ -0,0 +1,280 @@
+submodule openconfig-mpls-static {
+
+ yang-version "1";
+
+ belongs-to "openconfig-mpls" {
+ prefix "mpls";
+ }
+
+ // import some basic types
+ import openconfig-mpls-types {prefix oc-mplst; }
+ import openconfig-inet-types { prefix inet; }
+ import openconfig-extensions { prefix oc-ext; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "Defines static LSP configuration";
+
+ oc-ext:openconfig-version "2.4.0";
+
+ revision "2017-06-21" {
+ description
+ "Add TC bits typedef.";
+ reference "2.4.0";
+ }
+
+ revision "2017-03-22" {
+ description
+ "Add RSVP calculated-absolute-subscription-bw";
+ reference "2.3.0";
+ }
+
+ revision "2017-01-26" {
+ description
+ "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
+ reference "2.2.0";
+ }
+
+ revision "2016-12-15" {
+ description
+ "Add additional MPLS parameters";
+ reference "2.1.0";
+ }
+
+ revision "2016-09-01" {
+ description
+ "Revisions based on implementation feedback";
+ reference "2.0.0";
+ }
+
+ revision "2016-08-08" {
+ description
+ "Public release of MPLS models";
+ reference "1.0.1";
+ }
+
+ // grouping statements
+
+ grouping static-lsp-common-config {
+ description
+ "common definitions for static LSPs";
+
+ leaf next-hop {
+ type inet:ip-address;
+ description
+ "next hop IP address for the LSP";
+ }
+
+ leaf incoming-label {
+ type oc-mplst:mpls-label;
+ description
+ "label value on the incoming packet";
+ }
+
+ leaf push-label {
+ type oc-mplst:mpls-label;
+ description
+ "label value to push at the current hop for the
+ LSP";
+ }
+ }
+
+ grouping static-lsp-ingress-config {
+ description
+ "Configuration data for ingress LSPs";
+
+ uses static-lsp-common-config;
+ }
+
+ grouping static-lsp-ingress-state {
+ description
+ "Operational state data for ingress LSPs";
+ }
+
+ grouping static-lsp-ingress-top {
+ description
+ "Top-level grouping for ingress LSP data";
+
+ container ingress {
+ description
+ "Static LSPs for which the router is an
+ ingress node";
+
+ container config {
+ description
+ "Configuration data for ingress LSPs";
+
+ uses static-lsp-ingress-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for ingress LSPs";
+
+ uses static-lsp-ingress-config;
+ uses static-lsp-ingress-state;
+ }
+ }
+ }
+
+ grouping static-lsp-transit-config {
+ description
+ "Configuration data for transit LSPs";
+
+ uses static-lsp-common-config;
+ }
+
+ grouping static-lsp-transit-state {
+ description
+ "Operational state data for transit LSPs";
+ }
+
+ grouping static-lsp-transit-top {
+ description
+ "Top-level grouping for transit LSP data";
+
+ container transit {
+ description
+ "Static LSPs for which the router is an
+ transit node";
+
+ container config {
+ description
+ "Configuration data for transit LSPs";
+
+ uses static-lsp-transit-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for transit LSPs";
+
+ uses static-lsp-transit-config;
+ uses static-lsp-transit-state;
+ }
+ }
+ }
+
+ grouping static-lsp-egress-config {
+ description
+ "Configuration data for egress LSPs";
+
+ uses static-lsp-common-config;
+ }
+
+ grouping static-lsp-egress-state {
+ description
+ "Operational state data for egress LSPs";
+ }
+
+ grouping static-lsp-egress-top {
+ description
+ "Top-level grouping for egress LSP data";
+
+ container egress {
+ description
+ "Static LSPs for which the router is an
+ egress node";
+
+ container config {
+ description
+ "Configuration data for egress LSPs";
+
+ uses static-lsp-egress-config;
+ }
+
+ container state {
+
+ config false;
+
+ description
+ "Operational state data for egress LSPs";
+
+ uses static-lsp-egress-config;
+ uses static-lsp-egress-state;
+ }
+ }
+ }
+
+ grouping static-lsp-config {
+ description
+ "Configuration data for static LSPs";
+
+ leaf name {
+ type string;
+ description
+ "name to identify the LSP";
+ }
+ }
+
+ grouping static-lsp-state {
+ description
+ "Operational state data for static LSPs";
+
+ }
+
+ grouping static-lsp-top {
+ description
+ "grouping for top level list of static LSPs";
+
+
+ list static-lsp {
+ key "name";
+ description
+ "list of defined static LSPs";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ }
+ description
+ "Reference the name list key";
+ }
+
+ container config {
+ description
+ "Configuration data for the static lsp";
+
+ uses static-lsp-config;
+ }
+
+ container state {
+ config false;
+
+ description
+ "Operational state data for the static lsp";
+
+ uses static-lsp-config;
+ uses static-lsp-state;
+
+ }
+
+ // TODO: separation into ingress, transit, egress may help
+ // to figure out what exactly is configured, but need to
+ // consider whether implementations can support the
+ // separation
+ uses static-lsp-ingress-top;
+ uses static-lsp-transit-top;
+ uses static-lsp-egress-top;
+ }
+ }
+
+ // data definition statements
+
+ // augment statements
+
+
+}
diff --git a/models/openconfig/src/main/yang/mpls/openconfig-mpls-te.yang b/models/openconfig/src/main/yang/mpls/openconfig-mpls-te.yang
new file mode 100644
index 0000000..7feb012
--- /dev/null
+++ b/models/openconfig/src/main/yang/mpls/openconfig-mpls-te.yang
@@ -0,0 +1,1297 @@
+submodule openconfig-mpls-te {
+
+ yang-version "1";
+
+ belongs-to "openconfig-mpls" {
+ prefix "oc-mpls";
+ }
+
+
+ // import some basic types
+ import openconfig-inet-types { prefix inet; }
+ import openconfig-mpls-rsvp { prefix oc-rsvp; }
+ import openconfig-mpls-sr { prefix oc-sr; }
+ import openconfig-mpls-types {prefix oc-mplst; }
+ import openconfig-types { prefix oc-types; }
+ import openconfig-yang-types { prefix yang; }
+ import openconfig-extensions { prefix oc-ext; }
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "Configuration related to constrained-path LSPs and traffic
+ engineering. These definitions are not specific to a particular
+ signaling protocol or mechanism (see related submodules for
+ signaling protocol-specific configuration).";
+
+ oc-ext:openconfig-version "2.4.0";
+
+ revision "2017-06-21" {
+ description
+ "Add TC bits typedef.";
+ reference "2.4.0";
+ }
+
+ revision "2017-03-22" {
+ description
+ "Add RSVP calculated-absolute-subscription-bw";
+ reference "2.3.0";
+ }
+
+ revision "2017-01-26" {
+ description
+ "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
+ reference "2.2.0";
+ }
+
+ revision "2016-12-15" {
+ description
+ "Add additional MPLS parameters";
+ reference "2.1.0";
+ }
+
+ revision "2016-09-01" {
+ description
+ "Revisions based on implementation feedback";
+ reference "2.0.0";
+ }
+
+ revision "2016-08-08" {
+ description
+ "Public release of MPLS models";
+ reference "1.0.1";
+ }
+
+ // typedef statements
+
+ typedef te-bandwidth-type {
+ type enumeration {
+ enum SPECIFIED {
+ description
+ "Bandwidth is explicitly specified";
+ }
+ enum AUTO {
+ description
+ "Bandwidth is automatically computed";
+ }
+ }
+ description
+ "enumerated type for specifying whether bandwidth is
+ explicitly specified or automatically computed";
+ }
+
+ typedef mpls-srlg-flooding-type {
+ type enumeration {
+ enum FLOODED_SRLG {
+ description
+ "SRLG is flooded in the IGP";
+ }
+ enum STATIC_SRLG {
+ description
+ "SRLG is not flooded, the members are
+ statically configured";
+ }
+ }
+ description
+ "Enumerated bype for specifying how the SRLG is flooded";
+ }
+
+ typedef mpls-hop-type {
+ type enumeration {
+ enum LOOSE {
+ description
+ "loose hop in an explicit path";
+ }
+ enum STRICT {
+ description
+ "strict hop in an explicit path";
+ }
+ }
+ description
+ "enumerated type for specifying loose or strict
+ paths";
+ }
+
+ typedef te-metric-type {
+ type union {
+ type enumeration {
+ enum IGP {
+ description
+ "set the LSP metric to track the underlying
+ IGP metric";
+ }
+ }
+ type uint32;
+ }
+ description
+ "union type for setting the LSP TE metric to a
+ static value, or to track the IGP metric";
+ }
+
+ typedef cspf-tie-breaking {
+ type enumeration {
+ enum RANDOM {
+ description
+ "CSPF calculation selects a random path among
+ multiple equal-cost paths to the destination";
+ }
+ enum LEAST_FILL {
+ description
+ "CSPF calculation selects the path with greatest
+ available bandwidth";
+ }
+ enum MOST_FILL {
+ description
+ "CSPF calculation selects the path with the least
+ available bandwidth";
+ }
+ }
+ default RANDOM;
+ description
+ "type to indicate the CSPF selection policy when
+ multiple equal cost paths are available";
+ }
+
+
+ // grouping statements
+
+ grouping te-tunnel-reoptimize_config {
+ description
+ "Definition for reoptimize timer configuration";
+
+ leaf reoptimize-timer {
+ type uint16;
+ units seconds;
+ description
+ "frequency of reoptimization of
+ a traffic engineered LSP";
+ }
+ }
+
+
+ grouping te-lsp-auto-bandwidth_config {
+ description
+ "Configuration parameters related to autobandwidth";
+
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "enables mpls auto-bandwidth on the
+ lsp";
+ }
+
+ leaf min-bw {
+ type oc-mplst:bandwidth-kbps;
+ description
+ "set the minimum bandwidth in Kbps for an
+ auto-bandwidth LSP";
+ }
+
+ leaf max-bw {
+ type oc-mplst:bandwidth-kbps;
+ description
+ "set the maximum bandwidth in Kbps for an
+ auto-bandwidth LSP";
+ }
+
+ leaf adjust-interval {
+ type uint32;
+ description
+ "time in seconds between adjustments to
+ LSP bandwidth";
+ }
+
+ leaf adjust-threshold {
+ type oc-types:percentage;
+ description
+ "percentage difference between the LSP's
+ specified bandwidth and its current bandwidth
+ allocation -- if the difference is greater than the
+ specified percentage, auto-bandwidth adjustment is
+ triggered";
+ }
+ }
+
+ grouping te-lsp-overflow_config {
+ description
+ "configuration for mpls lsp bandwidth
+ overflow adjustment";
+
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "enables mpls lsp bandwidth overflow
+ adjustment on the lsp";
+ }
+
+ leaf overflow-threshold {
+ type oc-types:percentage;
+ description
+ "bandwidth percentage change to trigger
+ an overflow event";
+
+ }
+
+ leaf trigger-event-count {
+ type uint16;
+ description
+ "number of consecutive overflow sample
+ events needed to trigger an overflow adjustment";
+ }
+ }
+
+ grouping te-lsp-underflow_config {
+ description
+ "configuration for mpls lsp bandwidth
+ underflow adjustment";
+
+ leaf enabled {
+ type boolean;
+ default false;
+ description
+ "enables bandwidth underflow
+ adjustment on the lsp";
+ }
+
+ leaf underflow-threshold {
+ type oc-types:percentage;
+ description
+ "bandwidth percentage change to trigger
+ and underflow event";
+ }
+
+ leaf trigger-event-count {
+ type uint16;
+ description
+ "number of consecutive underflow sample
+ events needed to trigger an underflow adjustment";
+ }
+ }
+
+ grouping te-path-placement-constraints-config {
+ description
+ "Configuration data for link affinities";
+
+ leaf-list exclude-group {
+ type leafref {
+ path "../../../../../../../../../../te-global-attributes" +
+ "/mpls-admin-groups/admin-group/admin-group-name";
+ }
+ description
+ "list of references to named admin-groups to exclude in
+ path calculation.";
+ }
+
+ leaf-list include-all-group {
+ type leafref {
+ path "../../../../../../../../../../te-global-attributes" +
+ "/mpls-admin-groups/admin-group/admin-group-name";
+ }
+ description
+ "list of references to named admin-groups of which all must
+ be included";
+ }
+
+ leaf-list include-any-group {
+ type leafref {
+ path "../../../../../../../../../../te-global-attributes" +
+ "/mpls-admin-groups/admin-group/admin-group-name";
+ }
+ description
+ "list of references to named admin-groups of which one must
+ be included";
+ }
+ }
+
+ grouping te-path-placement-constraints-state {
+ description
+ "Operational state data for link affinities";
+ //TODO: currently a placeholder
+ }
+
+ grouping te-path-placement-constraints-top {
+ description
+ "Top-level grouping ";
+
+ container admin-groups {
+ description
+ "Top-level container for include/exclude constraints for
+ link affinities";
+
+ container config {
+ description
+ "Configuration data ";
+
+ uses te-path-placement-constraints-config;
+ }
+
+ container state {
+ config false;
+
+ description
+ "Operational state data ";
+
+ uses te-path-placement-constraints-config;
+ uses te-path-placement-constraints-state;
+ }
+ }
+ }
+
+ grouping te-tunnel-protection_config {
+ description
+ "Configuration parameters related to LSP
+ protection";
+ leaf protection-style-requested {
+ type identityref {
+ base oc-mplst:PROTECTION_TYPE;
+ }
+ default oc-mplst:UNPROTECTED;
+ description
+ "style of mpls frr protection desired: can be
+ link, link-node or unprotected.";
+ }
+ }
+
+ grouping explicit-route-subobject-config {
+ description
+ "The explicit route subobject grouping";
+
+ leaf address {
+ type inet:ip-address;
+ description
+ "router hop for the LSP path";
+ }
+
+ leaf hop-type {
+ type mpls-hop-type;
+ description
+ "strict or loose hop";
+ }
+
+ leaf index {
+ type uint8 {
+ range "0..255";
+ }
+ description
+ "Index of this explicit route object to express
+ the order of hops in the path";
+ }
+
+ }
+
+ grouping named-explicit-path-config {
+ description
+ "Configuration parameters relating to a named
+ explicit path";
+
+ leaf name {
+ type string;
+ description
+ "A string name that uniquely identifies an explicit
+ path";
+ }
+ }
+
+ // Explicit paths config somewhat following the IETF model
+ grouping explicit-paths_top {
+ description
+ "Top level global explicit path configuration
+ grouping";
+
+ container named-explicit-paths {
+ description
+ "Enclosing container for the named explicit paths";
+ list named-explicit-path {
+ key "name";
+ description
+ "A list of explicit paths";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ }
+ description
+ "A string name that uniquely identifies
+ an explicit path";
+ }
+
+ container config {
+ description
+ "Configuration parameters relating to named explicit
+ paths";
+ uses named-explicit-path-config;
+ uses oc-sr:sr-path-attributes_config;
+ }
+
+ container state {
+ config false;
+ description
+ "Operational state parameters relating to the named
+ explicit paths";
+ uses named-explicit-path-config;
+ uses oc-sr:sr-path-attributes_config;
+ }
+
+ container explicit-route-objects {
+ description
+ "Enclosing container for EROs";
+
+ list explicit-route-object {
+ key "index";
+ description
+ "List of explicit route objects";
+
+ leaf index {
+ type leafref {
+ path "../config/index";
+ }
+
+ description
+ "Index of this explicit route object,
+ to express the order of hops in path";
+ }
+
+ container config {
+ description
+ "Configuration parameters relating to an explicit
+ route";
+ uses explicit-route-subobject-config;
+ }
+
+
+ container state {
+ config false;
+ description
+ "State parameters relating to an explicit route";
+ uses explicit-route-subobject-config;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ grouping mpls-te-srlg_config {
+ description
+ "Configuration of various attributes associated
+ with the SRLG";
+
+ leaf name {
+ type string;
+ description
+ "SRLG group identifier";
+ }
+
+ leaf value {
+ type uint32;
+ description
+ "group ID for the SRLG";
+ }
+
+ leaf cost {
+ type uint32;
+ description
+ "The cost of the SRLG to the computation
+ algorithm";
+ }
+
+ leaf flooding-type {
+ type mpls-srlg-flooding-type;
+ default FLOODED_SRLG;
+ description
+ "The type of SRLG, either flooded in the IGP or
+ statically configured";
+ }
+ }
+
+ grouping mpls-te-srlg-members_config {
+ description
+ "Configuration of the membership of the SRLG";
+
+ leaf from-address {
+ type inet:ip-address;
+ description
+ "IP address of the a-side of the SRLG link";
+ }
+
+ leaf to-address {
+ type inet:ip-address;
+ description
+ "IP address of the z-side of the SRLG link";
+ }
+ }
+
+ grouping mpls-te-srlg-top {
+ description
+ "Top level grouping for MPLS shared
+ risk link groups.";
+
+ container srlgs {
+ description
+ "Shared risk link groups attributes";
+ list srlg {
+ key "name";
+ description
+ "List of shared risk link groups";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ // Requires YANG 1.1
+ //require-instance true;
+ }
+ description
+ "The SRLG group identifier";
+ }
+
+ container config {
+ description
+ "Configuration parameters related to the SRLG";
+ uses mpls-te-srlg_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters related to the SRLG";
+ uses mpls-te-srlg_config;
+ }
+
+ container static-srlg-members {
+ when "../config/flooding-type = 'STATIC_SRLG'" {
+ description
+ "Include this container for static
+ SRLG specific configuration";
+ }
+ description
+ "SRLG members for static (not flooded) SRLGs ";
+
+ list members-list {
+ key "from-address";
+ description
+ "List of SRLG members, which are expressed
+ as IP address endpoints of links contained in the
+ SRLG";
+
+ leaf from-address {
+ type leafref {
+ path "../config/from-address";
+ // Requires YANG 1.1
+ //require-instance true;
+ }
+ description
+ "The from address of the link in the SRLG";
+ }
+
+ container config {
+ description
+ "Configuration parameters relating to the
+ SRLG members";
+ uses mpls-te-srlg-members_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters relating to the SRLG
+ members";
+ uses mpls-te-srlg-members_config;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ grouping te-global-tunnel_config {
+ description
+ "Configuration parameters relevant to a single
+ traffic engineered tunnel.";
+
+ leaf name {
+ type string;
+ description
+ "The tunnel name";
+ }
+
+ leaf type {
+ type identityref {
+ base oc-mplst:TUNNEL_TYPE;
+ }
+ description
+ "Tunnel type, p2p or p2mp";
+ }
+
+ leaf signaling-protocol {
+ type identityref {
+ base oc-mplst:PATH_SETUP_PROTOCOL;
+ }
+ description
+ "Signaling protocol used to set up this tunnel";
+ }
+
+ leaf description {
+ type string;
+ description
+ "optional text description for the tunnel";
+ }
+
+ leaf admin-status {
+ type identityref {
+ base oc-mplst:TUNNEL_ADMIN_STATUS;
+ }
+ default oc-mplst:ADMIN_UP;
+ description
+ "TE tunnel administrative state.";
+ }
+
+ leaf preference {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Specifies a preference for this tunnel.
+ A lower number signifies a better preference";
+ }
+
+ leaf metric-type {
+ type identityref {
+ base oc-mplst:LSP_METRIC_TYPE;
+ }
+ default oc-mplst:LSP_METRIC_INHERITED;
+ description
+ "The type of metric specification that should be used to set
+ the LSP(s) metric";
+ }
+
+ leaf metric {
+ type int32;
+ description
+ "The value of the metric that should be specified. The value
+ supplied in this leaf is used in conjunction with the metric
+ type to determine the value of the metric used by the system.
+ Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
+ value of this leaf is used directly; where it is set to
+ LSP_METRIC_RELATIVE, the relevant (positive or negative)
+ offset is used to formulate the metric; where metric-type
+ is LSP_METRIC_INHERITED, the value of this leaf is not
+ utilised";
+ }
+
+ leaf shortcut-eligible {
+ type boolean;
+ default "true";
+ description
+ "Whether this LSP is considered to be eligible for us as a
+ shortcut in the IGP. In the case that this leaf is set to
+ true, the IGP SPF calculation uses the metric specified to
+ determine whether traffic should be carried over this LSP";
+ }
+
+ leaf protection-style-requested {
+ type identityref {
+ base oc-mplst:PROTECTION_TYPE;
+ }
+ default oc-mplst:UNPROTECTED;
+ description
+ "style of mpls frr protection desired: can be
+ link, link-node or unprotected.";
+ }
+
+ uses te-tunnel-reoptimize_config;
+ uses oc-rsvp:rsvp-p2p-tunnel-attributes_config;
+
+ }
+
+ grouping tunnel-p2p-attributes_config {
+ description
+ "Configuration related to p2p LSPs";
+ leaf destination {
+ type inet:ip-address;
+ description
+ "P2P tunnel destination address";
+ }
+ }
+
+ grouping p2p-path_state {
+ description
+ "Operational state parameters for p2p paths";
+
+ leaf associated-rsvp-session {
+ type leafref {
+ path "../../../../../../../../../signaling-protocols/" +
+ "rsvp-te/sessions/session/local-index";
+ }
+ description
+ "If the signalling protocol specified for this path is
+ RSVP-TE, this leaf provides a reference to the associated
+ session within the RSVP-TE protocol sessions list, such
+ that details of the signaling can be retrieved.";
+ }
+ }
+
+ grouping p2p-path_config {
+ description
+ "Configuration parameters for p2p paths";
+
+ leaf name {
+ type string;
+ description
+ "Path name";
+ }
+
+ leaf path-computation-method {
+ type identityref {
+ base oc-mplst:PATH_COMPUTATION_METHOD;
+ }
+ default oc-mplst:LOCALLY_COMPUTED;
+ description
+ "The method used for computing the path, either
+ locally computed, queried from a server or not
+ computed at all (explicitly configured).";
+ }
+
+ leaf use-cspf {
+ when "../path-computation-method = 'LOCALLY_COMPUTED'" {
+ description
+ "The use of cspf when the path-computation method is
+ local computation";
+ }
+ type boolean;
+ description
+ "Flag to enable CSPF for locally computed LSPs";
+ }
+
+ leaf cspf-tiebreaker {
+ when "../path-computation-method = 'LOCALLY_COMPUTED'" {
+ description
+ "The cspf tiebreaking method when the path is
+ locally computed";
+ }
+ type cspf-tie-breaking;
+ description
+ "Determine the tie-breaking method to choose between
+ equally desirable paths during CSFP computation";
+ }
+
+
+ leaf path-computation-server {
+ when "../path-computation-method = 'EXTERNALLY_QUERIED'" {
+ description
+ "The path-computation server when the path is
+ externally queried";
+ }
+ type inet:ip-address;
+ description
+ "Address of the external path computation
+ server";
+ }
+
+ leaf explicit-path-name {
+ when "../path-computation-method = 'EXPLICITLY_DEFINED'" {
+ description
+ "The name of the explicitly defined path used";
+ }
+
+ type leafref {
+ path "../../../../../../../"
+ + "named-explicit-paths/named-explicit-path/"
+ + "config/name";
+ // Requires YANG 1.1
+ //require-instance true;
+ }
+ description
+ "reference to a defined path";
+ }
+
+ leaf preference {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Specifies a preference for this path. The lower the
+ number higher the preference";
+ }
+
+ uses oc-rsvp:rsvp-p2p-path-attributes_config;
+ }
+
+
+ grouping te-tunnel-p2p_top {
+ description
+ "Top level grouping for p2p configuration";
+
+ container p2p-tunnel-attributes {
+ when "../config/type = 'P2P'" {
+ description
+ "Include this container for LSPs of type P2P";
+ }
+ description
+ "Parameters related to LSPs of type P2P";
+
+ container config {
+ description
+ "Configuration parameters for P2P LSPs";
+ uses tunnel-p2p-attributes_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters for P2P LSPs";
+ uses tunnel-p2p-attributes_config;
+ }
+
+ uses p2p-primary-paths_top;
+ uses p2p-secondary-paths_top;
+ }
+ }
+
+
+ grouping te-tunnel_state {
+ description
+ "Counters and statistical data relevent to a single
+ tunnel.";
+
+ leaf oper-status {
+ type identityref {
+ base oc-mplst:LSP_OPER_STATUS;
+ }
+ description
+ "The operational status of the TE tunnel";
+ }
+
+ leaf role {
+ type identityref {
+ base oc-mplst:LSP_ROLE;
+ }
+ description
+ "The lsp role at the current node, whether it is headend,
+ transit or tailend.";
+ }
+
+ container counters {
+ description
+ "State data for MPLS label switched paths. This state
+ data is specific to a single label switched path.";
+
+ leaf bytes {
+ type yang:counter64;
+ description
+ "Number of bytes that have been forwarded over the
+ label switched path.";
+ }
+
+ leaf packets {
+ type yang:counter64;
+ description
+ "Number of pacets that have been forwarded over the
+ label switched path.";
+ }
+
+ leaf path-changes {
+ type yang:counter64;
+ description
+ "Number of path changes for the label switched path";
+ }
+
+ leaf state-changes {
+ type yang:counter64;
+ description
+ "Number of state changes for the label switched path";
+ }
+
+ leaf online-time {
+ type yang:date-and-time;
+ description
+ "Indication of the time the label switched path
+ transitioned to an Oper Up or in-service state";
+ }
+
+ leaf current-path-time {
+ type yang:date-and-time;
+ description
+ "Indicates the time the LSP switched onto its
+ current path. This is reset upon a LSP path
+ change.";
+ }
+
+ leaf next-reoptimization-time {
+ type yang:date-and-time;
+ description
+ "Indicates the next scheduled time the LSP
+ will be reoptimized.";
+ }
+ }
+ }
+
+ grouping te-tunnel-bandwidth_config {
+ description
+ "Configuration parameters related to bandwidth for a tunnel";
+
+ leaf specification-type {
+ type te-bandwidth-type;
+ default SPECIFIED;
+ description
+ "The method used for settign the bandwidth, either explicitly
+ specified or configured";
+ }
+
+ leaf set-bandwidth {
+ when "../specification-type = 'SPECIFIED'" {
+ description
+ "The bandwidth value when bandwidth is explicitly
+ specified";
+ }
+ type oc-mplst:bandwidth-kbps;
+ description
+ "set bandwidth explicitly, e.g., using
+ offline calculation";
+ }
+ }
+
+ grouping te-tunnel-bandwidth_state {
+ description
+ "Operational state parameters relating to bandwidth for a tunnel";
+
+ leaf signaled-bandwidth {
+ type oc-mplst:bandwidth-kbps;
+ description
+ "The currently signaled bandwidth of the LSP. In the case where
+ the bandwidth is specified explicitly, then this will match the
+ value of the set-bandwidth leaf; in cases where the bandwidth is
+ dynamically computed by the system, the current value of the
+ bandwidth should be reflected.";
+ }
+ }
+
+ grouping te-tunnel-bandwidth_top {
+ description
+ "Top level grouping for specifying bandwidth for a tunnel";
+
+ container bandwidth {
+ description
+ "Bandwidth configuration for TE LSPs";
+
+ container config {
+ description
+ "Configuration parameters related to bandwidth on TE
+ tunnels:";
+ uses te-tunnel-bandwidth_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters related to bandwidth
+ configuration of TE tunnels";
+ uses te-tunnel-bandwidth_config;
+ uses te-tunnel-bandwidth_state;
+ }
+
+ container auto-bandwidth {
+ when "../config/specification-type = 'AUTO'" {
+ description
+ "Include this container for auto bandwidth
+ specific configuration";
+ }
+ description
+ "Parameters related to auto-bandwidth";
+
+ container config {
+ description
+ "Configuration parameters relating to MPLS
+ auto-bandwidth on the tunnel.";
+ uses te-lsp-auto-bandwidth_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters relating to MPLS
+ auto-bandwidth on the tunnel.";
+ uses te-lsp-auto-bandwidth_config;
+ }
+
+ container overflow {
+ description
+ "configuration of MPLS overflow bandwidth
+ adjustement for the LSP";
+
+ container config {
+ description
+ "Config information for MPLS overflow bandwidth
+ adjustment";
+ uses te-lsp-overflow_config;
+ }
+
+ container state {
+ config false;
+ description
+ "Config information for MPLS overflow bandwidth
+ adjustment";
+ uses te-lsp-overflow_config;
+ }
+ }
+
+ container underflow {
+ description
+ "configuration of MPLS underflow bandwidth
+ adjustement for the LSP";
+
+ container config {
+ description
+ "Config information for MPLS underflow bandwidth
+ adjustment";
+ uses te-lsp-underflow_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State information for MPLS underflow bandwidth
+ adjustment";
+ uses te-lsp-underflow_config;
+ }
+ }
+ }
+ }
+ }
+
+ grouping p2p-path-candidate-secondary-path-config {
+ description
+ "Configuration parameters relating to a secondary path which
+ is a candidate for a particular primary path";
+
+ leaf secondary-path {
+ type leafref {
+ path "../../../../../../p2p-secondary-paths/" +
+ "p2p-secondary-path/config/name";
+ }
+ description
+ "A reference to the secondary path that should be utilised
+ when the containing primary path option is in use";
+ }
+
+ leaf priority {
+ type uint16;
+ description
+ "The priority of the specified secondary path option. Higher
+ priority options are less preferable - such that a secondary
+ path reference with a priority of 0 is the most preferred";
+ }
+ }
+
+ grouping p2p-path-candidate-secondary-path-state {
+ description
+ "Operational state parameters relating to a secondary path
+ which is a candidate for a particular primary path";
+
+ leaf active {
+ type boolean;
+ description
+ "Indicates the current active path option that has
+ been selected of the candidate secondary paths";
+ }
+ }
+
+ grouping p2p-primary-paths_top {
+ description
+ "Top level grouping for p2p primary paths";
+
+ container p2p-primary-path {
+ description
+ "Primary paths associated with the LSP";
+
+ list p2p-primary-path {
+ key "name";
+ description
+ "List of p2p primary paths for a tunnel";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ // Requires YANG 1.1
+ //require-instance true;
+ }
+ description
+ "Path name";
+ }
+
+ container config {
+ description
+ "Configuration parameters related to paths";
+ uses p2p-path_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters related to paths";
+ uses p2p-path_config;
+ uses p2p-path_state;
+ }
+
+ container candidate-secondary-paths {
+ description
+ "The set of candidate secondary paths which may be used
+ for this primary path. When secondary paths are specified
+ in the list the path of the secondary LSP in use must be
+ restricted to those path options referenced. The
+ priority of the secondary paths is specified within the
+ list. Higher priority values are less preferred - that is
+ to say that a path with priority 0 is the most preferred
+ path. In the case that the list is empty, any secondary
+ path option may be utilised when the current primary path
+ is in use.";
+
+ list candidate-secondary-path {
+ key "secondary-path";
+
+ description
+ "List of secondary paths which may be utilised when the
+ current primary path is in use";
+
+ leaf secondary-path {
+ type leafref {
+ path "../config/secondary-path";
+ }
+ description
+ "A reference to the secondary path option reference
+ which acts as the key of the candidate-secondary-path
+ list";
+ }
+
+ container config {
+ description
+ "Configuration parameters relating to the candidate
+ secondary path";
+
+ uses p2p-path-candidate-secondary-path-config;
+ }
+
+ container state {
+ config false;
+ description
+ "Operational state parameters relating to the candidate
+ secondary path";
+
+ uses p2p-path-candidate-secondary-path-config;
+ uses p2p-path-candidate-secondary-path-state;
+ }
+ }
+ }
+
+ uses te-path-placement-constraints-top;
+
+ }
+ }
+ }
+
+ grouping p2p-secondary-paths_top {
+ description
+ "Top level grouping for p2p secondary paths";
+
+ container p2p-secondary-paths {
+ description
+ "Secondary paths for the LSP";
+
+ list p2p-secondary-path {
+ key "name";
+ description
+ "List of p2p primary paths for a tunnel";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ // Requires YANG 1.1
+ //require-instance true;
+ }
+ description
+ "Path name";
+ }
+
+ container config {
+ description
+ "Configuration parameters related to paths";
+ uses p2p-path_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters related to paths";
+ uses p2p-path_config;
+ uses p2p-path_state;
+ }
+
+ uses te-path-placement-constraints-top;
+ }
+ }
+ }
+
+ grouping te-tunnels_top {
+ description
+ "Top level grouping for TE tunnels";
+
+ container tunnels {
+ description
+ "Enclosing container for tunnels";
+ list tunnel {
+ key "name";
+ description
+ "List of TE tunnels. This list contains only the LSPs that the
+ current device originates (i.e., for which it is the head-end).
+ Where the signaling protocol utilised for an LSP allows a mid-point
+ or tail device to be aware of the LSP (e.g., RSVP-TE), then the
+ associated sessions are maintained per protocol";
+
+ leaf name {
+ type leafref {
+ path "../config/name";
+ // Requires YANG 1.1
+ //require-instance true;
+ }
+ description
+ "The tunnel name";
+ }
+
+ container config {
+ description
+ "Configuration parameters related to TE tunnels:";
+ uses te-global-tunnel_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters related to TE tunnels";
+ uses te-global-tunnel_config;
+ uses te-tunnel_state;
+
+ }
+
+ uses te-tunnel-bandwidth_top;
+ uses te-tunnel-p2p_top;
+ // TODO - add the p2mp configuration
+ }
+ }
+ }
+
+// data definition statements
+
+// augment statements
+
+// rpc statements
+
+// notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/mpls/openconfig-mpls-types.yang b/models/openconfig/src/main/yang/mpls/openconfig-mpls-types.yang
new file mode 100644
index 0000000..3ccd2db
--- /dev/null
+++ b/models/openconfig/src/main/yang/mpls/openconfig-mpls-types.yang
@@ -0,0 +1,395 @@
+module openconfig-mpls-types {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/mpls-types";
+
+ prefix "oc-mpls-types";
+
+ import openconfig-extensions { prefix oc-ext; }
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "General types for MPLS / TE data model";
+
+ oc-ext:openconfig-version "2.4.0";
+
+ revision "2017-06-21" {
+ description
+ "Add TC bits typedef.";
+ reference "2.4.0";
+ }
+
+ revision "2017-03-22" {
+ description
+ "Add RSVP calculated-absolute-subscription-bw";
+ reference "2.3.0";
+ }
+
+ revision "2017-01-26" {
+ description
+ "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
+ reference "2.2.0";
+ }
+
+ revision "2016-12-15" {
+ description
+ "Add additional MPLS parameters";
+ reference "2.1.0";
+ }
+
+ revision "2016-09-01" {
+ description
+ "Revisions based on implementation feedback";
+ reference "2.0.0";
+ }
+
+ revision "2016-08-08" {
+ description
+ "Public release of MPLS models";
+ reference "1.0.1";
+ }
+
+ // identity statements
+
+ identity PATH_COMPUTATION_METHOD {
+ description
+ "base identity for supported path computation
+ mechanisms";
+ }
+
+ identity LOCALLY_COMPUTED {
+ base PATH_COMPUTATION_METHOD;
+ description
+ "indicates a constrained-path LSP in which the
+ path is computed by the local LER";
+ }
+
+ identity EXTERNALLY_QUERIED {
+ base PATH_COMPUTATION_METHOD;
+ description
+ "Constrained-path LSP in which the path is
+ obtained by querying an external source, such as a PCE server.
+ In the case that an LSP is defined to be externally queried, it may
+ also have associated explicit definitions (which are provided to the
+ external source to aid computation); and the path that is returned by
+ the external source is not required to provide a wholly resolved
+ path back to the originating system - that is to say, some local
+ computation may also be required";
+ }
+
+ identity EXPLICITLY_DEFINED {
+ base PATH_COMPUTATION_METHOD;
+ description
+ "constrained-path LSP in which the path is
+ explicitly specified as a collection of strict or/and loose
+ hops";
+ }
+
+
+ // using identities rather than enum types to simplify adding new
+ // signaling protocols as they are introduced and supported
+ identity PATH_SETUP_PROTOCOL {
+ description
+ "base identity for supported MPLS signaling
+ protocols";
+ }
+
+ identity PATH_SETUP_RSVP {
+ base PATH_SETUP_PROTOCOL;
+ description
+ "RSVP-TE signaling protocol";
+ }
+
+ identity PATH_SETUP_SR {
+ base PATH_SETUP_PROTOCOL;
+ description
+ "Segment routing";
+ }
+
+ identity PATH_SETUP_LDP {
+ base PATH_SETUP_PROTOCOL;
+ description
+ "LDP - RFC 5036";
+ }
+
+
+ identity PROTECTION_TYPE {
+ description
+ "base identity for protection type";
+ }
+
+ identity UNPROTECTED {
+ base PROTECTION_TYPE;
+ description
+ "no protection is desired";
+ }
+
+ identity LINK_PROTECTION_REQUIRED {
+ base PROTECTION_TYPE;
+ description
+ "link protection is desired";
+ }
+
+ identity LINK_NODE_PROTECTION_REQUESTED {
+ base PROTECTION_TYPE;
+ description
+ "node and link protection are both desired";
+ }
+
+ identity LSP_ROLE {
+ description
+ "Base identity for describing the role of
+ label switched path at the current node";
+ }
+
+ identity INGRESS {
+ base LSP_ROLE;
+ description
+ "Label switched path is an ingress (headend)
+ LSP";
+ }
+
+ identity EGRESS {
+ base LSP_ROLE;
+ description
+ "Label switched path is an egress (tailend)
+ LSP";
+ }
+
+ identity TRANSIT {
+ base LSP_ROLE;
+ description
+ "Label switched path is a transit LSP";
+ }
+
+
+ identity TUNNEL_TYPE {
+ description
+ "Base identity from which specific tunnel types are
+ derived.";
+ }
+
+ identity P2P {
+ base TUNNEL_TYPE;
+ description
+ "TE point-to-point tunnel type.";
+ }
+
+ identity P2MP {
+ base TUNNEL_TYPE;
+ description
+ "TE point-to-multipoint tunnel type.";
+ }
+
+
+ identity LSP_OPER_STATUS {
+ description
+ "Base identity for LSP operational status";
+ }
+
+ identity DOWN {
+ base LSP_OPER_STATUS;
+ description
+ "LSP is operationally down or out of service";
+ }
+
+ identity UP {
+ base LSP_OPER_STATUS;
+ description
+ "LSP is operationally active and available
+ for traffic.";
+ }
+
+ identity TUNNEL_ADMIN_STATUS {
+ description
+ "Base identity for tunnel administrative status";
+ }
+
+ identity ADMIN_DOWN {
+ base TUNNEL_ADMIN_STATUS;
+ description
+ "LSP is administratively down";
+ }
+
+ identity ADMIN_UP {
+ base TUNNEL_ADMIN_STATUS;
+ description
+ "LSP is administratively up";
+ }
+
+ identity NULL_LABEL_TYPE {
+ description
+ "Base identity from which specific null-label types are
+ derived.";
+ }
+
+ identity EXPLICIT {
+ base NULL_LABEL_TYPE;
+ description
+ "Explicit null label is used.";
+ }
+
+ identity IMPLICIT {
+ base NULL_LABEL_TYPE;
+ description
+ "Implicit null label is used.";
+ }
+
+ identity LSP_METRIC_TYPE {
+ description
+ "Base identity for types of LSP metric specification";
+ }
+
+ identity LSP_METRIC_RELATIVE {
+ base LSP_METRIC_TYPE;
+ description
+ "The metric specified for the LSPs to which this identity refers
+ is specified as a relative value to the IGP metric cost to the
+ LSP's tail-end.";
+ }
+
+ identity LSP_METRIC_ABSOLUTE {
+ base LSP_METRIC_TYPE;
+ description
+ "The metric specified for the LSPs to which this identity refers
+ is specified as an absolute value";
+ }
+
+ identity LSP_METRIC_INHERITED {
+ base LSP_METRIC_TYPE;
+ description
+ "The metric for for the LSPs to which this identity refers is
+ not specified explicitly - but rather inherited from the IGP
+ cost directly";
+ }
+
+ // typedef statements
+ typedef mpls-label {
+ type union {
+ type uint32 {
+ range 16..1048575;
+ }
+ type enumeration {
+ enum IPV4_EXPLICIT_NULL {
+ value 0;
+ description
+ "valid at the bottom of the label stack,
+ indicates that stack must be popped and packet forwarded
+ based on IPv4 header";
+ }
+ enum ROUTER_ALERT {
+ value 1;
+ description
+ "allowed anywhere in the label stack except
+ the bottom, local router delivers packet to the local CPU
+ when this label is at the top of the stack";
+ }
+ enum IPV6_EXPLICIT_NULL {
+ value 2;
+ description
+ "valid at the bottom of the label stack,
+ indicates that stack must be popped and packet forwarded
+ based on IPv6 header";
+ }
+ enum IMPLICIT_NULL {
+ value 3;
+ description
+ "assigned by local LSR but not carried in
+ packets";
+ }
+ enum ENTROPY_LABEL_INDICATOR {
+ value 7;
+ description
+ "Entropy label indicator, to allow an LSR
+ to distinguish between entropy label and applicaiton
+ labels RFC 6790";
+ }
+ enum NO_LABEL {
+ description
+ "This value is utilised to indicate that the packet that
+ is forwarded by the local system does not have an MPLS
+ header applied to it. Typically, this is used at the
+ egress of an LSP";
+ }
+ }
+ }
+ description
+ "type for MPLS label value encoding";
+ reference "RFC 3032 - MPLS Label Stack Encoding";
+ }
+
+ typedef tunnel-type {
+ type enumeration {
+ enum P2P {
+ description
+ "point-to-point label-switched-path";
+ }
+ enum P2MP {
+ description
+ "point-to-multipoint label-switched-path";
+ }
+ enum MP2MP {
+ description
+ "multipoint-to-multipoint label-switched-path";
+ }
+ }
+ description
+ "defines the tunnel type for the LSP";
+ reference
+ "RFC 6388 - Label Distribution Protocol Extensions for
+ Point-to-Multipoint and Multipoint-to-Multipoint Label Switched
+ Paths
+ RFC 4875 - Extensions to Resource Reservation Protocol
+ - Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE
+ Label Switched Paths (LSPs)";
+ }
+
+ typedef bandwidth-kbps {
+ type uint64;
+ units "Kbps";
+ description
+ "Bandwidth values expressed in kilobits per second";
+ }
+
+ typedef bandwidth-mbps {
+ type uint64;
+ units "Mbps";
+ description
+ "Bandwidth values expressed in megabits per second";
+ }
+
+ typedef bandwidth-gbps {
+ type uint64;
+ units "Gbps";
+ description
+ "Bandwidth values expressed in gigabits per second";
+ }
+
+ typedef mpls-tc {
+ type uint8 {
+ range "0..7";
+ }
+ description
+ "Values of the MPLS Traffic Class (formerly known as
+ Experimental, EXP) bits";
+ }
+
+ // grouping statements
+
+ // data definition statements
+
+ // augment statements
+
+ // rpc statements
+
+ // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/mpls/openconfig-mpls.yang b/models/openconfig/src/main/yang/mpls/openconfig-mpls.yang
new file mode 100644
index 0000000..c214ce2
--- /dev/null
+++ b/models/openconfig/src/main/yang/mpls/openconfig-mpls.yang
@@ -0,0 +1,703 @@
+module openconfig-mpls {
+
+ yang-version "1";
+
+ // namespace
+ namespace "http://openconfig.net/yang/mpls";
+
+ prefix "oc-mpls";
+
+
+ // import some basic types
+ import openconfig-mpls-types { prefix oc-mplst; }
+ import openconfig-mpls-rsvp { prefix oc-rsvp; }
+ import openconfig-mpls-ldp { prefix oc-ldp; }
+ import openconfig-types { prefix oc-types; }
+ import openconfig-interfaces { prefix oc-if; }
+ import openconfig-extensions { prefix oc-ext; }
+ import openconfig-segment-routing { prefix oc-sr; }
+
+ // include submodules
+ include openconfig-mpls-te;
+ include openconfig-mpls-igp;
+ include openconfig-mpls-static;
+
+
+ // meta
+ organization "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "This module provides data definitions for configuration of
+ Multiprotocol Label Switching (MPLS) and associated protocols for
+ signaling and traffic engineering.
+
+ RFC 3031: Multiprotocol Label Switching Architecture
+
+ The MPLS / TE data model consists of several modules and
+ submodules as shown below. The top-level MPLS module describes
+ the overall framework. Three types of LSPs are supported:
+
+ i) traffic-engineered (or constrained-path)
+
+ ii) IGP-congruent (LSPs that follow the IGP path)
+
+ iii) static LSPs which are not signaled
+
+ The structure of each of these LSP configurations is defined in
+ corresponding submodules. Companion modules define the relevant
+ configuration and operational data specific to key signaling
+ protocols used in operational practice.
+
+
+ +-------+
+ +---------------->| MPLS |<--------------+
+ | +-------+ |
+ | ^ |
+ | | |
+ +----+-----+ +--------+-------+ +-----+-----+
+ | TE LSPs | | IGP-based LSPs | |static LSPs|
+ | | | | | |
+ +----------+ +----------------+ +-----------+
+ ^ ^ ^ ^
+ | +----------------+ | +--------+
+ | | | |
+ | +------+ +-+---+-+ +--+--+
+ +---+ RSVP | |SEGMENT| | LDP |
+ +------+ |ROUTING| +-----+
+ +-------+
+ ";
+
+ oc-ext:openconfig-version "2.4.0";
+
+ revision "2017-06-21" {
+ description
+ "Add TC bits typedef.";
+ reference "2.4.0";
+ }
+
+ revision "2017-03-22" {
+ description
+ "Add RSVP calculated-absolute-subscription-bw";
+ reference "2.3.0";
+ }
+
+ revision "2017-01-26" {
+ description
+ "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
+ reference "2.2.0";
+ }
+
+ revision "2016-12-15" {
+ description
+ "Add additional MPLS parameters";
+ reference "2.1.0";
+ }
+
+ revision "2016-09-01" {
+ description
+ "Revisions based on implementation feedback";
+ reference "2.0.0";
+ }
+
+ revision "2016-08-08" {
+ description
+ "Public release of MPLS models";
+ reference "1.0.1";
+ }
+
+
+ // grouping statements
+
+ grouping mpls-admin-group_config {
+ description
+ "configuration data for MPLS link admin groups";
+
+ leaf admin-group-name {
+ type string;
+ description
+ "name for mpls admin-group";
+ }
+
+ leaf bit-position {
+ type uint32;
+ description
+ "bit-position value for mpls admin-group. The value
+ for the admin group is an integer that represents one
+ of the bit positions in the admin-group bitmask. Values
+ between 0 and 31 are interpreted as the original limit
+ of 32 admin groups. Values >=32 are interpreted as
+ extended admin group values as per RFC7308.";
+ }
+
+ }
+
+ grouping mpls-admin-groups-top {
+
+ description
+ "top-level mpls admin-groups config
+ and state containers";
+
+ container mpls-admin-groups {
+ description
+ "Top-level container for admin-groups configuration
+ and state";
+
+ list admin-group {
+ key "admin-group-name";
+ description
+ "configuration of value to name mapping
+ for mpls affinities/admin-groups";
+
+ leaf admin-group-name {
+ type leafref {
+ path "../config/admin-group-name";
+ }
+ description
+ "name for mpls admin-group";
+ }
+ container config {
+ description
+ "Configurable items for admin-groups";
+ uses mpls-admin-group_config;
+ }
+
+ container state {
+ config false;
+ description
+ "Operational state for admin-groups";
+ uses mpls-admin-group_config;
+ }
+ }
+ }
+ }
+
+ grouping mpls-te-igp-flooding-bandwidth_config {
+ description
+ "Configurable items for igp flooding bandwidth
+ threshold configuration.";
+ leaf threshold-type {
+ type enumeration {
+ enum DELTA {
+ description
+ "DELTA indicates that the local
+ system should flood IGP updates when a
+ change in reserved bandwidth >= the specified
+ delta occurs on the interface.";
+ }
+ enum THRESHOLD_CROSSED {
+ description
+ "THRESHOLD-CROSSED indicates that
+ the local system should trigger an update (and
+ hence flood) the reserved bandwidth when the
+ reserved bandwidth changes such that it crosses,
+ or becomes equal to one of the threshold values.";
+ }
+ }
+ description
+ "The type of threshold that should be used to specify the
+ values at which bandwidth is flooded. DELTA indicates that
+ the local system should flood IGP updates when a change in
+ reserved bandwidth >= the specified delta occurs on the
+ interface. Where THRESHOLD_CROSSED is specified, the local
+ system should trigger an update (and hence flood) the
+ reserved bandwidth when the reserved bandwidth changes such
+ that it crosses, or becomes equal to one of the threshold
+ values";
+ }
+
+ leaf delta-percentage {
+ when "../threshold-type = 'DELTA'" {
+ description
+ "The percentage delta can only be specified when the
+ threshold type is specified to be a percentage delta of
+ the reserved bandwidth";
+ }
+ type oc-types:percentage;
+ description
+ "The percentage of the maximum-reservable-bandwidth
+ considered as the delta that results in an IGP update
+ being flooded";
+ }
+
+ leaf threshold-specification {
+ when "../threshold-type = 'THRESHOLD_CROSSED'" {
+ description
+ "The selection of whether mirrored or separate threshold
+ values are to be used requires user specified thresholds to
+ be set";
+ }
+ type enumeration {
+ enum MIRRORED_UP_DOWN {
+ description
+ "MIRRORED_UP_DOWN indicates that a single set of
+ threshold values should be used for both increasing
+ and decreasing bandwidth when determining whether
+ to trigger updated bandwidth values to be flooded
+ in the IGP TE extensions.";
+ }
+ enum SEPARATE_UP_DOWN {
+ description
+ "SEPARATE_UP_DOWN indicates that a separate
+ threshold values should be used for the increasing
+ and decreasing bandwidth when determining whether
+ to trigger updated bandwidth values to be flooded
+ in the IGP TE extensions.";
+ }
+ }
+ description
+ "This value specifies whether a single set of threshold
+ values should be used for both increasing and decreasing
+ bandwidth when determining whether to trigger updated
+ bandwidth values to be flooded in the IGP TE extensions.
+ MIRRORED-UP-DOWN indicates that a single value (or set of
+ values) should be used for both increasing and decreasing
+ values, where SEPARATE-UP-DOWN specifies that the increasing
+ and decreasing values will be separately specified";
+ }
+
+ leaf-list up-thresholds {
+ when "../threshold-type = 'THRESHOLD_CROSSED'" +
+ "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
+ description
+ "A list of up-thresholds can only be specified when the
+ bandwidth update is triggered based on crossing a
+ threshold and separate up and down thresholds are
+ required";
+ }
+ type oc-types:percentage;
+ description
+ "The thresholds (expressed as a percentage of the maximum
+ reservable bandwidth) at which bandwidth updates are to be
+ triggered when the bandwidth is increasing.";
+ }
+
+ leaf-list down-thresholds {
+ when "../threshold-type = 'THRESHOLD_CROSSED'" +
+ "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
+ description
+ "A list of down-thresholds can only be specified when the
+ bandwidth update is triggered based on crossing a
+ threshold and separate up and down thresholds are
+ required";
+ }
+ type oc-types:percentage;
+ description
+ "The thresholds (expressed as a percentage of the maximum
+ reservable bandwidth) at which bandwidth updates are to be
+ triggered when the bandwidth is decreasing.";
+ }
+
+ leaf-list up-down-thresholds {
+ when "../threshold-type = 'THRESHOLD_CROSSED'" +
+ "and ../threshold-specification = 'MIRRORED_UP_DOWN'" {
+ description
+ "A list of thresholds corresponding to both increasing
+ and decreasing bandwidths can be specified only when an
+ update is triggered based on crossing a threshold, and
+ the same up and down thresholds are required.";
+ }
+ type oc-types:percentage;
+ description
+ "The thresholds (expressed as a percentage of the maximum
+ reservable bandwidth of the interface) at which bandwidth
+ updates are flooded - used both when the bandwidth is
+ increasing and decreasing";
+ }
+ }
+
+
+ grouping mpls-te-igp-flooding-bandwidth {
+ description
+ "Top level group for traffic engineering
+ database flooding options";
+ container igp-flooding-bandwidth {
+ description
+ "Interface bandwidth change percentages
+ that trigger update events into the IGP traffic
+ engineering database (TED)";
+ container config {
+ description
+ "Configuration parameters for TED
+ update threshold ";
+ uses mpls-te-igp-flooding-bandwidth_config;
+ }
+ container state {
+ config false;
+ description
+ "State parameters for TED update threshold ";
+ uses mpls-te-igp-flooding-bandwidth_config;
+ }
+ }
+ }
+
+
+ grouping te-lsp-delay_config {
+ description
+ "Group for the timers goerning the delay
+ in installation and cleanup of TE LSPs";
+
+ leaf install-delay {
+ type uint16 {
+ range 0..3600;
+ }
+ units seconds;
+ description
+ "delay the use of newly installed te lsp for a
+ specified amount of time.";
+ }
+
+ leaf cleanup-delay {
+ type uint16;
+ units seconds;
+ description
+ "delay the removal of old te lsp for a specified
+ amount of time";
+ }
+ }
+
+ grouping te-interface-attributes-top {
+ description
+ "Top level grouping for attributes
+ for TE interfaces.";
+
+ list interface {
+ key "interface-id";
+ description
+ "List of TE interfaces";
+
+ leaf interface-id {
+ type leafref {
+ path "../config/interface-id";
+ }
+ description
+ "Reference to the interface id list key";
+ }
+
+ container config {
+ description
+ "Configuration parameters related to TE interfaces:";
+ uses te-interface-attributes_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters related to TE interfaces";
+ uses te-interface-attributes_config;
+ }
+
+ uses oc-if:interface-ref;
+
+ uses mpls-te-igp-flooding-bandwidth;
+ }
+ }
+
+ grouping te-interface-attributes_config {
+ description
+ "global level definitions for interfaces
+ on which TE is run";
+
+ leaf interface-id {
+ type oc-if:interface-id;
+ description
+ "Id of the interface";
+ }
+
+ leaf te-metric {
+ type uint32;
+ description
+ "TE specific metric for the link";
+ }
+
+ leaf-list srlg-membership {
+ type leafref {
+ path "../../../../te-global-attributes/srlgs/srlg/name";
+ }
+ description
+ "list of references to named shared risk link groups that the
+ interface belongs to.";
+ }
+
+ leaf-list admin-group {
+ type string;
+ description
+ "list of admin groups (by name) on the interface";
+ }
+ }
+
+ grouping mpls-te-lsp-timers {
+ description
+ "Grouping for traffic engineering timers";
+ container te-lsp-timers {
+ description
+ "Definition for delays associated with setup
+ and cleanup of TE LSPs";
+
+ container config {
+ description
+ "Configuration parameters related
+ to timers for TE LSPs";
+
+ uses te-lsp-delay_config;
+ uses te-tunnel-reoptimize_config;
+ }
+
+ container state {
+ config false;
+ description
+ "State related to timers for TE LSPs";
+
+ uses te-lsp-delay_config;
+ uses te-tunnel-reoptimize_config;
+ }
+ }
+ }
+
+ grouping mpls-global_config {
+ description
+ "Definition of global MPLS configuration parameters";
+
+ leaf null-label {
+ type identityref {
+ base oc-mplst:NULL_LABEL_TYPE;
+ }
+ default oc-mplst:IMPLICIT;
+ description
+ "The null-label type used, implicit or explicit";
+ }
+ }
+
+ grouping mpls-global-top {
+ description
+ "Top level grouping for global MPLS configuration ";
+
+ container config {
+ description
+ "Top level global MPLS configuration";
+ uses mpls-global_config;
+ }
+
+ container state {
+ config false;
+ description
+ "Top level global MPLS state";
+ uses mpls-global_config;
+ }
+ }
+
+ grouping mpls-interfaces-top {
+ description
+ "Top level grouping for attributes
+ for MPLS-enabled interfaces.";
+ container interface-attributes {
+ description
+ "Parameters related to MPLS interfaces";
+ list interface {
+ key "interface-id";
+ description
+ "List of TE interfaces";
+
+ leaf interface-id {
+ type leafref {
+ path "../config/interface-id";
+ }
+ description
+ "Reference to the interface id list key";
+ }
+
+ container config {
+ description
+ "Configuration parameters related to MPLS interfaces:";
+ uses mpls-interface-attributes-config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters related to TE interfaces";
+ uses mpls-interface-attributes-config;
+ }
+
+ uses oc-if:interface-ref;
+ }
+ }
+ }
+
+ grouping mpls-interface-attributes-config {
+ description
+ "global level definitions for interfaces
+ on which MPLS is run";
+
+ leaf interface-id {
+ type oc-if:interface-id;
+ description
+ "Indentifier for the MPLS interface";
+ }
+
+ leaf mpls-enabled {
+ type boolean;
+ default false;
+ description
+ "Enable MPLS forwarding on this interface";
+ }
+ }
+
+ grouping mpls-label-block-config {
+ description
+ "Configuration parameters relating to an MPLS label block.";
+
+ leaf local-id {
+ type string;
+ description
+ "A local identifier for the global label block allocation.";
+ }
+
+ leaf lower-bound {
+ type oc-mplst:mpls-label;
+ description
+ "Lower bound of the global label block. The block is defined to include
+ this label.";
+ }
+
+ leaf upper-bound {
+ type oc-mplst:mpls-label;
+ description
+ "Upper bound for the global label block. The block is defined to include
+ this label.";
+ }
+ }
+
+ grouping mpls-label-blocks-top {
+ description
+ "Top-level configuration and operational state parameters corresponding
+ to reserved label blocks.";
+
+ container reserved-label-blocks {
+ description
+ "A range of labels starting with the start-label and up-to and including
+ the end label that should be allocated as reserved. These labels should
+ not be utilised by any dynamic label allocation on the local system unless
+ the allocating protocol is explicitly configured to specify that
+ allocation of labels should be out of the label block specified.";
+
+ list reserved-label-block {
+ key "local-id";
+
+ description
+ "A range of labels starting with the start-label up to and including
+ the end label that should be allocated for use by a specific protocol.";
+
+ leaf local-id {
+ type leafref {
+ path "../config/local-id";
+ }
+ description
+ "A reference to a unique local identifier for this label block.";
+ }
+
+ container config {
+ description
+ "Configuration parameters relating to the label block.";
+
+ uses mpls-label-block-config;
+ }
+
+ container state {
+ config false;
+ description
+ "State parameters relating to the label block.";
+
+ uses mpls-label-block-config;
+ }
+ }
+ }
+ }
+
+ grouping mpls-top {
+ description
+ "Top level grouping for MPLS configuration and state";
+
+ container mpls {
+ description
+ "Anchor point for mpls configuration and operational
+ data";
+
+ container global {
+ // entropy label support, label ranges will be added here.
+ description
+ "general mpls configuration applicable to any
+ type of LSP and signaling protocol - label ranges,
+ entropy label supportmay be added here";
+ uses mpls-global-top;
+ uses mpls-interfaces-top;
+ uses mpls-label-blocks-top;
+ }
+
+ container te-global-attributes {
+ description
+ "traffic-engineering global attributes";
+ uses mpls-te-srlg-top;
+ uses mpls-admin-groups-top;
+ uses mpls-te-lsp-timers;
+ }
+
+ container te-interface-attributes {
+ description
+ "traffic engineering attributes specific
+ for interfaces";
+ uses te-interface-attributes-top;
+ }
+
+ container signaling-protocols {
+ description
+ "top-level signaling protocol configuration";
+
+ uses oc-rsvp:rsvp-global;
+ uses oc-ldp:ldp-global;
+ uses oc-sr:sr-mpls-top;
+ }
+
+ container lsps {
+ description
+ "LSP definitions and configuration";
+
+ container constrained-path {
+ description
+ "traffic-engineered LSPs supporting different
+ path computation and signaling methods";
+ uses explicit-paths_top;
+ uses te-tunnels_top;
+ }
+
+ container unconstrained-path {
+ description
+ "LSPs that use the IGP-determined path, i.e., non
+ traffic-engineered, or non constrained-path";
+
+ uses igp-lsp-common;
+ uses igp-lsp-setup;
+ }
+
+ container static-lsps {
+ description
+ "statically configured LSPs, without dynamic
+ signaling";
+
+ uses static-lsp-top;
+ }
+ }
+ }
+ }
+
+ uses mpls-top;
+
+ // augment statements
+
+ // rpc statements
+
+ // notification statements
+}