Merge "Property methods for resource metadata"
This commit is contained in:
commit
f41780fe57
@ -127,7 +127,7 @@ class Resource(object):
|
||||
created_time = timestamp.Timestamp(db_api.resource_get, 'created_at')
|
||||
updated_time = timestamp.Timestamp(db_api.resource_get, 'updated_at')
|
||||
|
||||
metadata = Metadata()
|
||||
_metadata = Metadata()
|
||||
|
||||
# Resource implementation set this to the subset of template keys
|
||||
# which are supported for handle_update, used by update_template_diff
|
||||
@ -217,6 +217,14 @@ class Resource(object):
|
||||
return result
|
||||
return not result
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
return self._metadata
|
||||
|
||||
@metadata.setter
|
||||
def metadata(self, metadata):
|
||||
self._metadata = metadata
|
||||
|
||||
def type(self):
|
||||
return self.t['Type']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user