]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat dbapi rename stack_get_by_tenant
authorSteven Hardy <shardy@redhat.com>
Thu, 15 Nov 2012 09:12:31 +0000 (09:12 +0000)
committerSteven Hardy <shardy@redhat.com>
Thu, 15 Nov 2012 09:12:31 +0000 (09:12 +0000)
Rename stack_get_by_tenant to stack_get_all_by_tenant
This aligns better with other dbapi calls and better describes
the actual purpose of the call

Change-Id: If410220f8423f31718e6bcbfeca62a45c94c4d18
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat/db/api.py
heat/db/sqlalchemy/api.py
heat/engine/service.py

index 6724bd1b88136555b7bd75c848baaa73d68d2f4f..2b6cf106f32ee35119c00ce462e1baa85ec389d6 100644 (file)
@@ -99,8 +99,8 @@ def stack_get_all(context):
     return IMPL.stack_get_all(context)
 
 
-def stack_get_by_tenant(context):
-    return IMPL.stack_get_by_tenant(context)
+def stack_get_all_by_tenant(context):
+    return IMPL.stack_get_all_by_tenant(context)
 
 
 def stack_create(context, values):
index 3f7336597f4609ab13735791f60c0b8f93097fcf..cfcec42b07e2e4c3cee266644c317fb948c80820 100644 (file)
@@ -137,7 +137,7 @@ def stack_get_all(context):
     return results
 
 
-def stack_get_by_tenant(context):
+def stack_get_all_by_tenant(context):
     results = model_query(context, models.Stack).\
                          filter_by(owner_id=None).\
                          filter_by(tenant=context.tenant_id).all()
index 44541c5bdf7c82c3b6ad4c91363c66732598d1f0..2fdc26b9bf40bdc9e399806f7abd344494b40702 100644 (file)
@@ -115,7 +115,7 @@ class EngineService(service.Service):
         The list_stacks method returns attributes of all stacks.
         arg1 -> RPC context.
         """
-        stacks = db_api.stack_get_by_tenant(context) or []
+        stacks = db_api.stack_get_all_by_tenant(context) or []
 
         def format_stack_detail(s):
             stack = parser.Stack.load(context, stack=s, resolve_data=False)