The simplest thing to do is to pass --debug to the nova or openstack cli list command and catch the argument from the curl URL.
The other way is to check the Nova API documentation and the SDK too. See you. On June 8, 2016 5:24:14 PM CEST, Jean-Pierre Ribeauville <[email protected]> wrote: >Hi, > >nova list --all-t works fine ( with “admin” environment variables). > >So it means that , within the python code, I have to find a way to >issue same request , i.e. by specifying “all tenant” parameter. > >For sure , I want ( if possible) to avoid to issue a request for every >tenant !! > >Any idea is welcome. > >Thx for help. >Grazie mille. > >J.P. > >From: Remo Mattei [mailto:[email protected]] >Sent: mercredi 8 juin 2016 17:07 >To: Jean-Pierre Ribeauville >Cc: [email protected] >Subject: Re: [Openstack] retrieve all instances whatever tenant/user >via python SDK > >Did you try the nova list --all-t > >Ciao > >Inviato da iPhone > >Il giorno 08 giu 2016, alle ore 06:20, Jean-Pierre Ribeauville ><[email protected]<mailto:[email protected]>> ha scritto: >Hi all, > >By running this piece if code : > >……… >def get_nova_credentials_v2(): > d = {} > d['version'] = '2' > d['username'] = os.environ['OS_USERNAME'] > d['api_key'] = os.environ['OS_PASSWORD'] > d['auth_url'] = os.environ['OS_AUTH_URL'] > d['project_id'] = os.environ['OS_TENANT_NAME'] > return d > >credentials = get_nova_credentials_v2() >nova_client = Client(**credentials) > >print(nova_client.servers.list()) >…… > >I’m able to retrieve the instances list when specifying the tenant and >username to whom the instances « belong ». > >As I want to retrieve all instances , I tried to use admin as tenant >and user , then no instance are found ( all my instances are under >“demo”). > >Via Horizon , all instances are retrievable under admin . > >Did I miss something ? > >Thx for help. > >Regards, > >Jean-Pierre RIBEAUVILLE > >+33 1 4717 2049 > ><image001.png> > >!DSPAM:1,57581db3283461494078773! >_______________________________________________ >Mailing list: >http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack >Post to : >[email protected]<mailto:[email protected]> >Unsubscribe : >http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > > >!DSPAM:1,57581db3283461494078773! > > >------------------------------------------------------------------------ > >_______________________________________________ >Mailing list: >http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack >Post to : [email protected] >Unsubscribe : >http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack -- Sent from my Android device with K-9 Mail. Please excuse my brevity. _______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : [email protected] Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
