0
votes

I'm having trouble getting the information I need from openstack python API. I want to query nova to get a list of nova services AND other information related to the services.

With shell command "nova service-list" command, I have all I need including the status of each services, like output stated below:

http://docs.openstack.org/user-guide-admin/content/section_cli_manage_services.html

Now I want to get the exactly the same result using python API. However the function nc.services.list() only returns the Binary portion (name of services) without any other info.

Any ideas how to write a code to get the full list of information?

1

1 Answers

0
votes

To get information about services you should use keystoneclient instead of novaclient:

from keystoneclient.v2_0 import client

keystone = client.Client(username=USER,
                         password=PASS,
                         tenant_name=TENANT_NAME,
                         auth_url=KEYSTONE_URL)

keystone.services.list()