From 82d2cc9b9f4e936cb342b692d60ff79ddef76288 Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Tue, 29 Sep 2015 18:40:12 +0200 Subject: [PATCH] Bug 3654: Introduction of latest topology model Introduced latest revision of ietf-network model. Change-Id: If83d5646c881c1cf1424317e75c5bd81c36e06dd Signed-off-by: Tony Tkacik --- model/artifacts/pom.xml | 5 + model/features/pom.xml | 4 + model/features/src/main/features/features.xml | 1 + model/ietf/ietf-network/pom.xml | 47 ++++ .../ietf-network-topology@2015-06-08.yang | 243 ++++++++++++++++++ .../main/yang/ietf-network@2015-06-08.yang | 144 +++++++++++ model/ietf/pom.xml | 4 + 7 files changed, 448 insertions(+) create mode 100644 model/ietf/ietf-network/pom.xml create mode 100644 model/ietf/ietf-network/src/main/yang/ietf-network-topology@2015-06-08.yang create mode 100644 model/ietf/ietf-network/src/main/yang/ietf-network@2015-06-08.yang diff --git a/model/artifacts/pom.xml b/model/artifacts/pom.xml index fc9f83c2a3..9bd115054c 100644 --- a/model/artifacts/pom.xml +++ b/model/artifacts/pom.xml @@ -92,6 +92,11 @@ opendaylight-l2-types 2013.08.27.8-SNAPSHOT + + org.opendaylight.mdsal.model + ietf-network-2015-06-08 + 1.0.0-SNAPSHOT + diff --git a/model/features/pom.xml b/model/features/pom.xml index c4b2605a82..41499d2016 100644 --- a/model/features/pom.xml +++ b/model/features/pom.xml @@ -115,5 +115,9 @@ org.opendaylight.mdsal.model ietf-topology-l3-unicast-igp + + org.opendaylight.mdsal.model + ietf-network-2015-06-08 + diff --git a/model/features/src/main/features/features.xml b/model/features/src/main/features/features.xml index 6552c70d83..35b567d641 100644 --- a/model/features/src/main/features/features.xml +++ b/model/features/src/main/features/features.xml @@ -29,6 +29,7 @@ mvn:org.opendaylight.mdsal.model/ietf-topology-isis/{{VERSION}} mvn:org.opendaylight.mdsal.model/ietf-topology-ospf/{{VERSION}} mvn:org.opendaylight.mdsal.model/ietf-topology-l3-unicast-igp/{{VERSION}} + mvn:org.opendaylight.mdsal.model/ietf-network-2015-06-08/{{VERSION}} diff --git a/model/ietf/ietf-network/pom.xml b/model/ietf/ietf-network/pom.xml new file mode 100644 index 0000000000..2c92fdc282 --- /dev/null +++ b/model/ietf/ietf-network/pom.xml @@ -0,0 +1,47 @@ + + + + + + + org.opendaylight.mdsal.model + model-ietf + 0.8.0-SNAPSHOT + + ietf-network-2015-06-08 + 1.0.0-SNAPSHOT + bundle + 4.0.0 + ${project.artifactId} + ${project.artifactId} + + + + + org.opendaylight.mdsal.model + mdsal-model-artifacts + 0.8.0-SNAPSHOT + pom + import + + + + + + + org.opendaylight.mdsal.model + ietf-inet-types + + + org.opendaylight.mdsal.model + ietf-yang-types + + + + diff --git a/model/ietf/ietf-network/src/main/yang/ietf-network-topology@2015-06-08.yang b/model/ietf/ietf-network/src/main/yang/ietf-network-topology@2015-06-08.yang new file mode 100644 index 0000000000..e262d8799b --- /dev/null +++ b/model/ietf/ietf-network/src/main/yang/ietf-network-topology@2015-06-08.yang @@ -0,0 +1,243 @@ +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 { + path "../../../nd:node/nd:node-id"; + } + mandatory true; + description + "Source node identifier, must be in same topology."; + } + leaf source-tp { + type leafref { + path "../../../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 { + path "../../../nd:node/nd:node-id"; + } + mandatory true; + description + "Destination node identifier, must be in the same + network."; + } + leaf dest-tp { + type leafref { + path "../../../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 { + path "../../../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 { + path "../../../nd:supporting-node/nd:network-ref"; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../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"; + } + } + } + } +} diff --git a/model/ietf/ietf-network/src/main/yang/ietf-network@2015-06-08.yang b/model/ietf/ietf-network/src/main/yang/ietf-network@2015-06-08.yang new file mode 100644 index 0000000000..c746343252 --- /dev/null +++ b/model/ietf/ietf-network/src/main/yang/ietf-network@2015-06-08.yang @@ -0,0 +1,144 @@ +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 { + 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."; + } + } + } + } +} diff --git a/model/ietf/pom.xml b/model/ietf/pom.xml index 0e2dbe6d6b..0afa038027 100644 --- a/model/ietf/pom.xml +++ b/model/ietf/pom.xml @@ -26,11 +26,15 @@ ietf-interfaces ietf-yang-types ietf-yang-types-20130715 + ietf-network + + ietf-ted ietf-topology ietf-topology-isis ietf-topology-l3-unicast-igp ietf-topology-ospf + ietf-restconf -- 2.36.6