cli not clear for create container

Bug #1231321 reported by Dafna Ron
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-swiftclient
Fix Released
Undecided
Pete Zaitcev

Bug Description

as someone who is new to swift I was trying to figure out how I can create a new container from the cli.
on horizon there it's very clear but looking at the cli, since there is no create command I was unable to figure it out until I asked people who have been working with swift for a while.

If you look at the help files than post will show this:
post Updates meta information for the account, container,
                         or object

There is no indication that you can create a new empty container using this command, only change existing ones - so unless I asked i would have never guessed to use it.

I think that there should be a create command for container or that the help files should be clearer

Pete Zaitcev (zaitcev)
Changed in swift:
assignee: nobody → Pete Zaitcev (zaitcev)
Pete Zaitcev (zaitcev)
affects: swift → python-swiftclient
Revision history for this message
Pete Zaitcev (zaitcev) wrote :

I went to fix it up and found that, oddly enough, we already had it.

In python-swiftclient-1.4.0 (comes with RHOS 3 Grizzly):

[root@rhev-a24c-01 swift]# swift post --help
Usage: post [options] [container] [object]
    Updates meta information for the account, container, or object depending on
    the args given. If the container is not found, it will be created
    automatically; but this is not true for accounts and objects. Containers
    also allow the -r (or --read-acl) and -w (or --write-acl) options. The -m
    or --meta option is allowed on all and used to define the user meta data
    items to set in the form Name:Value. This option can be repeated. Example:
    post -m Color:Blue -m Size:Large

In 1.6.0 (Havana), it says:

Usage: Updates meta information for the account, container, or object.
If the container is not found, it will be created automatically.

Positional arguments:
  <container> Name of container to post to
  <object> Name of object to post. Specify multiple times
                        for multiple objects

Which is easier to read.

Dafna is the problem that the list of commands does not specify that
post creates containers? I mean "swift --help" without any other
arguments.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-swiftclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/51706

Changed in python-swiftclient:
status: New → In Progress
Revision history for this message
Pete Zaitcev (zaitcev) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-swiftclient (master)

Reviewed: https://review.openstack.org/51706
Committed: http://github.com/openstack/python-swiftclient/commit/e08ec3ab8a28facc95977fc25c7e1e5381507591
Submitter: Jenkins
Branch: master

commit e08ec3ab8a28facc95977fc25c7e1e5381507591
Author: Pete Zaitcev <email address hidden>
Date: Mon Oct 14 15:04:40 2013 -0600

    Clarify main help for post subcommand

    Fixes bug 1231321

    Change-Id: I7014aa160ebe5ba0bc5a91de05e6858fc58f69e0

Changed in python-swiftclient:
status: In Progress → Fix Committed
Changed in python-swiftclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.