Do not allow update flavor internal attributes

This makes it only allow to update '/name', '/is_public',
'disabled' attributes.

Partially Implements: bp new-flavor

Change-Id: I8eb584ee47ce6bcdc2fe229485fa8540d48aa923
This commit is contained in:
Zhenguo Niu
2017-08-10 16:47:18 +08:00
parent 2d1379a72d
commit 82b89b0cb7

View File

@@ -108,6 +108,13 @@ class FlavorPatchType(types.JsonPatchType):
_api_base = Flavor
@staticmethod
def internal_attrs():
defaults = types.JsonPatchType.internal_attrs()
return defaults + ['/description', '/resources',
'/resource_traits',
'/resource_aggregates']
class FlavorCollection(base.APIBase):
"""API representation of a collection of flavor."""