[Openstack] [Heat] Heat-stack deletion and status
ESWAR RAO
eswar7028 at gmail.com
Fri Jul 15 15:45:23 UTC 2016
Hi All,
After deleting the heat-stack , I am polling until the stack is DELETED.
I am following below way of polling until stack-get fails with HTTPNotFound
Exception.
Is there any other better way of checking whether stack is DELETED instead
of catching exception.
>>> from heatclient.client import Client
heat_client = Client('1', endpoint=heat_url, token=auth_token)
heat_client.stacks.delete(stack_name)
******poll loop**********
try:
stack_get = heat_client.stacks.get(stack_name)
except (heatexception.HTTPNotFound):
# stack is deleted
if 'IN_PROGRESS' in stack_get.status:
# sleep and again loop
*********************************
Thanks
Eswar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160715/22e3e4ac/attachment.html>
More information about the Openstack
mailing list