forked from Mirror/frr
yang: Corrected pyang errors in frr-pathd.yang
Corrected pyang warnings and errors in frr-pathd.yang Signed-off-by: y-bharath14 <y.bharath@samsung.com>
This commit is contained in:
parent
e190163413
commit
eff5a9023a
|
@ -6,15 +6,9 @@ module frr-pathd {
|
||||||
import ietf-inet-types {
|
import ietf-inet-types {
|
||||||
prefix inet;
|
prefix inet;
|
||||||
}
|
}
|
||||||
import ietf-yang-types {
|
|
||||||
prefix yang;
|
|
||||||
}
|
|
||||||
import ietf-routing-types {
|
import ietf-routing-types {
|
||||||
prefix rt-types;
|
prefix rt-types;
|
||||||
}
|
}
|
||||||
import frr-interface {
|
|
||||||
prefix frr-interface;
|
|
||||||
}
|
|
||||||
|
|
||||||
organization
|
organization
|
||||||
"Free Range Routing";
|
"Free Range Routing";
|
||||||
|
@ -27,11 +21,10 @@ module frr-pathd {
|
||||||
revision 2018-11-06 {
|
revision 2018-11-06 {
|
||||||
description
|
description
|
||||||
"Initial revision.";
|
"Initial revision.";
|
||||||
|
reference "FRRouting";
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef protocol-origin-type {
|
typedef protocol-origin-type {
|
||||||
description
|
|
||||||
"Indication for the protocol origin of an object.";
|
|
||||||
type enumeration {
|
type enumeration {
|
||||||
enum pcep {
|
enum pcep {
|
||||||
value 1;
|
value 1;
|
||||||
|
@ -46,6 +39,8 @@ module frr-pathd {
|
||||||
description "The object was created through CLI, Yang model via Netconf, gRPC, etc";
|
description "The object was created through CLI, Yang model via Netconf, gRPC, etc";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
description
|
||||||
|
"Indication for the protocol origin of an object.";
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef originator-type {
|
typedef originator-type {
|
||||||
|
@ -57,7 +52,13 @@ module frr-pathd {
|
||||||
}
|
}
|
||||||
|
|
||||||
container pathd {
|
container pathd {
|
||||||
|
description
|
||||||
|
"Path properties for Segment Routing TE";
|
||||||
|
|
||||||
container srte {
|
container srte {
|
||||||
|
description
|
||||||
|
"Segment Routing TE properties";
|
||||||
|
|
||||||
list segment-list {
|
list segment-list {
|
||||||
key "name";
|
key "name";
|
||||||
description "Segment-list properties";
|
description "Segment-list properties";
|
||||||
|
@ -91,9 +92,10 @@ module frr-pathd {
|
||||||
}
|
}
|
||||||
container nai {
|
container nai {
|
||||||
presence "The segment has a Node or Adjacency Identifier";
|
presence "The segment has a Node or Adjacency Identifier";
|
||||||
|
description
|
||||||
|
"Node or Adjacency Identifier for the segment";
|
||||||
|
|
||||||
leaf type {
|
leaf type {
|
||||||
description "NAI type";
|
|
||||||
mandatory true;
|
|
||||||
type enumeration {
|
type enumeration {
|
||||||
enum ipv4_node {
|
enum ipv4_node {
|
||||||
value 1;
|
value 1;
|
||||||
|
@ -132,42 +134,59 @@ module frr-pathd {
|
||||||
description "IPv6 prefix with optional algorithm";
|
description "IPv6 prefix with optional algorithm";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mandatory true;
|
||||||
|
description "NAI type";
|
||||||
}
|
}
|
||||||
leaf local-address {
|
leaf local-address {
|
||||||
type inet:ip-address;
|
type inet:ip-address;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Local address of the NAI";
|
||||||
}
|
}
|
||||||
leaf local-prefix-len {
|
leaf local-prefix-len {
|
||||||
|
when "../type = 'ipv4_local_iface' or ../type = 'ipv6_local_iface' or ../type = 'ipv4_algo' or ../type = 'ipv6_algo'";
|
||||||
type uint8;
|
type uint8;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
when "../type = 'ipv4_local_iface' or ../type = 'ipv6_local_iface' or ../type = 'ipv4_algo' or ../type = 'ipv6_algo'";
|
description
|
||||||
|
"Prefix length of the local address";
|
||||||
}
|
}
|
||||||
leaf local-interface {
|
leaf local-interface {
|
||||||
|
when "../type = 'ipv4_local_iface' or ../type = 'ipv6_local_iface' or ../type = 'ipv4_unnumbered_adjacency'";
|
||||||
type uint32;
|
type uint32;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
when "../type = 'ipv4_local_iface' or ../type = 'ipv6_local_iface' or ../type = 'ipv4_unnumbered_adjacency'";
|
description
|
||||||
|
"Local interface ID for the NAI";
|
||||||
}
|
}
|
||||||
leaf remote-address {
|
leaf remote-address {
|
||||||
|
when "../type = 'ipv4_adjacency' or ../type = 'ipv6_adjacency' or ../type = 'ipv4_unnumbered_adjacency'";
|
||||||
type inet:ip-address;
|
type inet:ip-address;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
when "../type = 'ipv4_adjacency' or ../type = 'ipv6_adjacency' or ../type = 'ipv4_unnumbered_adjacency'";
|
description
|
||||||
}
|
"Remote address of the NAI";
|
||||||
leaf remote-interface {
|
}
|
||||||
type uint32;
|
leaf remote-interface {
|
||||||
mandatory true;
|
when "../type = 'ipv4_unnumbered_adjacency'";
|
||||||
when "../type = 'ipv4_unnumbered_adjacency'";
|
type uint32;
|
||||||
}
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Remote interface ID for the NAI";
|
||||||
|
}
|
||||||
leaf algorithm {
|
leaf algorithm {
|
||||||
|
when "../type = 'ipv4_algo' or ../type = 'ipv6_algo'";
|
||||||
type uint8;
|
type uint8;
|
||||||
mandatory true;
|
mandatory true;
|
||||||
when "../type = 'ipv4_algo' or ../type = 'ipv6_algo'";
|
description
|
||||||
}
|
"Algorithm to use for the NAI";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list policy {
|
list policy {
|
||||||
key "color endpoint";
|
key "color endpoint";
|
||||||
unique "name";
|
unique "name";
|
||||||
|
description
|
||||||
|
"List of SR Policies.";
|
||||||
|
|
||||||
leaf color {
|
leaf color {
|
||||||
type uint32;
|
type uint32;
|
||||||
description
|
description
|
||||||
|
@ -197,10 +216,10 @@ module frr-pathd {
|
||||||
"True if a valid candidate path of this policy is operational in zebra, False otherwise";
|
"True if a valid candidate path of this policy is operational in zebra, False otherwise";
|
||||||
}
|
}
|
||||||
list candidate-path {
|
list candidate-path {
|
||||||
|
key "preference";
|
||||||
unique "name";
|
unique "name";
|
||||||
description
|
description
|
||||||
"List of Candidate Paths of the SR Policy.";
|
"List of Candidate Paths of the SR Policy.";
|
||||||
key "preference";
|
|
||||||
leaf preference {
|
leaf preference {
|
||||||
type uint32;
|
type uint32;
|
||||||
description
|
description
|
||||||
|
@ -237,17 +256,21 @@ module frr-pathd {
|
||||||
description "Candidate path distinguisher";
|
description "Candidate path distinguisher";
|
||||||
}
|
}
|
||||||
leaf type {
|
leaf type {
|
||||||
description
|
|
||||||
"Type of the Candidate Path.";
|
|
||||||
mandatory true;
|
|
||||||
type enumeration {
|
type enumeration {
|
||||||
enum explicit {
|
enum explicit {
|
||||||
value 1;
|
value 1;
|
||||||
|
description
|
||||||
|
"Explicit path defined by a segment list";
|
||||||
}
|
}
|
||||||
enum dynamic {
|
enum dynamic {
|
||||||
value 2;
|
value 2;
|
||||||
|
description
|
||||||
|
"Dynamic path computed by a routing protocol";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Type of the Candidate Path.";
|
||||||
}
|
}
|
||||||
leaf segment-list-name {
|
leaf segment-list-name {
|
||||||
type leafref {
|
type leafref {
|
||||||
|
@ -271,10 +294,12 @@ module frr-pathd {
|
||||||
"If the bandwidth limitation is a requirement or only a suggestion";
|
"If the bandwidth limitation is a requirement or only a suggestion";
|
||||||
}
|
}
|
||||||
leaf value {
|
leaf value {
|
||||||
mandatory true;
|
|
||||||
type decimal64 {
|
type decimal64 {
|
||||||
fraction-digits 6;
|
fraction-digits 6;
|
||||||
}
|
}
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"The bandwidth value for the candidate path.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
container affinity {
|
container affinity {
|
||||||
|
@ -298,9 +323,10 @@ module frr-pathd {
|
||||||
}
|
}
|
||||||
list metrics {
|
list metrics {
|
||||||
key "type";
|
key "type";
|
||||||
|
description
|
||||||
|
"This list contains the different metrics that can be used to describe a path.";
|
||||||
|
|
||||||
leaf type {
|
leaf type {
|
||||||
description
|
|
||||||
"Type of the metric.";
|
|
||||||
type enumeration {
|
type enumeration {
|
||||||
enum igp {
|
enum igp {
|
||||||
value 1;
|
value 1;
|
||||||
|
@ -387,6 +413,8 @@ module frr-pathd {
|
||||||
description "Border Node Count metric";
|
description "Border Node Count metric";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
description
|
||||||
|
"Type of the metric.";
|
||||||
}
|
}
|
||||||
leaf required {
|
leaf required {
|
||||||
type boolean;
|
type boolean;
|
||||||
|
@ -405,10 +433,12 @@ module frr-pathd {
|
||||||
"Defines if the value has been generated by the originator of the path.";
|
"Defines if the value has been generated by the originator of the path.";
|
||||||
}
|
}
|
||||||
leaf value {
|
leaf value {
|
||||||
mandatory true;
|
|
||||||
type decimal64 {
|
type decimal64 {
|
||||||
fraction-digits 6;
|
fraction-digits 6;
|
||||||
}
|
}
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Value of the metric.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
container objective-function {
|
container objective-function {
|
||||||
|
@ -422,9 +452,6 @@ module frr-pathd {
|
||||||
"If an objective function is a requirement, or if it is only a suggestion";
|
"If an objective function is a requirement, or if it is only a suggestion";
|
||||||
}
|
}
|
||||||
leaf type {
|
leaf type {
|
||||||
description
|
|
||||||
"Type of objective function.";
|
|
||||||
mandatory true;
|
|
||||||
type enumeration {
|
type enumeration {
|
||||||
enum mcp {
|
enum mcp {
|
||||||
value 1;
|
value 1;
|
||||||
|
@ -495,6 +522,9 @@ module frr-pathd {
|
||||||
description "Minimize the number of Shared Nodes";
|
description "Minimize the number of Shared Nodes";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Type of objective function.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue