Repackage RFC8345 Network Topologies 91/73591/4
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Jun 2018 21:56:14 +0000 (23:56 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 2 Jul 2018 13:28:26 +0000 (13:28 +0000)
This is an upgrade of ietf-network, which is not used anywhere
anymore to RFC8345 with proper modular artifacts.

JIRA: MDSAL-358
Change-Id: I898a1e7aa69d216972ce23dacb13f467ce6f9619
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 files changed:
model/artifacts/pom.xml
model/features/odl-mdsal-models/pom.xml
model/ietf/ietf-network/src/main/yang/ietf-network-topology@2015-06-08.yang [deleted file]
model/ietf/ietf-network/src/main/yang/ietf-network@2015-06-08.yang [deleted file]
model/ietf/pom.xml
model/ietf/rfc8345-ietf-network-state/pom.xml [new file with mode: 0644]
model/ietf/rfc8345-ietf-network-state/src/main/yang/ietf-network-state@2018-02-26.yang [new file with mode: 0644]
model/ietf/rfc8345-ietf-network-topology-state/pom.xml [new file with mode: 0644]
model/ietf/rfc8345-ietf-network-topology-state/src/main/yang/ietf-network-topology-state@2018-02-26.yang [new file with mode: 0644]
model/ietf/rfc8345-ietf-network-topology/pom.xml [new file with mode: 0644]
model/ietf/rfc8345-ietf-network-topology/src/main/yang/ietf-network-topology@2018-02-26.yang [new file with mode: 0644]
model/ietf/rfc8345-ietf-network/pom.xml [moved from model/ietf/ietf-network/pom.xml with 66% similarity]
model/ietf/rfc8345-ietf-network/src/main/yang/ietf-network@2018-02-26.yang [new file with mode: 0644]
model/ietf/rfc8345/pom.xml [new file with mode: 0644]

index 89fcc690dcdf0c0d4f5461c36680c047b509db1d..5ceee8de8e053f868964a759ad228a0cfbe98d12 100644 (file)
                 <version>1.0.0-SNAPSHOT</version>
             </dependency>
 
+            <!-- RFC8345 -->
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8345</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8345-ietf-network</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8345-ietf-network-state</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8345-ietf-network-topology</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8345-ietf-network-topology-state</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+
             <!-- draft-bierman-netconf-restconf-02 -->
             <!-- FIXME: upgrade to RFC8040 -->
             <dependency>
                 <artifactId>ietf-topology-l3-unicast</artifactId>
                 <version>${ietf.topology.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.opendaylight.mdsal.model</groupId>
-                <artifactId>ietf-network-2015-06-08</artifactId>
-                <version>1.5.0-SNAPSHOT</version>
-            </dependency>
             <dependency>
                 <groupId>org.opendaylight.mdsal.model</groupId>
                 <artifactId>ietf-lisp-address-types-2015-11-05</artifactId>
index e138a5ef607c179d7565effec24648883af693bf..fb69579424eb6ac507226a32d775352ef3426e6b 100644 (file)
             <groupId>${project.groupId}</groupId>
             <artifactId>ietf-topology-l3-unicast-igp</artifactId>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>ietf-network-2015-06-08</artifactId>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>ietf-inet-types-2013-07-15</artifactId>
             <groupId>${project.groupId}</groupId>
             <artifactId>rfc7895</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345</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
deleted file mode 100644 (file)
index e262d87..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-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
deleted file mode 100644 (file)
index c746343..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-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 543c630fde5d9ba5fd2ad555a38181a81992c855..4c6e22a1f04d8743d1185456a070a8a54f7fca3e 100644 (file)
         <!-- RFC7895 YANG Module Library -->
         <module>rfc7895</module>
 
+        <!-- RFC8345 Network Topologies -->
+        <module>rfc8345</module>
+        <module>rfc8345-ietf-network</module>
+        <module>rfc8345-ietf-network-state</module>
+        <module>rfc8345-ietf-network-topology</module>
+        <module>rfc8345-ietf-network-topology-state</module>
+
         <module>ietf-interfaces</module>
-        <module>ietf-network</module>
         <module>ietf-packet-fields</module>
         <module>ietf-access-control-list</module>
         <module>ietf-lisp-address-types</module>
diff --git a/model/ietf/rfc8345-ietf-network-state/pom.xml b/model/ietf/rfc8345-ietf-network-state/pom.xml
new file mode 100644 (file)
index 0000000..3797823
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2018 Pantheon Technologies, s.ro. 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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>binding-parent</artifactId>
+        <version>0.13.0-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8345-ietf-network-state</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8345 ietf-network for non-NMDA</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>mdsal-model-artifacts</artifactId>
+                <version>0.13.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345-ietf-network</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/model/ietf/rfc8345-ietf-network-state/src/main/yang/ietf-network-state@2018-02-26.yang b/model/ietf/rfc8345-ietf-network-state/src/main/yang/ietf-network-state@2018-02-26.yang
new file mode 100644 (file)
index 0000000..9a6893d
--- /dev/null
@@ -0,0 +1,176 @@
+module ietf-network-state {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:ietf-network-state";
+  prefix nw-s;
+
+  import ietf-network {
+    prefix nw;
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+
+  organization
+    "IETF I2RS (Interface to the Routing System) Working Group";
+
+  contact
+    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
+     WG List:   <mailto:i2rs@ietf.org>
+
+     Editor:    Alexander Clemm
+                <mailto:ludwig@clemm.org>
+
+     Editor:    Jan Medved
+                <mailto:jmedved@cisco.com>
+
+     Editor:    Robert Varga
+                <mailto:robert.varga@pantheon.tech>
+
+     Editor:    Nitin Bahadur
+                <mailto:nitin_bahadur@yahoo.com>
+     Editor:    Hariharan Ananthakrishnan
+                <mailto:hari@packetdesign.com>
+
+     Editor:    Xufeng Liu
+                <mailto:xufeng.liu.ietf@gmail.com>";
+
+  description
+    "This module defines a common base data model for a collection
+     of nodes in a network.  Node definitions are further used
+     in network topologies and inventories.  It represents
+     information that either (1) is learned and automatically
+     populated or (2) results from applying network information
+     that has been configured per the 'ietf-network' data model,
+     mirroring the corresponding data nodes in this data model.
+
+     The data model mirrors 'ietf-network' but contains only
+     read-only state data.  The data model is not needed when the
+     underlying implementation infrastructure supports the Network
+     Management Datastore Architecture (NMDA).
+
+     Copyright (c) 2018 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject
+     to the license terms contained in, the Simplified BSD License
+     set forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8345;
+     see the RFC itself for full legal notices.";
+
+  revision 2018-02-26 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+
+  grouping network-ref {
+    description
+      "Contains the information necessary to reference a network --
+       for example, an underlay network.";
+    leaf network-ref {
+      type leafref {
+        path "/nw-s:networks/nw-s:network/nw-s:network-id";
+      require-instance false;
+      }
+      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 "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+
+          "/../network-ref]/nw-s:node/nw-s:node-id";
+        require-instance false;
+      }
+      description
+        "Used to reference a node.
+         Nodes are identified relative to the network that
+         contains them.";
+    }
+    uses network-ref;
+  }
+
+  container networks {
+    config false;
+    description
+      "Serves as a top-level container for a list of networks.";
+    list network {
+      key "network-id";
+      description
+        "Describes a network.
+         A network typically contains an inventory of nodes,
+         topological information (augmented through the
+         network-topology data model), and 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 nw:network-id;
+        description
+          "Identifies a network.";
+      }
+      list supporting-network {
+        key "network-ref";
+        description
+          "An underlay network, used to represent layered network
+           topologies.";
+        leaf network-ref {
+          type leafref {
+            path "/nw-s:networks/nw-s:network/nw-s:network-id";
+          require-instance false;
+          }
+          description
+            "References the underlay network.";
+        }
+      }
+
+      list node {
+        key "node-id";
+        description
+          "The inventory of nodes of this network.";
+        leaf node-id {
+          type nw:node-id;
+          description
+            "Uniquely identifies a node within the containing
+             network.";
+        }
+        list supporting-node {
+          key "network-ref node-ref";
+          description
+            "Represents another node that is in an underlay network
+             and that supports this node.  Used to represent layering
+             structure.";
+          leaf network-ref {
+            type leafref {
+              path "../../../nw-s:supporting-network/nw-s:network-ref";
+            require-instance false;
+            }
+            description
+              "References the underlay network of which the
+               underlay node is a part.";
+          }
+          leaf node-ref {
+            type leafref {
+              path "/nw-s:networks/nw-s:network/nw-s:node/nw-s:node-id";
+            require-instance false;
+            }
+            description
+              "References the underlay node itself.";
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/model/ietf/rfc8345-ietf-network-topology-state/pom.xml b/model/ietf/rfc8345-ietf-network-topology-state/pom.xml
new file mode 100644 (file)
index 0000000..376a405
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2018 Pantheon Technologies, s.ro. 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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>binding-parent</artifactId>
+        <version>0.13.0-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8345-ietf-network-topology-state</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8345 ietf-network-topology for non-NMDA</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>mdsal-model-artifacts</artifactId>
+                <version>0.13.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345-ietf-network-state</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345-ietf-network-topology</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/model/ietf/rfc8345-ietf-network-topology-state/src/main/yang/ietf-network-topology-state@2018-02-26.yang b/model/ietf/rfc8345-ietf-network-topology-state/src/main/yang/ietf-network-topology-state@2018-02-26.yang
new file mode 100644 (file)
index 0000000..1c1ba1b
--- /dev/null
@@ -0,0 +1,273 @@
+module ietf-network-topology-state {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology-state";
+  prefix nt-s;
+
+  import ietf-network-state {
+    prefix nw-s;
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+  import ietf-network-topology {
+    prefix nt;
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+
+  organization
+    "IETF I2RS (Interface to the Routing System) Working Group";
+
+  contact
+    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
+     WG List:   <mailto:i2rs@ietf.org>
+
+     Editor:    Alexander Clemm
+                <mailto:ludwig@clemm.org>
+
+     Editor:    Jan Medved
+                <mailto:jmedved@cisco.com>
+
+     Editor:    Robert Varga
+                <mailto:robert.varga@pantheon.tech>
+
+     Editor:    Nitin Bahadur
+                <mailto:nitin_bahadur@yahoo.com>
+
+     Editor:    Hariharan Ananthakrishnan
+                <mailto:hari@packetdesign.com>
+
+     Editor:    Xufeng Liu
+                <mailto:xufeng.liu.ietf@gmail.com>";
+
+  description
+    "This module defines a common base data model for network
+     topology state, representing topology that either (1) is learned
+     or (2) results from applying topology that has been configured
+     per the 'ietf-network-topology' data model, mirroring the
+     corresponding data nodes in this data model.  It augments the
+     base network state data model with links to connect nodes, as
+     well as termination points to terminate links on nodes.
+
+     The data model mirrors 'ietf-network-topology' but contains only
+     read-only state data.  The data model is not needed when the
+     underlying implementation infrastructure supports the Network
+     Management Datastore Architecture (NMDA).
+
+     Copyright (c) 2018 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject
+     to the license terms contained in, the Simplified BSD License
+     set forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8345;
+     see the RFC itself for full legal notices.";
+
+  revision 2018-02-26 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+
+  grouping link-ref {
+    description
+      "References a link in a specific network.  Although this
+       grouping is not used in this module, it is defined here for
+       the convenience of augmenting modules.";
+    leaf link-ref {
+      type leafref {
+        path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+
+          "/../network-ref]/nt-s:link/nt-s:link-id";
+        require-instance false;
+      }
+      description
+        "A type for an absolute reference to a link instance.
+         (This type should not be used for relative references.
+         In such a case, a relative path should be used instead.)";
+    }
+    uses nw-s:network-ref;
+  }
+
+  grouping tp-ref {
+    description
+      "References a termination point in a specific node.  Although
+       this grouping is not used in this module, it is defined here
+       for the convenience of augmenting modules.";
+    leaf tp-ref {
+      type leafref {
+        path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+
+          "/../network-ref]/nw-s:node[nw-s:node-id=current()/../"+
+          "node-ref]/nt-s:termination-point/nt-s:tp-id";
+        require-instance false;
+      }
+      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 nw-s:node-ref;
+  }
+
+  augment "/nw-s:networks/nw-s:network" {
+    description
+      "Add links to the network data model.";
+    list link {
+      key "link-id";
+      description
+        "A network link connects a local (source) node and
+         a remote (destination) node via a set of the respective
+         node's termination points.  It is possible to have several
+         links between the same source and destination nodes.
+         Likewise, a link could potentially be re-homed between
+         termination points.  Therefore, in order 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.";
+      container source {
+        description
+          "This container holds the logical source of a particular
+           link.";
+        leaf source-node {
+          type leafref {
+            path "../../../nw-s:node/nw-s:node-id";
+            require-instance false;
+          }
+          description
+            "Source node identifier.  Must be in the same topology.";
+        }
+        leaf source-tp {
+          type leafref {
+            path "../../../nw-s:node[nw-s:node-id=current()/../"+
+              "source-node]/termination-point/tp-id";
+            require-instance false;
+          }
+          description
+            "This termination point is located within the source node
+             and terminates the link.";
+        }
+      }
+      container destination {
+        description
+          "This container holds the logical destination of a
+           particular link.";
+        leaf dest-node {
+          type leafref {
+            path "../../../nw-s:node/nw-s:node-id";
+          require-instance false;
+          }
+          description
+            "Destination node identifier.  Must be in the same
+             network.";
+        }
+
+        leaf dest-tp {
+          type leafref {
+            path "../../../nw-s:node[nw-s:node-id=current()/../"+
+              "dest-node]/termination-point/tp-id";
+            require-instance false;
+          }
+          description
+            "This termination point is located within the
+             destination node and terminates the link.";
+        }
+      }
+      leaf link-id {
+        type nt: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 on which this link depends.";
+        leaf network-ref {
+          type leafref {
+            path "../../../nw-s:supporting-network/nw-s:network-ref";
+          require-instance false;
+          }
+          description
+            "This leaf identifies in which underlay topology
+             the supporting link is present.";
+        }
+        leaf link-ref {
+          type leafref {
+            path "/nw-s:networks/nw-s:network[nw-s:network-id="+
+              "current()/../network-ref]/link/link-id";
+            require-instance false;
+          }
+          description
+            "This leaf identifies a link that 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 "/nw-s:networks/nw-s:network/nw-s:node" {
+    description
+      "Augments termination points that 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 nt:tp-id;
+        description
+          "Termination point identifier.";
+      }
+      list supporting-termination-point {
+        key "network-ref node-ref tp-ref";
+        description
+          "This list identifies any termination points on which a
+           given termination point depends or onto which it maps.
+           Those termination points will themselves be contained
+           in a supporting node.  This dependency information can be
+           inferred from the dependencies between links.  Therefore,
+           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 "../../../nw-s:supporting-node/nw-s:network-ref";
+          require-instance false;
+          }
+          description
+            "This leaf identifies in which topology the
+             supporting termination point is present.";
+        }
+        leaf node-ref {
+          type leafref {
+            path "../../../nw-s:supporting-node/nw-s:node-ref";
+          require-instance false;
+          }
+          description
+            "This leaf identifies in which node the supporting
+             termination point is present.";
+        }
+
+        leaf tp-ref {
+          type leafref {
+            path "/nw-s:networks/nw-s:network[nw-s:network-id="+
+              "current()/../network-ref]/nw-s:node[nw-s:node-id="+
+              "current()/../node-ref]/termination-point/tp-id";
+            require-instance false;
+          }
+          description
+            "Reference to the underlay node (the underlay node must
+             be in a different topology).";
+        }
+      }
+    }
+  }
+}
diff --git a/model/ietf/rfc8345-ietf-network-topology/pom.xml b/model/ietf/rfc8345-ietf-network-topology/pom.xml
new file mode 100644 (file)
index 0000000..ee5f9cf
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2018 Pantheon Technologies, s.ro. 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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>binding-parent</artifactId>
+        <version>0.13.0-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8345-ietf-network-topology</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8345 ietf-network-topology</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>mdsal-model-artifacts</artifactId>
+                <version>0.13.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345-ietf-network</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/model/ietf/rfc8345-ietf-network-topology/src/main/yang/ietf-network-topology@2018-02-26.yang b/model/ietf/rfc8345-ietf-network-topology/src/main/yang/ietf-network-topology@2018-02-26.yang
new file mode 100644 (file)
index 0000000..1ec944d
--- /dev/null
@@ -0,0 +1,294 @@
+module ietf-network-topology {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";
+  prefix nt;
+
+  import ietf-inet-types {
+    prefix inet;
+    reference
+      "RFC 6991: Common YANG Data Types";
+  }
+  import ietf-network {
+    prefix nw;
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+
+  organization
+    "IETF I2RS (Interface to the Routing System) Working Group";
+
+  contact
+    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
+     WG List:   <mailto:i2rs@ietf.org>
+
+     Editor:    Alexander Clemm
+                <mailto:ludwig@clemm.org>
+
+     Editor:    Jan Medved
+                <mailto:jmedved@cisco.com>
+
+     Editor:    Robert Varga
+                <mailto:robert.varga@pantheon.tech>
+
+     Editor:    Nitin Bahadur
+                <mailto:nitin_bahadur@yahoo.com>
+
+     Editor:    Hariharan Ananthakrishnan
+                <mailto:hari@packetdesign.com>
+
+     Editor:    Xufeng Liu
+                <mailto:xufeng.liu.ietf@gmail.com>";
+
+  description
+    "This module defines a common base model for a network topology,
+     augmenting the base network data model with links to connect
+     nodes, as well as termination points to terminate links
+     on nodes.
+
+     Copyright (c) 2018 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject
+     to the license terms contained in, the Simplified BSD License
+     set forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8345;
+     see the RFC itself for full legal notices.";
+
+  revision 2018-02-26 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+
+  typedef link-id {
+    type inet:uri;
+    description
+      "An identifier for a link in a topology.  The precise
+       structure of the link-id will be up to the implementation.
+       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 data 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 of which the link is
+       a part.";
+  }
+
+  typedef tp-id {
+    type inet:uri;
+    description
+      "An identifier for termination points on a node.  The precise
+       structure of the tp-id will be up to the implementation.
+       The identifier SHOULD be chosen such that the same termination
+       point in a real network topology will always be identified
+       through the same identifier, even if the data model is
+       instantiated in separate datastores.  An implementation MAY
+       choose to capture semantics in the identifier -- for example,
+       to indicate the type of termination point and/or the type of
+       node that contains the termination point.";
+  }
+
+  grouping link-ref {
+    description
+      "This grouping can be used to reference a link in a specific
+       network.  Although it is not used in this module, it is
+       defined here for the convenience of augmenting modules.";
+    leaf link-ref {
+      type leafref {
+        path "/nw:networks/nw:network[nw:network-id=current()/../"+
+          "network-ref]/nt:link/nt:link-id";
+        require-instance false;
+      }
+      description
+        "A type for an absolute reference to a link instance.
+         (This type should not be used for relative references.
+         In such a case, a relative path should be used instead.)";
+    }
+    uses nw:network-ref;
+  }
+
+  grouping tp-ref {
+    description
+      "This grouping can be used to reference a termination point
+       in a specific node.  Although it is not used in this module,
+       it is defined here for the convenience of augmenting
+       modules.";
+    leaf tp-ref {
+      type leafref {
+        path "/nw:networks/nw:network[nw:network-id=current()/../"+
+          "network-ref]/nw:node[nw:node-id=current()/../"+
+          "node-ref]/nt:termination-point/nt:tp-id";
+        require-instance false;
+      }
+      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 nw:node-ref;
+  }
+
+  augment "/nw:networks/nw:network" {
+    description
+      "Add links to the network data model.";
+    list link {
+      key "link-id";
+      description
+        "A network link connects a local (source) node and
+         a remote (destination) node via a set of the respective
+         node's termination points.  It is possible to have several
+         links between the same source and destination nodes.
+         Likewise, a link could potentially be re-homed between
+         termination points.  Therefore, in order 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.";
+      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 {
+        description
+          "This container holds the logical source of a particular
+           link.";
+        leaf source-node {
+          type leafref {
+            path "../../../nw:node/nw:node-id";
+            require-instance false;
+          }
+          description
+            "Source node identifier.  Must be in the same topology.";
+        }
+        leaf source-tp {
+          type leafref {
+            path "../../../nw:node[nw:node-id=current()/../"+
+              "source-node]/termination-point/tp-id";
+            require-instance false;
+          }
+          description
+            "This termination point is located within the source node
+             and terminates the link.";
+        }
+      }
+
+      container destination {
+        description
+          "This container holds the logical destination of a
+           particular link.";
+        leaf dest-node {
+          type leafref {
+            path "../../../nw:node/nw:node-id";
+          require-instance false;
+          }
+          description
+            "Destination node identifier.  Must be in the same
+             network.";
+        }
+        leaf dest-tp {
+          type leafref {
+            path "../../../nw:node[nw:node-id=current()/../"+
+              "dest-node]/termination-point/tp-id";
+            require-instance false;
+          }
+          description
+            "This termination point is located within the
+             destination node and terminates the link.";
+        }
+      }
+      list supporting-link {
+        key "network-ref link-ref";
+        description
+          "Identifies the link or links on which this link depends.";
+        leaf network-ref {
+          type leafref {
+            path "../../../nw:supporting-network/nw:network-ref";
+          require-instance false;
+          }
+          description
+            "This leaf identifies in which underlay topology
+             the supporting link is present.";
+        }
+
+        leaf link-ref {
+          type leafref {
+            path "/nw:networks/nw:network[nw:network-id=current()/"+
+              "../network-ref]/link/link-id";
+            require-instance false;
+          }
+          description
+            "This leaf identifies a link that 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 "/nw:networks/nw:network/nw:node" {
+    description
+      "Augments termination points that 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
+          "This list identifies any termination points on which a
+           given termination point depends or onto which it maps.
+           Those termination points will themselves be contained
+           in a supporting node.  This dependency information can be
+           inferred from the dependencies between links.  Therefore,
+           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 "../../../nw:supporting-node/nw:network-ref";
+          require-instance false;
+          }
+          description
+            "This leaf identifies in which topology the
+             supporting termination point is present.";
+        }
+        leaf node-ref {
+          type leafref {
+            path "../../../nw:supporting-node/nw:node-ref";
+          require-instance false;
+          }
+          description
+            "This leaf identifies in which node the supporting
+             termination point is present.";
+        }
+        leaf tp-ref {
+          type leafref {
+            path "/nw:networks/nw:network[nw:network-id=current()/"+
+              "../network-ref]/nw:node[nw:node-id=current()/../"+
+              "node-ref]/termination-point/tp-id";
+            require-instance false;
+          }
+          description
+            "Reference to the underlay node (the underlay node must
+             be in a different topology).";
+        }
+      }
+    }
+  }
+}
similarity index 66%
rename from model/ietf/ietf-network/pom.xml
rename to model/ietf/rfc8345-ietf-network/pom.xml
index fc6c4ccfc64ab720ef26a97e378f447d0aeb1884..e80bfb21913935c3d5fff8de81dcc3c97a1b6e5b 100644 (file)
@@ -1,14 +1,16 @@
 <?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.
+ Copyright (c) 2018 Pantheon Technologies, s.ro. 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">
-
+<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">
+    <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
         <relativePath>../../../binding/binding-parent</relativePath>
     </parent>
 
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.opendaylight.mdsal.model</groupId>
-    <artifactId>ietf-network-2015-06-08</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8345-ietf-network</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
+
     <name>${project.artifactId}</name>
-    <description>${project.artifactId}</description>
+    <description>RFC8345 ietf-network</description>
 
     <dependencyManagement>
         <dependencies>
@@ -41,9 +43,5 @@
             <groupId>org.opendaylight.mdsal.model</groupId>
             <artifactId>ietf-inet-types-2013-07-15</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.mdsal.model</groupId>
-            <artifactId>ietf-yang-types-20130715</artifactId>
-        </dependency>
     </dependencies>
 </project>
diff --git a/model/ietf/rfc8345-ietf-network/src/main/yang/ietf-network@2018-02-26.yang b/model/ietf/rfc8345-ietf-network/src/main/yang/ietf-network@2018-02-26.yang
new file mode 100644 (file)
index 0000000..6a03d7e
--- /dev/null
@@ -0,0 +1,192 @@
+module ietf-network {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:ietf-network";
+  prefix nw;
+
+  import ietf-inet-types {
+    prefix inet;
+    reference
+      "RFC 6991: Common YANG Data Types";
+  }
+
+  organization
+    "IETF I2RS (Interface to the Routing System) Working Group";
+
+  contact
+    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
+     WG List:   <mailto:i2rs@ietf.org>
+
+     Editor:    Alexander Clemm
+                <mailto:ludwig@clemm.org>
+
+     Editor:    Jan Medved
+                <mailto:jmedved@cisco.com>
+
+     Editor:    Robert Varga
+                <mailto:robert.varga@pantheon.tech>
+
+     Editor:    Nitin Bahadur
+                <mailto:nitin_bahadur@yahoo.com>
+
+     Editor:    Hariharan Ananthakrishnan
+                <mailto:hari@packetdesign.com>
+
+     Editor:    Xufeng Liu
+                <mailto:xufeng.liu.ietf@gmail.com>";
+  description
+    "This module defines a common base data model for a collection
+     of nodes in a network.  Node definitions are further used
+     in network topologies and inventories.
+
+     Copyright (c) 2018 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject
+     to the license terms contained in, the Simplified BSD License
+     set forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8345;
+     see the RFC itself for full legal notices.";
+
+  revision 2018-02-26 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+
+  typedef node-id {
+    type inet:uri;
+    description
+      "Identifier for a node.  The precise structure of the node-id
+       will be up to the implementation.  For example, some
+       implementations MAY pick a URI that includes the network-id
+       as part of the path.  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 data model is instantiated in separate datastores.  An
+       implementation MAY choose to capture semantics in the
+       identifier -- for example, to indicate the type of node.";
+  }
+
+  typedef network-id {
+    type inet:uri;
+    description
+      "Identifier for a network.  The precise structure of the
+       network-id will be up to the implementation.  The identifier
+       SHOULD be chosen such that the same network will always be
+       identified through the same identifier, even if the data model
+       is instantiated in separate datastores.  An implementation MAY
+       choose to capture semantics in the identifier -- for example,
+       to indicate the type of network.";
+  }
+
+  grouping network-ref {
+    description
+      "Contains the information necessary to reference a network --
+       for example, an underlay network.";
+    leaf network-ref {
+      type leafref {
+        path "/nw:networks/nw:network/nw:network-id";
+      require-instance false;
+      }
+      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 "/nw:networks/nw:network[nw:network-id=current()/../"+
+          "network-ref]/nw:node/nw:node-id";
+        require-instance false;
+      }
+      description
+        "Used to reference a node.
+         Nodes are identified relative to the network that
+         contains them.";
+    }
+    uses network-ref;
+  }
+
+  container networks {
+    description
+      "Serves as a top-level container for a list of networks.";
+    list network {
+      key "network-id";
+      description
+        "Describes a network.
+         A network typically contains an inventory of nodes,
+         topological information (augmented through the
+         network-topology data model), and layering information.";
+      leaf network-id {
+        type network-id;
+        description
+          "Identifies a network.";
+      }
+      container network-types {
+        description
+          "Serves as an augmentation target.
+           The network type is indicated through corresponding
+           presence containers augmented into this container.";
+      }
+      list supporting-network {
+        key "network-ref";
+        description
+          "An underlay network, used to represent layered network
+           topologies.";
+        leaf network-ref {
+          type leafref {
+            path "/nw:networks/nw:network/nw:network-id";
+          require-instance false;
+          }
+          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
+            "Uniquely identifies a node within the containing
+             network.";
+        }
+        list supporting-node {
+          key "network-ref node-ref";
+          description
+            "Represents another node that is in an underlay network
+             and that supports this node.  Used to represent layering
+             structure.";
+          leaf network-ref {
+            type leafref {
+              path "../../../nw:supporting-network/nw:network-ref";
+            require-instance false;
+            }
+            description
+              "References the underlay network of which the
+               underlay node is a part.";
+          }
+          leaf node-ref {
+            type leafref {
+              path "/nw:networks/nw:network/nw:node/nw:node-id";
+            require-instance false;
+            }
+            description
+              "References the underlay node itself.";
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/model/ietf/rfc8345/pom.xml b/model/ietf/rfc8345/pom.xml
new file mode 100644 (file)
index 0000000..4a90414
--- /dev/null
@@ -0,0 +1,49 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>bundle-parent</artifactId>
+        <version>3.1.2</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8345</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8345 Network Topologies</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>mdsal-model-artifacts</artifactId>
+                <version>0.13.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345-ietf-network</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345-ietf-network-topology</artifactId>
+        </dependency>
+    </dependencies>
+</project>