Revision history [back]

Found the answer thanks to @larsks at stackoverflow.

The trick is that you use the admin's tenant as this allows you to retrieve servers from all users. My solution looks like this.

from keystoneclient.auth.identity import v2
from keystoneclient import session
from novaclient import client as nova_client

auth = v2.Password(auth_url="http://192.168.1.1:5000/v2.0",
               username="admin",
               password="my_secrete",
               tenant_name="admin") # the admin's tenant

auth_session = session.Session(auth=auth)
nova = nova_client.Client(2, session=auth_session)

for server in servers:
    ... do stuff like nova.servers.get("some id")