[Openstack] retrieve all instances whatever tenant/user via python SDK
Remo Mattei
Remo at Italy1.com
Wed Jun 8 15:06:33 UTC 2016
Did you try the nova list --all-t
Ciao
Inviato da iPhone
> Il giorno 08 giu 2016, alle ore 06:20, Jean-Pierre Ribeauville <jpribeauville at axway.com> 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 : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
> !DSPAM:1,57581db3283461494078773!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160608/8c54b92f/attachment.html>
More information about the Openstack
mailing list