summaryrefslogtreecommitdiffstats
path: root/deprecated/source/schema/openstack-identity.yang
blob: 4b929577f7586ba038a841dc29cd546e30a57a52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
module openstack-identity {
  namespace "urn:opnfv:promise:openstack:identity";
  prefix os-id;
  
  import access-control-models { prefix acm; }
  import nfv-infrastructure { prefix nfvi; }
  import complex-types { prefix ct; }
  import ietf-yang-types { prefix yang; }

  description
    "OpenStack Identity Data Models with complex types and typed instance
     identifiers represent the various Access Control Models available
     within OpenStack.";
  
  revision 2015-09-03 {
    description
      "This YANG module is modeled using 'yangforge' which natively provides
       complex types and typed instance identifiers.  This module
       provides various collections of resource management data models
       for instance based management";
  }

  /*********************************************
   * OpenStack Identity Models
   *********************************************/

  ct:complex-type Project {
    ct:extends acm:Group;
    description
      "OpenStack Project represent a distinct resource consumption space across
       collection of users and groups that can reserve and allocate
       resources.";
    
    leaf-list groups { type instance-identifer { ct:instance-type acm:Group; } }

    container resource {
      leaf-list images {
        if-feature vm-images;
        type instance-identifier { ct:instance-type nfvi:VirtualMachineImage; }
      }

      leaf-list flavors {
        if-feature compute-flavors;
        type instance-identifier { ct:instance-type nfvi:VirtualMachineFlavor; }
      }
    }
  }

  ct:complex-type User {
    ct:extends acm:User;
    
    description
      "OpenStack User can also belong to multiple projects.";
    
    leaf-list projects { type instance-identifier { ct:instance-type Project; } }
  }

  ct:complex-type Group {
    ct:extends acm:Group;

    description
      "OpenStack Group can also belong to multiple projects.";

    leaf-list projects { type instance-identifier { ct:instance-type Project; } }
  }

  ct:complex-type Domain {
    ct:extends acm:Domain;
    
    description
      "OpenStack Domain represent a distinct administrative domain including projects.";
    
    ct:instance-list projects { ct:instance-type Project; }
  }

  ct:complex-type Token {
    leaf key { type yang:uuid; }
    leaf identity { type instance-identifier { ct:instance-type Identity; } }
  }


  rpc create-project;
  rpc remove-project;
}