Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / x-ran / xran-usermgmt.yang
diff --git a/ntsimulator/yang/x-ran/xran-usermgmt.yang b/ntsimulator/yang/x-ran/xran-usermgmt.yang
new file mode 100644 (file)
index 0000000..9de1d90
--- /dev/null
@@ -0,0 +1,101 @@
+module xran-usermgmt {
+  yang-version 1.1;
+  namespace "urn:xran:user-mgmt:1.0";
+  prefix "xran-usermgmt";
+
+  // import openroadm user management
+  import org-openroadm-user-mgmt {
+    prefix openroadm;
+    revision-date 2017-12-15;
+  }
+
+  organization "xRAN Forum";
+
+  contact
+    "www.xran.org";
+
+  description
+    "This module defines the user management model for the xRAN Radio Unit.
+    The model is an augmentation of the user management model defined by
+    the openroadm MSA.
+
+    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";
+  }
+
+  grouping extended-xran-groups {
+    description
+      "New user permissions defined by xran.
+      Imported openroadm model only supports 'sudo' superuser permissions.";
+    leaf-list xran-group {
+      type enumeration {
+        enum nms {
+          description "Network Management System permissions";
+        }
+        enum fm-pm {
+          description
+            "permissions for fault and  performance management.";
+        }
+        enum swm {
+          description
+            "permissions for software managemet.";
+        }
+      }
+      description
+        "new group privileges defined by xRAN - a non sudo account may have
+        multiple group privileges.
+
+        See the xRAN management Plane specification for a list of YANG module
+        privileges";
+    }
+  }
+
+  container xran-user-profile {
+    description "baseline open-roadm user profile";
+    uses openroadm:user-profile;
+  }
+
+  augment "/xran-usermgmt:xran-user-profile/xran-usermgmt:user" {
+    description "add in new xran user group permissions";
+    uses extended-xran-groups;
+    leaf enabled {
+      type boolean;
+      must "count(../enabled='true') > 0" {
+        error-message "At least one account needs to be enabled.";
+      }
+      description
+        "Indicates whether an account is enabled or disabled.";
+    }
+  }
+}