Listing containers per tenant

Asked by Victoria Martinez de la Cruz

Hi,

I was wondering if listing containers per tenant is an available feature. I checked the client and the current code, and it doesn't look like it.

I know that the --os-tenant-name option is available but is not a viable replacement in the current implementation I'm working on [0] because it only works for projects of which the admin is a member.

In case that this functionality is indeed not available, do you think that filing a blueprint is a good idea?

I'd like to hear your suggestions, thanks a lot!

[0] https://blueprints.launchpad.net/horizon/+spec/tenant-deletion

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Victoria Martinez de la Cruz
Solved:
Last query:
Last reply:
Revision history for this message
Chmouel Boudjnah (chmouel) said :
#1

Hi Victoria,

I am not sure I understand your question, you would like to list containers in a tenant without specifying a user?

Thansk,
Chmouel.

Revision history for this message
Victoria Martinez de la Cruz (vkmc) said :
#2

Hi Chmouel,

Oh you're right, I missed an important detail. I wanted to list all the containers within a tenant with the *admin user*. As mentioned, this is to implement the tenant deletion workflow on Horizon :)

Do you know if there is a similar feature I could use to access all the containers within a tenant?

Thanks,

Victoria

Revision history for this message
Victoria Martinez de la Cruz (vkmc) said :
#3

#2 provides more information for this question

Revision history for this message
Chmouel Boudjnah (chmouel) said :
#4

So you basically would need to have a account with the ResellerAdmin role which would allow you to access other accounts.

The steps would be :

- have an admin user with the ResellerAdmin role (create the role already if it wasn't created before) : https://gist.github.com/chmouel/5120245

- get the tenant_id of the tenant you want to access.

- the storage_url will become :

http://storage_ip:8080/v1/AUTH_%(tenant_id)

- get a token from the admin user.

- you will be able to access the tenant_id like this :

curl -H 'X-Auth-User: ${ADMIN_TOKEN}' ${USER_STORAGE_URL}

I don't know if that's clear enough, feel free to ping me on irc if needed.

Revision history for this message
Victoria Martinez de la Cruz (vkmc) said :
#5

Thanks Chmouel! It sounds feasible, I will try that approach :)