+++ /dev/null
-
-/*
- * NO RW COPYRIGHT
- *
- */
-
-module ietf-l2-topology {
- yang-version 1;
- namespace "urn:ietf:params:xml:ns:yang:ietf-l2-topology";
- prefix "l2t";
-
- import ietf-network {
- prefix "nw";
- }
-
- import ietf-network-topology {
- prefix "nt";
- }
-
- import ietf-inet-types {
- prefix "inet";
- }
-
- import ietf-yang-types {
- prefix "yang";
- }
-
- organization "TBD";
- contact "I-D Editor: jie.dong@huawei.com";
-
- description
- "This module defines a basic model for
- the layer-2 topology of a network";
-
- revision "2015-06-23" {
- description "Initial revision";
- reference "draft-ietf-i2rs-l2-network-topology-01";
- }
-
- /*
- * Typedefs
- */
-
- typedef vlan {
- type uint16 {
- range "0..4095";
- }
- description "VLAN ID";
- }
-
- typedef trill-nickname {
- type uint16;
- description "TRILL Nickname";
- }
-
- typedef flag-type {
- type identityref {
- base "flag-identity";
- }
- description "Base type for flags";
- }
-
- typedef l2-network-event-type {
- type enumeration {
- enum "add" {
- value 0;
- description "An L2 node or link or termination-point
- has been added";
- }
- enum "remove" {
- value 1;
- description "An L2 node or link or termination-point
- has been removed";
- }
- enum "update" {
- value 2;
- description "An L2 node or link or termination-point
- has been updated";
- }
- }
- description "l2 network event type for notifications";
- } // l2-topology-event-type
-
-
- /*
- * Features
- */
-
- feature VLAN {
- description
- "Indicates that the system supports the
- vlan functions";
- }
-
- feature QinQ {
- description
- "Indicates that the system supports the
- qinq functions";
- }
-
- feature PBB {
- description
- "Indicates that the device supports the
- provider-backbone-bridging functions";
- }
-
- feature VPLS {
- description
- "Indicates that the device supports the
- VPLS functions";
- reference "RFC 4761, RFC 4762";
- }
-
- feature TRILL {
- description
- "Indicates that the device supports the
- TRILL functions";
- reference "RFC 6325";
- }
-
- feature VXLAN {
- description
- "Indicates that the device supports the
- VXLAN functions";
- reference "RFC 7348";
- }
-
- /*
- * Identities
- */
- identity flag-identity {
- description "Base type for flags";
- }
-
- identity encapsulation-type {
- description
- "Base identity from which specific encapsulation
- types are derived.";
- }
-
- identity eth-encapsulation-type {
- base encapsulation-type;
- description
- "Base identity from which specific ethernet
- encapsulation types are derived.";
-
- }
-
- identity ethernet {
- base eth-encapsulation-type;
- description
- "native ethernet encapsulation";
- }
-
- identity vlan {
- base eth-encapsulation-type;
- description
- "vlan encapsulation";
- }
-
- identity qinq {
- base eth-encapsulation-type;
- description
- "qinq encapsulation";
- }
-
- identity pbb {
- base eth-encapsulation-type;
- description
- "pbb encapsulation";
- }
-
- identity trill {
- base eth-encapsulation-type;
- description
- "trill encapsulation";
- }
-
- identity vpls {
- base eth-encapsulation-type;
- description
- "vpls encapsulation";
- }
-
- identity vxlan {
- base eth-encapsulation-type;
- description
- "vxlan encapsulation";
- }
-
- identity frame-relay {
- base encapsulation-type;
- description
- "Frame Relay encapsulation";
- }
-
- identity ppp {
- base encapsulation-type;
- description
- "PPP encapsulation";
- }
-
- identity hdlc {
- base encapsulation-type;
- description
- "HDLC encapsulation";
- }
-
- identity atm {
- base encapsulation-type;
- description
- "Base identity from which specific ATM
- encapsulation types are derived.";
-
- }
-
- identity pwe3 {
- base encapsulation-type;
- description
- "Base identity from which specific pw
- encapsulation types are derived.";
- }
-
-
- /*
- * Groupings
- */
-
-
- grouping l2-network-type {
- description "Identify the topology type to be L2.";
- container l2-network {
- presence "indicates L2 Network";
- description
- "The presence of the container node indicates
- L2 Topology";
- }
- }
-
- grouping l2-network-attributes {
- description "L2 Topology scope attributes";
- container l2-network-attributes {
- description "Containing L2 network attributes";
- leaf name {
- type string;
- description "Name of the L2 network";
- }
-
- leaf-list flag {
- type flag-type;
- description "L2 network flags";
- }
- }
- }
-
- grouping l2-node-attributes {
- description "L2 node attributes";
- container l2-node-attributes {
- description "Containing L2 node attributes";
- leaf name {
- type string;
- description "Node name";
- }
- leaf description {
- type string;
- description "Node description";
- }
- leaf-list management-address {
- type inet:ip-address;
- description "System management address";
- }
- leaf management-vid {
- if-feature VLAN;
- type vlan;
- description "System management VID";
- }
- leaf-list nick-name {
- if-feature TRILL;
- type trill-nickname;
- description "Nickname of the RBridge";
- }
- leaf-list flag {
- type flag-type;
- description "Node operational flags";
- }
- }
- } // grouping l2-node-attributes
-
-
- grouping l2-link-attributes {
- description "L2 link attributes";
- container l2-link-attributes {
- description "Containing L2 link attributes";
- leaf name {
- type string;
- description "Link name";
- }
- leaf-list flag {
- type flag-type;
- description "Link flags";
- }
- leaf rate {
- type decimal64 {
- fraction-digits 2;
- }
- description "Link rate";
-
- }
- leaf delay {
- type uint32;
- description "Link delay in microseconds";
- }
- leaf-list srlg {
- type uint32;
- description
- "List of Shared Risk Link Groups
- this link belongs to.";
- }
- }
- } // grouping l2-link-attributes
-
- grouping l2-termination-point-attributes {
- description "L2 termination point attributes";
- container l2-termination-point-attributes {
- description "Containing L2 TP attributes";
- leaf description {
- type string;
- description "Port description";
- }
-
- leaf maximum-frame-size {
- type uint32;
- description "Maximum frame size";
- }
-
- choice l2-termination-point-type {
- description
- "Indicates termination-point type
- specific attributes";
- case ethernet {
- leaf mac-address {
- type yang:mac-address;
- description "Interface MAC address";
- }
-
- leaf eth-encapsulation {
- type identityref {
- base eth-encapsulation-type;
- }
- description
- "Encapsulation type of this
- ternimation point.";
- }
-
- leaf port-vlan-id {
- if-feature VLAN;
- type vlan;
- description "Port VLAN ID";
- }
-
- list vlan-id-name {
- if-feature VLAN;
- key "vlan-id";
- description "Interface configured VLANs";
- leaf vlan-id {
- type vlan;
- description "VLAN ID";
- }
- leaf vlan-name {
- type string;
- description "VLAN Name";
- }
- }
- } //case ethernet
-
- case legacy {
- leaf encapsulation {
- type identityref {
- base encapsulation-type;
- }
- description
- "Encapsulation type of this termination point.";
- }
- } //case legacy
-
- } //choice termination-point-type
-
- leaf tp-state {
- type enumeration {
- enum in-use {
- value 0;
- description
- "the termination point is in forwarding state";
- }
- enum blocking {
- value 1;
- description
- "the termination point is in blocking state";
- }
- enum down {
- value 2;
- description
- "the termination point is in down state";
- }
- enum others {
- value 3;
- description
- "the termination point is in other state";
- }
- }
- config false;
- description "State of the termination point";
- }
- }
- } // grouping l2-termination-point-attributes
-
-/*** grouping of network/node/link/tp leaf-refs ***/
-
- grouping network-ref {
- description
- "Grouping for an absolute reference to a network topology
- instance.";
- leaf network-ref {
- type leafref {
- path "/nw:network/nw:network-id";
- }
- description
- "An absolute reference to a network topology instance.";
- }
- }
-
- grouping link-ref {
- description
- "Grouping for an absolute reference to a link instance.";
- uses network-ref;
- leaf link-ref {
- type leafref {
- path "/nw:network"
- +"[nw:network-id = current()/../network-ref]"
- +"/nt:link/nt:link-id";
- }
- description
- "An absolute reference to a link instance.";
- }
- }
-
- grouping node-ref {
- description
- "Grouping for an absolute reference to a node instance.";
- uses network-ref;
- leaf node-ref {
- type leafref {
- path "/nw:network"
- +"[nw:network-id = current()/../network-ref]"
- +"/nw:node/nw:node-id";
- }
- description
- "An absolute reference to a node instance.";
- }
- }
-
- grouping tp-ref {
- description
- "Grouping for an absolute reference to a termination point.";
- uses node-ref;
- leaf tp-ref {
- type leafref {
- path "/nw:network"
- +"[nw:network-id = current()/../network-ref]"
- +"/nw:node[nw:node-id = current()/../node-ref]"
- +"/nt:termination-point/nt:tp-id";
- }
- description
- "Grouping for an absolute reference to a TP.";
- }
- }
-
-
- /*
- * Data nodes
- */
- augment "/nw:network/nw:network-types" {
- description
- "Introduce new network type for L2 topology";
- uses l2-network-type;
- }
-
- augment "/nw:network" {
- /* RIFT-Change: when not to be used yet
- when "nw:network-types/l2-network" {
- description
- "Augmentation parameters apply only for networks
- with L2 topology";
- }
- */
- description
- "Configuration parameters for the L2 network
- as a whole";
- uses l2-network-attributes;
- }
-
- augment "/nw:network/nw:node" {
- /* RIFT-Change: when not to be used yet
- when "../nw:network-types/l2-network" {
- description
- "Augmentation parameters apply only for networks
- with L2 topology";
- }
- */
- description
- "Configuration parameters for L2 at the node
- level";
- uses l2-node-attributes;
- }
-
- augment "/nw:network/nt:link" {
- /* RIFT-Change: when not to be used yet
- when "/nw:network/nw:network-types/l2-network" {
- description
- "Augmentation parameters apply only for networks
- with L2 topology";
- }
- */
- description "Augment L2 topology link information";
- uses l2-link-attributes;
- }
-
- augment "/nw:network/nw:node/nt:termination-point" {
- /* RIFT-Change: when not to be used yet
- when "/nw:network/nw:network-types/l2-network" {
- description
- "Augmentation parameters apply only for networks
- with L2 topology";
- }
- */
- description
- "Augment L2 topology termination point configuration";
- uses l2-termination-point-attributes;
- }
-
- /*
- * Notifications
- */
-
- notification l2-node-event {
- description "Notification event for L2 node";
- leaf event-type {
- type l2-network-event-type;
- description "Event type";
- }
- uses node-ref;
- uses l2-network-type;
- uses l2-node-attributes;
- }
-
- notification l2-link-event {
- description "Notification event for L2 link";
- leaf event-type {
- type l2-network-event-type;
- description "Event type";
- }
- uses link-ref;
- uses l2-network-type;
- uses l2-link-attributes;
- }
-
- notification l2-termination-point-event {
- description "Notification event for L2 termination point";
- leaf event-type {
- type l2-network-event-type;
- description "Event type";
- }
- uses tp-ref;
- uses l2-network-type;
- uses l2-termination-point-attributes;
- }
-
-} // module l2-topology
+++ /dev/null
-
-/*
- * NO RW COPYRIGHT
- *
- */
-
-module ietf-network-topology {
- yang-version 1;
- namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";
- prefix lnk;
-
- import ietf-inet-types {
- prefix inet;
- }
- import ietf-network {
- prefix nd;
- }
-
- organization "TBD";
- contact
- "WILL-BE-DEFINED-LATER";
- description
- "This module defines a common base model for network topology,
- augmenting the base network model with links to connect nodes,
- as well as termination points to terminate links on nodes.";
-
- revision 2015-06-08 {
- description
- "Initial revision.";
- reference "draft-ietf-i2rs-yang-network-topo-01";
- }
-
- 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.";
- }
-
- grouping link-ref {
- description
- "References a link in a specific network.";
- leaf link-ref {
- type leafref {
- path "/nd:network[nd:network-id=current()/../"+
- "nd:network-ref]/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.)";
- }
- uses nd:network-ref;
- }
-
- grouping tp-ref {
- description
- "References a termination point in a specific node.";
- leaf tp-ref {
- type leafref {
- path "/nd:network[nd:network-id=current()/../"+
- "nd:network-ref]/nd:node[nd:node-id=current()/../"+
- "nd:node-ref]/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.)";
- }
- uses nd:node-ref;
- }
-
- augment "/nd:network" {
- description
- "Add links to the network model.";
- list link {
- key "link-id";
-
- 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.";
- container source {
- description
- "This container holds the logical source of a particular
- link.";
- leaf source-node {
- type leafref {
- // RIFT change:
- path "../../../../nd:network/nd:node/nd:node-id";
- }
- mandatory true;
- description
- "Source node identifier, must be in same topology.";
- }
- leaf source-tp {
- type leafref {
- // RIFT change:
- path "../../../../nd:network/nd:node[nd:node-id=current()/../"+
- "source-node]/termination-point/tp-id";
- }
- description
- "Termination point within source node that terminates
- the link.";
- }
- }
- container destination {
- description
- "This container holds the logical destination of a
- particular link.";
- leaf dest-node {
- type leafref {
- // RIFT change
- path "../../../../nd:network/nd:node/nd:node-id";
- }
- mandatory true;
- description
- "Destination node identifier, must be in the same
- network.";
- }
- leaf dest-tp {
- type leafref {
- // RIFT change:
- path "../../../../nd:network/nd:node[nd:node-id=current()/../"+
- "dest-node]/termination-point/tp-id";
- }
- description
- "Termination point within destination node that
- terminates the link.";
- }
- }
- 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.";
- }
- list supporting-link {
- key "network-ref link-ref";
- description
- "Identifies the link, or links, that this link
- is dependent on.";
- leaf network-ref {
- type leafref {
- // RIFT change:
- path "../../../../nd:network/nd:supporting-network/nd:network-ref";
- }
- description
- "This leaf identifies in which underlay topology
- supporting link is present.";
- }
- leaf link-ref {
- type leafref {
- path "/nd:network[nd:network-id=current()/.."+
- "/network-ref]/link/link-id";
- }
- description
- "This leaf identifies a link which is a part
- of this link's underlay. Reference loops, in which
- a link identifies itself as its underlay, either
- directly or transitively, are not allowed.";
- }
- }
- }
- }
- augment "/nd:network/nd:node" {
- description
- "Augment termination points which terminate links.
- Termination points can ultimately be mapped to interfaces.";
- list termination-point {
- key "tp-id";
- 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.";
- leaf tp-id {
- type tp-id;
- description
- "Termination point identifier.";
- }
- list supporting-termination-point {
- key "network-ref node-ref tp-ref";
- 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.";
- leaf network-ref {
- type leafref {
- // RIFT change:
- path "/nd:network/nd:node/nd:supporting-node/nd:network-ref";
- }
- description
- "This leaf identifies in which topology the
- supporting termination point is present.";
- }
- leaf node-ref {
- type leafref {
- // RIFT change:
- path "/nd:network/nd:node/nd:supporting-node/nd:node-ref";
- }
- description
- "This leaf identifies in which node the supporting
- termination point is present.";
- }
- leaf tp-ref {
- type leafref {
- path "/nd:network[nd:network-id=current()/../"+
- "network-ref]/nd:node[nd:node-id=current()/../"+
- "node-ref]/termination-point/tp-id";
- }
- description
- "Reference to the underlay node, must be in a
- different topology";
- }
- }
- }
- }
-}
+++ /dev/null
-
-/*
- * NO RW COPYRIGHT
- *
- */
-
-module ietf-network {
- yang-version 1;
- namespace "urn:ietf:params:xml:ns:yang:ietf-network";
- prefix nd;
-
- import ietf-inet-types {
- prefix inet;
- }
-
- organization "TBD";
- contact
- "WILL-BE-DEFINED-LATER";
- description
- "This module defines a common base model for a collection
- of nodes in a network. Node definitions s are further used
- in network topologies and inventories.";
-
- revision 2015-06-08 {
- description
- "Initial revision.";
- reference "draft-ietf-i2rs-yang-network-topo-01";
- }
-
- typedef node-id {
- type inet:uri;
- description
- "Identifier for a node.";
- }
-
- typedef network-id {
- type inet:uri;
- description
- "Identifier for a network.";
- }
-
- grouping network-ref {
- description
- "Contains the information necessary to reference a network,
- for example an underlay network.";
- leaf network-ref {
- type leafref {
- path "/network/network-id";
- }
- description
- "Used to reference a network, for example an underlay
- network.";
- }
- }
-
- grouping node-ref {
- description
- "Contains the information necessary to reference a node.";
- leaf node-ref {
- type leafref {
- path "/network[network-id=current()/../network-ref]"+
- "/node/node-id";
- }
- description
- "Used to reference a node.
- Nodes are identified relative to the network they are
- contained in.";
- }
- uses network-ref;
- }
-
- list network {
- config false;
- key "network-id";
- description
- "Describes a network.
- A network typically contains an inventory of nodes,
- topological information (augmented through
- network-topology model), as well as layering
- information.";
- container network-types {
- description
- "Serves as an augmentation target.
- The network type is indicated through corresponding
- presence containers augmented into this container.";
- }
- leaf network-id {
- type network-id;
- description
- "Identifies a network.";
- }
- leaf server-provided {
- type boolean;
- config false;
- description
- "Indicates whether the information concerning this
- particular network is populated by the server
- (server-provided true, the general case for network
- information discovered from the server),
- or whether it is configured by a client
- (server-provided true, possible e.g. for
- service overlays managed through a controller).";
- }
- list supporting-network {
- key "network-ref";
- description
- "An underlay network, used to represent layered network
- topologies.";
-
- leaf network-ref {
- type leafref {
- path "/network/network-id";
- }
- description
- "References the underlay network.";
- }
- }
- list node {
- key "node-id";
- description
- "The inventory of nodes of this network.";
- leaf node-id {
- type node-id;
- description
- "Identifies a node uniquely within the containing
- network.";
- }
- list supporting-node {
- key "network-ref node-ref";
- description
- "Represents another node, in an underlay network, that
- this node is supported by. Used to represent layering
- structure.";
- leaf network-ref {
- type leafref {
- path "../../../supporting-network/network-ref";
- }
- description
- "References the underlay network that the
- underlay node is part of.";
- }
- leaf node-ref {
- type leafref {
- path "/network/node/node-id";
- }
- description
- "References the underlay node itself.";
- }
- }
- }
- }
-}
-
+++ /dev/null
-
-/*
- *
- * Copyright 2016 RIFT.IO Inc
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-
-module odl-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.";
- // This is not what was published in the initial draft,
- // added topology-ref leaf and added it to the key
- key "topology-ref node-ref";
- leaf topology-ref {
- type topology-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
- }
- }
- }
-}