diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile | 4 | ||||
-rw-r--r-- | doc/manpages/swift.1 | 6 | ||||
-rw-r--r-- | doc/source/cli.rst | 39 |
3 files changed, 40 insertions, 9 deletions
diff --git a/doc/Makefile b/doc/Makefile index 73aeb6e..3943da4 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -62,9 +62,9 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python-novaclient.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python-swiftclient.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-novaclient.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-swiftclient.qhc" latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex diff --git a/doc/manpages/swift.1 b/doc/manpages/swift.1 index 5d21c18..bbf5280 100644 --- a/doc/manpages/swift.1 +++ b/doc/manpages/swift.1 @@ -134,10 +134,12 @@ programs, such as jq. .RS 4 Generates a temporary URL allowing unauthenticated access to the Swift object at the given path, using the given HTTP method, for the given number of -seconds, using the given TempURL key. If optional \-\-absolute argument is +seconds, using the given TempURL key. With the optional \-\-prefix\-based option a +prefix-based URL is generated. If optional \-\-absolute argument is provided, seconds is instead interpreted as a Unix timestamp at which the URL should expire. \fBExample\fR: tempurl GET $(date \-d "Jan 1 2016" +%s) /v1/AUTH_foo/bar_container/quux.md my_secret_tempurl_key \-\-absolute + .RE \fBauth\fR @@ -184,4 +186,4 @@ swift \-A https://127.0.0.1:443/auth/v1.0 \-U swiftops:swiftops \-K swiftops sta .SH DOCUMENTATION .LP More in depth documentation about OpenStack Swift as a whole can be found at -.BI http://swift.openstack.org +.BI https://docs.openstack.org/developer/swift diff --git a/doc/source/cli.rst b/doc/source/cli.rst index 87020c9..1f76b05 100644 --- a/doc/source/cli.rst +++ b/doc/source/cli.rst @@ -228,7 +228,7 @@ Capabilities Tempurl ------- - ``tempurl [method] [seconds] [path] [key]`` + ``tempurl [command-options] [method] [seconds] [path] [key]`` Generates a temporary URL for a Swift object. ``method`` option sets an HTTP method to allow for this temporary URL that is usually 'GET' or 'PUT'. ``seconds`` option sets @@ -236,7 +236,10 @@ Tempurl is passed, the Unix timestamp when the temporary URL will expire. ``path`` option sets the full path to the Swift object. Example: ``/v1/AUTH_account/c/o``. ``key`` option is the secret temporary URL key set on the Swift cluster. To set a key, run - ``swift post -m "Temp-URL-Key: <your secret key>"``. + ``swift post -m "Temp-URL-Key: <your secret key>"``. To generate a prefix-based temporary + URL use the ``--prefix-based`` option. This URL will contain the path to the prefix. Do not + forget to append the desired objectname at the end of the path portion (and before the + query portion) before sharing the URL. Auth ---- @@ -244,7 +247,7 @@ Auth ``auth`` Display authentication variables in shell friendly format. Command to run to export storage - url and auth token into ``OS_STORAGE_URL`` and ``OS_AUTH_TOKEN``: ``swift auth``. + URL and auth token into ``OS_STORAGE_URL`` and ``OS_AUTH_TOKEN``: ``swift auth``. Command to append to a runcom file (e.g. ``~/.bashrc``, ``/etc/profile``) for automatic authentication: ``swift auth -v -U test:tester -K testing``. @@ -294,6 +297,30 @@ List the contents of a container: testSwift.txt +Copy an object to new destination: + +.. code-block:: bash + + > swift copy -d /DestContainer/testSwift.txt SourceContainer testSwift.txt + + SourceContainer/testSwift.txt copied to /DestContainer/testSwift.txt + +Delete an object from a container: + +.. code-block:: bash + + > swift delete TestContainer testSwift.txt + + testSwift.txt + +Delete a container: + +.. code-block:: bash + + > swift delete TestContainer + + TestContainer + Display auth related authentication variables in shell friendly format: .. code-block:: bash @@ -318,8 +345,10 @@ Download an object from a container: To upload an object to a container, your current working directory must be where the file is located or you must provide the complete path to the file. - In the case that you provide the complete path of the file, that complete - path will be the name of the uploaded object. + In other words, the --object-name <object-name> is an option that will upload + file and name object to <object-name> or upload directory and use <object-name> as + object prefix. In the case that you provide the complete path of the file, + that complete path will be the name of the uploaded object. For example: |