Bug 3654: Introduction of latest topology model 99/27599/5
authorTony Tkacik <ttkacik@cisco.com>
Tue, 29 Sep 2015 16:40:12 +0000 (18:40 +0200)
committerRobert Varga <rovarga@cisco.com>
Tue, 29 Sep 2015 18:34:59 +0000 (20:34 +0200)
Introduced latest revision of ietf-network model.

Change-Id: If83d5646c881c1cf1424317e75c5bd81c36e06dd
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
model/artifacts/pom.xml
model/features/pom.xml
model/features/src/main/features/features.xml
model/ietf/ietf-network/pom.xml [new file with mode: 0644]
model/ietf/ietf-network/src/main/yang/ietf-network-topology@2015-06-08.yang [new file with mode: 0644]
model/ietf/ietf-network/src/main/yang/ietf-network@2015-06-08.yang [new file with mode: 0644]
model/ietf/pom.xml

index fc9f83c2a3d6bb0c3d6aee20b079d85c6e5533a0..9bd115054c47faab1d6093fe745528e5106a8e65 100644 (file)
                 <artifactId>opendaylight-l2-types</artifactId>
                 <version>2013.08.27.8-SNAPSHOT</version>
             </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>ietf-network-2015-06-08</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
 
         </dependencies>
     </dependencyManagement>
index c4b2605a8240e6f135ea1a96a128c80828ecb6d3..41499d20167db024cb66c386a0ea36e099f6d262 100644 (file)
             <groupId>org.opendaylight.mdsal.model</groupId>
             <artifactId>ietf-topology-l3-unicast-igp</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>ietf-network-2015-06-08</artifactId>
+        </dependency>
     </dependencies>
 </project>
index 6552c70d8392bf552406dc46eb06d966b94220c7..35b567d64137a206c7b5475e0dbef70e29ba647d 100644 (file)
@@ -29,6 +29,7 @@
         <bundle>mvn:org.opendaylight.mdsal.model/ietf-topology-isis/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.mdsal.model/ietf-topology-ospf/{{VERSION}}</bundle>
         <bundle>mvn:org.opendaylight.mdsal.model/ietf-topology-l3-unicast-igp/{{VERSION}}</bundle>
+        <bundle>mvn:org.opendaylight.mdsal.model/ietf-network-2015-06-08/{{VERSION}}</bundle>
     </feature>
 
 </features>
diff --git a/model/ietf/ietf-network/pom.xml b/model/ietf/ietf-network/pom.xml
new file mode 100644 (file)
index 0000000..2c92fdc
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2013 Cisco Systems, Inc. and others.  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
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>model-ietf</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>ietf-network-2015-06-08</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  <modelVersion>4.0.0</modelVersion>
+  <name>${project.artifactId}</name>
+  <description>${project.artifactId}</description>
+
+  <dependencyManagement>
+      <dependencies>
+      <dependency>
+        <groupId>org.opendaylight.mdsal.model</groupId>
+        <artifactId>mdsal-model-artifacts</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+      <dependency>
+          <groupId>org.opendaylight.mdsal.model</groupId>
+          <artifactId>ietf-inet-types</artifactId>
+      </dependency>
+      <dependency>
+          <groupId>org.opendaylight.mdsal.model</groupId>
+          <artifactId>ietf-yang-types</artifactId>
+      </dependency>
+  </dependencies>
+
+</project>
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 (file)
index 0000000..e262d87
--- /dev/null
@@ -0,0 +1,243 @@
+module ietf-network-topology {\r
+  yang-version 1;\r
+  namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";\r
+  prefix lnk;\r
+\r
+  import ietf-inet-types {\r
+    prefix inet;\r
+  }\r
+  import ietf-network {\r
+    prefix nd;\r
+  }\r
+\r
+  organization "TBD";\r
+  contact\r
+    "WILL-BE-DEFINED-LATER";\r
+  description\r
+    "This module defines a common base model for network topology, \r
+     augmenting the base network model with links to connect nodes, \r
+     as well as termination points to terminate links on nodes.";\r
+\r
+  revision 2015-06-08 {\r
+    description\r
+      "Initial revision.";\r
+    reference "draft-ietf-i2rs-yang-network-topo-01";\r
+  }\r
+\r
+  typedef link-id {\r
+    type inet:uri;\r
+    description\r
+      "An identifier for a link in a topology.\r
+       The identifier may be opaque.\r
+       The identifier SHOULD be chosen such that the same link in a\r
+       real network topology will always be identified through the\r
+       same identifier, even if the model is instantiated in \r
+          separate datastores. An implementation MAY choose to capture\r
+       semantics in the identifier, for example to indicate the type\r
+       of link and/or the type of topology that the link is a part \r
+       of.";\r
+  }\r
+\r
+  typedef tp-id {\r
+    type inet:uri;\r
+    description\r
+      "An identifier for termination points on a node.\r
+       The identifier may be opaque.\r
+       The identifier SHOULD be chosen such that the same TP in a\r
+       real network topology will always be identified through the\r
+       same identifier, even if the model is instantiated in\r
+       separate datastores. An implementation MAY choose to capture\r
+       semantics in the identifier, for example to indicate the type\r
+       of TP and/or the type of node and topology that the TP is a \r
+       part of.";\r
+  }\r
+\r
+  grouping link-ref {\r
+    description\r
+      "References a link in a specific network.";\r
+    leaf link-ref {\r
+      type leafref {\r
+        path "/nd:network[nd:network-id=current()/../"+\r
+          "nd:network-ref]/link/link-id";\r
+      }\r
+      description\r
+        "A type for an absolute reference a link instance.\r
+         (This type should not be used for relative references.\r
+         In such a case, a relative path should be used instead.)";\r
+    }\r
+    uses nd:network-ref;\r
+  }\r
+\r
+  grouping tp-ref {\r
+    description\r
+      "References a termination point in a specific node.";\r
+    leaf tp-ref {\r
+      type leafref {\r
+        path "/nd:network[nd:network-id=current()/../"+\r
+          "nd:network-ref]/nd:node[nd:node-id=current()/../"+\r
+          "nd:node-ref]/termination-point/tp-id";\r
+      }\r
+      description\r
+        "A type for an absolute reference to a termination point.\r
+         (This type should not be used for relative references.\r
+         In such a case, a relative path should be used instead.)";\r
+    }\r
+    uses nd:node-ref;\r
+  }\r
+\r
+  augment "/nd:network" {\r
+    description \r
+      "Add links to the network model.";\r
+    list link {\r
+      key "link-id";\r
+      description\r
+        "A Network Link connects a by Local (Source) node and\r
+         a Remote (Destination) Network Nodes via a set of the\r
+         nodes' termination points.\r
+         As it is possible to have several links between the same\r
+         source and destination nodes, and as a link could\r
+         potentially be re-homed between termination points, to\r
+         ensure that we would always know to distinguish between\r
+         links, every link is identified by a dedicated link\r
+         identifier.\r
+         Note that a link models a point-to-point link, not a\r
+         multipoint link.\r
+         Layering dependencies on links in underlay topologies are\r
+         not represented as the layering information of nodes and of\r
+         termination points is sufficient.";\r
+      container source {\r
+        description\r
+          "This container holds the logical source of a particular\r
+           link.";\r
+        leaf source-node {\r
+          type leafref {\r
+            path "../../../nd:node/nd:node-id";\r
+          }\r
+          mandatory true;\r
+          description\r
+            "Source node identifier, must be in same topology.";\r
+        }\r
+        leaf source-tp {\r
+          type leafref {\r
+            path "../../../nd:node[nd:node-id=current()/../"+\r
+              "source-node]/termination-point/tp-id";\r
+          }\r
+          description\r
+            "Termination point within source node that terminates\r
+             the link.";\r
+        }\r
+      }\r
+      container destination {\r
+        description\r
+          "This container holds the logical destination of a\r
+           particular link.";\r
+        leaf dest-node {\r
+          type leafref {\r
+            path "../../../nd:node/nd:node-id";\r
+          }\r
+          mandatory true;\r
+          description\r
+            "Destination node identifier, must be in the same\r
+             network.";\r
+        }\r
+        leaf dest-tp {\r
+          type leafref {\r
+            path "../../../nd:node[nd:node-id=current()/../"+\r
+              "dest-node]/termination-point/tp-id";\r
+          }\r
+          description\r
+            "Termination point within destination node that\r
+             terminates the link.";\r
+        }\r
+      }\r
+      leaf link-id {\r
+        type link-id;\r
+        description\r
+          "The identifier of a link in the topology.\r
+           A link is specific to a topology to which it belongs.";\r
+      }\r
+      list supporting-link {\r
+        key "network-ref link-ref";\r
+        description\r
+          "Identifies the link, or links, that this link\r
+           is dependent on.";\r
+        leaf network-ref {\r
+          type leafref {\r
+            path "../../../nd:supporting-network/nd:network-ref";\r
+          }\r
+          description\r
+            "This leaf identifies in which underlay topology\r
+             supporting link is present.";\r
+        }\r
+        leaf link-ref {\r
+          type leafref {\r
+            path "/nd:network[nd:network-id=current()/.."+\r
+              "/network-ref]/link/link-id";\r
+          }\r
+          description\r
+            "This leaf identifies a link which is a part\r
+             of this link's underlay. Reference loops, in which\r
+             a link identifies itself as its underlay, either\r
+             directly or transitively, are not allowed.";\r
+        }\r
+      }\r
+    }\r
+  }\r
+  augment "/nd:network/nd:node" {\r
+    description\r
+      "Augment termination points which terminate links.  \r
+       Termination points can ultimately be mapped to interfaces.";\r
+    list termination-point {\r
+      key "tp-id";\r
+      description\r
+        "A termination point can terminate a link.\r
+         Depending on the type of topology, a termination point\r
+         could, for example, refer to a port or an interface.";\r
+      leaf tp-id {\r
+        type tp-id;\r
+        description\r
+          "Termination point identifier.";\r
+      }\r
+      list supporting-termination-point {\r
+        key "network-ref node-ref tp-ref";\r
+        description\r
+          "The leaf list identifies any termination points that\r
+           the termination point is dependent on, or maps onto.\r
+           Those termination points will themselves be contained\r
+           in a supporting node.\r
+           This dependency information can be inferred from\r
+           the dependencies between links.  For this reason,\r
+           this item is not separately configurable.  Hence no\r
+           corresponding constraint needs to be articulated.\r
+           The corresponding information is simply provided by the\r
+           implementing system.";\r
+        leaf network-ref {\r
+          type leafref {\r
+            path "../../../nd:supporting-node/nd:network-ref";\r
+          }\r
+          description\r
+            "This leaf identifies in which topology the\r
+             supporting termination point is present.";\r
+        }\r
+        leaf node-ref {\r
+          type leafref {\r
+            path "../../../nd:supporting-node/nd:node-ref";\r
+          }\r
+          description\r
+            "This leaf identifies in which node the supporting\r
+             termination point is present.";\r
+        }\r
+        leaf tp-ref {\r
+          type leafref {\r
+            path "/nd:network[nd:network-id=current()/../"+\r
+              "network-ref]/nd:node[nd:node-id=current()/../"+\r
+              "node-ref]/termination-point/tp-id";\r
+          }\r
+          description\r
+            "Reference to the underlay node, must be in a\r
+             different topology";\r
+        }\r
+      }\r
+    }\r
+  }\r
+}\r
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 (file)
index 0000000..c746343
--- /dev/null
@@ -0,0 +1,144 @@
+module ietf-network {\r
+  yang-version 1;\r
+  namespace "urn:ietf:params:xml:ns:yang:ietf-network";\r
+  prefix nd;\r
+\r
+  import ietf-inet-types {\r
+    prefix inet;\r
+  }\r
+\r
+  organization "TBD";\r
+  contact\r
+    "WILL-BE-DEFINED-LATER";\r
+  description\r
+    "This module defines a common base model for a collection \r
+     of nodes in a network. Node definitions s are further used\r
+     in network topologies and inventories.";\r
+\r
+  revision 2015-06-08 {\r
+    description\r
+      "Initial revision.";\r
+    reference "draft-ietf-i2rs-yang-network-topo-01";\r
+  }\r
+\r
+  typedef node-id {\r
+    type inet:uri;\r
+    description\r
+      "Identifier for a node.";\r
+  }\r
+\r
+  typedef network-id {\r
+    type inet:uri;\r
+    description\r
+      "Identifier for a network.";\r
+  }\r
+\r
+  grouping network-ref {\r
+    description\r
+      "Contains the information necessary to reference a network,\r
+       for example an underlay network.";\r
+    leaf network-ref {\r
+      type leafref {\r
+        path "/network/network-id";\r
+      }\r
+      description\r
+        "Used to reference a network, for example an underlay\r
+         network.";\r
+    }\r
+  }\r
+\r
+  grouping node-ref {\r
+    description \r
+      "Contains the information necessary to reference a node.";\r
+    leaf node-ref {\r
+      type leafref {\r
+        path "/network[network-id=current()/../network-ref]"+\r
+          "/node/node-id";\r
+      }\r
+      description\r
+        "Used to reference a node.  \r
+         Nodes are identified relative to the network they are\r
+         contained in.";\r
+    }\r
+    uses network-ref;\r
+  }\r
+\r
+  list network {\r
+    key "network-id";\r
+    description\r
+      "Describes a network.\r
+       A network typically contains an inventory of nodes,\r
+       topological information (augmented through \r
+       network-topology model), as well as layering \r
+       information.";\r
+    container network-types {\r
+      description\r
+        "Serves as an augmentation target.  \r
+         The network type is indicated through corresponding\r
+         presence containers augmented into this container.";\r
+    }\r
+    leaf network-id {\r
+      type network-id;\r
+      description\r
+        "Identifies a network.";\r
+    }\r
+    leaf server-provided {\r
+      type boolean;\r
+      config false;\r
+      description\r
+        "Indicates whether the information concerning this\r
+         particular network is populated by the server \r
+         (server-provided true, the general case for network \r
+         information discovered from the server), \r
+         or whether it is configured by a client \r
+         (server-provided true, possible e.g. for \r
+         service overlays managed through a controller).";\r
+    }\r
+    list supporting-network {\r
+      key "network-ref";\r
+      description\r
+        "An underlay network, used to represent layered network\r
+         topologies.";\r
+      leaf network-ref {\r
+        type leafref {\r
+          path "/network/network-id";\r
+        }\r
+        description\r
+          "References the underlay network.";\r
+      }\r
+    }\r
+    list node {\r
+      key "node-id";\r
+      description\r
+        "The inventory of nodes of this network.";\r
+      leaf node-id {\r
+        type node-id;\r
+        description\r
+          "Identifies a node uniquely within the containing \r
+           network.";\r
+      }\r
+      list supporting-node {\r
+        key "network-ref node-ref";\r
+        description\r
+          "Represents another node, in an underlay network, that \r
+           this node is supported by.  Used to represent layering \r
+           structure.";\r
+        leaf network-ref {\r
+          type leafref {\r
+            path "../../../supporting-network/network-ref";\r
+          }\r
+          description\r
+            "References the underlay network that the \r
+             underlay node is part of.";\r
+        }\r
+        leaf node-ref {\r
+          type leafref {\r
+            path "/network/node/node-id";\r
+          }\r
+          description\r
+            "References the underlay node itself.";\r
+        }\r
+      }\r
+    }\r
+  }\r
+}\r
index 0e2dbe6d6bd145e5934268a4e53a8c825889fdb9..0afa038027c96d22c0e61a1107142315f59f9580 100644 (file)
         <module>ietf-interfaces</module>
         <module>ietf-yang-types</module>
         <module>ietf-yang-types-20130715</module>
+        <module>ietf-network</module>
+
+        <!-- Legacy IETF topology models -->
         <module>ietf-ted</module>
         <module>ietf-topology</module>
         <module>ietf-topology-isis</module>
         <module>ietf-topology-l3-unicast-igp</module>
         <module>ietf-topology-ospf</module>
+
         <module>ietf-restconf</module>
     </modules>
 </project>