Bug 1564164 - [RFE][Swift] List containers from all projects using the openstack CLI
Summary: [RFE][Swift] List containers from all projects using the openstack CLI
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient
Version: 10.0 (Newton)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Alpha
: 17.0
Assignee: Pete Zaitcev
QA Contact: Mike Abrams
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-05 14:11 UTC by MD Sufiyan
Modified: 2021-05-06 12:59 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)
Working test of 3rd Party authentication (8.71 KB, text/x-matlab)
2020-05-08 00:51 UTC, Pete Zaitcev
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 731395 0 None NEW Allow to list containers of other accounts 2020-11-30 11:51:08 UTC

Description MD Sufiyan 2018-04-05 14:11:37 UTC
1. Description

There is no option available for listing all the swift container from all projects using command "openstack container list"

Version

OSP10
openstack-swift-container-2.10.2-3.el7ost.noarch
python-openstackclient-3.2.1-2.el7ost.noarch

~~~
[stack@instack ~]$ openstack container list 
+--------+
| Name   |
+--------+
| test03 |
| test04 |
+--------+
[stack@instack ~]$ openstack container list --os-project-name admin
+--------+
| Name   |
+--------+
| test03 |
| test04 |
+--------+
[stack@instack ~]$ openstack container list --os-project-name demo
+--------+
| Name   |
+--------+
| test00 |
| test01 |
+--------+
[stack@instack ~]$ openstack container list --all
+--------+
| Name   |
+--------+
| test03 |
| test04 |
+--------+
[stack@instack ~]$ 
~~~~

2. Use case

An ideal way of displaying container list from all project can be achived by using paramter like "--all-projects" like we do in case of displaying instance via command "openstack server list --all-project".


3. Upstream reference
        Bugzillas? No
        Blueprints? No
        Specs? No

4. RH bugzilla dependencies?
   No


5. Primary Red Hat contact:
   a. Name:  MD Sufiyan
   b. Email:   msufiyan@redhat.com

Comment 1 Pete Zaitcev 2020-05-08 00:51:09 UTC
Created attachment 1686364 [details]
Working test of 3rd Party authentication

Works like this:

[zaitcev@suzdal tests]$ PYTHONPATH=/q/zaitcev/hail/python-swiftclient-tip python poke10list3p.py -A https://rhev-a24c-01.os.lab.eng.bos.redhat.com:35357/v3 -U ksuserten:ksuser -K u*** 
[{'name': 'u1', 'count': 0, 'bytes': 0, 'last_modified': '2020-04-26T03:34:47.118650'}]
[zaitcev@suzdal tests]$ PYTHONPATH=/q/zaitcev/hail/python-swiftclient-tip python poke10list3p.py -A https://rhev-a24c-01.os.lab.eng.bos.redhat.com:35357/v3 -U ksadmten:ksadmin -K a***
[{'name': 'a1', 'count': 0, 'bytes': 0, 'last_modified': '2020-04-26T02:46:58.690110'}]
[zaitcev@suzdal tests]$ PYTHONPATH=/q/zaitcev/hail/python-swiftclient-tip python poke10list3p.py -A https://rhev-a24c-01.os.lab.eng.bos.redhat.com:35357/v3 -U ksadmten:ksadmin -K a*** ksuser
[{'name': 'u1', 'count': 0, 'bytes': 0, 'last_modified': '2020-04-26T03:34:47.118650'}]
[zaitcev@suzdal tests]$

Comment 2 Pete Zaitcev 2020-05-28 03:27:29 UTC
The --all parameter is not what one might think it is: it forces
the CLI to list all containers beyond the default cut-off of 10,000.
The proposed syntax is (subject to change):

  openstack container list --target='*'


Note You need to log in before you can comment on or make changes to this bug.