module odl-pcep-ietf-stateful { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful"; prefix "stateful"; import ietf-inet-types { prefix inet; revision-date 2013-07-15; } import network-topology { prefix nt; revision-date 2013-10-21; } import network-topology-pcep { prefix topo; revision-date 2022-07-30; } import pcep-types { prefix pcep; revision-date 2018-11-09; } import pcep-message { prefix msg; revision-date 2018-11-09; } import rsvp { prefix rsvp; revision-date 2015-08-20; } import topology-tunnel { prefix tt; revision-date 2013-08-19; } import topology-tunnel-pcep { prefix tun; revision-date 2018-11-09; } import topology-tunnel-pcep-programming { prefix ttpp; revision-date 2018-11-09; } import yang-ext { prefix ext; revision-date 2013-07-09; } import network-concepts { prefix netc; revision-date 2013-11-25; } organization "Cisco Systems, Inc."; contact "Robert Varga "; description "This module contains the data model of PCEP extensions defined in RFC 8231: 'Path Computation Element Communication Protocol (PCEP) Extensions for Stateful PCE'. 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 "2020-07-20" { description "Update to PCEP Stateful RFC & PCE binding label sid draft"; reference "https://tools.ietf.org/html/rfc8231 https://tools.ietf.org/html/draft-ietf-pce-binding-label-sid-03"; } revision "2018-11-09" { description "P2MP extension."; reference "RFC8306"; } revision 2017-10-25 { description "Update network-topology-pcep revision"; } revision "2013-12-22" { description "Initial revision."; reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07"; } typedef operational-status { type enumeration { enum down { value 0; } enum up { value 1; } enum active { value 2; } enum going-down { value 3; } enum going-up { value 4; } } } typedef plsp-id { type uint32 { range 0..1048576; } } typedef srp-id-number { type uint32 { range 0..4294967294; } } typedef symbolic-path-name { type binary { length 1..65535; } } grouping path-binding-tlv { reference "https://tools.ietf.org/html/draft-ietf-pce-binding-label-sid-03#section-3"; container path-binding { uses pcep:tlv; choice binding-type-value { case mpls-label { leaf mpls-label { type netc:mpls-label; } } case mpls-label-entry { leaf label { type netc:mpls-label; } leaf traffic-class { type uint8 { range 0..7; } } leaf bottom-of-stack { type boolean; } leaf time-to-live { type uint8; } } case srv6 { leaf srv6-address { type inet:ipv6-address-no-zone; } } } } } grouping lsp-identifiers-tlv { description "LSP Identifiers TLV"; reference "https://tools.ietf.org/html/rfc8231#section-7.3.1"; container lsp-identifiers { uses pcep:tlv; leaf lsp-id { type rsvp:lsp-id; } leaf tunnel-id { type rsvp:tunnel-id; } choice address-family { case ipv4-case { container ipv4 { leaf ipv4-tunnel-sender-address { type inet:ipv4-address-no-zone; mandatory true; } leaf ipv4-extended-tunnel-id { type rsvp:ipv4-extended-tunnel-id; mandatory true; } leaf ipv4-tunnel-endpoint-address { type inet:ipv4-address-no-zone; mandatory true; } } } case ipv6-case { container ipv6 { leaf ipv6-tunnel-sender-address { type inet:ipv6-address-no-zone; mandatory true; } leaf ipv6-extended-tunnel-id { type rsvp:ipv6-extended-tunnel-id; mandatory true; } leaf ipv6-tunnel-endpoint-address { type inet:ipv6-address-no-zone; mandatory true; } } } } } } grouping lsp-error-code-tlv { description "LSP Error Code TLV"; reference "https://tools.ietf.org/html/rfc8231#section-7.3.3"; container lsp-error-code { uses pcep:tlv; leaf error-code { type uint32; } } } grouping rsvp-error-spec-tlv { description "RSVP Error Spec TLV"; reference "https://tools.ietf.org/html/rfc8231#section-7.3.4"; container rsvp-error-spec { uses pcep:tlv; choice error-type { case rsvp-case { container rsvp-error { uses rsvp:error-spec; } } case user-case { container user-error { uses rsvp:user-error-spec; } } } } } grouping stateful-capability-tlv { description "Stateful PCE Capability TLV"; reference "https://tools.ietf.org/html/rfc8231#section-7.1.1"; container stateful { uses pcep:tlv; leaf lsp-update-capability { type boolean; default false; } } } grouping symbolic-path-name-tlv { description "Symbolic Path Name TLV"; reference "https://tools.ietf.org/html/rfc8231#section-7.3.2"; container symbolic-path-name { uses pcep:tlv; leaf path-name { type symbolic-path-name; } } } grouping lsp-object { description "LSP Object"; reference "https://tools.ietf.org/html/rfc8321#section-7.3"; container lsp { uses pcep:object; container "tlvs" { uses lsp-error-code-tlv; uses lsp-identifiers-tlv; uses rsvp-error-spec-tlv; uses symbolic-path-name-tlv; uses pcep:vs-tlv; uses pcep:vendor-information-tlvs; uses path-binding-tlv; } leaf plsp-id { type plsp-id; } leaf delegate { type boolean; default false; } leaf sync { type boolean; default false; } leaf remove { type boolean; default false; } leaf administrative { type boolean; default false; } leaf operational { type operational-status; } } } grouping srp-object { description "SRP Object"; reference "https://tools.ietf.org/html/rfc8231#section-7.2"; container srp { uses pcep:object; container "tlvs" { uses symbolic-path-name-tlv; uses pcep:vendor-information-tlvs; uses pcep:path-setup-type-tlv; } leaf operation-id { type srp-id-number; mandatory true; } } } grouping pcupd-message { uses pcep:message; container pcupd-message { description "State Update Request Message"; reference "https://tools.ietf.org/html/rfc8231#section-6.2"; uses pcep:message-header; list updates { uses srp-object; uses lsp-object; container path { uses pcep:path-definition; } } } } grouping pcrpt-message { uses pcep:message; container pcrpt-message { description "State Report Message"; reference "https://tools.ietf.org/html/rfc8231#section-6.1"; uses pcep:message-header; list reports { uses srp-object; uses lsp-object; container path { uses pcep:path-definition; } } } } notification pcupd { uses pcupd-message; } notification pcrpt { uses pcrpt-message; } augment "/msg:open/msg:open-message/msg:open/msg:tlvs" { uses stateful-capability-tlv; ext:augment-identifier tlvs-1; } augment "/msg:pcrep/msg:pcrep-message/msg:replies" { reference "https://tools.ietf.org/html/rfc8231#section-6.5"; uses lsp-object; ext:augment-identifier tlvs-4; } augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2p" { reference "https://tools.ietf.org/html/rfc8231#section-6.4"; uses lsp-object; } augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2mp" { reference "https://tools.ietf.org/html/rfc8231#section-6.4"; uses lsp-object; } augment "/msg:pcerr/msg:pcerr-message/msg:error-type" { reference "https://tools.ietf.org/html/rfc8231#section-6.3"; case stateful-case { container stateful { list srps { uses srp-object; } } } } augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" { uses stateful-capability-tlv; ext:augment-identifier tlvs-3; } augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:reported-lsp/topo:path" { uses lsp-object; uses pcep:path-setup-type-tlv; } augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:stateful-tlv" { uses stateful-capability-tlv; } augment "/topo:ensure-lsp-operational/topo:input/topo:arguments" { ext:augment-identifier arguments-1; leaf operational { type operational-status; } } augment "/topo:add-lsp/topo:input/topo:arguments" { ext:augment-identifier arguments-2; uses lsp-object; uses pcep:path-setup-type-tlv; } augment "/topo:update-lsp/topo:input/topo:arguments" { ext:augment-identifier arguments-3; uses lsp-object; uses pcep:path-setup-type-tlv; } typedef administrative-status { type enumeration { enum active; enum inactive; } reference "https://tools.ietf.org/html/rfc8231#section-7.3"; } grouping cfg-attributes { leaf administrative-status { type administrative-status; } } grouping oper-attributes { leaf operational-status { type operational-status; config false; } } augment "/nt:network-topology/nt:topology/nt:link" { when "../../tunnel-types/pcep-tunnel"; uses cfg-attributes; uses oper-attributes; } augment "/nt:network-topology/nt:topology/tt:paths" { when "../../tunnel-types/pcep-tunnel"; uses cfg-attributes; uses oper-attributes; } augment "/ttpp:pcep-create-p2p-tunnel/ttpp:input" { uses cfg-attributes; } augment "/ttpp:pcep-update-tunnel/ttpp:input" { uses cfg-attributes; } }