module ietf-pcep-srv6 {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-pcep-srv6";
prefix pcep-srv6;
import ietf-srv6-types {
prefix srv6-types;
reference
"I-D.ietf-spring-srv6-yang: YANG Data Model for SRv6
Base and Static";
}
import ietf-te-types {
prefix te-types;
reference
"RFC 8776: Common YANG Data Types for Traffic Engineering";
}
import ietf-pcep {
prefix pcep;
reference
"I-D.ietf-pce-pcep-yang: A YANG Data Model for Path
Computation Element Communications Protocol (PCEP)";
}
organization
"IETF PCE (Path Computation Element) Working Group";
contact
"WG Web:
WG List:
Editor: Cheng Li
Shuping Peng
";
description
"The YANG module augments the Path Computation Element
Communications Protocol (PCEP) YANG operational model
with Segment Routing in IPv6 (SRv6).
Copyright (c) 2024 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Revised BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see the
RFC itself for full legal notices.";
revision 2024-10-19 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for Segment Routing (SR) Policy
and SRv6 support in Path Computation Element Communications
Protocol (PCEP)";
}
/* Features */
feature srv6 {
description
"Support Segment Routing in IPv6 (SRv6) for PCE.";
reference
"RFC 9603: Path Computation Element Communication Protocol
(PCEP) Extensions for IPv6 Segment Routing";
}
feature bsid {
description
"Support Binding SID for PCE.";
reference
"RFC 9604: Carrying Binding Label/SID in PCE-Based Networks";
}
feature sid-str {
description
"Support for SID Structure";
reference
"RFC 9603: Path Computation Element Communication Protocol
(PCEP) Extensions for IPv6 Segment Routing";
}
/* Identity */
identity path-setup-srv6 {
if-feature "srv6";
base te-types:path-signaling-type;
description
"SRv6 path setup type";
}
/* Groupings */
grouping srv6-msd {
description
"SRv6 MSD";
leaf msd-type {
type uint8;
description
"SRv6 Maximum Segment Depth (MSD) Type";
}
leaf msd-value {
type uint8;
description
"SRv6 MSD value for the type";
}
reference
"RFC 9603: Path Computation Element Communication Protocol
(PCEP) Extensions for IPv6 Segment Routing";
}
grouping srv6 {
description
"SRv6";
container srv6 {
if-feature "srv6";
description
"If SRv6 is supported";
leaf enabled {
type boolean;
description
"Enabled or Disabled; set to true when
Enabled";
}
leaf nai {
type boolean;
default "false";
description
"True indicates capability to resolve Node or
Adjacency Identifier (NAI) to SRv6 Segment
Identifier (SID)";
}
list srv6-msd {
key "msd-type";
config false;
description
"list of SRv6 MSD";
uses srv6-msd;
}
}
}
grouping segment-list {
description
"Segment list grouping";
container segment-list {
description
"Segments for given segment list";
list segment {
key "index";
description
"Configure Segment/hop at the index";
uses segment-properties;
}
}
}
grouping segment-properties {
description
"Segment properties grouping";
leaf index {
type uint32;
description
"Segment index";
}
leaf sid-value {
type srv6-types:srv6-sid;
description
"SRv6 SID value";
}
uses sid-str;
leaf endpoint-behavior {
type identityref {
base srv6-types:srv6-endpoint-type;
}
description
"The behavior associated with the SRv6 SIDs.";
}
/*Query: Add NAI?*/
}
grouping sid-str {
description
"The default SID Structure";
container sid-str {
if-feature "sid-str";
description
"The default SID Structure";
leaf lb {
type uint8;
description
"SRv6 SID Locator Block length in bits";
}
leaf ln {
type uint8;
description
"SRv6 SID Locator Node length in bits";
}
leaf fn {
type uint8;
description
"SRv6 SID Function length in bits";
}
leaf an {
type uint8;
description
"SRv6 SID Arguments length in bits";
}
}
}
/*
* Augment modules to add SRv6
*/
augment "/pcep:pcep/pcep:entity/pcep:capabilities" {
description
"Augmenting SRv6 capabilities";
uses srv6;
uses sid-str;
}
augment "/pcep:pcep/pcep:entity/pcep:peers/pcep:peer"
+ "/pcep:capabilities" {
description
"Augmenting SRv6 capabilities for peer";
uses srv6;
}
augment "/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp" {
description
"Augmenting SRv6 for LSP";
container srv6 {
when "derived-from-or-self
(/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp/pcep:pst,
'path-setup-srv6')" {
description
"For SRv6 path";
}
if-feature "srv6";
uses segment-list;
description
"SRv6 information";
}
}
}