module ietf-pcep-srv6 {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-pcep-srv6";
prefix ps;
import ietf-srv6-types {
prefix "st";
reference "RFC XXXX";
}
import ietf-te-types {
prefix "te-types";
reference "RFC XXXX";
}
import ietf-pcep {
prefix "p";
reference "RFC XXXX";
}
organization
"IETF PCE (Path Computation Element) Working Group";
contact
"WG Web:
WG List:
Editor: Dhruv Dhody
";
description
"The YANG module augments the PCEP yang operational
model with SRv6";
revision 2018-10-19 {
description "Initial revision.";
reference
"RFC XXXX: A YANG Data Model for Path Computation
Element Communications Protocol
(PCEP) - Segement Routing in IPv6
(SRv6)";
}
/* Identity */
identity path-setup-srv6 {
base te-types:path-signaling-type;
description
"SRv6 path setup type";
}
/* Features */
feature srv6 {
description
"Support Segment Routing in IPv6 (SRv6) for PCE.";
}
/* Groupings */
grouping srv6 {
description
"SRv6";
container srv6 {
if-feature srv6;
description
"If SRv6 is supported";
leaf enabled{
type boolean;
description
"Enabled or Disabled";
}
leaf max-sl {
type uint8;
description
"Max value of the segment left field in SRH";
}
leaf sl-limit{
type boolean;
default false;
description
"True indicates no limit on SL, the
leaf max-sl is ignored";
}
}
}
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 st:srv6-sid;
description "SRv6 SID value";
}
}
/*
* Augment modules to add SRv6
*/
augment "/p:pcep/p:entity/p:capability"{
description
"Augmenting SRv6";
uses srv6;
}
augment "/p:pcep/p:entity/p:peers/p:peer/p:capability"{
description
"Augmenting SRv6";
uses srv6;
}
augment "/p:pcep/p:entity/p:lsp-db/p:lsp"{
description
"Augmenting SRv6";
container srv6 {
when "/p:pcep/p:entity/p:lsp-db/p:lsp/p:pst
= 'path-setup-srv6'" {
description
"For SRv6 path";
}
if-feature srv6;
uses segment-list;
description
"SRv6";
}
}
}//module