29 Commits

Author SHA1 Message Date
Steve Martinelli
019c155e9b Fine tune some of the helps commands
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
2015-01-13 00:58:57 -05:00
Dean Troyer
d5caa6a26b Command object docs: container, object
Change-Id: Ie3df543a28cbee0cc809310a05f431c97b2c7e70
2014-12-30 16:09:54 -05:00
Dean Troyer
2166d7d3af Remove ClientManager._service_catalog
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
2014-10-18 00:01:52 -05:00
Steve Martinelli
388bbbac2c Fix issues with object related commands
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
2014-10-06 20:04:19 -04:00
Dean Troyer
31018bf7c2 Move object-store commands to low-level API
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
2014-10-01 13:50:13 -04:00
Jenkins
2306059c8e Merge "Multiple args for object and container commands" 2014-09-18 08:17:14 +00:00
Steve Martinelli
09a546891f Add support for 'file' format objects
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
2014-09-15 01:58:00 +00:00
Steve Martinelli
505c784bad Add preliminary save container support
Save all objects from a container

implements bp: swift-client

Change-Id: I7f2437236574e212033e63d768929d813289ed05
2014-09-15 01:57:54 +00:00
Steve Martinelli
e47787e12f Add preliminary support for downloading objects
Added command and library to download a single object from swift

Change-Id: I3dc47b414ff37b526e6f633aa83ac3aa4b5be0ae
implements: bp swift-client
2014-09-15 01:57:50 +00:00
Dean Troyer
ae957b176e Use Keystone client session.Session
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
2014-09-08 00:06:52 -05:00
Terry Howe
b725b5017a Multiple args for object and container commands
Have object and container create and delete handle multiple
arguments.

Change-Id: I389358c13ac2d99655ca26e784e3d299286c0af3
2014-09-06 16:23:55 -06:00
Dean Troyer
4bbd03210f Change app.restapi to app.client_manager.session
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
2014-08-25 13:38:03 -05:00
Steve Martinelli
8af26a51c3 Add commands for object upload and delete
Add commands to upload an object to a container, and to delete
an object from a container.

Change-Id: I37c02315495bba5abe612733d1109a3d4ce256a1
implements: bp swift-client
2014-08-08 18:33:20 -04:00
Steve Martinelli
be83ae763f Add container create and delete support
Add basic container create and delete support to OSC.

Change-Id: Ia104db9d7e580d33097ea33a5690998f817995d1
implements: bp swift-client
2014-08-03 03:52:04 -04:00
Dean Troyer
b96d9d374c More make_client() logging cleanup
Change-Id: I5af4b9c52c69d6e31e6ca5f90d5880c097880a71
2014-07-26 12:22:50 -06:00
Jenkins
8c556e6943 Merge "Change object API_NAME to 'object_store'" 2014-07-24 03:55:49 +00:00
Dean Troyer
f3dbab4a6c Fix PEP8 E302 errors
Also add remaining skipped checks to HACKING

Change-Id: I0c4333ce29597e0a8a233af17c15bed2b4d0711f
2014-07-22 17:51:15 -06:00
Steve Martinelli
498ddf95c6 Change object API_NAME to 'object_store'
Previously the API_NAME was 'object-store' which caused all sorts
of failures when running swift commands

Change-Id: I448ca10f7d173024313722246e63cf23fd71117c
Closes-Bug: #1343658
2014-07-17 19:17:07 -04:00
Dean Troyer
21bd4619ae Clean up make_client() logging
Change-Id: I0b6760a6401b50e3dfb891af75424ae89df42ebc
2014-07-08 01:44:55 -05:00
Christian Berendt
3b485de6b0 replace string format arguments with function parameters
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.

Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
2014-05-20 13:49:56 +02:00
Jenkins
cb2fd0af83 Merge "Remove copyright from empty files" 2014-01-23 17:38:15 +00:00
Jenkins
9e9bbad120 Merge "Remove remaining print statements" 2014-01-23 04:09:53 +00:00
Dean Troyer
350718f3bb Remove remaining print statements
I think these are the last two stragglers, including debugging lines

Change-Id: Ic3dd98480211d0f7d3cc951bec5cd54f902a101f
2014-01-22 18:53:11 -06:00
Alexander Ignatov
ad4367839f Remove copyright from empty files
According to policy change in HACKING:
http://docs.openstack.org/developer/hacking/#openstack-licensing
empty files should no longer contain copyright notices.

Change-Id: Iba09a00f24dfbd1cd03c1c9f70ea216788e64d93
Closes-Bug: #1262424
2014-01-20 17:28:13 +04:00
Dean Troyer
f2dbe2e437 Bring RESTApi closer to ithe imminent keystoneclient.Session
Prepare to use the (soon to be) common Session from keystoneclient
* Rework RESTApi to eventually be a subclass of keystoneclient.Session

Change-Id: I68e610f8b19a3f6267a93f7bf3de54a228be68aa
2013-12-03 14:26:46 -06:00
Dean Troyer
935781fdf9 Restore Object API name 'object-store'
It's used in the service catalog, doh!

Change-Id: If8f6db49c84756fd8e58cc68910160da4cd99b5d
2013-11-25 14:46:57 -06:00
Dean Troyer
9062811d10 Expand support for command extensions
Allows client libraries to have complete access to the rest of the
OSC ClientManager.  In addition, extension libraries can define
global options (for API version options/env vars) and define
versioned API entry points similar to the in-repo commands.

The changes to ClientManager exposed some issues in the existing
object api tests that needed to be cleaned up.

Change-Id: Ic9662edf34c5dd130a2f1a69d2454adefc1f8a95
2013-11-21 01:27:10 -06:00
Dean Troyer
ad59b03be6 Add object-store show commands
* Add lib.container.show_container() and lib.object.show_object()
* Add container and object show commands

Change-Id: I963d664c55b59739453345f0f353aa2eaf1bf70e
2013-09-26 13:34:11 -05:00
Dean Troyer
725e2543ef Object API commands using our REST API layer
* Add object-store API to ClientManager
* Add object-store client
* Add Object API library in openstackclient.object.v1.lib
* Add Object API {container,object} list commands
* Add library tests
* Add command tests

This should complete the Object v1 container and object list commands

Change-Id: Ib1770d45efa8871959826b85faafa1e0bcef0a03
2013-08-28 22:16:34 -05:00