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
";
description
"The YANG module augments the PCEP YANG operational
model with SRv6.
Copyright (c) 2021 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 Simplified 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 2021-02-22 {
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
"I-D.ietf-pce-segment-routing-ipv6: PCEP Extensions
for Segment Routing leveraging the IPv6 data plane";
}
/* 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";
}
}
grouping srv6 {
description
"SRv6";
container srv6 {
if-feature "srv6";
description
"If SRv6 is supported";
leaf enabled {
type boolean;
description
"Enabled or Disabled";
}
leaf msd-limit {
type boolean;
default "false";
description
"True indicates no limit on MSD, the
list srv6-msd is ignored";
}
list srv6-msd {
key "msd-type";
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";
}
}
/*
* Augment modules to add SRv6
*/
augment "/pcep:pcep/pcep:entity/pcep:capability" {
description
"Augmenting SRv6";
uses srv6;
}
augment
"/pcep:pcep/pcep:entity/pcep:peers/pcep:peer/pcep:capability" {
description
"Augmenting SRv6";
uses srv6;
}
augment "/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp" {
description
"Augmenting SRv6";
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";
}
}
}