module ietf-rift {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-rift";
prefix rift;
import ietf-inet-types {
prefix "inet";
reference "RFC6991";
}
import ietf-routing {
prefix "rt";
reference "RFC8349";
}
import ietf-interfaces {
prefix "if";
reference "RFC7223";
}
import ietf-routing-types {
prefix "rt-types";
reference "RFC8294";
}
organization
"IETF RIFT(Routing In Fat Trees) Working Group";
contact
"WG Web:
WG List:
Editor: Zheng Zhang
Editor: Yuehua Wei
Editor: Shaowen Ma
Editor: Xufeng Liu
";
description
"The module defines the YANG definitions for RIFT.
Copyright (c) 2018 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 3618; see
the RFC itself for full legal notices.";
revision 2019-05-05 {
description "Initial revision.";
reference
"RFC XXXX: A YANG Data Model for RIFT.
draft-ietf-rift-rift: RIFT: Routing in Fat Trees.";
}
/*
* Features
*/
/*feature overload {
description "A node with overload bit set SHOULD NOT advertise any reachability
prefixes southbound except locally hosted ones. The leaf node SHOULD
set the 'overload' bit on its node TIEs.";
}*/
feature bfd {
description "Support BFD (RFC5881) function to react quickly to link failures.";
}
feature flood-reducing {
description "Support flood reducing function defined in section 4.2.3.8.";
}
feature policy {
description "Support policy guide information.";
}
typedef systemid {
type string {
pattern
'[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}';
}
description
"This type defines RIFT system id using pattern,
system id looks like : 0143.0438.0100.AeF0";
}
typedef level {
type uint8 {
range "0 .. 24";
}
default "0";
description "The value of node level. The max value is 24.";
}
typedef linkidtype {
type uint32;
description
"This type defines the link id of an interface.";
}
typedef PrefixSequenceType {
type uint64;
description
"This type defines the link id of an interface.";
}
/*
* Identity
*/
identity rift {
base rt:routing-protocol;
description "Identity for the RIFT routing protocol.";
}
/*
* Groupings
*/
grouping node-key {
leaf systemid {
type systemid;
mandatory true;
description "Each node is identified via a SystemID which is 64 bits wide.";
}
description "The key information used to distinguish a node.";
}
grouping base-node-info {
leaf level {
type level;
description "The level of this node.";
}
uses node-key;
leaf name {
type string;
description "The name of this node. It won't be used as the key of node,
just used for description.";
}
leaf pod {
type uint32;
description "Point of Delivery. The self-contained vertical slice of
a Clos or Fat Tree network containing normally only
level 0 and level 1 nodes. It communicates with nodes
in other PoDs via the spine. We number PoDs to distinguish
them and use PoD #0 to denote 'undefined' PoD.";
}
leaf overload {
type boolean;
description "If the overload bit in TIEs should be set.";
}
leaf flood-reducing {
if-feature flood-reducing;
type boolean;
description "If the node support flood reducing function defined in section 4.2.3.8.";
}
uses hierarchy-indications;
uses interface;
description "The base information of a node.";
}
grouping neighbor {
leaf remote-id {
type uint32;
description "The remote-id to reach this neighbor.";
}
leaf local-id {
type uint32;
description "The local-id of link connect to this neighbor.";
}
leaf distance {
type uint32;
description "The cost value to arrive this neighbor.";
}
leaf remote-nonce {
type uint16;
description "Remote Nonce of the adjacency as received
in LIEs. In case of LIE packet this MUST
correspond to the value in the serialized
object otherwise the packet MUST be discarded.";
}
leaf-list miscabled-links {
type linkidtype;
description "List of miscabled links.";
}
description "The neighbor information.";
}
grouping hierarchy-indications {
leaf hierarchy-indications {
type enumeration {
enum "leaf-only" {
description "The node will never leave the 'bottom of the
hierarchy'.";
}
enum "leaf_only_and_leaf_2_leaf_procedures" {
description "This means leaf to leaf.";
}
enum "top_of_fabric" {
description "The node is 'top of fabric'.";
}
}
description "The hierarchy indications of this node.";
}
description "The hierarchy indications of this node.";
}
grouping node {
uses base-node-info;
uses algorithm;
leaf hal {
type level;
config false;
description "The highest defined level value seen from all
valid level offers received.";
}
container vol-list {
config false;
list vol {
key "systemid";
leaf offered-level {
type level;
description "The level type value offered by this neighbor.";
}
uses base-node-info;
description "The valid offered level information.";
}
description "The valid offered level information.";
}
leaf-list miscabled-links {
type linkidtype;
config false;
description
"List of miscabled links.";
}
description "The information of local node. Includes base information,
configurable parameters and features.";
}
grouping direction-type {
leaf direction-type {
type enumeration {
enum illegal {
description "Illegal direction.";
}
enum south {
description "A link to a node one level down.";
}
enum north {
description "A link to a node one level up.";
}
enum east-west {
description "A link to a node in the same level.";
}
enum max {
description "The max value of direction.";
}
}
description "The type of a link.";
}
description "The type of a link.";
}
grouping interface {
list interfaces {
key "local-id";
leaf local-id {
type linkidtype;
mandatory true;
description "The local id of this interface.";
}
leaf name {
type if:interface-ref;
description "The interface's name.";
}
leaf if-index {
type if:interface-ref;
description "The index of this interface.";
}
leaf bfd {
if-feature bfd;
type boolean;
description "If BFD function is enabled to react link failures
after neighbor's detection.";
}
uses direction-type;
leaf you_are_flood_repeater {
type boolean;
description "If the neighbor on this link is flooding repeater.";
}
leaf not_a_ztp_offer {
type boolean;
description "If the neighbor on this link offers ZTP.";
}
leaf flood-port {
type inet:port-number;
description "The flooding port.";
}
leaf lie-rx-port {
type inet:port-number;
description "The port of LIE packet receiving.";
}
leaf holdtime {
type rt-types:timer-value-seconds16;
units seconds;
description "The holding time of this adjacency.";
}
leaf local-nonce {
type uint16;
description "Local Nonce of the adjacency as advertised in LIEs.
In case of LIE packet this MUST correspond to the
value in the serialized object otherwise the packet
MUST be discarded.";
}
description "The interface information on this node.";
}
description "The interface information.";
}
grouping prefix-info {
leaf prefix {
type inet:ip-prefix;
description "The prefix information.";
}
leaf metric {
type uint32;
description "The metric of this prefix.";
}
leaf tag {
type uint64;
description "The tag of this prefix.";
}
leaf monotonic_clock {
type PrefixSequenceType;
description "The monotonic clock for mobile addresses.";
}
leaf from-link {
type linkidtype;
description "In case of locally originated prefixes, i.e.
interface addresses this can describe which
link the address belongs to.";
}
description "The detail information of prefix.";
}
grouping tie-id {
leaf originator {
type systemid;
description "The originator's systemid of this TIE.";
}
uses direction-type;
leaf tie-number {
type uint32;
description "The number of this TIE";
}
description "TIE is the acronym for 'Topology Information Element'.
TIEs are exchanged between RIFT nodes to describe parts
of a network such as links and address prefixes. This is
the TIE identification information.";
}
grouping key-value {
leaf key {
type uint16;
description "The type of key value combination.";
}
leaf value {
type uint32;
description "The value of key value combination.";
}
description "The key-value store information.";
}
grouping tie-info {
leaf seq {
type uint32;
description "The sequence number of a TIE.";
}
leaf lifetime {
type uint16 {
range "1 .. 65535";
}
description "The lifetime of a TIE.";
}
container tie-node {
uses base-node-info;
description "The node element information in this TIE.";
}
container tie-prefix {
container prefixes {
uses prefix-info;
description "It is the prefixes TIE element.";
}
container positive_disaggregation_prefixes {
uses prefix-info;
description "It is the positive disaggregation prefixes TIE element.";
}
container negative_disaggregation_prefixes {
uses prefix-info;
description "It is the negative disaggregation prefixes element.";
}
container external_prefixes {
uses prefix-info;
description "It is the external prefixes element.";
}
description "The prefix information in this TIE.";
}
container kvs {
uses key-value;
description "The key/values in the database.";
}
description "TIE is the acronym for 'Topology Information Element'.
TIEs are exchanged between RIFT nodes to describe parts
of a network such as links and address prefixes. This TIE
info is used to indicate the state of this TIE. When the
type of this TIE is set to 'node', the node-element is
making sense. When the type of this TIE is set to other
types except for 'node', the prefix-info is making sense.";
}
grouping algorithm {
choice algorighm-type {
case spf {
description "The algorithm is SPF.";
}
case all-path {
description "The algorithm is all-path.";
}
description "The possible algorithm types.";
}
description "The computation algorithm types.";
}
/*
* Data nodes
*/
augment "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol" {
when "derived-from-or-self(rt:type, 'rift:rift')" {
description "This augment is only valid for a routing protocol instance of RIFT.";
}
description "RIFT ( Routing in Fat Trees ) YANG model.";
container rift {
presence "Container for RIFT protocol.";
description "RIFT configuration data.";
container node-info {
description "The node information about RIFT.";
uses node;
}
container neighbor {
config false;
list nbrs {
key "systemid remote-id";
uses base-node-info;
uses neighbor;
description "The information of a neighbor.";
}
description "The neighbor's information.";
}//neighbor
container database {
config false;
list ties {
key "tie-index";
leaf tie-index {
type uint32;
description "The index of a TIE.";
}
container database-tie {
uses tie-id;
uses tie-info;
description "The TIEs in the database.";
}
description "The detail information of a TIE.";
}
description "The TIEs information in database.";
}//database
container kv-store {
list kvs {
key "kvs-index";
leaf kvs-index {
type uint32;
description "The index of a kv pair.";
}
container kvs-tie {
uses tie-id;
uses key-value;
description "The TIEs in the kv-store.";
}
description "The information used to distinguish a Key/Value pair.
When the type of kv is set to 'node', node-element is
making sense. When the type of kv is set to other values
except 'node', prefix-info is making sense.";
}
description "The Key/Value store information.";
}//kv-store
}//rift
}//augment
/*
* RPCs
*/
/*
* Notifications
*/
notification error-set {
description "The errors notification of RIFT.";
container tie-level-error {
uses tie-id;
uses tie-info;
description "The level is undefined in the LIEs.";
}
container nbr-error {
list nbrs {
key "systemid remote-id";
uses base-node-info;
uses neighbor;
description "The information of a neighbor.";
}
description "The neighbor errors set.";
}
}
}