summaryrefslogtreecommitdiff
path: root/heat/objects
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2016-06-21 15:47:11 +1200
committerSteve Baker <sbaker@redhat.com>2016-07-13 11:58:27 +1200
commitb125b812982c04d061a3b455991b1f862f7a244c (patch)
treed062a4debd58a384d9f167d0e6553fa0b3d5deb9 /heat/objects
parent845075031a6a6fc720f4b5d587556aec65519f3c (diff)
downloadheat-b125b812982c04d061a3b455991b1f862f7a244c.tar.gz
Remove remaining methods from db objects
- HeatBase.expire, not used anywhere - HeatBase.save_and_update, moved to sqlalchemy.api - SoftDelete.soft_delete moved to sqlalchemy.api update_and_save creates a transaction, so it needs to be in sqlalchemy.api so that a context manager can eventually manage the transaction. Change-Id: I84749f4fd0781ed9a2d62327b39ce6eee0f07b35
Diffstat (limited to 'heat/objects')
-rw-r--r--heat/objects/resource.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/heat/objects/resource.py b/heat/objects/resource.py
index 9b632a482..968781224 100644
--- a/heat/objects/resource.py
+++ b/heat/objects/resource.py
@@ -193,12 +193,10 @@ class Resource(
@classmethod
def update_by_id(cls, context, resource_id, values):
- resource_db = db_api.resource_get(context, resource_id)
- resource_db.update_and_save(values)
+ db_api.resource_update_and_save(context, resource_id, values)
def update_and_save(self, values):
- resource_db = db_api.resource_get(self._context, self.id)
- resource_db.update_and_save(values)
+ db_api.resource_update_and_save(self._context, self.id, values)
def select_and_update(self, values, expected_engine_id=None,
atomic_key=0):