Fix DB calls in Resource API
The DB API changed in 892b99bff480aba8240a1f49eadeea079bae4c81, while these calls were added in 247cc2bb9afb9db87ffad7160ef05d2cc4457235. Both patches were under review simultaneously. Change-Id: I8fc6c3228c99f025e01fc82979fa94f086649909 Signed-off-by: Zane Bitter <zbitter@redhat.com>
This commit is contained in:
parent
247cc2bb9a
commit
7155c52d94
@ -394,7 +394,7 @@ class EngineManager(manager.Manager):
|
|||||||
def describe_stack_resource(self, context, stack_name, resource_name):
|
def describe_stack_resource(self, context, stack_name, resource_name):
|
||||||
self._authenticate(context)
|
self._authenticate(context)
|
||||||
|
|
||||||
stack = db_api.stack_get(context, stack_name)
|
stack = db_api.stack_get_by_name(context, stack_name)
|
||||||
if not stack:
|
if not stack:
|
||||||
raise AttributeError('Unknown stack name')
|
raise AttributeError('Unknown stack name')
|
||||||
resource = db_api.resource_get_by_name_and_stack(context,
|
resource = db_api.resource_get_by_name_and_stack(context,
|
||||||
@ -409,7 +409,7 @@ class EngineManager(manager.Manager):
|
|||||||
self._authenticate(context)
|
self._authenticate(context)
|
||||||
|
|
||||||
if stack_name:
|
if stack_name:
|
||||||
stack = db_api.stack_get(context, stack_name)
|
stack = db_api.stack_get_by_name(context, stack_name)
|
||||||
else:
|
else:
|
||||||
resource = db_api.resource_get_by_physical_resource_id(context,
|
resource = db_api.resource_get_by_physical_resource_id(context,
|
||||||
physical_resource_id)
|
physical_resource_id)
|
||||||
@ -436,7 +436,7 @@ class EngineManager(manager.Manager):
|
|||||||
def list_stack_resources(self, context, stack_name):
|
def list_stack_resources(self, context, stack_name):
|
||||||
self._authenticate(context)
|
self._authenticate(context)
|
||||||
|
|
||||||
stack = db_api.stack_get(context, stack_name)
|
stack = db_api.stack_get_by_name(context, stack_name)
|
||||||
if not stack:
|
if not stack:
|
||||||
raise AttributeError('Unknown stack name')
|
raise AttributeError('Unknown stack name')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user