32030d1c3c22ad1136b26c4c36e2571393758480
[osm/SO.git] / models / plugins / yang / rw-project.yang
1 /*
2  *
3  *   Copyright 2017 RIFT.IO Inc
4  *
5  *   Licensed under the Apache License, Version 2.0 (the "License");
6  *   you may not use this file except in compliance with the License.
7  *   You may obtain a copy of the License at
8  *
9  *       http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *   Unless required by applicable law or agreed to in writing, software
12  *   distributed under the License is distributed on an "AS IS" BASIS,
13  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *   See the License for the specific language governing permissions and
15  *   limitations under the License.
16  *
17  */
18
19 module rw-project
20 {
21   namespace "http://riftio.com/ns/riftware-1.0/rw-project";
22   prefix "rw-project";
23
24   import rw-pb-ext {
25     prefix "rw-pb-ext";
26   }
27
28   revision 2017-02-08 {
29     description
30       "Initial revision. This YANG file defines the
31        projects fo MANO to support Role Based Access
32        Control (RBAC)";
33     reference
34       "Derived from earlier versions of base YANG files";
35   }
36
37   list project {
38     description
39         "Configuration for individual Projects.  RIFT.ware applications
40         and Projects are expected to augment this list in order to add
41         configuration for Projects that is specific to the product or
42         application.  As such, this list contains minimal data defined
43         in this yang module.  When augmenting this element, other yang
44         modules should prefer to define containers with the same name
45         as the augmenting module.  (Augmenting RIFT.ware modules should
46         prefer to augment without the rw prefix [for new features], or
47         should prefer to augment the augmented container of an existing
48         augment.";
49
50     key name;
51     leaf name {
52       description "Name of the Project.";
53       type string {
54         length "1..255";
55       }
56     }
57
58     leaf description {
59       description "Information about Project";
60       type string;
61     }
62
63     container project-config {
64
65       description "Project management related configuration.";
66
67       leaf name-ref {
68         type leafref {
69           path "../../name";
70         }
71         mandatory true;
72       }
73
74       // list user {
75       //   description
76       //     "The list of Users who have been assigned Roles within this
77       //     Project.";
78
79       //   key user-name user-domain;
80       //   uses rw-rbac-base:user-key;
81
82       //   list role {
83       //     description
84       //       "The list of Roles the User has been assigned.";
85
86       //     key role key;
87       //     uses rw-rbac-base:role-instance;
88       //   }
89       // }
90     }
91
92     container project-state {
93
94       config false;
95
96       description "Project management operational data";
97     }
98   }
99 }