Remove unnecessary validation in update environment form the client

Change-Id: Iad4a667f65373cf74eb9d4613a3336fe1d46b90b
Closes-Bug: #1457211
This commit is contained in:
Limor Stotland
2015-05-26 12:36:44 +00:00
parent 3b0e35bcbd
commit df46403d8c

View File

@@ -50,15 +50,6 @@ class EnvironmentManager(base.ResourceManager):
name = kwargs.get('name', None)
self._ensure_not_empty(name=name)
attrs = kwargs.keys()
attrs.remove('name')
allowed = ['description', 'variables', 'scope']
disallowed = list(set(attrs) - set(allowed))
if disallowed:
raise ValueError('The attributes %s cannot be updated.' %
disallowed)
# Convert dict to text for the variables attribute.
if kwargs.get('variables') and isinstance(kwargs['variables'], dict):
kwargs['variables'] = json.dumps(kwargs['variables'])