From: Liang Chen Date: Wed, 18 Sep 2013 08:37:47 +0000 (+0800) Subject: Document user properties X-Git-Tag: 2014.1~24^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=dbc61189bfa21129e60cb454668aaf9a55167a7e;p=openstack-build%2Fheat-build.git Document user properties This adds descriptions to the properties of user, access key, and access policy. Fixes bug #1224154 Change-Id: Ib1a7d77540e67ef99b82c41c5f25a57b292c6003 --- diff --git a/heat/engine/resources/user.py b/heat/engine/resources/user.py index a3c25ccf..c6038c6b 100644 --- a/heat/engine/resources/user.py +++ b/heat/engine/resources/user.py @@ -29,13 +29,20 @@ logger = logging.getLogger(__name__) class User(resource.Resource): - properties_schema = {'Path': {'Type': 'String'}, - 'Groups': {'Type': 'List'}, - 'LoginProfile': {'Type': 'Map', - 'Schema': { - 'Password': {'Type': 'String'} - }}, - 'Policies': {'Type': 'List'}} + properties_schema = { + 'Path': { + 'Type': 'String', + 'Description': _('Not Implemented.')}, + 'Groups': { + 'Type': 'List', + 'Description': _('Not Implemented.')}, + 'LoginProfile': { + 'Type': 'Map', + 'Schema': {'Password': {'Type': 'String'}}, + 'Description': _('A login profile for the user.')}, + 'Policies': { + 'Type': 'List', + 'Description': _('Access policies to apply to the user.')}} def _validate_policies(self, policies): for policy in (policies or []): @@ -124,13 +131,21 @@ class User(resource.Resource): class AccessKey(resource.Resource): - properties_schema = {'Serial': {'Type': 'Integer', - 'Implemented': False}, - 'UserName': {'Type': 'String', - 'Required': True}, - 'Status': {'Type': 'String', - 'Implemented': False, - 'AllowedValues': ['Active', 'Inactive']}} + properties_schema = { + 'Serial': { + 'Type': 'Integer', + 'Implemented': False, + 'Description': _('Not Implemented.')}, + 'UserName': { + 'Type': 'String', + 'Required': True, + 'Description': _('The name of the user that the new key will' + ' belong to.')}, + 'Status': { + 'Type': 'String', + 'Implemented': False, + 'AllowedValues': ['Active', 'Inactive'], + 'Description': _('Not Implemented.')}} def __init__(self, name, json_snippet, stack): super(AccessKey, self).__init__(name, json_snippet, stack) @@ -231,8 +246,12 @@ class AccessKey(resource.Resource): class AccessPolicy(resource.Resource): - properties_schema = {'AllowedResources': {'Type': 'List', - 'Required': True}} + properties_schema = { + 'AllowedResources': { + 'Type': 'List', + 'Required': True, + 'Description': _('Resources that users are allowed to access by' + ' the DescribeStackResource API.')}} def handle_create(self): resources = self.properties['AllowedResources']