How to create stack with python SDK

asked 2014-07-30 09:45:45 -0600

Goblja gravatar image

updated 2014-07-30 14:06:50 -0600

smaffulli gravatar image


I have went through this guide and have created python script that creates instances.

Is it possible to create stack with such method. I installed python-heatclient and tried to run python script. script:

# -*- coding: utf-8 -*- from credentials import get_keystone_creds
from heatclient.client import Client

    credentials = get_keystone_creds()
    #heat = Client('1', endpoint=heat_url, token=auth_token)
    heat = Client('1', endpoint="",

    print("Heat List")

    print("Execution Completed")

But I get message: <generator object="" paginate="" at="" 0x2a0e0a0="">

what i am doing wrong?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2017-01-18 06:40:06 -0600

A Verma gravatar image

Hey, I know its late for reply but here you go: Do print using next() because output is not list but generator. print(next(heat.stacks.list()))

edit flag offensive delete link more

answered 2014-08-01 08:52:21 -0600

Goblja gravatar image

So I understand why this message was created. heat.staks.list is returned as an object and to print list we have to use print function : utils.print_list(stacks, fields, sortby_index=3)

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-07-30 09:45:45 -0600

Seen: 881 times

Last updated: Jan 18 '17