python nova, get server project from servers

asked 2018-01-19 01:28:43 -0600

uffe gravatar image


I'm fetching a list of all server using the python nova sdk, and calling list with all_tenants. Can I get what project each server belongs to some how?


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-01-19 02:25:36 -0600

ppeereb1 gravatar image

This will do:

for server in nova.servers.list(search_opts={'all_tenants': 1}):
  print server.tenant_id
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-01-19 01:28:43 -0600

Seen: 214 times

Last updated: Jan 19 '18