1 module odl-pcep-segment-routing {
3 namespace "urn:opendaylight:params:xml:ns:yang:pcep:segment:routing";
6 import pcep-types { prefix pcep; revision-date 2018-11-09; }
7 import pcep-message { prefix msg; revision-date 2018-11-09; }
8 import odl-pcep-ietf-stateful { prefix stateful; revision-date 2020-07-20; }
9 import odl-pcep-ietf-initiated { prefix initiated; revision-date 2020-07-20; }
10 import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
11 import network-topology { prefix nt; revision-date 2013-10-21; }
12 import network-topology-pcep { prefix pn; revision-date 2022-07-30; }
14 organization "Cisco Systems, Inc.";
15 contact "Milos Fabian <milfabia@cisco.com>";
18 "This module contains the data model of PCEP Extensions for Segment Routing,
19 as defined in RFC 8664.
21 Copyright (c)2015 Cisco Systems, Inc. All rights reserved.
23 This program and the accompanying materials are made available
24 under the terms of the Eclipse Public License v1.0 which
25 accompanies this distribution, and is available at
26 http://www.eclipse.org/legal/epl-v10.html";
28 revision "2020-07-20" {
29 description "Update to RFC 8664";
30 reference "RFC8664: https://tools.ietf.org/html/rfc8664";
33 revision "2018-11-09" {
40 description "Update network-topology-pcep revision";
43 revision "2015-01-12" {
45 "Upgrade from draft-sivabalan-pce-segment-routing-02.";
46 reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01";
49 grouping sr-pce-capability-tlv {
50 description "SR-PCE-CAPABILITY TLV";
51 reference "http://tools.ietf.org/html/rfc8664#section-4.1.2";
53 container sr-pce-capability {
56 description "N flag used by a PCC to indicate that it is capable of resolving a NAI to a SID";
61 description " X flag used by a PCC to indicate that it does not impose any limit to the MSD";
66 description "Maximum SID Depth";
73 augment "/msg:open/msg:open-message/msg:open/msg:tlvs" {
74 reference "http://tools.ietf.org/html/rfc4664#section-4.1";
75 uses sr-pce-capability-tlv;
78 augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" {
79 reference "http://tools.ietf.org/html/rfc8664#section-5.1";
80 uses sr-pce-capability-tlv;
84 reference "http://tools.ietf.org/html/rfc8664#section-4.3.1";
107 grouping sr-subobject {
108 description "Common grouping for both SR-ERO and SR-RRO subobjects as they share the same content representation.";
110 description "Node or Adjacency Identifier Type (NT)";
114 description "If this bit is set to 1, the SID value represents an MPLS label stack entry";
119 description "TC, S & TTL fields in the MPLS label are specified by the PCE if M & C are set to 1";
123 /* S-Flag is represented by the presence of the SID TLV: isSflag() is equivalent to getSid() != null */
125 description "Segment Identifier";
128 /* F-Flag is represented by the presence of the NAI TLV: isFflag() is equivalent to getNai() != null */
130 reference "http://tools.ietf.org/html/rfc8664#section-4.3.2";
131 description "Node or Adjacency Identifier";
133 when "../nai-type = 'ipv4-node-id' or ../nai-type = 'ipv6-node-id'";
134 description "IP Node ID";
136 type inet:ip-address-no-zone;
141 when "../nai-type = 'ipv4-adjacency' or ../nai-type = 'ipv6-adjacency'";
142 description "IP Adjacency";
143 leaf local-ip-address {
144 type inet:ip-address-no-zone;
147 leaf remote-ip-address {
148 type inet:ip-address-no-zone;
152 case unnumbered-adjacency {
153 when "../nai-type = 'unnumbered'";
154 description "Unnumbered Adjacency with IPv4 NodeIDs";
159 leaf local-interface-id {
163 leaf remote-node-id {
167 leaf remote-interface-id {
173 when "../nai-type = 'ipv6-local'";
174 description "IPv6 adjacency with link-local IPv6 addresses";
175 leaf local-ipv6-address {
176 type inet:ipv6-address-no-zone;
183 leaf remote-ipv6-address {
184 type inet:ipv6-address-no-zone;
195 // kept both groupings in case draft changes and they won't be equal
196 grouping sr-ero-subobject {
197 reference "http://tools.ietf.org/html/rfc8664#section-4.3";
198 /* L(oose)-flag is already present within the ERO subObject */
202 grouping sr-rro-subobject {
203 reference "http://tools.ietf.org/html/rfc8664#section-4.4";
208 augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:result/msg:success-case/msg:success/msg:paths/msg:ero/msg:subobject/msg:subobject-type" {
210 uses sr-ero-subobject;
215 augment "/initiated:pcinitiate/initiated:pcinitiate-message/initiated:requests/initiated:ero/initiated:subobject/initiated:subobject-type" {
217 uses sr-ero-subobject;
221 augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:path/stateful:ero/stateful:subobject/stateful:subobject-type" {
223 uses sr-ero-subobject;
227 augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:path/stateful:ero/stateful:subobject/stateful:subobject-type" {
229 uses sr-ero-subobject;
234 augment "/pn:add-lsp/pn:input/pn:arguments/pn:ero/pn:subobject/pn:subobject-type" {
236 uses sr-ero-subobject;
240 augment "/pn:update-lsp/pn:input/pn:arguments/pn:ero/pn:subobject/pn:subobject-type" {
242 uses sr-ero-subobject;
246 augment "/nt:network-topology/nt:topology/nt:node/pn:path-computation-client/pn:reported-lsp/pn:path/pn:ero/pn:subobject/pn:subobject-type" {
248 uses sr-ero-subobject;
253 augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2p/msg:reported-route/msg:rro/msg:subobject/msg:subobject-type" {
255 uses sr-rro-subobject;
259 augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2p/msg:rro/msg:subobject/msg:subobject-type" {
261 uses sr-rro-subobject;
265 augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:result/msg:failure-case/msg:rro/msg:subobject/msg:subobject-type" {
267 uses sr-rro-subobject;
271 augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:result/msg:success-case/msg:success/msg:paths/msg:rro/msg:subobject/msg:subobject-type" {
273 uses sr-rro-subobject;
278 augment "/initiated:pcinitiate/initiated:pcinitiate-message/initiated:requests/initiated:rro/initiated:subobject/initiated:subobject-type" {
280 uses sr-rro-subobject;
284 augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:path/stateful:rro/stateful:subobject/stateful:subobject-type" {
286 uses sr-rro-subobject;
290 augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:path/stateful:rro/stateful:subobject/stateful:subobject-type" {
292 uses sr-rro-subobject;
297 augment "/pn:add-lsp/pn:input/pn:arguments/pn:rro/pn:subobject/pn:subobject-type" {
299 uses sr-rro-subobject;
303 augment "/pn:update-lsp/pn:input/pn:arguments/pn:rro/pn:subobject/pn:subobject-type" {
305 uses sr-rro-subobject;
309 augment "/nt:network-topology/nt:topology/nt:node/pn:path-computation-client/pn:reported-lsp/pn:path/pn:rro/pn:subobject/pn:subobject-type" {
311 uses sr-rro-subobject;