~ubuntu-branches/ubuntu/trusty/heat/trusty-security

« back to all changes in this revision

Viewing changes to heat/engine/resources/user.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-10-03 09:43:04 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20131003094304-k2c4qcsfn7cv6eos
Tags: 2013.2~rc1-0ubuntu1
* New upstream release.
* debian/control: Dropped python-d2to1 build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
 
31
31
class User(resource.Resource):
32
 
    properties_schema = {'Path': {'Type': 'String'},
33
 
                         'Groups': {'Type': 'List'},
34
 
                         'LoginProfile': {'Type': 'Map',
35
 
                                          'Schema': {
36
 
                                              'Password': {'Type': 'String'}
37
 
                                          }},
38
 
                         'Policies': {'Type': 'List'}}
 
32
    properties_schema = {
 
33
        'Path': {
 
34
            'Type': 'String',
 
35
            'Description': _('Not Implemented.')},
 
36
        'Groups': {
 
37
            'Type': 'List',
 
38
            'Description': _('Not Implemented.')},
 
39
        'LoginProfile': {
 
40
            'Type': 'Map',
 
41
            'Schema': {'Password': {'Type': 'String'}},
 
42
            'Description': _('A login profile for the user.')},
 
43
        'Policies': {
 
44
            'Type': 'List',
 
45
            'Description': _('Access policies to apply to the user.')}}
39
46
 
40
47
    def _validate_policies(self, policies):
41
48
        for policy in (policies or []):
124
131
 
125
132
 
126
133
class AccessKey(resource.Resource):
127
 
    properties_schema = {'Serial': {'Type': 'Integer',
128
 
                                    'Implemented': False},
129
 
                         'UserName': {'Type': 'String',
130
 
                                      'Required': True},
131
 
                         'Status': {'Type': 'String',
132
 
                                    'Implemented': False,
133
 
                                    'AllowedValues': ['Active', 'Inactive']}}
 
134
    properties_schema = {
 
135
        'Serial': {
 
136
            'Type': 'Integer',
 
137
            'Implemented': False,
 
138
            'Description': _('Not Implemented.')},
 
139
        'UserName': {
 
140
            'Type': 'String',
 
141
            'Required': True,
 
142
            'Description': _('The name of the user that the new key will'
 
143
                             ' belong to.')},
 
144
        'Status': {
 
145
            'Type': 'String',
 
146
            'Implemented': False,
 
147
            'AllowedValues': ['Active', 'Inactive'],
 
148
            'Description': _('Not Implemented.')}}
134
149
 
135
150
    def __init__(self, name, json_snippet, stack):
136
151
        super(AccessKey, self).__init__(name, json_snippet, stack)
231
246
 
232
247
 
233
248
class AccessPolicy(resource.Resource):
234
 
    properties_schema = {'AllowedResources': {'Type': 'List',
235
 
                                              'Required': True}}
 
249
    properties_schema = {
 
250
        'AllowedResources': {
 
251
            'Type': 'List',
 
252
            'Required': True,
 
253
            'Description': _('Resources that users are allowed to access by'
 
254
                             ' the DescribeStackResource API.')}}
236
255
 
237
256
    def handle_create(self):
238
257
        resources = self.properties['AllowedResources']