Sync Common folder
[transportpce.git] / ordmodels / network / src / main / yang / ietf-network@2015-06-08.yang
index c7463432527dc71883f2722f1f2d9d4963646ac7..6e7282c82b39245c0b7d9789644989c6e2003b2d 100644 (file)
-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
+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.";
+        }
+      }
+    }
+  }
+}