The current approach of using the Metadata descriptor
class has some issues including:
* Unintended database queries on accessing a metadata attribute
* get/modify/set patterns since the attribute isn't backed by a real dict
* lack of control over whether to fetch metadata locally or from the db
This change creates Resource methods metadata_get and metadata_set to use
for reading and modifying resource data. This is a refactoring change only so
there should be no change in behaviour.
This change will help in the future with
Related-Bug: #1306743
Reviewed: https:/ /review. openstack. org/89736 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=96791aaa107 b54908e3c7a7531 d96f08cb17acd8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 96791aaa107b549 08e3c7a7531d96f 08cb17acd8
Author: Steve Baker <email address hidden>
Date: Wed Apr 23 14:04:57 2014 +1200
Use resource methods for metadata get/set
The current approach of using the Metadata descriptor
class has some issues including:
* Unintended database queries on accessing a metadata attribute
* get/modify/set patterns since the attribute isn't backed by a real dict
* lack of control over whether to fetch metadata locally or from the db
This change creates Resource methods metadata_get and metadata_set to use
for reading and modifying resource data. This is a refactoring change only so
there should be no change in behaviour.
This change will help in the future with
Related-Bug: #1306743
Change-Id: I7cd87a071ac410 a388d787f132c9a ee194030714