Proposal to move Promise shim-layer code to a new deprecated folder
[promise.git] / deprecated / source / schema / openstack-identity.yang
1 module openstack-identity {
2   namespace "urn:opnfv:promise:openstack:identity";
3   prefix os-id;
4   
5   import access-control-models { prefix acm; }
6   import nfv-infrastructure { prefix nfvi; }
7   import complex-types { prefix ct; }
8   import ietf-yang-types { prefix yang; }
9
10   description
11     "OpenStack Identity Data Models with complex types and typed instance
12      identifiers represent the various Access Control Models available
13      within OpenStack.";
14   
15   revision 2015-09-03 {
16     description
17       "This YANG module is modeled using 'yangforge' which natively provides
18        complex types and typed instance identifiers.  This module
19        provides various collections of resource management data models
20        for instance based management";
21   }
22
23   /*********************************************
24    * OpenStack Identity Models
25    *********************************************/
26
27   ct:complex-type Project {
28     ct:extends acm:Group;
29     description
30       "OpenStack Project represent a distinct resource consumption space across
31        collection of users and groups that can reserve and allocate
32        resources.";
33     
34     leaf-list groups { type instance-identifer { ct:instance-type acm:Group; } }
35
36     container resource {
37       leaf-list images {
38         if-feature vm-images;
39         type instance-identifier { ct:instance-type nfvi:VirtualMachineImage; }
40       }
41
42       leaf-list flavors {
43         if-feature compute-flavors;
44         type instance-identifier { ct:instance-type nfvi:VirtualMachineFlavor; }
45       }
46     }
47   }
48
49   ct:complex-type User {
50     ct:extends acm:User;
51     
52     description
53       "OpenStack User can also belong to multiple projects.";
54     
55     leaf-list projects { type instance-identifier { ct:instance-type Project; } }
56   }
57
58   ct:complex-type Group {
59     ct:extends acm:Group;
60
61     description
62       "OpenStack Group can also belong to multiple projects.";
63
64     leaf-list projects { type instance-identifier { ct:instance-type Project; } }
65   }
66
67   ct:complex-type Domain {
68     ct:extends acm:Domain;
69     
70     description
71       "OpenStack Domain represent a distinct administrative domain including projects.";
72     
73     ct:instance-list projects { ct:instance-type Project; }
74   }
75
76   ct:complex-type Token {
77     leaf key { type yang:uuid; }
78     leaf identity { type instance-identifier { ct:instance-type Identity; } }
79   }
80
81
82   rpc create-project;
83   rpc remove-project;
84 }