<modelVersion>4.0.0</modelVersion>
<artifactId>ietf-ted</artifactId>
- <version>2013.07.12.2-SNAPSHOT</version>
+ <version>2013.10.21.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
--- /dev/null
+module ted {
+ yang-version 1;
+ namespace "urn:TBD:params:xml:ns:yang:network:ted";
+ // replace with IANA namespace when assigned
+ prefix ted;
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ organization "TBD";
+ contact
+ "TBD";
+ description
+ "Helper module to hold TED attributes for OSPF/ISIS";
+
+ revision 2013-10-21 {
+
+ description
+ "Initial revision";
+ }
+
+ typedef switching-capabilities {
+ description
+ "Switching Capabilities of an interface.";
+ reference
+ "RFC 5307: IS-IS Extensions in Support of Generalized
+ Multi-Protocol Label Switching (GMPLS)";
+ type enumeration {
+ enum "PSC-1" {
+ description
+ "Packet-Switch Capable-1 (PSC-1)";
+ value 1;
+ }
+ enum "PSC-2" {
+ description
+ "Packet-Switch Capable-2 (PSC-2)";
+ value 2;
+ }
+ enum "PSC-3" {
+ description
+ "Packet-Switch Capable-3 (PSC-3)";
+ value 3;
+ }
+ enum "PSC-4" {
+ description
+ "Packet-Switch Capable-4 (PSC-4)";
+ value 4;
+ }
+ enum "L2SC" {
+ description
+ "Layer-2 Switch Capable (L2SC)";
+ value 51;
+ }
+ enum "TDM" {
+ description
+ "Time-Division-Multiplex Capable (TDM)";
+ value 100;
+ }
+ enum "LSC" {
+ description
+ "Lambda-Switch Capable (LSC)";
+ value 150;
+ }
+ enum "FSC" {
+ description
+
+ "Fiber-Switch Capable (FSC)";
+ value 200;
+ }
+ }
+ }
+
+ typedef pcc-capabilities {
+ description
+ "Path Computation Capabilities.";
+ reference
+ "RFC 5088, draft-ietf-pce-disco-protoc-isis-07.txt
+ OSPF/ISIS Protocol Extensions for Path Computation Element (PCE) Discovery.";
+ type bits {
+ bit path-computation-with-gmpls-link-constraints {
+ position 0;
+ }
+ bit bidirectional-path-computation {
+ position 1;
+ }
+ bit diverse-path-computation {
+ position 2;
+ }
+ bit load-balanced-path-computation {
+ position 3;
+ }
+ bit synchronized-path-computation {
+ position 4;
+ }
+ bit support-for-multiple-objective-functions {
+ position 5;
+ }
+ bit support-for-additive-path-constraints {
+ position 6;
+ }
+ bit support-for-request-prioritization {
+ position 7;
+ }
+ bit support-for-multiple-requests-per-message {
+ position 8;
+ }
+ }
+ }
+
+ grouping ted-node-attributes {
+ description
+ "Identifier to uniquely identify a node in TED";
+ reference "RFC 5305, RFC 6119: IPv6 Traffic Engineering in IS-IS/OSPF";
+ leaf te-router-id-ipv4 {
+
+ description
+ "Globally unique IPv4 Traffic Engineering Router ID.";
+ type inet:ipv4-address;
+ }
+ leaf te-router-id-ipv6 {
+ description
+ "Globally unique IPv6 Traffic Engineering Router ID";
+ type inet:ipv6-address;
+ }
+ list ipv4-local-address {
+ description
+ "List of IPv4 Local Address(OSPF). RFC 5786";
+ key "ipv4-prefix";
+ leaf ipv4-prefix {
+ description
+ "Local IPv4 address for the node";
+ type inet:ipv4-prefix;
+ }
+ }
+ list ipv6-local-address {
+ description
+ "List of IPv6 Local Address.";
+ reference
+ "RFC 5786: Advertising a Router's Local Addresses
+ in OSPF Traffic Engineering (TE) Extensions";
+ key "ipv6-prefix";
+ leaf ipv6-prefix {
+ description
+ "Local IPv6 address for the node";
+ type inet:ipv6-prefix;
+ }
+ leaf prefix-option {
+ description
+ "IPv6 prefix option.";
+ type uint8;
+ }
+ }
+ leaf pcc-capabilities {
+ description
+ "OSPF/ISIS PCC capabilities";
+ type pcc-capabilities;
+ }
+ }
+
+ grouping ted-link-attributes {
+ description
+ "TED Attributes associated with the link.";
+ reference "RFC 3630, RFC 3784: IS-IS / OSPF Traffic Engineering (TE)";
+
+ leaf color {
+ description
+ "Administrative group or color of the link";
+ type uint32;
+ }
+ leaf max-link-bandwidth {
+ description
+ "Maximum bandwidth that can be see on this link in this direction. Units in bytes per second";
+ type decimal64 {
+ fraction-digits 2;
+ }
+ }
+ leaf max-resv-link-bandwidth {
+ description
+ "Maximum amount of bandwidth that can be reserved in this direction in this link. Units in bytes per second";
+ type decimal64 {
+ fraction-digits 2;
+ }
+ }
+ list unreserved-bandwidth {
+ description
+ "Unreserved bandwidth for 0-7 priority levels. Units in bytes per second";
+ max-elements "8";
+ key "priority";
+ leaf priority {
+ type uint8 {
+ range "0..7";
+ }
+ }
+ leaf bandwidth {
+ description
+ "Unreserved bandwidth for this level";
+ type decimal64 {
+ fraction-digits 2;
+ }
+ }
+ }
+ leaf te-default-metric {
+ description
+ "Traffic Engineering Metric";
+ type uint32;
+ }
+ container srlg {
+ description
+ "Shared Risk Link Group Attributes";
+ uses srlg-attributes;
+ }
+ }
+
+ grouping srlg-attributes {
+ description
+ "Shared Risk Link Group Attributes";
+ reference
+ "RFC 5307, RFC 4203: ISIS / OSPF Extensions in Support of
+ Generalized Multi-Protocol Label Switching (GMPLS)";
+ list interface-switching-capabilities {
+ description
+ "List of interface capabilities for this interface";
+ key "switching-capability";
+ leaf switching-capability {
+ description
+ "Switching Capability for this interface";
+ type ted:switching-capabilities;
+ }
+ leaf encoding {
+ description
+ "Encoding supported by this interface";
+ type uint8;
+ }
+ list max-lsp-bandwidth {
+ description
+ "Maximum LSP Bandwidth at priorities 0-7";
+ max-elements "8";
+ key "priority";
+ leaf priority {
+ type uint8 {
+ range "0..7";
+ }
+ }
+ leaf bandwidth {
+ description
+ "Max LSP Bandwidth for this level";
+ type decimal64 {
+ fraction-digits 2;
+ }
+ }
+ }
+ container packet-switch-capable {
+ when "../switching-capability = PSC-1 or ../switching-capability = PSC-2 or ../switching-capability = PSC-3 or ../switching-capability = PSC-4";
+ description
+ "Interface has packet-switching capabilities";
+ leaf minimum-lsp-bandwidth {
+ description
+ "Minimum LSP Bandwidth. Units in bytes per second";
+ type decimal64 {
+ fraction-digits 2;
+ }
+
+ }
+ leaf interface-mtu {
+ description
+ "Interface MTU";
+ type uint16;
+ }
+ }
+ container time-division-multiplex-capable {
+ when "../switching-capability = TDM";
+ description
+ "Interface has time-division multiplex capabilities";
+ leaf minimum-lsp-bandwidth {
+ description
+ "Minimum LSP Bandwidth. Units in bytes per second";
+ type decimal64 {
+ fraction-digits 2;
+ }
+ }
+ leaf indication {
+ description
+ "Indication whether the interface supports Standard or Arbitrary SONET/SDH";
+ type uint16;
+ }
+ }
+ }
+ list srlg-values {
+ description
+ "List of Shared Risk Link Group this interface belongs to.";
+ key "srlg-value";
+ leaf srlg-value {
+ description
+ "Shared Risk Link Group value";
+ type uint32;
+ }
+ }
+ leaf link-protection-type {
+ description
+ "Link Protection Type desired for this link";
+ type uint16;
+ }
+ }
+}
<modelVersion>4.0.0</modelVersion>
<artifactId>ietf-topology-isis</artifactId>
- <version>2013.07.12.0-SNAPSHOT</version>
+ <version>2013.10.21.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
--- /dev/null
+module isis-topology {
+ yang-version 1;
+ namespace "urn:TBD:params:xml:ns:yang:network:isis-topology";
+ // replace with IANA namespace when assigned
+ prefix "isis";
+ import network-topology {
+ prefix nt;
+ }
+ import l3-unicast-igp-topology {
+ prefix igp;
+ }
+ import ted {
+ prefix ted;
+ }
+
+ organization "TBD";
+ contact "TBD";
+ description "ISIS Topology model";
+
+ revision "2013-10-21" {
+ description "Initial version";
+ }
+ typedef iso-system-id {
+ description "ISO System ID. RFC 1237";
+ type string {
+ pattern '[0-9a-fA-F]{4}(\.[0-9a-fA-F]{4}){2}';
+ }
+ }
+
+ typedef iso-pseudonode-id {
+ description "ISO pseudonode id for broadcast network";
+ type string {
+ pattern '[0-9a-fA-F]{2}';
+ }
+ }
+ typedef iso-net-id {
+ description "ISO NET ID. RFC 1237";
+ type string {
+ pattern '[0-9a-fA-F]{2}((\.[0-9a-fA-F]{4}){6})';
+ }
+ }
+
+ grouping isis-topology-type {
+ container isis {
+ presence "Indicates ISIS Topology";
+ }
+ }
+
+ augment "/nt:network-topology/nt:topology/nt:topology-types/igp:l3-unicast-igp-topology" {
+ uses isis-topology-type;
+ }
+
+ augment "/nt:network-topology/nt:topology/igp:igp-topology-attributes" {
+ when "../nt:topology-types/l3t:l3-unicast-igp-topology/isis";
+ container isis-topology-attributes {
+ leaf net {
+ type iso-net-id;
+ }
+ }
+ }
+
+ augment "/nt:network-topology/nt:topology/nt:node/igp:igp-node-attributes" {
+ when "../../nt:topology-types/l3t:l3-unicast-igp-topology/isis";
+ uses isis-node-attributes;
+ }
+
+ augment "/nt:network-topology/nt:topology/nt:link/igp:igp-link-attributes" {
+
+ when "../../nt:topology-types/l3t:l3-unicast-igp-topology/isis";
+ uses isis-link-attributes;
+ }
+
+ grouping isis-node-attributes {
+ container isis-node-attributes {
+ container iso {
+ leaf iso-system-id {
+ type iso-system-id;
+ }
+ leaf iso-pseudonode-id {
+ default "0";
+ type iso-pseudonode-id;
+ }
+ }
+ leaf-list net {
+ max-elements 3;
+ type iso-net-id;
+ }
+ leaf-list multi-topology-id {
+ description "List of Multi Topology Identifier upto 128 (0-127). RFC 4915";
+ max-elements "128";
+ type uint8 {
+ range "0..127";
+ }
+ }
+ choice router-type {
+ case level-2 {
+ leaf level-2 {
+ type empty;
+ }
+ }
+ case level-1 {
+ leaf level-1 {
+ type empty;
+ }
+ }
+ case level-1-2 {
+ leaf level-1-2 {
+ type empty;
+ }
+ }
+ }
+ container ted {
+ uses ted:ted-node-attributes;
+ }
+ }
+ }
+
+ grouping isis-link-attributes {
+ container isis-link-attributes {
+ leaf multi-topology-id {
+ type uint8 {
+ range "0..127";
+ }
+ }
+ container ted {
+ uses ted:ted-link-attributes;
+ }
+ }
+ }
+
+ augment "/igp:igp-node-event" {
+ uses isis-topology-type;
+ uses isis-node-attributes;
+ }
+
+ augment "/igp:igp-link-event" {
+ uses isis-topology-type;
+ uses isis-link-attributes;
+ }
+} // Module isis-topology
<modelVersion>4.0.0</modelVersion>
<artifactId>ietf-topology-l3-unicast-igp</artifactId>
- <version>2013.07.12.0-SNAPSHOT</version>
+ <version>2013.10.21.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
--- /dev/null
+module l3-unicast-igp-topology {
+ yang-version 1;
+ namespace "urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology";
+ // replace with IANA namespace when assigned
+ prefix "l3t";
+ import network-topology {
+ prefix "nt";
+ }
+
+ import ietf-inet-types {
+ prefix "inet";
+ }
+
+ organization "TBD";
+ contact "TBD";
+
+ revision "2013-10-21" {
+ description "Initial revision";
+ reference "TBD";
+ }
+
+ typedef igp-event-type {
+ description "IGP Event type for notifications";
+ type enumeration {
+ enum "add" {
+ value 0;
+ description "An IGP node or link or prefix or termination-point has been added";
+ }
+ enum "remove" {
+ value 1;
+ description "An IGP node or link or prefix or termination-point has been removed";
+ }
+ enum "update" {
+ value 2;
+ description "An IGP node or link or prefix or termination-point has been updated";
+ }
+ }
+ } // igp-event-type
+
+ identity flag-identity {
+ description "Base type for flags";
+ }
+ identity undefined-flag {
+ base "flag-identity";
+ }
+
+ typedef flag-type {
+
+ type identityref {
+ base "flag-identity";
+ }
+ }
+
+ grouping igp-prefix-attributes {
+ leaf prefix {
+ type inet:ip-prefix;
+ }
+ leaf metric {
+ type uint32;
+ }
+ leaf-list flag {
+ type flag-type;
+ }
+ }
+
+ grouping l3-unicast-igp-topology-type {
+ container l3-unicast-igp-topology {
+ presence "indicates L3 Unicast IGP Topology";
+ }
+ }
+
+ grouping igp-topology-attributes {
+ container igp-topology-attributes {
+ leaf name {
+ description "Name of the topology";
+ type string;
+ }
+ leaf-list flag {
+ description "Topology flags";
+ type flag-type;
+ }
+ }
+ }
+
+ grouping igp-node-attributes {
+ container igp-node-attributes {
+ leaf name {
+ description "Node name";
+ type inet:domain-name;
+ }
+ leaf-list flag {
+ description "Node operational flags";
+ type flag-type;
+ }
+ leaf-list router-id {
+ description "Router-id for the node";
+
+ type inet:ip-address;
+ }
+ list prefix {
+ key "prefix";
+ uses igp-prefix-attributes;
+ }
+ }
+ }
+
+ grouping igp-link-attributes {
+ container igp-link-attributes {
+ leaf name {
+ description "Link Name";
+ type string;
+ }
+ leaf-list flag {
+ description "Link flags";
+ type flag-type;
+ }
+ leaf metric {
+ description "Link Metric";
+ type uint32 {
+ range "0..16777215" {
+ description "
+ ";
+ // OSPF/ISIS supports max 3 byte metric.
+ // Ideally we would like this restriction to be
+ // defined in the derived models, however,
+ // we are not allowed to augment a "must" statement.
+ }
+ }
+ }
+ }
+ } // grouping igp-link-attributes
+
+ grouping igp-termination-point-attributes {
+ container igp-termination-point-attributes {
+ choice termination-point-type {
+ case ip {
+ leaf-list ip-address {
+ description "IPv4 or IPv6 address";
+ type inet:ip-address;
+ }
+ }
+ case unnumbered {
+ leaf unnumbered-id {
+ description "Unnumbered interface identifier";
+ type uint32;
+
+ }
+ }
+ }
+ }
+ } // grouping igp-termination-point-attributes
+
+
+ augment "/nt:network-topology/nt:topology/nt:topology-types" {
+ uses l3-unicast-igp-topology-type;
+ }
+
+ augment "/nt:network-topology/nt:topology" {
+ when "nt:topology-types/l3-unicast-igp-topology";
+ uses igp-topology-attributes;
+ }
+
+ augment "/nt:network-topology/nt:topology/nt:node" {
+ when "../nt:topology-types/l3-unicast-igp-topology";
+ uses igp-node-attributes;
+ }
+ augment "/nt:network-topology/nt:topology/nt:link" {
+ when "../nt:topology-types/l3-unicast-igp-topology";
+ uses igp-link-attributes;
+ }
+ augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" {
+ when "../../nt:topology-types/l3-unicast-igp-topology";
+ uses igp-termination-point-attributes;
+ }
+
+ notification igp-node-event {
+ leaf igp-event-type {
+ type igp-event-type;
+ }
+ leaf topology-ref {
+ type nt:topology-ref;
+ }
+ uses l3-unicast-igp-topology-type;
+ uses nt:node-attributes;
+ uses igp-node-attributes;
+ }
+
+ notification igp-link-event {
+ leaf igp-event-type {
+ type igp-event-type;
+ }
+ leaf topology-ref {
+ type nt:topology-ref;
+ }
+
+ uses l3-unicast-igp-topology-type;
+ uses nt:link-attributes;
+ uses igp-link-attributes;
+ }
+
+ notification igp-prefix-event {
+ leaf igp-event-type {
+ type igp-event-type;
+ }
+ leaf topology-ref {
+ type nt:topology-ref;
+ }
+ leaf node-ref {
+ type nt:node-ref;
+ }
+ uses l3-unicast-igp-topology-type;
+ container prefix {
+ uses igp-prefix-attributes;
+ }
+ }
+
+ notification termination-point-event {
+ leaf igp-event-type {
+ type igp-event-type;
+ }
+ leaf topology-ref {
+ type nt:topology-ref;
+ }
+ leaf node-ref {
+ type nt:node-ref;
+ }
+ uses l3-unicast-igp-topology-type;
+ uses nt:tp-attributes;
+ uses igp-termination-point-attributes;
+ }
+}
<modelVersion>4.0.0</modelVersion>
<artifactId>ietf-topology-ospf</artifactId>
- <version>2013.07.12.0-SNAPSHOT</version>
+ <version>2013.10.21.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
--- /dev/null
+module ospf-topology {
+ yang-version 1;
+ namespace "urn:TBD:params:xml:ns:yang:ospf-topology";
+ // replace with IANA namespace when assigned
+
+ prefix "ospf";
+
+ import network-topology {
+ prefix "nt";
+ }
+
+ import l3-unicast-igp-topology {
+ prefix "l3t";
+ }
+ import ietf-inet-types {
+ prefix "inet";
+ }
+ import ted {
+ prefix "ted";
+ }
+
+ organization "TBD";
+ contact "TBD";
+ description "OSPF Topology model";
+
+ revision "2013-10-21" {
+ description "Initial revision";
+ reference "TBD";
+ }
+
+ typedef area-id {
+ description "OSPF Area ID";
+ type uint32;
+ }
+
+ grouping ospf-topology-type {
+ container ospf {
+ presence "indiates OSPF Topology";
+ }
+ }
+
+ augment "/nt:network-topology/nt:topology/nt:topology-types/l3t:l3-unicast-igp-topology" {
+ uses ospf-topology-type;
+ }
+
+ augment "/nt:network-topology/nt:topology/l3t:igp-topology-attributes" {
+ when "../nt:topology-types/l3t:l3-unicast-igp-topology/ospf";
+ container ospf-topology-attributes {
+ leaf area-id {
+ type area-id;
+ }
+ }
+ }
+
+ augment "/nt:network-topology/nt:topology/nt:node/l3t:igp-node-attributes" {
+ when "../../nt:topology-types/l3t:l3-unicast-igp-topology/ospf";
+ uses ospf-node-attributes;
+ }
+
+ augment "/nt:network-topology/nt:topology/nt:link/l3t:igp-link-attributes" {
+ when "../../nt:topology-types/l3t:l3-unicast-igp-topology/ospf";
+ uses ospf-link-attributes;
+ }
+
+ augment "/nt:network-topology/nt:topology/nt:node/l3t:igp-node-attributes/l3t:prefix" {
+ when "../../../nt:topology-types/l3t:l3-unicast-igp-topology/ospf";
+ uses ospf-prefix-attributes;
+ }
+
+ grouping ospf-node-attributes {
+ container ospf-node-attributes {
+ choice router-type {
+ case abr {
+ leaf abr {
+ type empty;
+ }
+ }
+ case asbr {
+ leaf asbr {
+ type empty;
+ }
+ }
+ case internal {
+ leaf internal {
+ type empty;
+ }
+ }
+ case pseudonode {
+ leaf pseudonode {
+ type empty;
+ }
+ }
+ }
+ leaf dr-interface-id {
+ when "../router-type/pseudonode";
+ description "For pseudonodes, DR interface-id";
+ default "0";
+ type uint32;
+ }
+ leaf-list multi-topology-id {
+ description "List of Multi-Topology Identifier up-to 128 (0-127). RFC 4915";
+ max-elements "128";
+
+ type uint8 {
+ range "0..127";
+ }
+ }
+ leaf capabilities {
+ description "OSPF capabilities as bit vector. RFC 4970";
+ type bits {
+ bit graceful-restart-capable {
+ position 0;
+ }
+ bit graceful-restart-helper {
+ position 1;
+ }
+ bit stub-router-support {
+ position 2;
+ }
+ bit traffic-engineering-support {
+ position 3;
+ }
+ bit point-to-point-over-lan {
+ position 4;
+ }
+ bit experimental-te {
+ position 5;
+ }
+ }
+ }
+ container ted {
+ uses ted:ted-node-attributes;
+ }
+ } // ospf
+ } // ospf-node-attributes
+
+ grouping ospf-link-attributes {
+ container ospf-link-attributes {
+ leaf multi-topology-id {
+ type uint8 {
+ range "0..127";
+ }
+ }
+ container ted {
+ uses ted:ted-link-attributes;
+ }
+ }
+ } // ospf-link-attributes
+
+ grouping ospf-prefix-attributes {
+ container ospf-prefix-attributes {
+
+ leaf forwarding-address {
+ when "../../l3t:l3-unicast-igp-topology/l3t:ospf/l3t:router-type/l3t:asbr";
+ type inet:ipv4-address;
+ }
+ }
+ }
+
+ augment "/l3t:igp-node-event" {
+ uses ospf-topology-type;
+ uses ospf:ospf-node-attributes;
+ }
+
+ augment "/l3t:igp-link-event" {
+ uses ospf-topology-type;
+ uses ospf:ospf-link-attributes;
+ }
+
+ augment "/l3t:igp-prefix-event" {
+ uses ospf-topology-type;
+ uses ospf:ospf-prefix-attributes;
+ }
+}
<modelVersion>4.0.0</modelVersion>
<artifactId>ietf-topology</artifactId>
- <version>2013.07.12.2-SNAPSHOT</version>
+ <version>2013.10.21.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
--- /dev/null
+module network-topology {
+ yang-version 1;
+ namespace "urn:TBD:params:xml:ns:yang:network-topology";
+ // replace with IANA namespace when assigned
+ prefix "nt";
+
+ import ietf-inet-types { prefix "inet"; }
+
+ organization "TBD";
+
+ contact "WILL-BE-DEFINED-LATER";
+
+ description
+ "This module defines a model for the topology of a network.
+ Key design decisions are as follows:
+ A topology consists of a set of nodes and links.
+ Links are point-to-point and unidirectional.
+ Bidirectional connections need to be represented through
+ two separate links.
+ Multipoint connections, broadcast domains etc can be represented
+ through a hierarchy of nodes, then connecting nodes at
+ upper layers of the hierarchy.";
+
+ revision 2013-10-21 {
+ description
+ "Initial revision.";
+ }
+
+ typedef topology-id {
+ type inet:uri;
+ description
+ "An identifier for a topology.";
+ }
+
+ typedef node-id {
+ type inet:uri;
+ description
+ "An identifier for a node in a topology.
+ The identifier may be opaque.
+ The identifier SHOULD be chosen such that the same node in a
+ real network topology will always be identified through the
+ same identifier, even if the model is instantiated in separate
+ datastores. An implementation MAY choose to capture semantics
+ in the identifier, for example to indicate the type of node
+ and/or the type of topology that the node is a part of.";
+ }
+
+
+ typedef link-id {
+ type inet:uri;
+ description
+ "An identifier for a link in a topology.
+ The identifier may be opaque.
+ The identifier SHOULD be chosen such that the same link in a
+ real network topology will always be identified through the
+ same identifier, even if the model is instantiated in separate
+ datastores. An implementation MAY choose to capture semantics
+ in the identifier, for example to indicate the type of link
+ and/or the type of topology that the link is a part of.";
+ }
+
+ typedef tp-id {
+ type inet:uri;
+ description
+ "An identifier for termination points on a node.
+ The identifier may be opaque.
+ The identifier SHOULD be chosen such that the same TP in a
+ real network topology will always be identified through the
+ same identifier, even if the model is instantiated in separate
+ datastores. An implementation MAY choose to capture semantics
+ in the identifier, for example to indicate the type of TP
+ and/or the type of node and topology that the TP is a part of.";
+ }
+
+ typedef tp-ref {
+ type leafref {
+ path "/network-topology/topology/node/termination-point/tp-id";
+ }
+ description
+ "A type for an absolute reference to a termination point.
+ (This type should not be used for relative references.
+ In such a case, a relative path should be used instead.)";
+ }
+ typedef topology-ref {
+ type leafref {
+ path "/network-topology/topology/topology-id";
+ }
+ description
+ "A type for an absolute reference a topology instance.";
+ }
+
+ typedef node-ref {
+ type leafref {
+ path "/network-topology/topology/node/node-id";
+ }
+ description
+
+ "A type for an absolute reference to a node instance.
+ (This type should not be used for relative references.
+ In such a case, a relative path should be used instead.)";
+ }
+
+ typedef link-ref {
+ type leafref {
+ path "/network-topology/topology/link/link-id";
+ }
+ description
+ "A type for an absolute reference a link instance.
+ (This type should not be used for relative references.
+ In such a case, a relative path should be used instead.)";
+ }
+
+ grouping tp-attributes {
+ description
+ "The data objects needed to define a termination point.
+ (This only includes a single leaf at this point, used
+ to identify the termination point.)
+ Provided in a grouping so that in addition to the datastore,
+ the data can also be included in notifications.";
+ leaf tp-id {
+ type tp-id;
+ }
+ leaf-list tp-ref {
+ type tp-ref;
+ config false;
+ description
+ "The leaf list identifies any termination points that the
+ termination point is dependent on, or maps onto.
+ Those termination points will themselves be contained
+ in a supporting node.
+ This dependency information can be inferred from
+ the dependencies between links. For this reason,
+ this item is not separately configurable. Hence no
+ corresponding constraint needs to be articulated.
+ The corresponding information is simply provided by the
+ implementing system.";
+ }
+ }
+
+ grouping node-attributes {
+ description
+ "The data objects needed to define a node.
+ The objects are provided in a grouping so that in addition to
+ the datastore, the data can also be included in notifications
+ as needed.";
+
+ leaf node-id {
+ type node-id;
+ description
+ "The identifier of a node in the topology.
+ A node is specific to a topology to which it belongs.";
+ }
+ list supporting-node {
+ description
+ "This list defines vertical layering information for nodes.
+ It allows to capture for any given node, which node (or nodes)
+ in the corresponding underlay topology it maps onto.
+ A node can map to zero, one, or more nodes below it;
+ accordingly there can be zero, one, or more elements in the list.
+ If there are specific layering requirements, for example
+ specific to a particular type of topology that only allows
+ for certain layering relationships, the choice
+ below can be augmented with additional cases.
+ A list has been chosen rather than a leaf-list in order
+ to provide room for augmentations, e.g. for
+ statistics or priorization information associated with
+ supporting nodes.";
+ key "node-ref";
+ leaf node-ref {
+ type node-ref;
+ }
+ }
+ }
+
+ grouping link-attributes {
+ // This is a grouping, not defined inline with the link definition itself,
+ // so it can be included in a notification, if needed
+ leaf link-id {
+ type link-id;
+ description
+ "The identifier of a link in the topology.
+ A link is specific to a topology to which it belongs.";
+ }
+ container source {
+ leaf source-node {
+ mandatory true;
+ type node-ref;
+ description
+ "Source node identifier, must be in same topology.";
+ }
+ leaf source-tp {
+ type tp-ref;
+ description
+ "Termination point within source node that terminates the link.";
+
+ }
+ }
+ container destination {
+ leaf dest-node {
+ mandatory true;
+ type node-ref;
+ description
+ "Destination node identifier, must be in same topology.";
+ }
+ leaf dest-tp {
+ type tp-ref;
+ description
+ "Termination point within destination node that terminates the link.";
+ }
+ }
+ list supporting-link {
+ key "link-ref";
+ leaf link-ref {
+ type link-ref;
+ }
+ }
+ }
+
+
+ container network-topology {
+ list topology {
+ description "
+ This is the model of an abstract topology.
+ A topology contains nodes and links.
+ Each topology MUST be identified by
+ unique topology-id for reason that a network could contain many
+ topologies.
+ ";
+ key "topology-id";
+ leaf topology-id {
+ type topology-id;
+ description "
+ It is presumed that a datastore will contain many topologies. To
+ distinguish between topologies it is vital to have UNIQUE
+ topology identifiers.
+ ";
+ }
+ leaf server-provided {
+ type boolean;
+ config false;
+ description "
+ Indicates whether the topology is configurable by clients,
+ or whether it is provided by the server. This leaf is
+
+ populated by the server implementing the model.
+ It is set to false for topologies that are created by a client;
+ it is set to true otherwise. If it is set to true, any
+ attempt to edit the topology MUST be rejected.
+ ";
+ }
+ container topology-types {
+ description
+ "This container is used to identify the type, or types
+ (as a topology can support several types simultaneously),
+ of the topology.
+ Topology types are the subject of several integrity constraints
+ that an implementing server can validate in order to
+ maintain integrity of the datastore.
+ Topology types are indicated through separate data nodes;
+ the set of topology types is expected to increase over time.
+ To add support for a new topology, an augmenting module
+ needs to augment this container with a new empty optional
+ container to indicate the new topology type.
+ The use of a container allows to indicate a subcategorization
+ of topology types.
+ The container SHALL NOT be augmented with any data nodes
+ that serve a purpose other than identifying a particular
+ topology type.
+ ";
+ }
+ list underlay-topology {
+ key "topology-ref";
+ leaf topology-ref {
+ type topology-ref;
+ }
+ // a list, not a leaf-list, to allow for potential augmentation
+ // with properties specific to the underlay topology,
+ // such as statistics, preferences, or cost.
+ description
+ "Identifies the topology, or topologies, that this topology
+ is dependent on.";
+ }
+
+ list node {
+ description "The list of network nodes defined for the topology.";
+ key "node-id";
+ uses node-attributes;
+ must "boolean(../underlay-topology[*]/node[./supporting-nodes/node-ref])";
+ // This constraint is meant to ensure that a referenced node is in fact
+ // a node in an underlay topology.
+ list termination-point {
+ description
+
+ "A termination point can terminate a link.
+ Depending on the type of topology, a termination point could,
+ for example, refer to a port or an interface.";
+ key "tp-id";
+ uses tp-attributes;
+ }
+ }
+
+ list link {
+ description "
+ A Network Link connects a by Local (Source) node and
+ a Remote (Destination) Network Nodes via a set of the
+ nodes' termination points.
+ As it is possible to have several links between the same
+ source and destination nodes, and as a link could potentially
+ be re-homed between termination points, to ensure that we
+ would always know to distinguish between links, every link
+ is identified by a dedicated link identifier.
+ Note that a link models a point-to-point link, not a multipoint
+ link.
+ Layering dependencies on links in underlay topologies are
+ not represented as the layering information of nodes and of
+ termination points is sufficient.
+ ";
+ key "link-id";
+ uses link-attributes;
+ must "boolean(../underlay-topology/link[./supporting-link]";
+ // Constraint: any supporting link must be part of an underlay topology
+ must "boolean(../node[./source/source-node])";
+ // Constraint: A link must have as source a node of the same topology
+ must "boolean(../node[./destination/dest-node])";
+ // Constraint: A link must have as source a destination of the same topology
+ must "boolean(../node/termination-point[./source/source-tp])";
+ // Constraint: The source termination point must be contained in the source node
+ must "boolean(../node/termination-point[./destination/dest-tp])";
+ // Constraint: The destination termination point must be contained
+ // in the destination node
+ }
+ }
+ }
+}