summaryrefslogtreecommitdiff
path: root/swiftclient/shell.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typo in shell.pyzhangyanxian2016-12-161-1/+1
| | | | | | TrivialFix Change-Id: I0b0a21df1433ec8f355c452c91a818feb9f6f134
* Merge "modify 'swift <sub_command> —help' display"Jenkins2016-12-131-6/+12
|\
| * modify 'swift <sub_command> —help' displayShashirekha Gundur2016-12-131-6/+12
| | | | | | | | | | | | | | | | | | In python swiftclient: swift <sub_command> —help will now display st_<sub_command>_options + st_<sub_command>_help texts e.g. http://paste.openstack.org/show/589752/ Change-Id: I34e4b2ac29ef395f8ca474ce7a82f59a1fd8c7f4 Closes-Bug: #1621415
* | Merge "Add additional headers for HEAD/GET/DELETE requests."Jenkins2016-11-081-2/+25
|\ \ | |/ |/|
| * Add additional headers for HEAD/GET/DELETE requests.Charles Hsu2016-11-071-2/+25
| | | | | | | | | | Change-Id: I69276ba711057c122f97deac412e492e313c34dd Closes-Bug: 1615830
* | Merge "Update help text around container ACL syntax"Jenkins2016-09-191-3/+5
|\ \ | |/ |/|
| * Update help text around container ACL syntaxMohit Motiani2016-09-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch add the information about the syntax of provding read and write access to the users within a project. The current status is: account:* does not work with tempauth account does not work with keystoneauth Furthermore, the concept of "account" is fuzzy. It could be a "project", but even that doesn't distinguish between a project id and a project name. Change-Id: I4462230fe05aa4a742e825f5b6312deb93bc1170 Closes-Bug: #1587677
* | Merge "Make object option dependent on container in usage strings"Jenkins2016-09-141-4/+4
|\ \
| * | Make object option dependent on container in usage stringsAlistair Coles2016-09-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | In usage messages, it only makes sense to have an object option if the container option has been specified. Fixes the parentheses to indicate this. Change-Id: I550ba99879ea6ce5489617a94cec36b66be270c8 Related-Change: Ie84a90eb0278dd2cdf5775948572bb140f8d2c4b
* | | Merge "Make tempurl command check for valid object path"Jenkins2016-09-141-7/+7
|\ \ \
| * | | Make tempurl command check for valid object pathAlistair Coles2016-09-141-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the supplied path is not of the form /v1/a/c/o then swift tempurl subcommand will now return an error message. Also removes redundant check for seconds parameter being an int from shell.py because the same check is made when calling utils.generate_temp_url. Drive-by fix for missing param definition for generate_temp_url. Change-Id: I41f4389948b01fadaa5fc4939ea12e0ed2167345 Related-Change: I0fb2ce125fe12d660e4deb778265016bdd5ff31b
* | | | Merge "Make options arguments truely optional"Jenkins2016-09-081-9/+17
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | Make options arguments truely optionalChristian Schwede2016-09-061-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the options help, info and debug must exist in the options dictionary; however it might be that this is not the case if a method is imported externally. This patch fixes this. Also support using a storage URL or path as an argument for tempurl, and adding a test to verify correct output in both cases. Related-Bug: 1607519 Related-Bug: 1607523 Closes-Bug: 1607521 Change-Id: I0fb2ce125fe12d660e4deb778265016bdd5ff31b
* | | Fixed inconsistent positional arguments namingNandini Tata2016-09-071-18/+19
|/ / | | | | | | | | | | | | | | | | When printing the help menu for Swift commands, it is confusing to see both positional arguments and options not distinguished. The positional arguments are supposed to be enclosed in angular braces <>, options in square braces [] and optional positional arguments in [<>]. Change-Id: Ie84a90eb0278dd2cdf5775948572bb140f8d2c4b
* | Merge "Add copy object method"Jenkins2016-08-241-1/+101
|\ \
| * | Add copy object methodMarek Kaleta2016-08-231-1/+101
| |/ | | | | | | | | | | | | | | | | | | | | Implement copy object method in swiftclient Connection, Service and CLI. Although COPY functionality can be accomplished with 'X-Copy-From' header in PUT request, using copy is more convenient especially when using copy for updating object metadata non-destructively. Closes-Bug: 1474939 Change-Id: I1338ac411f418f4adb3d06753d044a484a7f32a4
* | Add --json option to `swift capabilities` / `swift info`Tim Burke2016-08-021-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us do things like: $ swift info --json | jq '[.swift.policies[].name]' [ "Standard-Replica", "EC" ] Also, escape more dashes in the man page, so they won't be misinterpreted as hyphens. Change-Id: Ic7690bdbcfc55f55e5dde9bc11bb0644085973ce
* | Merge "Add an option: disable etag check on downloads"Jenkins2016-06-061-1/+5
|\ \
| * | Add an option: disable etag check on downloadsCheng Li2016-06-021-1/+5
| |/ | | | | | | | | | | | | | | This patch is to add an option of disable etag check on downloads. Change-Id: I9ad389dd691942dea6db470ca3f0543eb6e9703e Closes-bug: #1581147
* | Suppress InsecureRequestWarning when using --insecureTim Burke2016-06-011-0/+5
|/ | | | | | | | | The user already knows this is insecure, there's no point in bringing it up again and again. See also: https://github.com/kennethreitz/requests/issues/2214 Change-Id: I7991b2e568407269f84138bc03711147ed080c9c
* Merge "Support client certificate/key"Jenkins2016-05-191-0/+12
|\
| * Support client certificate/keyCedric Brandily2016-04-101-0/+12
| | | | | | | | | | | | | | | | | | This change enables to specify a client certificate/key with: * usual CLI options (--os-cert/--os-key) * usual environment variables ($OS_CERT/$OS_KEY) Closes-Bug: #1565112 Change-Id: I12e151adcb6084d801c6dfed21d82232a3259aea
* | Default to v3 auth if we find a (user|project)-domain-(name|id) optionTim Burke2016-05-031-2/+1
| | | | | | | | Change-Id: I4616492752b620de0bf90672142f1071ec9bac83
* | Pull option processing out to service.pyTim Burke2016-05-031-35/+3
| | | | | | | | | | | | | | ...because it seems silly that we do nearly the same thing in two different places Change-Id: Iafafe3c553d00652adb91ceefd0de1479cbcb5da
* | Parse options to dictTim Burke2016-05-031-121/+113
| | | | | | | | | | | | | | This is a first step toward unifying the options parsing magic between shell.py and service.py Change-Id: If001e07978c0bae729ac0cd9b2c2934092c98447
* | Merge "Fix downloading from "marker" item"Jenkins2016-04-141-2/+2
|\ \ | |/ |/|
| * Fix downloading from "marker" itemSergey Gotliv2016-04-081-2/+2
| | | | | | | | | | | | | | | | | | The documentation of "swift download" hints that "marker" option is supported, but in reality we forgot to patch it through, so all downloads were always done with the default, empty marker. Closes-Bug: #1565393 Change-Id: I38bd29d2baa9188b61397dec75ce1d864041653c
* | Merge "Port from optparse to argparse"Jenkins2016-04-081-264/+299
|\ \ | |/ |/|
| * Port from optparse to argparseTim Burke2016-04-061-264/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Why now? * argparse was introduced in Python 3.2 and back-ported to Python 2.7. Until we dropped Python 2.6 support, we were stuck on optparse. * keystoneauth.loading.cli provides register_argparse_arguments and load_from_argparse_arguments helper methods. Now that we're moving toward Keystone Session support, argparse seems required. Closes-Bug: 1553030 Change-Id: I5139fb64a8631a3010680090fd04345f95c55c7b
* | Removes redundant "to"Nguyen Hung Phuong2016-03-181-1/+1
| | | | | | | | | | | | This patch removes "to" in swift guide. Change-Id: I4104bd3651947e341e1ed06c76b3f8f66f565c3f
* | Merge "Include response headers in ClientExceptions"Jenkins2016-03-171-2/+9
|\ \ | |/ |/|
| * Include response headers in ClientExceptionsTim Burke2016-03-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | Now, client applications can get to things like transaction IDs for failures without needing to turn on all of logging. While we're at it, add a from_response factory method for ClientException. Co-Authored-By: Alexander Corwin <ancorwin@gmail.com> Change-Id: Ib46d5f8fc7f36f651f5908bb9d900316fdaebce3
* | Merge "Check threads number options validation"Jenkins2016-03-171-6/+50
|\ \ | |/ |/|
| * Check threads number options validationMin Min Ren2016-02-241-6/+50
| | | | | | | | | | | | | | | | Add checking object-threads, container-threads and segment-threads options validation The values should be a positive integer Change-Id: Iaf98e33dae4b9a7f82e33f7cc2e5a0b293a1c76f Close-Bug: #1546973
* | Follow-up to patch 282363Tim Burke2016-02-251-1/+1
| | | | | | | | | | | | | | | | | | * Improve some formatting * Be more explicit about how much will be revealed when * Rename redact_sensitive_tokens to redact_sensitive_headers, as it affects more than tokens. Change-Id: I02b375d914e9f0a210d038ecb31188d09a8ffce3
* | Do not reveal auth token in swiftclient log messages by defaultJoel Wright2016-02-221-0/+2
|/ | | | | | | | | | | | | | | | Currently the swiftclient logs sensitive info in headers when logging HTTP requests. This patch hides sensitive info in headers such as 'X-Auth-Token' in a similar way to swift itself (we add a 'reveal_sensitive_prefix' configuration to the client). With this patch, tokens are truncated by removing the specified number of characters, after which '...' is appended to the logged token to indicate that it has been redacted. Co-Authored-By: Li Cheng <shcli@cn.ibm.com> Co-Authored-By: Zack M. Davis <zdavis@swiftstack.com> Change-Id: I43dd7254f7281d4db59b286aa2145643c64e1705 Closes-bug: #1516692
* Merge "Display proper name when failing to create segments container"Jenkins2016-02-171-1/+1
|\
| * Display proper name when failing to create segments containerTim Burke2016-02-101-1/+1
| | | | | | | | | | | | Previously, we displayed the base container's name. Change-Id: I70f1949a44ba61158e31178e4536f229c37aab47
* | Merge "Fix debug and info option parsing"Jenkins2016-02-111-8/+7
|\ \
| * | Fix debug and info option parsingChristian Schwede2015-12-301-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The debug and info options need to be set before a subcommand method is called, otherwise they are simply ignored. This is kind of irritating - other options (for example -U, -A, -K) are usable after a positional command. This patch fixes this, and commands like these are no longer ignoring --debug or --info: swift stat --debug swift list container --info Co-Authored-By: Alistair Coles <alistair.coles@hpe.com> Change-Id: Ib19b05deef7a015881f1eed4a3946025e16bf922
* | | Support --os-identity-api-version optionAlistair Coles2016-02-051-6/+17
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the auth-version to be specified using --os-identity-api-version or OS_IDENTITY_API_VERSION for compatibility with other openstack client command line options. The auth version used will be selected as follows: - if either --auth-version or --os-identity-api-version is set, use that value - otherwise use the value of ST_AUTH_VERSION, if set - otherwise use the value of OS_AUTH_VERSION, if set - otherwise (new behaviour) use the value of OS_IDENTITY_API_VERSION, if set - otherwise default to 1.0 Note that before this change the auth version might have defaulted to 1.0 despite OS_IDENTITY_API_VERSION being set, but with this change OS_IDENTITY_API_VERSION is preferred. Change-Id: Ifba4c4e43560ede3013337b8cdbc77dc2de6e8ff Closes-Bug: #1541273
* | Merge "Convert http response(byte string) to string in python3."Jenkins2016-01-221-1/+2
|\ \
| * | Convert http response(byte string) to string in python3.Charles Hsu2015-09-061-1/+2
| | | | | | | | | | | | | | | | | | | | | Avoid a TypeError exception in python3. Change-Id: I4039e3f2a88b5f681288b5ca8dd5c63c13b7764f Closes-bug: #1457012
* | | Use bulk-delete middleware when availableTim Burke2016-01-121-15/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When issuing `delete` commands that would require three or more individual deletes, check whether the cluster supports bulk deletes and use that if it's available. Additionally, a new option is added to the `delete` command: * --prefix <prefix> Delete all objects that start with <prefix>. This is similar to the --prefix option for the `list` command. Example: $ swift delete c --prefix obj_prefix/ ...will delete from container "c" all objects whose name begins with "obj_prefix/", such as "obj_prefix/foo" and "obj_prefix/bar". Change-Id: I6b9504848d6ef562cf4f570bbcd17db4e3da8264
* | | Fix some typosTim Burke2015-12-301-1/+1
| |/ |/| | | | | Change-Id: Iaf7f30a7ae0c2ac76fc5cdcee31ea74c08ce601e
* | Merge "Unification of manpages and docstrings"Jenkins2015-12-011-9/+12
|\ \
| * | Unification of manpages and docstringsPeter Lisák2015-11-131-9/+12
| | | | | | | | | | | | | | | | | | | | | * adding missing options * unification of help Change-Id: I2365e66433b63de8fd4da205611d9c1bf3bb6730
* | | Merge "Suppress iso8601 logging from --debug output"Jenkins2015-12-011-0/+1
|\ \ \ | |/ / |/| |
| * | Suppress iso8601 logging from --debug outputQiu Yu2015-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | This change silences logging from iso8601 when --debug option set Change-Id: Ib8b8423012d43ef78d7138609fa98f40d46e7d4b Closes-bug: #1324470
* | | Add content-type in list of container contentPeter Lisák2015-11-111-1/+3
| | | | | | | | | | | | Change-Id: Ie0787d5ffbee0a7d2429cb285fa6ecdf722e4ae1