Ask Your Question

# Revision history [back]

Replace the server() call with

for server in conn.compute.servers(all_tenants=True):


Note that earlier versions of the OpenStack SDK suffer from a bug that makes it ignore the all_tenants option. If that is the case for you, add "all_tenants" to the _query_parameters definition in ..../site-packages/openstack/compute/v2/server.py.

Replace the server() call withI was successful with this code:

...
conn = connection.Connection(auth_url="http://192.168.1.222:5000/v3/",
project_name="admin",username="admin",
password="pw",
user_domain_id="default",
project_domain_id="default")

host_names = []
for server in conn.compute.servers(all_tenants=True):
...


Note that earlier versions of the OpenStack SDK suffer from a bug that makes it ignore the all_tenants option. If that is the case for you, add "all_tenants" to the _query_parameters definition in ..../site-packages/openstack/compute/v2/server.py.

I was successful with this code:

...
conn = connection.Connection(auth_url="http://192.168.1.222:5000/v3/",
project_name="admin",username="admin",
password="pw",
user_domain_id="default",
project_domain_id="default")

host_names = []
for server in conn.compute.servers(all_tenants=True):
...


Note that earlier versions of the OpenStack SDK suffer from a bug that makes it ignore the all_tenants option. If that is the case for you, add the string "all_tenants" to the _query_parameters definition in ..../site-packages/openstack/compute/v2/server.py.

I was successful with this code:

...
conn = connection.Connection(auth_url="http://192.168.1.222:5000/v3/",
project_name="admin",username="admin",
password="pw",
user_domain_id="default",
project_domain_id="default")

host_names = []
for server in conn.compute.servers(all_tenants=True):
...


Note that earlier versions of the OpenStack SDK suffer from a bug that makes it ignore the all_tenants option. If that is the case for you, add the string "all_tenants" to the _query_parameters definition in ..../site-packages/openstack/compute/v2/server.py.

See also the newest version of the openstacksdk.