summaryrefslogtreecommitdiff
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Rename Openstack to OpenStacktanlin2014-02-131-9/+9
| | | | Change-Id: I091b1d2de41ff59b21ce136738e2f69b759d682b
* Fix swiftclient helpChristian Schwede2014-02-071-16/+20
| | | | | | | | Command help was wrong in some cases. While we're at it, add some defaults to help and change some brackets to be consistent with http://en.wikipedia.org/wiki/Command-line_interface#Command_description_syntax Change-Id: I5d7b2a703294d97fc5e3de43b9ec375c3ea55a6e
* Fix misspellings in python swiftclientShane Wang2014-02-071-1/+1
| | | | | | | | | Fix misspellings detected by: * pip install misspellings * git ls-files | grep -v locale | misspellings -f - Change-Id: I2fb042b3d9eb59cd404c52c775e5cc870e6157e1 Closes-Bug: #1257295
* Add capabilities optionFabien Boucher2014-01-171-1/+42
| | | | | | | | This patch adds a capabilities option on swiftclient. This option uses the new /info endpoint to request the remote capabilities and nicely display it. Change-Id: Ie34b454511d5527e402e66e1fdb72120f427f2fd
* Merge "Add --object-name"Jenkins2013-12-251-11/+35
|\
| * Add --object-nameTaurus Cheung2013-12-241-11/+35
| | | | | | | | | | | | | | | | | | Add parameter --object-name, which: 1) Sets target object name when upload single file 2) Sets object prefix when upload a directory Change-Id: Idc4357c3355e66d31c100540b901e70db20b03c3 Closes-Bug: 1012979
* | Fix help of some optional argumentsSahid Orentino Ferdjaoui2013-12-181-4/+4
|/ | | | | | | | | | Some positional arguments are optional but the help indicate they are mendatory and can be confuse for an user. swift delete <container> [object] swift post <container> [object] Change-Id: I7be525905b51d3ef160b0f47194e817b5cba0f9b
* Fix download bandwidth for swift command.jola-mirecka2013-11-281-7/+13
| | | | | | | | | | | | | | | | We noticed a difference in download bandwidth while using authentication details and pre-auth information for download. Download using authentication details included authentication time into the download bandwidth at each call of the function. This time should have been excluded from download bandwidth. This patch set is adding a timer variable to the client library. That allows to accurately measure and store the time of each action. Then while printing the download bandwith in the swift command authentication time is excluded from bandwidth. Change-Id: I63df9023e169f637f120ae9e25dac9c90a4e75a0 Fixes: bug #1197443
* Merge "Allow custom headers when using swift download (CLI)"Jenkins2013-11-271-1/+15
|\
| * Allow custom headers when using swift download (CLI)Matthieu Huin2013-11-041-1/+15
| | | | | | | | | | | | | | | | | | | | This fixes bug #1051046 A repeatable option, --header or -H, is added so a user can specify custom headers such as Range or If-Modified-Since when downloading an object with the swift CLI. Change-Id: I1f7dcf64cf625f2e5a4488c210894cfe6e0d5974
* | Merge "Add verbose output to all stat commands"Jenkins2013-11-211-120/+6
|\ \ | |/ |/|
| * Add verbose output to all stat commandsClay Gerrard2013-10-091-120/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | When you stat a container or object with the verbose flag the full path of the reousrce will be displayed with the token similarlly to how an account stat displays the auth url and token. * move some logic out of bin/swift.st_stat to test it * new module swiftclient.commnad_helpers for code you want to test * moved prt_bytes into swiftclient.utils to test it * fixed IndexError with prt_bytes on sizes >= 1024Y Change-Id: Iaaa96e0308b08c554205b0055b8a04de581fefa4
* | Fix a typo in help text: "downlad"Romain Hardouin2013-10-271-1/+1
| | | | | | | | | | Change-Id: Icd6cf75f3c5758c13118060c19c9c000e28ef3ae Closes-Bug: #1245082
* | Merge "enhance swiftclient logging"Jenkins2013-10-181-5/+11
|\ \
| * | enhance swiftclient loggingLeah Klearman2013-10-171-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * log to debug for successes and info for errors * remove dead code, neither body or raw_body are sent in kwargs * include resp.reason and response headers in logging * remove trailing \n in logging. users who want them can set logging.basicConfig(format=FORMAT) * add --info option to swift cli Change-Id: If07af46cb377f3f3d70f6c4284037241d360a8b7
* | | Merge "Extend usage message for `swift download`"Jenkins2013-10-171-2/+4
|\ \ \
| * | | Extend usage message for `swift download`Alexis Lee2013-09-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it clear that you do not have to provide either the container or object positional parameters, and what swiftclient will do if you omit them. Change-Id: I3766fc1eabd51f197e2175771af579577a96c192
* | | | Merge "user defined headers added to swift post queries"Jenkins2013-10-171-0/+2
|\ \ \ \ | |_|/ / |/| | |
| * | | user defined headers added to swift post queriesMatthieu Huin2013-09-271-0/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | This commit fixes a problem where headers passed through the option --header were not taken into account when doing "post" queries. Change-Id: Ia34808c53a1816d9956a98e0803d8c4d20d2ad44 Closes-Bug: #1226256
* | | Clarify main help for post subcommandPete Zaitcev2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | Fixes bug 1231321 Change-Id: I7014aa160ebe5ba0bc5a91de05e6858fc58f69e0
* | | Make pbr only a build-time dependency.Samuel Merritt2013-10-101-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This lets you build python-swiftclient packages that don't require pbr to be installed at all. You would need pbr on the machine running rpmbuild / debuild, but not on the machines that install the packages. Unfortunately, this does not make python-swiftclient able to be installed via pip 0.3.1 on Lucid; you'll need to uninstall the system python-pip package and install a new pip some other way. Given that pip < 1.3 doesn't perform SSL certificate validation for pypi (trivial MITM attack, anyone?), you'd probably want to get a new pip anyway. Change-Id: I85d4d77aacf094e48d39e48e750594b95dbc7af0
* | fix bug with replace old *LOsDavid Goetz2013-09-101-1/+1
|/ | | | Change-Id: I9e6278b62608cf36fa7e5e228f234cc8199c17fc
* Remove redundant unit suffixStanislaw Pitucha2013-08-281-1/+1
| | | | | | | Transfer speed already has a "MB/s" unit. The "s" suffix was probably a copy/paste mistake. Change-Id: Iccd7894d5ca11aac8a9f98365834c5d3deef0720
* Reformat help outputsJakub Krajcovic2013-08-191-70/+194
| | | | | | | | | | | Reformatted the help outputs in the swift client to bring them more in line with the rest of the openstack clients. Changes were added to all of the st_command_help variables and a new variable st_command_options was added to help with correct formatting of help outputs. Change-Id: I0c549cf96292384ddb36b43ecec41a883d8b2e13 Implements: changes to help outputs
* Move multi-threading code to a library.Darrell Bishop2013-07-281-394/+264
| | | | | | | | | | | | | | | | | | | | | | This patch extracts the multi-threading code from bin/swift into swiftclient/multithreading and adds tests. In particular, this new way of doing it (with context managers) will prevent non-daemonic threads from wedging the process when unexpected exceptions happen. I enabled reporting of which lines, specifically, are not covered by unit tests (added -m option to "coverage report" in .unittests). This patch includes a drive-by fix for uploading a segmented file with --use-slo when that object already exists. A key of "name" was used instead of "path", raising KeyError. There's also another drive-by fix for uploading segmented objects with --use-slo. Commit 874e0e4427b80e1b15b74a1557b73ba9d61443ca regressed this by removing the capturing of thread-worker results in QueueFunctionThread.run(). This patch restores that functionality and the feature (uploading SLO objects). Change-Id: I0b4f677e4a734e83d1a25088d9a74f7d46384e53
* Merge "Allow setting # of retries in the binary"Jenkins2013-07-121-0/+3
|\
| * Allow setting # of retries in the binaryBen McCann2013-07-081-0/+3
| | | | | | | | Change-Id: I7ef4f1f86cc6ea4937043ea7bf7d9526e23bd2c7
* | Merge "Allow storage url override for both auth vers."Jenkins2013-07-101-4/+5
|\ \
| * | Allow storage url override for both auth vers.Darrell Bishop2013-07-051-4/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When --os-storage-url is specified on the command-line to bin/swift, it will override the used storage URL regardless of authentication for both authentication version 1 and version 2. This can be used to bypass a load-balancer to hit a specific proxy server for testing/debugging purposes. Within the client library, this feature is accessed by passing the desired storage URL into swiftclient.client.Conection.__init__() via the os_options keyword argument. For example: conn = Connection(auth_url, user, key, os_options={ 'object_storage_url': 'http://overridden.storage.url/AUTH_foo'}) This patch also adds a dependency on mock>=0.8.0, which is the same as openstack/swift. Change-Id: Id2a36ed6abffd65e7762b6beea5bbfc6c036e848
* | Note '-V 2' is necessary for auth 2.01.5.0Kun Huang2013-07-071-1/+2
|/ | | | | | | | | | Here are some questions in Launchpad, just because they miss '-V 2' for auth 2.0. https://answers.launchpad.net/swift/+question/231938 https://answers.launchpad.net/swift/+question/231279 So I add somethins for noteing people add the '-V 2' Change-Id: I2e0fef969be4eca316975de03fdbc516a1069acf
* Merge "Add -p option to download command."Jenkins2013-07-051-130/+151
|\
| * Add -p option to download command.Darrell Bishop2013-06-261-130/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the ability to download a subset of containers (--all with -p) or a subset of objects within a container (container name with -p). This patch also includes a drive-by fix for "download --all" which would not actually download any objects (for me, at least) because the object queue got filled with "stop" messages before the container workers had run long enough to put work in the object queue. Doh! I also closed up a few holes where an (unexpected, obviously) Exception could cause the process to hang because non-daemon threads still existed. Change-Id: I71c6935c60282b5353badc2dfce8a935d47e3bb7
* | add -t for totals to list command and --lh to statMark Seger2013-06-261-19/+50
|/ | | | Change-Id: Ieaba5e7762032bf9a2652ead39870d55e85b4672
* Merge "Add -l and --lh switches to swift 'list' command"Jenkins2013-06-111-6/+71
|\
| * Add -l and --lh switches to swift 'list' commandMark Seger2013-06-101-6/+71
| | | | | | | | | | | | | | Also updated man page and added an example in 'list' command help message Change-Id: Icf38de9bab6d387a9a1deed444a91f68b4389cfe
* | Add option to disable SSL compressionStuart McLaren2013-06-041-1/+7
|/ | | | | | | | | | | Allows optionally disabling SSL compression. This can significantly improve HTTPS upload/download performance in some cases -- in particular when the object is not compressible and you have very high network bandwidth. Implements blueprint ssl-compression. Change-Id: I1260055f9c2e83cdabfeb51aed11b3899bed4d55
* remove busy-wait so that swift client won't use up all CPU cyclesTong Li2013-05-291-117/+61
| | | | | | | | | | | | The current implementation uses busy-wait and checking flags to communicate between threads. It wastes a lot of CPU powers. With python 2.6 is required for Swift, the communication between threads should now be using queue and signal mechanisms. This patch removed the busy-wait loops and use queue and queue join for threads coordination which will not consume CPU cycles if a thread is blocked. Change-Id: I648cd637a92a159d5c13baa83f357cee2dfe7937
* do not warn about etag for sloDavid Goetz2013-05-131-2/+4
| | | | Change-Id: I17fa1643f28aa1cd160c2d770243875a3c4a80ee
* Switch to flake8.Monty Taylor2013-05-011-71/+107
| | | | Change-Id: Ib9ba1e7eed09c5a90c558a8365d0a87c3f4b5ee5
* Improve Python 3.x compatibilityDirk Mueller2013-04-291-23/+23
| | | | | | | | Some mechancical replacement of the deprecated except x,y: construct with except x as y, which works with any Python version >= 2.6 Change-Id: Ic245049dc7b408a5c89b9e27dfd2bd7c08acc5b5
* Merge "Static large object support."1.4.0Jenkins2013-04-041-34/+105
|\
| * Static large object support.David Goetz2013-04-031-34/+105
| | | | | | | | | | | | | | | | Also fixed bug with current large objects with segment listing prefixes. Allow retry for object PUTs when possible. Change-Id: I0edff127fd5d5c53da33aa7cb76a4f4dc85bf6e6
* | Improve auth option helpDean Troyer2013-04-041-3/+14
|/ | | | | | | Add to the help strings to clarify the need for --os-auth-token to also have --os-storage-url supplied. Change-Id: I6a7259c38ce01813ae96f307efaf46e7863bd223
* Merge "Allow user to specify headers at the command line."Jenkins2013-03-211-1/+15
|\
| * Allow user to specify headers at the command line.tong li2013-03-181-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently swift client does not allow content type to be specified when upload an object. It does not allow a user to change content type neither. This patch will allow a user to specify content type by using upload command or modify the content type by using post command. For example: 1. To upload an object with specific content type: swift upload -H content-type:applicaiton/xml con1 file1 2. To modify an object to a specific content type: swift post -H content-type:application/josn con1 file1 This patch also allow a client to specify other request headers. Change-Id: I12db83a1d465285e0906889cc67dfaa44e059568 Fixes: bug #1154621
* | Merge "Allow v2 to use storage_url/storage_token directly"Jenkins2013-03-191-1/+7
|\ \ | |/ |/|
| * Allow v2 to use storage_url/storage_token directlyChmouel Boudjnah2013-02-271-1/+7
| | | | | | | | | | | | - Fixes bug 1134306. Change-Id: Ie1737c57f57bcdad50b3096c921d46a1fe5293b8
* | Merge "Added "/" check when list containers."Jenkins2013-02-281-1/+1
|\ \
| * | Added "/" check when list containers.Jian Zhang2013-02-241-1/+1
| |/ | | | | | | | | | | | | | | If there is a "/" in container name, print usage. Fixs bug 1121897. Change-Id: I633b5b7ff3a8dbc249ddd3c65439dd46c7d93b4a
* | Allow to specify segment containeryuan-zhou2013-02-261-6/+20
|/ | | | | | | | | | | | | | Fix bug 1110924 Add segment container option as part of 'swift upload -S'. If this option is omitted, the segments will go to <container>_segments. Example: $ swift upload c1 obj1 -S 1 -C user_segments Please check swift upload --help for more details Change-Id: Ib71aae322485d8d3ac89916d37ebcac053f49e3b