module ietf-sr-policy-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-sr-policy-types";
prefix "sr-policy-types";
import ietf-inet-types {
prefix "inet";
}
import ietf-routing-types {
prefix "rt-types";
}
import ietf-srv6-types {
prefix "srv6-types";
}
organization "IETF SPRING Working Group";
contact
"WG Web:
WG List:
Editor: Kamran Raza
Editor: Zhuang Shunwan
Editor: Daniel Voyer
Editor: Muhammad Durrani
Editor: Satoru Matsushima
Editor: Pavan Vishnu Beeram
";
description
"This YANG module defines the essential types for the management
of SR policy module.
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).";
revision "2019-11-04" {
description
"New editor added";
reference
"draft-raza-spring-sr-policy-yang";
}
revision "2019-07-08" {
description
"Dynamic TE candidate-path support";
reference
"draft-raza-spring-sr-policy-yang";
}
revision "2018-07-01" {
description
"Initial version";
reference
"draft-raza-spring-sr-policy-yang";
}
/* Identities */
identity candidate-path-not-selected-reason {
description
"Base identity for which reasons for not selecting
candidate path are derived from";
}
identity candidate-path-not-selected-not-best {
base candidate-path-not-selected-reason;
description
"Higher preference path exists";
}
identity candidate-path-not-selected-no-valid-segment-list {
base candidate-path-not-selected-reason;
description
"Candidate path has no valid segment list(s)";
}
identity candidate-path-not-selected-empty-segment-list {
base candidate-path-not-selected-reason;
description
"Candidate path has empty segment list(s)";
}
identity candidate-path-not-selected-invalid-binding-sid {
base candidate-path-not-selected-reason;
description
"Candidate path has invalid binding SID";
}
identity policy-down-reason {
description
"Base identity for the reasons why SR policy is operationally down";
}
identity policy-down-reason-admin-down {
base policy-down-reason;
description "Policy is administrately down";
}
identity policy-down-reason-no-source-address {
base policy-down-reason;
description "Policy has no source address";
}
identity policy-down-reason-no-endpoint {
base policy-down-reason;
description "Policy has no end-point";
}
identity policy-down-reason-no-candidate-path {
base policy-down-reason;
description "Policy has no candidate path";
}
identity policy-down-reason-no-valid-candidate-path {
base policy-down-reason;
description "Policy has no valid candidate path";
}
identity policy-down-reason-candidate-path-invalid-segment-list {
base policy-down-reason;
description "Policy's candidate path has invalid segment list";
}
identity policy-down-reason-policy-unconfigured {
base policy-down-reason;
description "Policy is unconfigured";
}
identity policy-down-reason-policy-color-endpoint-updated {
base policy-down-reason;
description "Policy's color and end-point are updated";
}
identity policy-down-reason-local-label-setup-failed {
base policy-down-reason;
description "Policy's local label setup (allocation/rewrite) failed";
}
identity policy-down-reason-forwarding-rewrite-failed {
base policy-down-reason;
description "Policy's forwarding rewrite installation failed";
}
identity policy-down-reason-internal-error {
base policy-down-reason;
description "Infra related internal error";
}
identity binding-sid-unavailable-reason {
description
"Base identity for binding sid unavailable reason types";
}
identity binding-sid-allocation-error {
base binding-sid-unavailable-reason;
description "SID allocator returned an error";
}
identity binding-sid-already-exists {
base binding-sid-unavailable-reason;
description "Binding sid already exists/allocated";
}
identity binding-sid-internal-error {
base binding-sid-unavailable-reason;
description "Internal error with binding sid allocation";
}
identity binding-sid-color-endpoint-conflict {
base binding-sid-unavailable-reason;
description "Binding sid already allocated by another sr-policy with different color/endpoint";
}
identity binding-sid-rewrite-error {
base binding-sid-unavailable-reason;
description "Binding sid forwarding rewrite error";
}
identity binding-sid-outside-srlb-range {
base binding-sid-unavailable-reason;
description "Binding sid outside SRLB range";
}
identity path-disjointness {
description
"Base identity for the type of path disjointness computation";
}
identity path-disjointness-link {
base path-disjointness;
description "The computed path is link-disjoint with the existing path";
}
identity path-disjointness-node {
base path-disjointness;
description "The computed path is node-disjoint with the existing path";
}
identity path-disjointness-srlg {
base path-disjointness;
description "The computed path is srlg-disjoint with the existing path";
}
identity path-disjointness-srlg-node {
base path-disjointness;
description "The computed path is node and srlg disjoint with the existing path";
}
/* Typdefs */
typedef sid-value-type {
type union {
type rt-types:mpls-label;
type srv6-types:srv6-sid;
}
description "The SID value type";
}
typedef binding-sid-oper-state {
type enumeration {
enum ALLOC-PENDING {
value 1;
description "SID allocation pending for Binding SID";
}
enum PROGRAMMED {
value 3;
description "Binding SID is programmed in forwarding";
}
enum CONFLICT {
value 4;
description "Binding SID is in-conflict state with
regards to SID allocation. This also means that SID
allocation is pending";
}
}
description
"Binding SID operational state type";
}
typedef policy-admin-state {
type enumeration {
enum UP {
value 1;
description "SR policy is administratively up";
}
enum DOWN {
value 2;
description "SR policy is administratively down";
}
}
description "SR policy admin state";
}
typedef policy-oper-state {
type enumeration {
enum UP {
value 1;
description "SR policy is operationally up";
}
enum DOWN {
value 2;
description "SR policy is operationally down";
}
}
description "SR policy oper state";
}
typedef segment-type {
type enumeration {
enum segment-type-1 {
value 1;
description "SR-MPLS Label";
}
enum segment-type-2 {
value 2;
description "SRv6 SID";
}
enum segment-type-3 {
value 3;
description "IPv4 Prefix with optional SR Algorithm";
}
enum segment-type-4 {
value 4;
description "IPv6 Global Prefix with optional SR Algorithm for SR-MPLS";
}
enum segment-type-5 {
value 5;
description "IPv4 Prefix with Local Interface ID";
}
enum segment-type-6 {
value 6;
description "IPv4 Addresses for link endpoints as Local, Remote pair";
}
enum segment-type-7 {
value 7;
description "IPv6 Prefix and Interface ID for link endpoints as Local,
Remote pair for SR-MPLS";
}
enum segment-type-8 {
value 8;
description "IPv6 Addresses for link endpoints as Local, Remote pair for
SR-MPLS";
}
enum segment-type-9 {
value 9;
description "IPv6 Global Prefix with optional SR Algorithm for SRv6";
}
enum segment-type-10 {
value 10;
description "IPv6 Prefix and Interface ID for link endpoints as Local,
Remote pair for SRv6";
}
enum segment-type-11 {
value 11;
description "IPv6 Addresses for link endpoints as Local, Remote pair for
SRv6";
}
}
description "SR segment type";
}
typedef dataplane-type {
type enumeration {
enum mpls {
value 1;
description "Segment-routing MPLS";
}
enum srv6 {
value 2;
description "Segment-routing v6";
}
}
description "Dataplane type of the segments";
}
typedef binding-sid-alloc-mode {
type enumeration {
enum explicit {
value 1;
description "Explicitly specified BSID";
}
enum dynamic {
value 2;
description "Dynamically allocated BSID";
}
}
description "binding SID allocation mode";
}
typedef protocol-origin-type {
type enumeration {
enum pcep {
value 10;
description "PCEP used as signalling mechanism for the candidate path";
}
enum bgp {
value 20;
description "BGP used as signalling mechanism for the candidate path";
}
enum local {
value 30;
description "CLI, Yang model via Netconf, gRPC, etc used for candidate path instantiation";
}
}
description "Originating protocol type";
}
typedef explicit-binding-sid-rule-type {
type enumeration {
enum enforce-srlb {
value 1;
description
"Explicit Binding SID is enforced with no
fallback if label does not fall in SRLB or
if no SRLB is configured";
}
enum fallback-dynamic {
value 2;
description
"Explicit Binding SID falls back to dynamic in
case explicit label is not available.";
}
}
description "Explicit binding sid rule types";
}
} // module