summaryrefslogtreecommitdiff
path: root/swiftclient/command_helpers.py
Commit message (Collapse)AuthorAgeFilesLines
* object versioning featuresClay Gerrard2020-04-081-1/+5
| | | | | | | | | | * add --versions to list * add --versions to delete * add --version-id to stat * add --version-id to delete * add --version-id to download Change-Id: I89802064921778fee7efe57c7d60c976cdde3a27
* Add additional headers for HEAD/GET/DELETE requests.Charles Hsu2016-11-071-4/+10
| | | | | Change-Id: I69276ba711057c122f97deac412e492e313c34dd Closes-Bug: 1615830
* Add per policy container count to account stat outputClay Gerrard2014-09-191-0/+8
| | | | | | | | | | When the account response includes 'X-Storage-Policy-X-Container-Count' the command helpers will stick a helpful extra line in the output. If the swift response doesn't include the information the behavior is unchanged. Change-Id: Iaaa55d207ebe6a9c16e52adb56eb858c57cfb26a
* Add importable SwiftService incorporating shell.py logicJoel Wright2014-08-261-64/+117
| | | | | | | | | | | | | | | | This patch adds a SwiftService class that incorporates the high level logic from swiftclient/shell.py. It also ports shell.py to use the new class, and updates the code in swiftclient/multithreading.py to allow the SwiftService to be used for multiple operations whilst using only one thread pool. Currently, code that imports swiftclient has to have its own logic for things like creating large objects, parallel uploads, and parallel downloads. This patch adds a SwiftService class that makes that functionality available in Python code as well as through the shell. Change-Id: I08c5796b4c01001d79fd571651c3017c16462ffd Implements: blueprint bin-swift-logic-as-importable-library
* Clean up raw policy stats in account statYuan Zhou2014-08-061-9/+32
| | | | | | | | | | | | | | | | | | | | | Storage policy stats was not well parsed in account stat. This patch parses the stats and print out the stats in a format like below: $swift -A http://swift_cluster/auth/v1.0 -U test:tester -K testing stat Account: AUTH_test Containers: 5 Objects: 1 Bytes: 2097152 Objects in policy "golden": 1 Bytess in policy "golden": 2097152 Objects in policy "silver": 0 Bytes in policy "silver": 0 X-Timestamp: 1404697760.88809 X-Trans-Id: txec519e24b44a413abb705-0053da2dcb Content-Type: text/plain; charset=utf-8 Accept-Ranges: bytes Change-Id: I7ad0ee6d88f8393e3a93e90cd52b9b592da7072d
* match hacking rules in swiftJohn Dickinson2014-01-241-0/+13
| | | | Change-Id: Iee02978f38ca020754f52ceaed6aa3684fa87bc9
* Add verbose output to all stat commandsClay Gerrard2013-10-091-0/+91
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