Merge "Update the constraint value of schema 'ACCESS_TYPE' for Manila share"
This commit is contained in:
commit
77d94c2312
|
@ -17,7 +17,7 @@ from heat.engine import constraints
|
|||
from manilaclient import client as manila_client
|
||||
from manilaclient import exceptions
|
||||
|
||||
MANILACLIENT_VERSION = "1"
|
||||
MANILACLIENT_VERSION = "2"
|
||||
CLIENT_NAME = 'manila'
|
||||
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ class ManilaShare(resource.Resource):
|
|||
properties.Schema.STRING,
|
||||
_('Type of access that should be provided to guest.'),
|
||||
constraints=[constraints.AllowedValues(
|
||||
['ip', 'domain'])],
|
||||
['ip', 'user', 'cert', 'cephx'])],
|
||||
required=True
|
||||
),
|
||||
ACCESS_LEVEL: properties.Schema(
|
||||
|
|
|
@ -223,3 +223,13 @@ class ManilaShareTest(common.HeatTestCase):
|
|||
self.assertEqual('ca', share.FnGetAtt('created_at'))
|
||||
self.assertEqual('s', share.FnGetAtt('status'))
|
||||
self.assertEqual('p_id', share.FnGetAtt('project_id'))
|
||||
|
||||
def test_allowed_access_type(self):
|
||||
tmp = template_format.parse(manila_template)
|
||||
properties = tmp['resources']['test_share']['properties']
|
||||
properties['access_rules'][0]['access_type'] = 'domain'
|
||||
stack = utils.parse_stack(tmp, stack_name='access_type')
|
||||
self.assertRaisesRegexp(
|
||||
exception.StackValidationFailed,
|
||||
".* \"domain\" is not an allowed value \[ip, user, cert, cephx\]",
|
||||
stack.validate)
|
||||
|
|
Loading…
Reference in New Issue