module ietf-pcep-srpolicy {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-pcep-srpolicy";
prefix pcep-srp;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-pcep {
prefix pcep;
reference
"I-D.ietf-pce-pcep-yang: A YANG Data Model for Path
Computation Element Communications Protocol (PCEP)";
}
import ietf-sr-policy-types {
prefix sr-policy-types;
reference
"I-D.ietf-spring-sr-policy-yang: YANG Data Model for
Segment Routing Policy";
}
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 model with Segment
Routing (SR) Policy.
Copyright (c) 2022 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 2022-10-23 {
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 multipath {
description
"Support for multipath ERO.";
reference
"I-D.ietf-pce-multipath: PCEP Extensions for Signaling
Multipath Information";
}
/* Groupings */
grouping sr-policy {
description
"Segment Routing Policy grouping";
leaf headend {
type inet:ip-address-no-zone;
description
"SR Policy headend";
reference
"RFC 9256: Segment Routing Policy Architecture";
}
leaf color {
type uint32 {
range "1..max";
}
description
"SR Policy Color";
reference
"RFC 9256: Segment Routing Policy Architecture";
}
leaf endpoint {
type inet:ip-address-no-zone;
description
"SR Policy Endpoint";
reference
"RFC 9256: Segment Routing Policy Architecture";
}
}
grouping sr-policy-cp {
description
"Segment Routing Policy Candidate Path grouping";
leaf protocol-origin {
type sr-policy-types:protocol-origin-type;
description
"SR Policy Candidate Path Protocol";
reference
"RFC 9256: Segment Routing Policy Architecture";
}
leaf originator {
type string;
description
"SR Policy Candidate Path Originator";
reference
"RFC 9256: Segment Routing Policy Architecture";
}
leaf discriminator {
type uint32 {
range "1..max";
}
description
"SR Policy Candidate Path Discriminator";
reference
"RFC 9256: Segment Routing Policy Architecture";
}
}
augment "/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp" {
description
"Augmenting SR Policy";
container sr-policy {
when
"derived-from-or-self
(/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp/pcep:pst,
'path-setup-sr') or
derived-from-or-self
(/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp/pcep:pst,
'path-setup-srv6')" {
description
"Applicable for SR or SRv6";
}
uses sr-policy;
uses sr-policy-cp;
description
"SR Policy Candidate Path";
}
}
}