module ietf-ppr {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-ppr";
prefix ppr;
import ietf-inet-types {
prefix inet;
}
import ietf-routing {
prefix rt;
}
organization
"IETF LSR - Link State Routing Working Group";
contact
"WG Web:
WG List:
Author: Yingzhen Qu
Uma Chunduri
";
description
"This Yang module defines the configuration and operational
state for Preferred Path Routing common to all vendor
implementations.
This YANG model conforms to the Network Management
Datastore Architecture (NDMA) as described in RFC XXXX.
Copyright (c) 2019 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
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX;
see the RFC itself for full legal notices.";
reference "RFC XXXX";
revision 2019-07-07 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for PPR.";
}
typedef ppr-pde-type {
type enumeration {
enum topological {
value "1";
description "Topological PPR PDE.";
}
enum non-topological {
value "2";
description "Non-Topological PPR PED.";
}
}
description
"PPR PDE type.";
}
typedef ppr-pde-id-type {
type enumeration {
enum sidlabel {
value "1";
description
"PPR ID in mpls label format.";
}
enum prefix-sid {
value "2";
description
"SR-MPLS prefix SID.";
}
enum adj-sid {
value "3";
description
"SR-MPLS adjacency SID.";
}
enum ipv4-node {
value "4";
description
"IPv4 node address.";
}
enum ipv4-p2p {
value "5";
description
"IPv5 P2P interface address.";
}
enum ipv4-lan {
value "6";
description
"IPv4 Lan interface address.";
}
enum ipv6-node {
value "7";
description
"IPv6 node address.";
}
enum ipv6-p2p {
value "8";
description
"IPv6 P2P interface address.";
}
enum ipv6-lan {
value "9";
description
"IPv6 LAN interface address.";
}
enum srv6-node-sid {
value "10";
description
"PDE ID in SRv6 node SID format.";
}
enum srv6-adj-sid {
value "11";
description
"PDE ID in SRv6 node SID format.";
}
}
description "Type of PPR ID.";
}
/* Groupings*/
grouping ppr-attributes {
leaf count-packets {
type boolean;
description
"create a counter to count number of packets
forwarded on this PPR-ID on each node in the
path description.";
}
leaf count-bytes {
type boolean;
description
"create a conter to count number of bytes.";
}
leaf ppr-metric {
type uint32;
description
"Metric of the path prepsented by the PPR-ID.";
}
description
"Groupings for PPR attributes.";
}
grouping pde-attributes {
leaf pde-id-type {
type ppr-pde-id-type;
description
"PDE forwarding identifier type.";
}
leaf loose {
type boolean;
default "true";
description
"If set, the next topological PDE is loose.";
}
leaf pde-type {
type ppr-pde-type;
description "PPR PDE type.";
}
description
"Groupings for PDE attributes.";
}
augment "/rt:routing" {
description
"This module augments routing-instace configuration
with preferred path routing.";
container preferred-path-routing {
description
"preferred path routing configuration.";
list preferred-path-lists {
key "name";
description
"Preferred path lists.";
leaf name {
type string;
description "PPR path list ID.";
}
list preferred-path-mpls {
key "ppr-id";
description
"List of preferred path using MPLS data plane.";
leaf ppr-prefix {
type inet:ip-prefix;
description
"PPR Prefix representing the destination of the path.";
}
leaf ppr-id {
type uint32;
description
"PPR ID, A 20 bit label or 32 bit SID.";
}
leaf algo {
type uint8;
description
"SPF algorithm.";
}
list ppr-pde {
key "pde-id";
leaf pde-id {
type uint32;
description
"PDE identifiler.";
}
uses pde-attributes;
description
"List of PPR Path Description Element (PDE).";
}
container attributes {
uses ppr-attributes;
description "PPR attributes.";
}
}
list preferred-path-ipv4 {
key "ppr-id";
description
"List of preferred path using IPv4 data plane.";
leaf ppr-prefix {
type inet:ipv4-prefix;
description
"PPR Prefix representing the destination of the path.";
}
leaf ppr-id {
type inet:ipv4-prefix;
description
"PPR ID, IPv4 address format.";
}
leaf algo {
type uint8;
description
"SPF algorithm.";
}
list ppr-pde {
key "pde-id";
leaf pde-id {
type inet:ipv4-address;
description
"PDE identifier.";
}
uses pde-attributes;
description
"List of PPR Path Description Element (PDE).";
}
container attributes {
uses ppr-attributes;
description "PPR attributes.";
}
}
list preferred-path-ipv6 {
key "ppr-id";
description
"List of preferred path using IPv6 data plane.";
leaf ppr-id {
type inet:ipv6-prefix;
description
"PPR ID, IPv6 address format.";
}
leaf algo {
type uint8;
description
"SPF algorithm.";
}
leaf ppr-prefix {
type inet:ipv6-prefix;
description
"The prefix at the tail-end of the advertised PPR.";
}
list ppr-pde {
key "pde-id";
leaf pde-id {
type inet:ipv6-prefix;
description
"PDE identifier.";
}
uses pde-attributes;
description
"List of PPR Path Description Element (PDE).";
}
container attributes {
uses ppr-attributes;
description "PPR attributes.";
}
}
list preferred-path-srv6 {
key "ppr-id";
description
"List of preferred path using SRv6 data plane.";
leaf ppr-id {
type inet:ipv6-prefix;
description
"PPR ID, SRv6 SID format.";
}
leaf algo {
type uint8;
description
"SPF algorithm.";
}
list ppr-pde {
key "pde-id";
leaf pde-id {
type inet:ipv6-address;
description
"PDE identifier.";
}
description
"List of PPR Path Description Element (PDE).";
}
uses pde-attributes;
container attributes {
uses ppr-attributes;
description "PPR attributes.";
}
}
}
}
}
}