module pcep-types { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:pcep:types"; prefix "pcep-t"; import ieee754 { prefix ieee754; revision-date 2013-08-19; } import ietf-inet-types { prefix inet; revision-date 2013-07-15; } import network-concepts { prefix netc; revision-date 2013-11-25; } import rsvp { prefix rsvp; revision-date 2015-08-20; } import iana { prefix iana; revision-date 2013-08-16; } organization "Cisco Systems, Inc."; contact "Robert Varga "; description "This module contains the base data model of a PCEP message. It rolls up the definitions contained in RFC5440, RFC7896, RFC5520 and RFC8306, RFC5886. Copyright (c)2013 Cisco Systems, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"; revision "2018-11-09" { description "P2MP extension."; reference "RFC8306"; } revision "2013-10-05" { description "Initial revision."; reference "RFC5440"; } // NOTE: this model uses counts bits in fields from left to right, // just as IANA does for PCEP protocol. // Types typedef protocol-version { type uint8 { range 1..7; } } typedef request-id { type uint32 { range 1..max; } } typedef of-id { type uint16; } grouping vendor-information { description "VENDOR-INFORMATION format"; reference "http://tools.ietf.org/html/draft-ietf-pce-rfc7150bis-00#section-4"; leaf enterprise-number { type iana:enterprise-number; } choice enterprise-specific-information { } } // TLVs grouping tlv { description "Marker grouping for TLV groupings."; } grouping no-path-vector-tlv { description "NO-PATH-VECTOR TLV"; reference "https://tools.ietf.org/html/rfc5440#section-7.5"; uses tlv; leaf flags { type bits { bit p2mp-unreachable { position 24; } bit no-gco-solution { position 25; } bit no-gco-migration { position 26; } bit path-key { reference "https://tools.ietf.org/html/rfc5520#section-7.4"; position 27; } bit chain-unavailable { position 28; } bit unknown-source { position 29; } bit unknown-destination { position 30; } bit pce-unavailable { position 31; } } mandatory true; } } grouping overload-duration-tlv { description "OVERLOAD-DURATION TLV"; reference "https://tools.ietf.org/html/rfc5440#section-7.14"; container overload-duration { uses tlv; leaf duration { type uint32; units seconds; } } } grouping req-missing-tlv { description "REQ-MISSING TLV"; reference "https://tools.ietf.org/html/rfc5440#section-7.5"; container req-missing { uses tlv; leaf request-id { type request-id; } } } grouping of-list-tlv { description "OF-List TLV"; reference "https://tools.ietf.org/html/rfc5541#section-2.1"; container of-list { uses tlv; leaf-list codes { type of-id; } } } grouping order-tlv { description "Order TLV"; reference "https://tools.ietf.org/html/rfc5557#section-5.4"; container order { uses tlv; leaf delete { type uint32; mandatory true; } leaf setup { type uint32; mandatory true; } } } grouping vs-tlv { description "Vendor-specific TLV."; container vs-tlv { status obsolete; description "This model is obsolete, please use vendor-information-tlvs instead"; uses tlv; leaf enterprise-number { type iana:enterprise-number; } choice vendor-payload { } } } grouping path-setup-type-tlv { description "PATH-SETUP-TYPE TLV"; reference "https://tools.ietf.org/html/draft-ietf-pce-lsp-setup-type-00#section-3"; container path-setup-type { uses tlv; leaf pst { description "PST=0: Path is setup via RSVP-TE signaling protocol(default)."; type uint8; default 0; } } } // Objects grouping object-header { description "Common Object Header"; reference "https://tools.ietf.org/html/rfc5440#section-7.2"; leaf processing-rule { type boolean; default false; } leaf ignore { type boolean; default false; } } grouping object { description "Core object structure with optional TLVs"; uses object-header; } grouping vendor-information-tlvs { list vendor-information-tlv { description "VENDOR-INFORMATION-TLV"; reference "http://tools.ietf.org/html/draft-ietf-pce-rfc7150bis-00#section-3"; uses tlv; uses vendor-information; } } grouping vendor-information-objects { list vendor-information-object { description "VENDOR-INFORMATION-OBJECT"; reference "http://tools.ietf.org/html/draft-ietf-pce-rfc7150bis-00#section-2"; uses object; uses vendor-information; } } grouping open-object { description "OPEN Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.3"; container open { uses object; container "tlvs" { uses of-list-tlv; uses vendor-information-tlvs; } leaf version { type protocol-version; default 1; } leaf keepalive { type uint8 { range 0..255; } mandatory true; } leaf dead-timer { type uint8 { range 0..255; } mandatory true; } leaf session-id { type uint8; } } } grouping rp-object { description "RP Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.4"; container rp { uses object; container "tlvs" { uses order-tlv; uses vendor-information-tlvs; uses path-setup-type-tlv; } leaf priority { type uint8 { range 1..7; } } leaf request-id { type request-id; mandatory true; } leaf reoptimization { type boolean; default false; } leaf bi-directional { type boolean; default false; } leaf loose { type boolean; default false; } leaf path-key { type boolean; default false; reference "https://tools.ietf.org/html/rfc5520#section-3.2.1"; } leaf fragmentation { type boolean; default false; reference "https://tools.ietf.org/html/rfc8306#section-3.3.1"; } leaf p2mp { type boolean; default false; reference "https://tools.ietf.org/html/rfc8306#section-3.3.1"; } leaf ero-compression { type boolean; default false; reference "https://tools.ietf.org/html/rfc8306#section-3.3.1"; } leaf supply-of { type boolean; default false; reference "https://tools.ietf.org/html/rfc5541#section-3.3"; } leaf order { type boolean; default false; reference "https://tools.ietf.org/html/rfc5557#section-5.3"; } leaf make-before-break { type boolean; default false; reference "https://tools.ietf.org/html/rfc5557#section-5.3"; } } } grouping no-path-object { description "NO-PATH Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.5"; uses object; leaf nature-of-issue { type uint8; mandatory true; } leaf unsatisfied-constraints { when "nature-of-issue = 0" { description "The C flag has no meaning and is ignored unless the NI field is set to 0x00."; } type boolean; default false; } } typedef p2mp-leaves { reference "https://tools.ietf.org/html/rfc8306#section-3.3.2"; description "Types of leaves in a P2MP request."; type enumeration { enum new-leaves-to-add { value 1; } enum old-leaves-to-remove { value 2; } enum old-leaves-path-modified-reoptimized { value 3; } enum old-leaves-path-unchanged { value 4; } } } grouping p2mp-leaves-leaf { leaf p2mp-leaves { type p2mp-leaves; mandatory true; } } grouping endpoints-ipv4-source { leaf source-ipv4-address { type inet:ipv4-address-no-zone; mandatory true; } } grouping endpoints-ipv6-source { leaf source-ipv6-address { type inet:ipv6-address-no-zone; mandatory true; } } grouping ipv6-destinations { leaf-list destination-ipv6-address { type inet:ipv6-address-no-zone; min-elements 1; } } grouping ipv4-destinations { leaf-list destination-ipv4-address { type inet:ipv4-address-no-zone; min-elements 1; } } grouping endpoints { choice address-family { mandatory true; case ipv4-case { container ipv4 { uses endpoints-ipv4-source; leaf destination-ipv4-address { type inet:ipv4-address-no-zone; mandatory true; } } } case ipv6-case { container ipv6 { uses endpoints-ipv6-source; leaf destination-ipv6-address { type inet:ipv6-address-no-zone; mandatory true; } } } case p2mp-ipv4-case { container p2mp-ipv4 { uses p2mp-leaves-leaf; uses endpoints-ipv4-source; uses ipv4-destinations; } } case p2mp-ipv6-case { container p2mp-ipv6 { uses p2mp-leaves-leaf; uses endpoints-ipv6-source; uses ipv6-destinations; } } } } grouping endpoints-object { description "END-POINTS Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.6"; container endpoints-obj { uses object; uses endpoints; } } grouping bnc { uses object; // No possibility of TLVs list subobject { leaf loose { type boolean; mandatory true; } uses rsvp:ip-prefix-subobject; ordered-by user; } } grouping branch-node-object { description "Branch Node Object"; reference "https://tools.ietf.org/html/rfc8306#section-3.11.1"; container branch-node-list { uses bnc; } } grouping non-branch-node-object { description "Branch Node Object"; reference "https://tools.ietf.org/html/rfc8306#section-3.11.1"; container non-branch-node-list { uses bnc; } } grouping bnc-object { choice branch-node-type { case branch-node-case { uses branch-node-object; } case non-branch-node-case { uses non-branch-node-object; } } } grouping unreach-destination-object { description "UNREACH-DESTINATION Object"; reference "https://tools.ietf.org/html/rfc8306#section-3.14"; container unreach-destination-obj { uses object; choice destination { case ipv4-destination-case { uses ipv4-destinations; } case ipv6-destination-case { uses ipv6-destinations; } } } } grouping bandwidth { // No possibility to carry TLVs leaf bandwidth { type netc:bandwidth; } } grouping bandwidth-object { description "BANDWIDTH Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.7"; container bandwidth { uses object; uses bandwidth; } } grouping reoptimization-bandwidth-object { description "BANDWIDTH Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.7"; container reoptimization-bandwidth { uses object; uses bandwidth; } } grouping metric-object { description "METRIC Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.8"; container metric { uses object; leaf metric-type { type uint8; mandatory true; } leaf bound { type boolean; default false; } leaf computed { type boolean; default false; } leaf value { type ieee754:float32; } } } grouping exclude-route-object { description "Exclude Route Object"; reference "https://tools.ietf.org/html/rfc5521#section-2.1.1"; container xro { uses object; leaf flags { type bits { bit fail { position 31; } } mandatory true; } list subobject { uses rsvp:exclude-route-subobjects; ordered-by user; } } } grouping explicit-route-object { description "Explicit Route Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.9"; container ero { // No possibility of TLVs uses object; list subobject { leaf loose { type boolean; mandatory true; } uses rsvp:explicit-route-subobjects; ordered-by user; } } } grouping secondary-explicit-route-object { description "Secondary Explicit Route Object"; reference "https://tools.ietf.org/html/rfc8306#section-3.2"; container sero { // No possibility of TLVs uses object; list subobject { leaf loose { type boolean; mandatory true; } uses rsvp:secondary-explicit-route-subobjects; ordered-by user; } } } grouping include-route-object { description "Include Route Object"; reference "https://tools.ietf.org/html/rfc7896#section-2.1"; container iro { // No possibility of TLVs uses object; list subobject { leaf loose { type boolean; mandatory true; } uses rsvp:explicit-route-subobjects; ordered-by user; } } } grouping reported-route-object { description "Reported Route Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.10"; container rro { // No possibility of TLVs uses object; list subobject { uses rsvp:record-route-subobjects; ordered-by user; } } } grouping secondary-reported-route-object { description "Reported Route Object"; reference "https://tools.ietf.org/html/rfc8306#section-3.2"; container srro { // No possibility of TLVs uses object; list subobject { uses rsvp:secondary-record-route-subobjects; ordered-by user; } } } grouping lspa-object { description "LSPA Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.11"; container lspa { uses object; uses rsvp:tunnel-attributes; container "tlvs" { uses vendor-information-tlvs; } } } grouping svec-object { description "Synchronization Vector Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.13"; container svec { // No possibility of TLVs uses object; leaf link-diverse { type boolean; default false; } leaf node-diverse { type boolean; default false; } leaf srlg-diverse { type boolean; default false; } leaf partial-path-diverse { type boolean; default false; } leaf link-direction-diverse { type boolean; default false; } leaf-list requests-ids { type request-id; } } } grouping notification-object { description "NOTIFICATION Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.14"; container c-notification { uses object; container "tlvs" { when "../type = 2 and ../value = 1"; uses overload-duration-tlv; uses vendor-information-tlvs; } leaf type { type uint8; mandatory true; } leaf value { type uint8; mandatory true; } } } grouping pcep-error-object { description "PCEP-ERROR Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.15"; container error-object { uses object; container "tlvs" { when "../type = 7"; uses req-missing-tlv; uses vendor-information-tlvs; } leaf type { type uint8; mandatory true; } leaf value { type uint8; mandatory true; } } } grouping load-balancing-object { description "LOAD-BALANCING Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.16"; container load-balancing { // No possibility of TLVs uses object; leaf max-lsp { type uint8; mandatory true; } leaf min-bandwidth { type netc:bandwidth; } } } grouping close-object { description "CLOSE Object"; reference "https://tools.ietf.org/html/rfc5440#section-7.17"; container c-close { uses object; leaf reason { type uint8; mandatory true; } container tlvs { uses vendor-information-tlvs; } } } grouping path-key-object { description "PATH-KEY Object"; reference "https://tools.ietf.org/html/rfc5520#section-3.2.2"; container path-key { uses object; list path-keys { min-elements 1; leaf loose { type boolean; default false; } uses rsvp:path-key-subobject; ordered-by user; } } } grouping of-object { description "OF Object"; reference "https://tools.ietf.org/html/rfc5541#section-3.1"; container of { uses object; leaf code { type of-id; mandatory true; } container tlvs { uses vendor-information-tlvs; } } } grouping monitoring-object { description "The MONITORING object is used to specify the set of requested PCEP state metrics."; reference "https://tools.ietf.org/html/rfc5886#section-4.1"; container monitoring { uses object; leaf flags { type bits { bit incomplete { description "Indicates that PCE cannot provide any of the set of requested performance metrics for unspecified reasons."; position 19; } bit overload { description "Indicates that the overload status is a metric of interest."; position 20; } bit processing-time { description "Indicates that the processing times is a metric of interest."; position 21; } bit general { description "Indicates that the monitoring request is a general monitoring request."; position 22; } bit liveness { description "Indicates that the state metric of interest is the PCE's liveness."; position 23; } } } leaf monitoring-id { description "The Monitoring-id-number combined with the PCC-REQ-ID identifying the requesting PCC uniquely identifies the monitoring request context."; type uint32; mandatory true; } container tlvs { description "Optional TLV(s)."; uses vendor-information-tlvs; } } } grouping pcc-id-req-object { description "The PCC-ID-REQ object is used to specify the IP address of the requesting PCC."; reference "https://tools.ietf.org/html/rfc5886#section-4.2"; container pcc-id-req { uses object; leaf ip-address { type inet:ip-address-no-zone; } } } grouping pce-id-object { description "The PCE-ID object is used to specify a PCE's IP address."; reference "https://tools.ietf.org/html/rfc5886#section-4.3"; container pce-id { uses object; leaf ip-address { type inet:ip-address-no-zone; } } } grouping proc-time-object { description "The PROC-TIME object is used to report various processing time related metrics."; reference "https://tools.ietf.org/html/rfc5886#section-4.4"; container proc-time { uses object; leaf estimated { description "Indicates that the reported metric value is based on estimated processing time as opposed to actual computations."; type boolean; mandatory true; } leaf current-proc-time { description "Indicates, in milliseconds, the processing time for the path computation of interest characterized in the corresponding PCMonReq message."; type uint32; } leaf min-proc-time { description "The minimum processing time in milliseconds"; type uint32; mandatory true; } leaf max-proc-time { description "The maximum processing time in milliseconds"; type uint32; mandatory true; } leaf average-proc-time { description "The average processing time in milliseconds"; type uint32; mandatory true; } leaf variance-proc-time { description "The variance of processing times in milliseconds"; type uint32; mandatory true; } } } grouping overload-object { description "The OVERLOAD object is used to report a PCE processing congestion state."; reference "https://tools.ietf.org/html/rfc5886#section-4.5"; container overload { uses object; leaf duration { description "This field indicates the amount of time, in seconds, that the responding PCE expects that it may continue to be overloaded from the time that the response message was generated."; type uint16; mandatory true; } } } typedef class-type { type uint8 { range 1..7; } } grouping classtype-object { description "CLASSTYPE Object"; reference "https://tools.ietf.org/html/rfc5455#section-3"; container class-type { uses object; leaf class-type { type class-type; mandatory true; } } } grouping gc-object { description "GLOBAL CONSTRAINTS (GC) Object"; reference "https://tools.ietf.org/html/rfc5557#section-5.5"; container gc { uses object; leaf max-hop { type uint8; mandatory true; } leaf max-utilization { type uint8 { range 0..100; } units percent; mandatory true; } leaf min-utilization { type uint8 { range 0..100; } units percent; mandatory true; } leaf over-booking-factor { type uint8 { range 0..100; } units percent; mandatory true; } container tlvs { uses vendor-information-tlvs; } } } // Messages grouping message { description "Marker grouping for message groupings."; } grouping message-header { description "Common Header"; reference "https://tools.ietf.org/html/rfc5440#section-6.1"; leaf version { type protocol-version; default 1; } } grouping open-message { uses message; container open-message { description "Open Message"; reference "https://tools.ietf.org/html/rfc5440#section-6.2"; uses message-header; uses open-object; } } grouping keepalive-message { uses message; container keepalive-message { description "Keepalive Message"; reference "https://tools.ietf.org/html/rfc5440#section-6.3"; uses message-header; } } grouping lsp-attributes { uses lspa-object; uses bandwidth-object; uses reoptimization-bandwidth-object; list metrics { uses metric-object; } uses include-route-object; uses reported-route-object; uses exclude-route-object; uses of-object; uses classtype-object; } grouping pcreq-message { uses message; container pcreq-message { description "Path Computation Request Message"; reference "https://tools.ietf.org/html/rfc5440#section-6.4"; uses message-header; list requests { uses rp-object; container path-key-expansion { when "rp/path-key = true"; uses path-key-object; } container segment-computation { when "rp/path-key = false"; container p2p { when "../rp/p2mp = false"; uses endpoints-object; container reported-route { uses reported-route-object; uses reoptimization-bandwidth-object; } uses vendor-information-objects; uses load-balancing-object; uses lsp-attributes; } container p2mp { when "../rp/p2mp = true"; reference "https://tools.ietf.org/html/rfc8306#section-3.4"; list endpoint-rro-pair { uses endpoints-object; list rros { choice route-object { case reported-route-object-case { uses reported-route-object; } case secondary-reported-route-object-case { uses secondary-reported-route-object; } } } uses reoptimization-bandwidth-object; min-elements 1; } uses of-object; uses lspa-object; uses bandwidth-object; list metric { uses metric-object; } choice iro-bnc-choice { case iro-case { uses include-route-object; } case bnc-case { uses bnc-object; } } uses load-balancing-object; } } uses vendor-information-objects; } list svec { uses svec-object; uses of-object; uses gc-object; uses exclude-route-object; list metric { uses metric-object; } uses vendor-information-objects; } container monitoring-request { uses monitoring; list pce-id-list { uses pce-id-object; } } } } grouping path-definition { uses explicit-route-object; uses lsp-attributes; } grouping monitoring { uses monitoring-object; uses pcc-id-req-object; } grouping monitoring-metrics { list metric-pce { uses pce-id-object; uses proc-time-object; uses overload-object; } } grouping monitoring-response { uses monitoring; choice monitoring-metrics-list { case specific-metrics-list { list specific-metrics { uses rp-object; uses monitoring-metrics; } } case general-metrics-list { uses monitoring-metrics; } } } grouping pcmonrep-message { description "The PCMonRep message is used to provide PCE state metrics back to the requester for out-of-band monitoring requests."; reference "https://tools.ietf.org/html/rfc5886#section-9.2"; uses message; container pcmonrep-message { uses monitoring-response; } } grouping pcrep-message { uses message; container pcrep-message { description "Path Computation Reply Message"; reference "https://tools.ietf.org/html/rfc5440#section-6.5"; uses message-header; list replies { uses rp-object; uses vendor-information-objects; uses monitoring; uses monitoring-metrics; choice result { case success-case { container success { list paths { uses path-definition; } uses vendor-information-objects; } } case failure-case { container no-path { uses no-path-object; container "tlvs" { uses vendor-information-tlvs; container no-path-vector { uses no-path-vector-tlv; } } } uses lsp-attributes; } } } } } grouping pcntf-message { uses message; container pcntf-message { description "Notification Message"; reference "https://tools.ietf.org/html/rfc5440#section-6.6"; uses message-header; list notifications { list rps { uses rp-object; } list notifications { uses notification-object; } } } } grouping pcerr-message { uses message; container pcerr-message { description "Error Message"; reference "https://tools.ietf.org/html/rfc5440#section-6.7"; uses message-header; list errors { uses pcep-error-object; } choice error-type { case request-case { container request { list rps { uses rp-object; } } } case session-case { container session { uses open-object; } } } } } grouping close-message { uses message; container c-close-message { description "Close Message"; reference "https://tools.ietf.org/html/rfc5440#section-6.8"; uses message-header; uses close-object; } } grouping start-tls-message { uses message; container start-tls-message { description "StartTLS Message"; reference "https://tools.ietf.org/html/draft-ietf-pce-pceps-02#section-3.3"; uses message-header; } } }