Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / x-ran / xran-usermgmt.yang
1 module xran-usermgmt {
2   yang-version 1.1;
3   namespace "urn:xran:user-mgmt:1.0";
4   prefix "xran-usermgmt";
5
6   // import openroadm user management
7   import org-openroadm-user-mgmt {
8     prefix openroadm;
9     revision-date 2017-12-15;
10   }
11
12   organization "xRAN Forum";
13
14   contact
15     "www.xran.org";
16
17   description
18     "This module defines the user management model for the xRAN Radio Unit.
19     The model is an augmentation of the user management model defined by
20     the openroadm MSA.
21
22     Copyright 2018 the xRAN Forum.
23
24     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
25     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34     POSSIBILITY OF SUCH DAMAGE.
35
36     Redistribution and use in source and binary forms, with or without
37     modification, are permitted provided that the following conditions are met:
38
39     * Redistributions of source code must retain the above copyright notice,
40     this list of conditions and the above disclaimer.
41     * Redistributions in binary form must reproduce the above copyright notice,
42     this list of conditions and the above disclaimer in the documentation
43     and/or other materials provided with the distribution.
44     * Neither the Members of the xRAN Forum nor the names of its
45     contributors may be used to endorse or promote products derived from
46     this software without specific prior written permission.";
47
48   revision "2018-07-20" {
49     description
50       "version 1.0.0 - First release of the xRAN YANG M-Plane models.
51
52       This version of the model supports v01.00 of the corrsponding xRAN
53       M-Plane Specification.";
54     reference "XRAN-FH.MP.0-v01.00";
55   }
56
57   grouping extended-xran-groups {
58     description
59       "New user permissions defined by xran.
60       Imported openroadm model only supports 'sudo' superuser permissions.";
61     leaf-list xran-group {
62       type enumeration {
63         enum nms {
64           description "Network Management System permissions";
65         }
66         enum fm-pm {
67           description
68             "permissions for fault and  performance management.";
69         }
70         enum swm {
71           description
72             "permissions for software managemet.";
73         }
74       }
75       description
76         "new group privileges defined by xRAN - a non sudo account may have
77         multiple group privileges.
78
79         See the xRAN management Plane specification for a list of YANG module
80         privileges";
81     }
82   }
83
84   container xran-user-profile {
85     description "baseline open-roadm user profile";
86     uses openroadm:user-profile;
87   }
88
89   augment "/xran-usermgmt:xran-user-profile/xran-usermgmt:user" {
90     description "add in new xran user group permissions";
91     uses extended-xran-groups;
92     leaf enabled {
93       type boolean;
94       must "count(../enabled='true') > 0" {
95         error-message "At least one account needs to be enabled.";
96       }
97       description
98         "Indicates whether an account is enabled or disabled.";
99     }
100   }
101 }