Adding nemo engine.
[nemo.git] / nemo-api / src / main / yang / nemo-user.yang
1 /*\r
2  * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 \r
9 module nemo-user {\r
10     yang-version 1;\r
11 \r
12     namespace "urn:opendaylight:params:xml:ns:yang:nemo:user";\r
13     prefix "nemo-user";\r
14 \r
15     import nemo-common {prefix nemo-common;}\r
16 \r
17     revision "2015-10-10" {\r
18         description\r
19             "Initial revision.";\r
20     }\r
21 \r
22     container user-roles {\r
23         list user-role {\r
24             description\r
25                 "Defines the user role. Different users have different\r
26                  intention manifestations, which have different granularity\r
27                  or different level. It depends on users' role, knowledge\r
28                  and their purpose.";\r
29 \r
30             key "role-name";\r
31             leaf role-name {\r
32                 description\r
33                     "A user-visible and unique name for a kind of role.";\r
34                 type nemo-common:user-role-name;\r
35                 mandatory true;\r
36             }\r
37 \r
38             leaf role-description {\r
39                 description\r
40                     "Describes the characteristic,responsibility and purpose for a kind of role.";\r
41                 type nemo-common:user-role-description;\r
42             }\r
43 \r
44             // TBD\r
45         }\r
46     }\r
47 \r
48     grouping user-instance {\r
49         description\r
50             "It represents an instance of the user.";\r
51 \r
52         leaf user-id {\r
53             description\r
54                 "A unique ID for a user.";\r
55             type nemo-common:user-id;\r
56             mandatory true;\r
57         }\r
58 \r
59         leaf user-name {\r
60             description\r
61                 "A user-visible and unique name for the user.";\r
62             type nemo-common:user-name;\r
63             mandatory true;\r
64         }\r
65 \r
66         leaf user-password {\r
67             description\r
68                 "The password of a user.";\r
69             type nemo-common:user-password;\r
70             mandatory true;\r
71         }\r
72 \r
73         leaf user-role {\r
74             description\r
75                 "The role of a user.";\r
76             type nemo-common:user-role-name;\r
77             mandatory true;\r
78         }\r
79     }\r
80 }\r