From c01420e29ac8b6f1588a947efe623369c2848b96 Mon Sep 17 00:00:00 2001 From: Wenzhi Yu Date: Fri, 10 Jun 2016 19:38:42 +0800 Subject: [PATCH] Set 'nested_depth=2' when calling heat.resources.list Since Heat bug[1] have already been fixed, now we can set 'nested_depth=2' when calling heat().resources.list(), see the TODO comment inline[2]. This is a follow up patch for patch 318416, see[3] for detail. [1]https://bugs.launchpad.net/heat/+bug/1588130 [2]https://github.com/openstack/magnum/blob/678f74c12e7a0e8c8b7eaa846080426f315fac42/magnum/api/controllers/v1/bay.py#L283 [3]https://review.openstack.org/#/c/318416/ Change-Id: I7d9712510ace9de9c965d24583f8d31961114b16 --- magnum/api/controllers/v1/bay.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/magnum/api/controllers/v1/bay.py b/magnum/api/controllers/v1/bay.py index 92df5d45ec..b310b2f8f0 100644 --- a/magnum/api/controllers/v1/bay.py +++ b/magnum/api/controllers/v1/bay.py @@ -280,11 +280,8 @@ class BaysController(rest.RestController): osc = clients.OpenStackClients(context) filters = {'status': 'FAILED'} try: - # TODO(yuywz): We should set 'nested_depth=2' when - # calling heat().resources.list() after Heat bug - # https://bugs.launchpad.net/heat/+bug/1588130 fixed. failed_resources = osc.heat().resources.list( - bay.stack_id, filters=filters) + bay.stack_id, nested_depth=2, filters=filters) except Exception as e: failed_resources = [] LOG.warning(_LW("Failed to retrieve failed resources for "