Search code examples
python-2.7openstackheat

"heat.stack.list()" to list all stack within the openstack "admin" cred


I have source the admin credentials. I want to list the heat stack running in all the tenant, is that possible ?

for now, I am fetching the name the stack from JSON, and pulling out the id, after sourcing specific tenant cred.

def heat_id(heat,stack_name):
    stack_id = str(heat.stacks.get(stack_name).id)

Solution

  • OpenStack Heat stack resources are isolated under a Tenant. To get the entire list of running stacks, you should do it by iterating the tenant's list and then make a stack list call with filtered status = active. Note: User who does this execution should be given permission to required tenant's (probably in your case it all tenant's)