Ask Your Question

packstack ceilometer client

asked 2014-11-23 00:07:29 -0500

chitranshi-shubham gravatar image


I had create a small program for retrieving meter list and sample list from ceilometer using python-ceilometerclient and it worked well in devstack, now i try the same code in my packstack installation and it fails.

I have used python-ceilometerclient and python-keystoneclient that comes with devstack. is there a different set of clients for packstack ?

I also tried line by line code on my python console in packstack installation and it the problem occurs when i write this line

meter_list = ceilometer_client.meters.list()

the ceilometer_client here is authenticated by keystone. Finally can you provide me with a sample code or give me link of docs to packstack ceilometer client ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-24 19:34:33 -0500

chitranshi-shubham gravatar image

actually there is no problem with the python-ceilometerclient it is just that we have to use the lambda function when getting the token. I found this article to be really useful.

here is a short snippet of the code you can use.

keystone_client = KClient(username=username,password=password,tenant_name=tenant_name,auth_url=Auth_url)
token = keystone_client.service_catalog.catalog['token']['id']
ceil = ceilometer_client(endpoint=Endpoint,token=lambda: token)

now you can use the ceilometer client

meters = ceil.meters.list()
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-11-23 00:07:29 -0500

Seen: 250 times

Last updated: Nov 24 '14