<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes" ?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="no"?>
<?rfc rfcedstyle="yes"?>
<?rfc subcompact="no"?>
<?rfc compact="yes" ?>
<?rfc iprnotified="Yes" ?>
<?rfc strict="no" ?>
<rfc category="std" docName="draft-ietf-pce-pcep-srv6-yang-05"
     ipr="trust200902" obsoletes="" submissionType="IETF" updates=""
     xml:lang="en">
  <front>
    <title abbrev="PCEP-SR-YANG">A YANG Data Model for Segment Routing (SR)
    Policy and SR in IPv6 (SRv6) support in Path Computation Element
    Communications Protocol (PCEP)</title>

    <author fullname="Cheng Li" initials="C" surname="Li">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Rd.</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>c.l@huawei.com</email>
      </address>
    </author>

    <author fullname="Siva Sivabalan" initials="S." surname="Sivabalan">
      <organization>Ciena Corporation</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <email>ssivabal@ciena.com</email>
      </address>
    </author>

    <author fullname="Shuping Peng" initials="S" surname="Peng">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Rd.</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>pengshuping@huawei.com</email>
      </address>
    </author>

    <author fullname="Mike Koldychev" initials="M" surname="Koldychev">
      <organization>Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <email>mkoldych@cisco.com</email>
      </address>
    </author>

    <author fullname="Luc-Fabrice Ndifor" initials="L" surname="Ndifor">
      <organization>MTN Cameroon</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>Cameroon</country>
        </postal>

        <email>Luc-Fabrice.Ndifor@mtn.com</email>
      </address>
    </author>

    <date/>

    <area>Routing</area>

    <workgroup>PCE Working Group</workgroup>

    <abstract>
      <t>This document augments a YANG data model for the management of Path
      Computation Element Communications Protocol (PCEP) for communications
      between a Path Computation Client (PCC) and a Path Computation Element
      (PCE), or between two PCEs in support for Segment Routing in IPv6 (SRv6)
      and SR Policy. The data model includes configuration data and state data
      (status information and counters for the collection of statistics).</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction" toc="default">
      <t>The Path Computation Element (PCE) defined in <xref
      target="RFC4655"/> is an entity that is capable of computing a network
      path or route based on a network graph, and applying computational
      constraints. A Path Computation Client (PCC) may make requests to a PCE
      for paths to be computed.</t>

      <t>PCEP is the communication protocol between a PCC and PCE and is
      defined in <xref target="RFC5440"/>. PCEP interactions include path
      computation requests and path computation replies as well as
      notifications of specific states related to the use of a PCE in the
      context of Multiprotocol Label Switching (MPLS) and Generalized MPLS
      (GMPLS) Traffic Engineering (TE). <xref target="RFC8231"/> specifies
      extensions to PCEP to enable stateful control of MPLS TE LSPs.</t>

      <t><xref target="I-D.ietf-pce-segment-routing-ipv6"/> extends <xref
      target="RFC8664"/> to support SR for IPv6 data plane.</t>

      <t><xref target="I-D.ietf-pce-pcep-yang"/> defines a YANG <xref
      target="RFC7950"/> data model for the management of PCEP speakers. This
      document contains a specification of the PCEP-SRv6 YANG module,
      "ietf-pcep-srv6" which provides the PCEP-SRv6 <xref
      target="I-D.ietf-pce-segment-routing-ipv6"/> data model. This document
      also contains the PCEP SR Policy YANG module, "ietf-pcep-srpolicy" which
      provides a reference to SR Policies <xref target="RFC9256"/>.</t>

      <t>The PCEP operational state is included in the same tree as the PCEP
      configuration consistent with Network Management Datastore Architecture
      (NMDA) <xref target="RFC8342"/>. The origin of the data is indicated as
      per the origin metadata annotation.</t>
    </section>

    <section title="Requirements Language" toc="default">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>
    </section>

    <section title="Terminology and Notation" toc="default">
      <t>This document also uses the following terms defined in <xref
      target="RFC7420"/>: <list style="symbols">
          <t>PCEP entity: a local PCEP speaker.</t>

          <t>PCEP peer: a remote PCEP speaker.</t>

          <t>PCEP speaker: where it is not necessary to distinguish between
          local and remote.</t>
        </list></t>

      <t>Further, this document also uses the following terms defined in <xref
      target="RFC8231"/> : <list style="symbols">
          <t>Stateful PCE, Passive Stateful PCE, Active Stateful PCE.</t>

          <t>Delegation, Revocation, Redelegation.</t>

          <t>LSP State Report, Path Computation Report message (PCRpt).</t>

          <t>LSP State Update, Path Computation Update message (PCUpd).</t>
        </list></t>

      <t><xref target="RFC8281"/> : <list style="symbols">
          <t>PCE-initiated LSP, Path Computation LSP Initiate Message
          (PCInitiate).</t>
        </list></t>

      <t><xref target="RFC8408"/> : <list style="symbols">
          <t>Path Setup Type (PST).</t>
        </list></t>

      <t><xref target="RFC8664"/> : <list style="symbols">
          <t>Segment Routing (SR).</t>
        </list></t>

      <t><xref target="I-D.ietf-pce-segment-routing-ipv6"/> : <list
          style="symbols">
          <t>Segment Routing in IPv6 (SRv6).</t>
        </list></t>

      <t><xref target="RFC9256"/> : <list style="symbols">
          <t>SR Policy.</t>
        </list></t>

      <section anchor="sec.tree-symbols" title="Tree Diagrams" toc="default">
        <t>A simplified graphical representation of the data model is used in
        this document. The meaning of the symbols in these diagrams is defined
        in <xref target="RFC8340"/>.</t>

        <!--
      <list style="symbols">
        <t>Brackets "[" and "]" enclose list keys.</t>
        <t>Abbreviations before data node names: "rw" means
        configuration (read-write) and "ro" state data
        (read-only).</t>
        <t>Symbols after data node names: "?" means an optional node, "!"
      means a presence container, and "*" denotes a list and leaf-list.</t>


        <t>Parentheses enclose choice and case nodes, and case nodes
        are also marked with a colon (":").</t>
        <t>Ellipsis ("...") stands for contents of subtrees that are
        not shown.</t>
      </list></t>-->
      </section>

      <section title="Prefixes in Data Node Names" toc="default">
        <t>In this document, names of data nodes and other data model objects
        are often used without a prefix, as long as it is clear from the
        context in which the YANG module each name is defined. Otherwise, names
        are prefixed using the standard prefix associated with the
        corresponding YANG module, as shown in <xref format="default"
        pageno="false" target="tab.prefixes"/>.</t>

        <texttable align="center" anchor="tab.prefixes" style="full"
                   suppress-title="false"
                   title="Prefixes and corresponding YANG modules">
          <ttcol align="left">Prefix</ttcol>

          <ttcol align="left">YANG module</ttcol>

          <ttcol align="left">Reference</ttcol>

          <c>inet</c>

          <c>ietf-inet-types</c>

          <c><xref target="RFC6991"/></c>

          <c>te-types</c>

          <c>ietf-te-types</c>

          <c><xref format="default" pageno="false" target="RFC8776"/></c>

          <c>pcep</c>

          <c>ietf-pcep</c>

          <c><xref format="default" pageno="false"
          target="I-D.ietf-pce-pcep-yang"/></c>

          <c>srv6-types</c>

          <c>ietf-srv6-types</c>

          <c><xref format="default" pageno="false"
          target="I-D.ietf-spring-srv6-yang"/></c>

          <c>sr-policy-types</c>

          <c>ietf-sr-policy-types</c>

          <c><xref format="default" pageno="false"
          target="I-D.ietf-spring-sr-policy-yang"/></c>

          <!--<c>rt</c><c>ietf-routing</c><c><xref target="RFC8349" pageno="false" format="default"/></c>-->
        </texttable>
      </section>

      <section title="References in the Model" toc="default">
        <t>The following additional documents are referenced in the model defined
        in this document -</t>

        <texttable align="center" anchor="tab.ref" style="full"
                   suppress-title="false"
                   title="References in the YANG modules">
          <ttcol align="left">Title</ttcol>

          <ttcol align="left">Reference</ttcol>

          <c>PCEP Extensions for Segment Routing leveraging the IPv6 data
          plane</c>

          <c><xref target="I-D.ietf-pce-segment-routing-ipv6"/></c>

          <c>Carrying Binding Label/Segment Identifier (SID) in PCE-based
          Networks</c>

          <c><xref target="I-D.ietf-pce-binding-label-sid"/></c>

          <c>Segment Routing Policy Architecture</c>

          <c><xref target="RFC9256"/></c>

          <c>PCEP Extensions for Signaling Multipath Information</c>

          <c><xref target="I-D.ietf-pce-multipath"/></c>

          <c>PCEP extension to support Segment Routing Policy Candidate
          Paths</c>

          <c><xref target="I-D.ietf-pce-segment-routing-policy-cp"/></c>
        </texttable>
      </section>

      <section title="Further Discussion" toc="default">
        <t><xref target="I-D.ietf-pce-multipath"/> defines a mechanism to
        encode multiple paths for a single set of objectives and constraints.
        This is a generic PCEP mechanism, not specific to any path setup type
        or dataplane but the key usecase is SR.</t>

        <t>Further discussion is needed on how to model it in PCEP YANG.</t>
      </section>
    </section>

    <section anchor="sec.data-tree" title="The Design of YANG Data Model"
             toc="default">
      <section anchor="sec.overview.data-tree"
               title="The Overview of PCEP SRv6 Data Model" toc="default">
        <t>The PCEP-SRv6 YANG module defined in this document has all the
        common building blocks for the PCEP-SRv6 extension. The model augments
        PCEP capabilities at the Entity and peer level with SRv6 capability in
        PCEP, support for NAI, MSD and the SID structure. The model also
        extends the LSP in the LSP-DB to maintain SRv6 paths. <figure
            align="left" alt="" height="" suppress-title="true" title=""
            width="">
            <artwork align="left" alt="" height="" name="" type="" width=""
                     xml:space="preserve"><![CDATA[
module: ietf-pcep-srv6

  augment /pcep:pcep/pcep:entity/pcep:capabilities:
    +--rw srv6 {srv6}?
    |  +--rw enabled?    boolean
    |  +--rw nai?        boolean
    |  +--rw srv6-msd* [msd-type]
    |     +--rw msd-type     uint8
    |     +--rw msd-value?   uint8
    +--rw sid-str {sid-str}?
       +--rw lb?   uint8
       +--rw ln?   uint8
       +--rw fn?   uint8
       +--rw an?   uint8
  augment /pcep:pcep/pcep:entity/pcep:peers/pcep:peer/pcep:capabilities:
    +--rw srv6 {srv6}?
       +--rw enabled?    boolean
       +--rw nai?        boolean
       +--rw srv6-msd* [msd-type]
          +--rw msd-type     uint8
          +--rw msd-value?   uint8
  augment /pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp:
    +--ro srv6 {srv6}?
       +--ro segment-list
          +--ro segment* [index]
             +--ro index                uint32
             +--ro sid-value?           srv6-types:srv6-sid
             +--ro sid-str {sid-str}?
             |  +--ro lb?   uint8
             |  +--ro ln?   uint8
             |  +--ro fn?   uint8
             |  +--ro an?   uint8
             +--ro endpoint-behavior?   identityref


]]></artwork>
          </figure></t>
      </section>

      <section anchor="sec.overview.data-tree1"
               title="The Overview of PCEP SR Policy Data Model" toc="default">
        <t>The PCEP-SRPolicy YANG module defined in this document has all the
        common building blocks for the PCEP-SR Policy extension. The model
        augments the LSP in the LSPDB to have information refering to the SR
        Policy and the candidate path. <figure align="left" alt="" height=""
            suppress-title="true" title="" width="">
            <artwork align="left" alt="" height="" name="" type="" width=""
                     xml:space="preserve"><![CDATA[
module: ietf-pcep-srpolicy

  augment /pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp:
    +--ro sr-policy
       +--ro headend?    inet:ip-address-no-zone
       +--ro color?      uint32
       +--ro endpoint?   inet:ip-address-no-zone
       +--ro name?       string
       +--ro cp
          +--ro protocol-origin?   sr-policy-types:protocol-origin-type
          +--ro originator?        string
          +--ro discriminator?     uint32
          +--ro name?              string

]]></artwork>
          </figure></t>

        <t>The sr-policy container is applicable for both SR-MPLS and
        SRv6.</t>
      </section>
    </section>

    <section title="The YANG Modules" toc="default">
      <section title="ietf-pcep-srv6 module" toc="default">
        <t>RFC Ed.: In this section, replace all occurrences of 'XXXX' with
        the actual RFC number and all occurrences of the revision date below
        with the date of RFC publication (and remove this note).</t>

        <figure align="left" alt="" height="" suppress-title="true" title=""
                width="">
          <artwork align="left" alt="" height="" name="" type="" width=""
                   xml:space="preserve"><![CDATA[

<CODE BEGINS> file "ietf-pcep-srv6@2024-03-18.yang"
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:   <https://datatracker.ietf.org/wg/pce/>
     WG List:  <mailto:pce@ietf.org>
     Editor:   Cheng Li
               <mailto:c.l@huawei.com>
               Shuping Peng
               <mailto:pengshuping@huawei.com>";
  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-03-18 {
    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";
  }

  feature bsid {
    description
      "Support Binding SID for PCE.";
    reference
      "I-D.ietf-pce-binding-label-sid: Carrying Binding
       Label/Segment Identifier (SID) in PCE-based Networks.";
  }

  feature sid-str {
    description
      "Support for SID Structure";
    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";
    }
    reference
      "I-D.ietf-pce-segment-routing-ipv6: PCEP Extensions
       for Segment Routing leveraging the IPv6 data plane";
  }

  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";
        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";
    }
  }
}

<CODE ENDS>
                     ]]></artwork>
        </figure>
      </section>

      <section title="ietf-pcep-srpolicy module" toc="default">
        <t>RFC Ed.: In this section, replace all occurrences of 'XXXX' with
        the actual RFC number and all occurrences of the revision date below
        with the date of RFC publication (and remove this note).</t>

        <figure align="left" alt="" height="" suppress-title="true" title=""
                width="">
          <artwork align="left" alt="" height="" name="" type="" width=""
                   xml:space="preserve"><![CDATA[

<CODE BEGINS> file "ietf-pcep-srpolicy@2024-03-18.yang"
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-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)";
  }
  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:   <https://datatracker.ietf.org/wg/pce/>
     WG List:  <mailto:pce@ietf.org>
     Editor:   Cheng Li
               <mailto:c.l@huawei.com>
               Shuping Peng
               <mailto:pengshuping@huawei.com>";
  description
    "The YANG module augments the Path Computation Element
     Communications Protocol (PCEP) YANG model with Segment
     Routing (SR) Policy.

     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-03-18 {
    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";
  }

  /* Identities */

  identity sr-policy {
    base te-types:association-type;
    description
      "SR Policy Association";
    reference
      "I-D.ietf-pce-segment-routing-policy-cp: PCEP extension to
       support Segment Routing Policy Candidate Paths";
  }

  /* 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";
    }
    leaf name {
      type string;
      description
        "SR Policy name";
      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";
    }
    leaf name {
      type string;
      description
        "SR Policy Candidate Path name";
      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;
      container cp {
        uses sr-policy-cp;
        description
          "SR Policy Candidate Path information";
      }
      description
        "SR Policy information";
    }
  }
}

<CODE ENDS>
                     ]]></artwork>
        </figure>
      </section>
    </section>

    <section title="Security Considerations" toc="default">
      <t>The YANG module defined in this document is designed to be accessed
      via network management protocol such as NETCONF <xref target="RFC6241"/>
      or RESTCONF <xref target="RFC8040"/>. The lowest NETCONF layer is the
      secure transport layer and the mandatory-to-implement secure transport
      is SSH <xref target="RFC6242"/>. The lowest RESTCONF layer is HTTPS, and
      the mandatory-to-implement secure transport is TLS <xref
      target="RFC8446"/></t>

      <t>The NETCONF access control model <xref target="RFC8341"/> provides
      the means to restrict access for particular NETCONF or RESTCONF users to
      a pre-configured subset of all available NETCONF or RESTCONF protocol
      operations and content.</t>

      <t>There are a number of data nodes defined in the YANG module which are
      writable/creatable/deletable (i.e., config true, which is the default).
      These data nodes may be considered sensitive or vulnerable in some
      network environments. Write operations (e.g., &lt;edit-config&gt;) to
      these data nodes without proper protection can have a negative effect on
      network operations. These are the subtrees and data nodes and their
      sensitivity/vulnerability: <list>
          <t>/pcep:pcep/pcep:entity/pcep:capabilities/pcep-srv6:srv6 -
          configure local SRv6 capability and parameters.</t>

          <t>/pcep:pcep/pcep:entity/pcep:peers/pcep:peer/pcep:capabilities/pcep-srv6:srv6
          - configure peer's SRv6 capability and parameters.</t>
        </list></t>

      <t>Unauthorized access to above list can adversely affect the PCEP
      session between the local entity and the peers. This may lead to
      inability to compute new paths, stateful operations on the delegated as
      well as PCE-initiated LSPs.</t>

      <t>Some of the readable data nodes in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus
      important to control read access (e.g., via get, get-config, or
      notification) to these data nodes. These are the subtrees and data nodes
      and their sensitivity/vulnerability: <list>
          <t>/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp/pcep-srv6:srv6 - The
          SRv6 SID in the network. Unauthorized access to this could provide
          entire path and network usage information.</t>

          <t>/pcep:pcep/pcep:entity/pcep:lsp-db/pcep:lsp/pcep-srpolicy:sr-policy
          - The reference to SR Policy. Unauthorized access to this could
          provide SR Policy usage information.</t>
        </list></t>

      <!--<t>Some of the RPC operations in this YANG module may be considered sensitive
    or vulnerable in some network environments. It is thus important to control
    access to these operations. These are the operations and their
    sensitivity/vulnerability:
    <list>

  <t>trigger-resync - trigger resynchronization with the PCE. Unauthorized access to
      this could force a PCEP session into continuous state synchronization. </t>
  </list></t>-->
    </section>

    <section title="IANA Considerations" toc="default">
      <t>This document registers a URI in the "IETF XML Registry" <xref
      target="RFC3688"/>. Following the format in RFC 3688, the following
      registration has been made. <list style="hanging">
          <t hangText="URI:">urn:ietf:params:xml:ns:yang:ietf-pcep-srv6</t>

          <t hangText="Registrant Contact:">The PCE WG of the IETF.</t>

          <t hangText="XML:">N/A; the requested URI is an XML namespace.</t>
        </list> <list style="hanging">
          <t
          hangText="URI:">urn:ietf:params:xml:ns:yang:ietf-pcep-srpolicy</t>

          <t hangText="Registrant Contact:">The PCE WG of the IETF.</t>

          <t hangText="XML:">N/A; the requested URI is an XML namespace.</t>
        </list></t>

      <t>This document registers a YANG module in the "YANG Module Names"
      registry <xref target="RFC6020"/>. <figure align="left" alt="" height=""
          suppress-title="false" title="" width="">
          <artwork align="left" alt="" height="" name="" type="" width=""
                   xml:space="preserve"><![CDATA[
    Name:         ietf-pcep-srv6
    Namespace:    urn:ietf:params:xml:ns:yang:ietf-pcep-srv6
    Prefix:       pcep-srv6
    Reference:    This I-D

    Name:         ietf-pcep-srpolicy
    Namespace:    urn:ietf:params:xml:ns:yang:ietf-pcep-srpolicy
    Prefix:       pcep-srp
    Reference:    This I-D
        ]]></artwork>
        </figure></t>
    </section>

    <section title="Acknowledgements" toc="default">
      <t>The authors would like to thank Dhruv Dhody for the initial YANG
      model.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119.xml" ?>

      <?rfc include="reference.RFC.3688.xml" ?>

      <?rfc include="reference.RFC.5440.xml" ?>

      <?rfc include="reference.RFC.6020.xml" ?>

      <?rfc include="reference.RFC.6241.xml" ?>

      <?rfc include="reference.RFC.6242.xml" ?>

      <?rfc include="reference.RFC.6991.xml" ?>

      <?rfc include="reference.RFC.7950.xml" ?>

      <?rfc include="reference.RFC.8040.xml" ?>

      <?rfc include="reference.RFC.8174.xml"?>

      <?rfc include="reference.RFC.8231.xml"?>

      <?rfc include="reference.RFC.8281.xml"?>

      <?rfc include="reference.RFC.8340.xml"?>

      <?rfc include="reference.RFC.8341.xml" ?>

      <?rfc include="reference.RFC.8408.xml" ?>

      <?rfc include="reference.RFC.8446.xml" ?>

      <?rfc include="reference.RFC.8664.xml"?>

      <?rfc include="reference.RFC.8776.xml"?>

      <?rfc include="reference.I-D.ietf-spring-srv6-yang"?>

      <?rfc include="reference.I-D.ietf-pce-pcep-yang"?>

      <?rfc include="reference.I-D.ietf-pce-segment-routing-ipv6"?>

      <?rfc include="reference.I-D.ietf-spring-sr-policy-yang"?>

      <?rfc include="reference.I-D.ietf-pce-segment-routing-policy-cp"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.4655.xml" ?>

      <?rfc include="reference.RFC.7420.xml" ?>

      <?rfc include="reference.RFC.8342.xml"?>

      <?rfc include="reference.RFC.9256.xml"?>

      <?rfc include="reference.I-D.ietf-pce-binding-label-sid"?>

      <?rfc include="reference.I-D.ietf-pce-multipath"?>
    </references>
  </back>
</rfc>
