Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / x-ran / xran-externalio.yang
diff --git a/ntsimulator/yang/x-ran/xran-externalio.yang b/ntsimulator/yang/x-ran/xran-externalio.yang
new file mode 100644 (file)
index 0000000..a78a710
--- /dev/null
@@ -0,0 +1,144 @@
+module xran-externalio {
+  yang-version 1.1;
+  namespace "urn:xran:external-io:1.0";
+  prefix "xran-io";
+
+  organization "xRAN Forum";
+
+  contact
+    "www.xran.org";
+
+  description
+    "This module defines the input state and output configuration for
+    the xRAN Radio Unit external IO.
+
+    Copyright 2018 the xRAN Forum.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+    POSSIBILITY OF SUCH DAMAGE.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the above disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the above disclaimer in the documentation
+    and/or other materials provided with the distribution.
+    * Neither the Members of the xRAN Forum nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.";
+
+  revision "2018-07-20" {
+    description
+      "version 1.0.0 - First release of the xRAN YANG M-Plane models.
+
+      This version of the model supports v01.00 of the corrsponding xRAN
+      M-Plane Specification.";
+    reference "XRAN-FH.MP.0-v01.00";
+  }
+
+  container external-io {
+    description
+      "External IO information.";
+    list input {
+      key "name";
+      config false;
+      description
+        "Leaf nodes describing external line inputs";
+      leaf name {
+        type string {
+          length "1..255";
+        }
+        description
+        "A name that is unique across the RU that identifies an input port instance.
+        This name may be used in fault management to refer to a fault source
+        or affected object";
+      }
+      leaf port-in {
+        type uint8;
+        description
+          "A number which identifies an external input port.";
+      }
+
+      leaf line-in {
+        type boolean;
+        default true;
+        description
+          "Value TRUE indicates that circuit is open.
+           Value FALSE indicates that circuit is closed.
+
+           Usually when nothing is connected to the line the value is TRUE.
+           The details of external line-in implementation are HW specific.";
+      }
+    }
+
+    list output {
+      key "name";
+      description
+        "Leaf nodes describing external line outputs";
+      leaf name {
+        type string {
+          length "1..255";
+        }
+        description
+          "A name that is unique across the RU that identifies an output port instance.
+          This name may be used in fault management to refer to a fault source
+          or affected object";
+      }
+      leaf port-out {
+        type uint8;
+        mandatory true;
+        description
+          "A number which identifies an external output port.";
+      }
+
+      leaf line-out {
+        type boolean;
+        default true;
+        description
+          "Value TRUE indicates that circuit is in its natural state.
+           Value FALSE indicates that circuit is not in its natural state.";
+      }
+    }
+  }
+
+  notification external-input-change {
+    description
+      "Notification used to indicate that external line input has changed state";
+    container current-input-notification {
+      description "a container for the state of the input ports";
+      list external-input {
+        key "name";
+        description "a list of the input ports and their state";
+        leaf name{
+          type leafref{
+            path "/external-io/input/name";
+          }
+          description "the name of the ald-port";
+        }
+        leaf io-port {
+          type leafref{
+            path  "/external-io/input/port-in";
+          }
+          description "the external input port";
+        }
+        leaf line-in {
+          type leafref{
+            path  "/external-io/input/line-in";
+          }
+          description "the state of the external input port";
+        }
+      }
+    }
+  }
+}