summaryrefslogtreecommitdiff
path: root/openstackclient/object
Commit message (Collapse)AuthorAgeFilesLines
* Blacken openstackclient.objectStephen Finucane2023-05-104-60/+102
| | | | | | | | | | Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: I6658e76d7d1f93149f24fcab28d593195b37779f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Add storage policy option to create container commandSimon Merrick2020-02-191-0/+12
| | | | | | | | + Add CLI option to specify swift storage policy + Add CLI flag to specify container uses public read ACLS + Show storage policy in container show data Change-Id: I08ffa0d98bd39d467aa415771675f59bd77768ff
* Replace six.iteritems() with .items()lihaijing2020-01-093-6/+3
| | | | | | | | | | | | | | | | 1. As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2. In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* Use cliff formattable columns in object storage commandsAkihiro Motoki2019-06-223-4/+7
| | | | | | | Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: I65737561c9b5ef29f5878316d2ff89f3d538158f
* Allow objects to be streamed to stdoutHonza Pokorny2017-07-051-1/+2
| | | | Change-Id: Icd8de6b2122fe77926d93da9bda08f56c3672a7a
* Help/docs cleanups: marker, limit, ip-address metavarsDean Troyer2017-04-042-2/+2
| | | | | | | | | | | | Cleanup help strings and docs for clarity and to keep things consistent: * --limit metavar should be <num-resource> to indicate what is being counted * --marker metavar should be <resource> or <resource-id> to indicate the type of value being specified * <*-ip-address> metavars should be just <ip-address> as there is no difference in format between fixed and floating IPs * Move all occurances of '(name or ID)' to end of help text Change-Id: I2c31746ed6ded3845244e03e57d809f8bc0e6b9d
* translate all command help strings3.4.0Steve Martinelli2016-11-173-17/+17
| | | | | | | | | | | | | | Leverage the new cliff command class attribute (_description) to get the help of a command, this allows us to mark strings for translation. We could not do this before since the help was grabbed from the docstring. This also depends on a new release of cliff and a bump to the minimum level in osc's requirements. Closes-Bug: 1636209 Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
* Add translation markers for object commandsRajasi Kulkarni2016-09-263-48/+50
| | | | | | | | | None of the help messages for the object commands are marked for translation. This patch adds the necessary support. Co-Authored-By: Steve Martinelli <s.martinelli@gmail.com> Change-Id: Ibf472d8f7d5ab6c876f60cddcab8833b28f042e0
* Add option "--name" to command "openstack object create"Rajasi Kulkarni2016-09-261-1/+13
| | | | | | | | | | | Option "--name" can be used to set as the object name of the file to be uploaded in the container. Similar to option "--object-name" in command "swift upload". Added unit test case to ensure an exception is raised when using option "--name" for uploading multiple objects. Change-Id: Ied7827841f6ca1cf9d4b48e304cbe5d62eda38ab Closes-Bug: #1607972
* Add default limit for container/objectzheng yin2016-09-262-0/+21
| | | | | | | | | | | | Default container name length less than or equal to 256 in link[1], as the same time,default object name length less than or equal to 1024 in link[2]. Thereforce, I check the length of container and object in take_action. and if it's greater than 256/1024 I warn the user. [1] https://github.com/openstack/swift/blob/master/swift/common/constraints.py#L39 [2] https://github.com/openstack/swift/blob/master/swift/common/constraints.py#L35 Change-Id: I304b77cbc464eaba041321654cc29248cbe4b9a6
* osc-lib: shellDean Troyer2016-08-051-2/+2
| | | | | | | | | | | | | Convert to using ClientManager and OpenStackShell from osc-lib. * Change all internal uses of ClientManager private attributes that are now public in osc-lib's ClientManager. Leave back-compat copies in place in OSC's clientManager so we don't break plugins. * Put some work-arounds in place for changes in osc-lib that we need until a new release makes it through the g-r and u-c change process. * Add a test for Unicode decoding of argv in shell.main() to parallel the one in osc-lib. Change-Id: I85289740d4ca081f2aca8c9b40ec422ad25d302c
* Standardize import formatshizhihui2016-07-221-1/+0
| | | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format. Change-Id: Ibf29ccaf3ddec4a956334cc3368ebee7a66e282c
* osc-lib: commandDean Troyer2016-06-133-6/+3
| | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* osc-lib: parseractionsDean Troyer2016-06-133-3/+3
| | | | | | | Leave parseractions.py and test_parseractions.py as a sanity check during the deprecation period. Change-Id: I1a7469b6d872284e0276502a1a287bc0b87f8f83
* osc-lib: utilsDean Troyer2016-06-134-4/+5
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* Add recursive object delete for containersTerryHowe2016-02-051-0/+14
| | | | Change-Id: Ib291e79864c218464e842a08efd3742193ba5ff0
* log take_action parameters in a single placeAkihiro Motoki2016-02-023-74/+10
| | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* Delete the unused LOG configure codezhurong2016-01-051-4/+0
| | | | | | Delete the unused LOG configure code and import code Change-Id: I1fb0cacfe44b6a2fd4e4b3f504b6d1dec055c5c4
* Fix up object-store show commandsSteve Martinelli2015-10-103-0/+6
| | | | | | | | | | | | | | | | 1) Change metadata to appear under a common 'properties' key, and use the utility to format them, this applied to object, account and container. 2) Clean up container and object output, which were setting the x-container-meta-owner property, but this is metadata only for the container, so it's pointless to have, removed it. 3) Container show was showing read/write ACLs and sync stuff, but these are not being returned by my swift by default, so I moved these to be checks, so we don't clutter the output. Change-Id: Ife7521fe9c2724035b06963c118bd6016ba2f5b5
* add set/unset support for objects in object storeSteve Martinelli2015-10-061-0/+74
| | | | | | | | | add docs and command support to set and unset metadata of objects that are stored in an object store (swift). Closes-Bug: #1501945 Change-Id: If838a4b3343b6ddb97cd4bd1cb63f0ba1c1a00a1
* add support for set/unset of container propertiesSteve Martinelli2015-10-061-0/+62
| | | | | | | | include docs and commands to set and unset container properties Partial-Bug: #1501945 Change-Id: I8d7e8cf356a2321a37ed940c4e10cae411b94dfd
* Add support for showing account detailsSteve Martinelli2015-10-021-1/+13
| | | | | | | | | | add the command `openstack account show` that lists details about the object store account that the user authenticated against. Partial-Bug: #1501943 Change-Id: I1246dafee812b63a41d43be4e3598224364a2c11
* Add support for updating swift account propertiesSteve Martinelli2015-10-011-0/+71
| | | | | | | | | this patch adds support for creating/updating and removing properties (nee: metadata) for object store accounts. Partial-Bug: #1501943 Change-Id: I3ed70a5d8bd8920fedb79adc60cdc602261d5eef
* Use a common decorator to log 'take_action' activationJoshua Harlow2015-09-012-8/+8
| | | | | | | | | Instead of duplicating the same log statement throughout the code, the same logic can be provided by a shared decorator that abstracts away the logging capability and unifies it behind a common function instead. Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
* Merge "Do not set default versions in parsed args"Jenkins2015-07-241-5/+3
|\
| * Do not set default versions in parsed argsTerryHowe2015-07-181-5/+3
| | | | | | | | | | | | | | | | | | | | | | Setting default versions in parsed args makes it so OCC cannot tell if the argument was parsed, an environment variable was set or it is just defaulted. In order to set api versions from OCC, it will have to be defaulted after processing OCC. Closes-Bug: #1453229 Change-Id: I4d065919397b783f3bdd4022c986c0234a7a16e6
* | More minor docs fixesTerryHowe2015-07-191-0/+0
|/ | | | Change-Id: Ia74b8e14bacb562d9bac29221f511acbab5296df
* Rename endpoint type to interfaceTerryHowe2015-07-151-1/+1
| | | | | Change-Id: I4e21d09bc747e8210f4f79a1d6c4c7ccf2f25d1c Closes-Bug: #1454392
* Add --os-endpoint-type cli optional argumentRoxana Gherle2015-07-021-0/+1
| | | | | | | | | | | | User should be able to specify the endpoint type through a CLI optional argument/ENV variable setting. We will name this new optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and based on the value given, the service API will use that specific endpoint type. Possible values: public, admin, internal. DocImpact Closes-Bug: #1454392 Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29
* Fine tune some of the helps commandsSteve Martinelli2015-01-132-2/+2
| | | | | | | | | try and add some consistency with the show and delete commands. replace 'show x' with 'display x' change 'delete a y' with just 'delete y' Change-Id: I47dfa8ee23ac5c41b355796415eb515155832f65
* Command object docs: container, objectDean Troyer2014-12-302-25/+25
| | | | Change-Id: Ie3df543a28cbee0cc809310a05f431c97b2c7e70
* Remove ClientManager._service_catalogDean Troyer2014-10-181-4/+4
| | | | | | | | | | Anything that needs a service catalog can get it directly from auth_ref.service_catalog, no need to carry the extra attribute. ClientManager.get_endpoint_for_service_type() reamins the proper method to get an endpoint for clients that still need one directly. Change-Id: I809091c9c71d08f29606d7fd8b500898ff2cb8ae
* Fix issues with object related commandsSteve Martinelli2014-10-061-6/+0
| | | | | | | | | | | | | | | 1) Can't create instance of swiftclient. Since we now create an API instance, creating a swiftclient instance won't work. Trying to do any object related command fails. 2) Listing objects in a container fails, we depend on the data returned in a specific way, during the API transition this must have slipped through. Needs regression/funcitonal tests to mame sure this doesn't happen again. Change-Id: I69079a0dc9f32b84e6f9307729d3dbbba549ac5e
* Move object-store commands to low-level APIDean Troyer2014-10-015-454/+30
| | | | | | | | api.object_store.APIv1 now contains the formerly top-level functions implementing the object-store REST client. This replaces the old-style ObjectClientv1 that is no longer necessary. Change-Id: I7d8fea326b214481e7d6b24119bd41777c6aa968
* Merge "Multiple args for object and container commands"Jenkins2014-09-182-34/+57
|\
| * Multiple args for object and container commandsTerry Howe2014-09-062-34/+57
| | | | | | | | | | | | | | Have object and container create and delete handle multiple arguments. Change-Id: I389358c13ac2d99655ca26e784e3d299286c0af3
* | Add support for 'file' format objectsSteve Martinelli2014-09-151-0/+4
| | | | | | | | | | | | | | | | Some objects can be saved as 'dirname/filename' which causes the existing support to fail. The correct behaviour should be to create the directories needed. Change-Id: I71c61bc3b0f76a3e6d2703bd45508f9d6483546e
* | Add preliminary save container supportSteve Martinelli2014-09-152-0/+43
| | | | | | | | | | | | | | | | Save all objects from a container implements bp: swift-client Change-Id: I7f2437236574e212033e63d768929d813289ed05
* | Add preliminary support for downloading objectsSteve Martinelli2014-09-152-0/+62
| | | | | | | | | | | | | | Added command and library to download a single object from swift Change-Id: I3dc47b414ff37b526e6f633aa83ac3aa4b5be0ae implements: bp swift-client
* | Use Keystone client session.SessionDean Troyer2014-09-082-8/+8
|/ | | | | | | | | | | | | | This replaces the restapi requests wrapper with the one from Keystone client so we can take advantage of the auth plugins. As a first step only the v2 and v3 token and password plugins are supported. This maintainis no changes to the command options or environment variables. The next steps will include reworking the other API client interfaces to fully utilize the single auth session. Blueprint: ksc-session-auth Change-Id: I47ec63291e4c3cf36c8061299a4764f60b36ab89
* Change app.restapi to app.client_manager.sessionDean Troyer2014-08-254-56/+55
| | | | | | | | | | | This is step 1 toward using Keystone client's session.Session as the primary session/requests interface in OSC. * Move the session create into ClientManager and rename 'restapi' attribute to 'session' * Set up ClientManager and session loggers * Fix container and object command references to restapi/api Change-Id: I013d81520b336c7a6422cd22c05d1d65655e64f8
* Add commands for object upload and deleteSteve Martinelli2014-08-082-0/+109
| | | | | | | | Add commands to upload an object to a container, and to delete an object from a container. Change-Id: I37c02315495bba5abe612733d1109a3d4ce256a1 implements: bp swift-client
* Add container create and delete supportSteve Martinelli2014-08-032-0/+90
| | | | | | | Add basic container create and delete support to OSC. Change-Id: Ia104db9d7e580d33097ea33a5690998f817995d1 implements: bp swift-client
* More make_client() logging cleanupDean Troyer2014-07-261-1/+1
| | | | Change-Id: I5af4b9c52c69d6e31e6ca5f90d5880c097880a71
* Merge "Change object API_NAME to 'object_store'"Jenkins2014-07-241-2/+3
|\
| * Change object API_NAME to 'object_store'Steve Martinelli2014-07-171-2/+3
| | | | | | | | | | | | | | | | Previously the API_NAME was 'object-store' which caused all sorts of failures when running swift commands Change-Id: I448ca10f7d173024313722246e63cf23fd71117c Closes-Bug: #1343658
* | Fix PEP8 E302 errorsDean Troyer2014-07-222-4/+4
|/ | | | | | Also add remaining skipped checks to HACKING Change-Id: I0c4333ce29597e0a8a233af17c15bed2b4d0711f
* Clean up make_client() loggingDean Troyer2014-07-081-1/+2
| | | | Change-Id: I0b6760a6401b50e3dfb891af75424ae89df42ebc
* replace string format arguments with function parametersChristian Berendt2014-05-202-4/+4
| | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
* Merge "Remove copyright from empty files"Jenkins2014-01-233-36/+0
|\