module graph { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:graph"; prefix "graph"; import ietf-inet-types { prefix inet; revision-date 2013-07-15; } import ietf-routing-types { prefix rt-types; } organization "Orange"; contact "Philippe Niger Olivier Dugeon "; description "This module contains the graph data model for network topology and datastore used in the Path Computation Algorithms. Copyright (c)2019 Orange. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"; revision "2025-01-15" { description "Update to ASLA, Flex-Algo, SR-MPLS and SRv6"; reference "RFC9552 (BGP-LS), RFC9085 (SR), RFC9514 (SRv6), RFC9351 (Flex-Algo), RFC9104 (Extended Admin Group), RFC8814 (MSD), RFC9086 (EPE) and RFC9294 (ASLA)"; } revision "2022-07-20" { description "Multi-Topology (IPv4 + IPv6) support"; reference ""; } revision "2019-11-25" { description "Initial revision."; reference ""; } typedef delay { description "Link delay is in the range 0 - 16.777215 seconds. Larger value is also encoded with Max value."; units "microseconds"; type rt-types:uint24; } typedef loss { description "Link loss is in the range 0 - 50.331642% (= 2^24 - 2). Larger value is also encoded with Max value."; units "0.000003%"; type rt-types:uint24; } typedef decimal-bandwidth { description "Bandwidth in decimal format for easy comparison"; units "bytes/second"; type decimal64 { fraction-digits 2; } } grouping te-metric { leaf metric { description "Traffic Engineering Metric"; type uint32; } leaf admin-group { description "Administrative group or color of the link"; type uint32; } leaf max-link-bandwidth { description "Maximum bandwidth that can be use"; type decimal-bandwidth; } leaf max-resv-link-bandwidth { description "Maximum amount of bandwidth that can be reserved"; type decimal-bandwidth; } list unreserved-bandwidth { description "Unreserved bandwidth for 0-7 class type"; max-elements "8"; ordered-by user; key "class-type"; leaf class-type { type uint8 { range "0..7"; } } leaf bandwidth { description "Unreserved bandwidth for this class type"; type decimal-bandwidth; } } } grouping extended-metric { leaf delay { description "Unidirectional Delay."; type delay; } container min-max-delay { description "Min/Max Unidirectional Delay"; leaf min-delay { type delay; } leaf max-delay { type delay; } } leaf jitter { description "Unidirectional Delay Variation"; type delay; } leaf loss { description "Unidirectional Loss"; type loss; } leaf residual-bandwidth { description "Unidirectional Residual Bandwidth"; type decimal-bandwidth; } leaf available-bandwidth { description "Unidirectional Available Bandwidth"; type decimal-bandwidth; } leaf utilized-bandwidth { description "Unidirectional Utilized Bandwidth"; type decimal-bandwidth; } leaf-list extended-admin-group { description "List of Extended Admin Group"; type uint32; } } grouping msd { description "Maximum SID Depth"; leaf msd-type { type uint8; } leaf value { type uint8; } } grouping sr-link-attributes { leaf adj-sid { description "Segment Routing Adjacency Identifier for IPv4"; units "MPLS label"; type uint32; } leaf backup-adj-sid { description "Segment Routing Backup Adjacency Identifier for IPv4"; units "MPLS label"; type uint32; } leaf adj-sid6 { description "Segment Routing Adjacency Identifier for IPv6"; units "MPLS label"; type uint32; } leaf backup-adj-sid6 { description "Segment Routing Backup Adjacency Identifier for IPv6"; units "MPLS label"; type uint32; } list link-msd { uses msd; } } grouping egress-peer-engineering { leaf peer-node-sid { description "The SID representing the peer of the BGP session."; type uint32; } leaf peer-adj-sid { description "The SID representing the peer of the BGP session."; type uint32; } leaf-list peer-set-sids { description "The SID representing the group the peer is part of."; type uint32; } } grouping asla-type { description "Standardized Applications for ASLA"; leaf rsvp-te { type boolean; } leaf segment-routing { type boolean; } leaf lfa { type boolean; } leaf flex-algo { type boolean; } } grouping asla-metric { description "Application Specific Link Attributes"; container applications { uses asla-type; } leaf admin-group { type uint32; } leaf te-metric { type uint32; } leaf-list srlgs { type uint32; } uses extended-metric; } grouping edge-attributes { description "Attributes associated with the Edge"; reference "RFC 3630 & RFC 7471, RFC 3784 & RFC8570: OSPF / IS-IS Traffic Engineering (TE) & Extended Metrics"; // Link local and remote ID: IP address or link identifier leaf local-address { type inet:ipv4-address; } leaf remote-address { type inet:ipv4-address; } leaf local-address6 { type inet:ipv6-address; } leaf remote-address6 { type inet:ipv6-address; } leaf local-identifier { type uint32; } leaf remote-identifier { type uint32; } leaf metric { description "Standard Metric from the routing protocol"; type uint32; } container te-metric { description "Standard Traffic Engineering Metrics"; uses te-metric; } container extended-metric { description "Performance (Extended) Metrics"; uses extended-metric; } leaf-list srlgs { description "List of Shared Risk Link Group Attributes"; type uint32; } container sr-link-attributes { description "Segment Routing information of the Link"; uses sr-link-attributes; } container egress-peer-engineering { description "Egress Peer Engineering (EPE) SID"; uses egress-peer-engineering; } container asla-metric { description "Application Specific Link Attributes"; uses asla-metric; } } grouping edge { description "Unidirectional Edge (link) representation for the network topology"; leaf edge-id { type uint64; mandatory true; } leaf local-vertex-id { description "Vertex identifier where the Edge is attached"; type uint64; } leaf remote-vertex-id { description "Vertex identifier where the Edge is going to"; type uint64; } leaf name { description "Edge name"; type string; } container edge-attributes { description "All attributes associated to the Edge"; uses edge-attributes; } } typedef algorithm { type enumeration { enum spf { value 0; } enum strict-spf { value 1; } } } typedef flex-metric { type enumeration { enum igp { value 0; } enum delay { value 1; } enum te { value 2; } } } grouping node-flex-algo { leaf flex-algo { type uint8 { range "128..255"; } } leaf metric-type { type flex-metric; } leaf calc-type { type uint8 { range "0..127"; } } leaf priority { type uint8; } leaf-list exclude-any { type uint32; } leaf-list include-any { type uint32; } leaf-list include-all { type uint32; } leaf-list exclude-srlg { type uint32; } } grouping sr-node-attributes { description "Segment Routing information"; leaf mpls-ipv4 { type boolean; } leaf mpls-ipv6 { type boolean; } leaf-list algorithms { description "Supported SR Algorithm"; type algorithm; } list srgb { description "List of Segment Routing Global Block: lower-bound + range-size"; leaf lower-bound { type uint32; } leaf range-size { type uint32; } } list srlb { description "List of Segment Routing Local Block: lower-bound + range-size"; leaf lower-bound { type uint32; } leaf range-size { type uint32; } } list node-msd { uses msd; } list flex-algo { description "Supported Flex Algorithms"; uses node-flex-algo; } } typedef node-type { type enumeration { enum standard { value 0; } enum abr { value 1; } enum asbr-in { value 2; } enum asbr-out { value 3; } enum pseudo { value 4; } } default standard; } grouping vertex { description "Vertex (node) representation for the network topology"; leaf vertex-id { description "Identifier of the Vertex"; type uint64; mandatory true; } leaf name { description "Name of the Vertex when known"; type string; } leaf router-id { description "Global unique IPv4 Trafic Engineering Router ID"; type inet:ipv4-address; } leaf router-id6 { description "Global unique IPv6 Trafic Engineering Router ID"; type inet:ipv6-address; } leaf type { type node-type; } leaf asn { description "AS Number"; type uint32; } container sr-node-attributes { description "Vertex Segment Routing information"; uses sr-node-attributes; } } grouping prefix-sr-flags { leaf node-sid { description "Prefix is a Node Segment Routing Identifier (Node-SID)"; type boolean; } leaf no-php { description "Prefix SID requested No Pinultimate-Hop-Popping (PHP) for the last hop"; type boolean; } leaf explicit-null { description "Prefix SID requested explicit-Null for the last hop"; type boolean; } leaf value { description "Prefix SID is an MPLS label"; type boolean; } leaf local { description "Prefix SID is local"; type boolean; } } grouping sr-prefix-attributes { leaf prefix-sid { description "Segment Routing prefix Identifier. Unit MPLS label"; type uint32; } leaf prefix-algo { description "Algorithm (SPF or S-SPF) associated to this SID"; type uint8; } container prefix-sr-flags { uses prefix-sr-flags; } container prefix-flex-algo { description "Flexible Algorithm"; leaf flex-algo { type uint8 { range "128..255"; } } leaf metric { type uint32; } } } grouping prefix { leaf vertex-id { description "Reference to the Vertex where the prefix is attached"; type uint64; } leaf prefix { description "IP (v4 or v6) Prefix."; type inet:ip-prefix; mandatory true; } leaf igp-metric { description "Metric associated to the prefix by the IGP"; type uint32; } container sr-prefix-attributes { description "Prefix Segment Routing information"; uses sr-prefix-attributes; } } container graph-topology { list graph { description "Graph representation of the Network Topology"; key "name"; leaf name { type string; } leaf domain-scope { description "Network domain scope: intra or inter domain"; type enumeration { enum intra-domain { value 1; } enum inter-domain { value 2; } } default intra-domain; } leaf asn { description "AS Number"; type uint32; } list vertex { description "The list of Vertices defined for the Graph."; key "vertex-id"; uses vertex; } list edge { description "The list of Edges defined for the Graph."; key "edge-id"; uses edge; } list prefix { description "The list of prefixes for the Graph."; key "prefix"; uses prefix; } } } }