summaryrefslogtreecommitdiff
path: root/openstackclient/api
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add version url config workaround"Jenkins2015-01-191-1/+45
|\
| * Add version url config workaroundDean Troyer2015-01-151-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This subclasses KSC's generic Password plugin to allow version discovery with default Keystone configurations that leave admin_endpoint and public_endpoint at the default values (http://localhost:xxxx). This patch copies the scheme and netloc from the original auth_url into the URL returned from version discovery if the returned netloc begins with 'localhost'. Due to the specific nature of this review, the Keystone team is not inclned to include it in keystoneclient so it is addressed here. Closes-bug: #1410364 Change-Id: I877fe74d86aab3a63122a07b77d1302a007f5b30
* | Add helpful messages when authN'ing with passwordSteve Martinelli2015-01-161-1/+21
|/ | | | | | | | | | Setting up auth options can be complicated, and we currently don't do any checking before we build all our auth parameters to send off to keystoneclient. We should do some basic checking to guide new users. Change-Id: I9c88f1c9637b3870c151952ecc797aaf65be271a Closes-Bug: #1400531
* Don't import form keystoneclient.openstack.commonJamie Lennox2014-12-171-2/+1
| | | | | | | | The keystoneclient.openstack.common directory is where we sync files from oslo incubator. It is not a public directory and should not be being consumed by openstackclient. Change-Id: I011bb95c2c824e2dbc4b822ca922ae77b8d9b955
* Merge "Enhance the theming for modules page"Jenkins2014-12-011-0/+1
|\
| * Enhance the theming for modules pageSteve Martinelli2014-11-181-0/+1
| | | | | | | | | | | | Also fixes a few small docstring syntax errors Change-Id: I85eb968e32c1191cf5d60d02deff2ab7f3291074
* | Add environment variable in the os-auth-type helpMarek Denis2014-11-171-1/+2
|/ | | | | | | Help for option --os-auth-type doesn't specify what environment variable configures it. This patch fixes that. Change-Id: Id2e29e477d5ca56339bd777fb73b5af13788615b
* Merge "Change --os-auth-plugin to --os-auth-type"Jenkins2014-10-241-33/+31
|\
| * Change --os-auth-plugin to --os-auth-typeDean Troyer2014-10-231-33/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User's don't know what a plugin is. * Internally, os_auth_type and/or auth_type represents what the user supplied. * auth_plugin_name is the name of the selected plugin * auth_plugin is the actual plugin object Plugin selection process: * if --os-auth-type is supplied: * if it matches against an available plugin, done * (if it can map to an availble plugin type, done; TODO in a followup) * if --os-auth-type is not supplied: * if --os-url and --os-token are supplied, select 'token_endpoint' * if --os-username supplied, select identity_api_version + 'password' * if --os-token supplied, select identity_api_version + 'token' Change-Id: Ice4535214e311ebf924087cf77f6d84d76f5f3ee
* | Merge "Update use of open() in object API"Jenkins2014-10-241-1/+7
|\ \ | |/ |/|
| * Update use of open() in object APIDean Troyer2014-10-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Switch to use io.open() for py3 compatibility and simpler testing. * Open files in 'rb' mode to avoid translation on Windows Previously tests simply relied on files that were present in the repository to run tests using open(). Change the filenames to ensure that no longer happens. requests_mock doesn't have a way to match against the request body for PUT/POST; an attempt to add a new Matcher to do that worked but it needs to subclass the currently private adapter._Matcher class or duplicate most of its functionality. Change-Id: I8c30b41db20af8ecafe67e760e872fc08adec905
* | Clean up shell authenticationDean Troyer2014-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove the auth option checks as the auth plugins will validate their own options * Move the initialization of client_manager to the end of initialize_app() so it is always called. Note that no attempts to actually authenticate occur until the first use of one of the client attributes in client_manager. This leaves initialize_clientmanager() (formerly uathenticate_user()) empty so remove it. * Remove interact() as the client_manager has already been created And there is nothing left. * prepare_to_run_command() is reduced to trigger an authentication attempt for the best_effort auth commands, currently the only one is 'complete'. * Add prompt_for_password() to ask the user to enter a password when necessary. Passed to ClientManager in a new kward pw_func. Bug: 1355838 Change-Id: I9fdec9144c4c84f65aed1cf91ce41fe1895089b2
* | Add plugin to support token-endpoint authDean Troyer2014-10-121-8/+61
|/ | | | | | | | | | | | | | | | | The ksc auth plugins do not have support for the original token-endpoint (aka token flow) auth where the user supplies a token (possibly the Keystone admin_token) and an API endpoint. This is used for bootstrapping Keystone but also has other uses when a scoped user token is provided. The api.auth:TokenEndpoint class is required to provide the same interface methods so all of the special-case code branches to support token-endpoint can be removed. Some additional cleanups related to ClientManager and creating the Compute client also were done to streamline using sessions. Change-Id: I1a6059afa845a591eff92567ca346c09010a93af
* Support for keystone auth pluginsMatthieu Huin2014-10-091-0/+180
| | | | | | | | | | | | | | | | | | | | | | | This patch allows the user to choose which authentication plugin to use with the CLI. The arguments needed by the auth plugins are automatically added to the argument parser. Some examples with the currently available authentication plugins:: OS_USERNAME=admin OS_PROJECT_NAME=admin OS_AUTH_URL=http://keystone:5000/v2.0 \ OS_PASSWORD=admin openstack user list OS_USERNAME=admin OS_PROJECT_DOMAIN_NAME=default OS_USER_DOMAIN_NAME=default \ OS_PROJECT_NAME=admin OS_AUTH_URL=http://keystone:5000/v3 OS_PASSWORD=admin \ OS_IDENTITY_API_VERSION=3 OS_AUTH_PLUGIN=v3password openstack project list OS_TOKEN=1234 OS_URL=http://service_url:35357/v2.0 \ OS_IDENTITY_API_VERSION=2.0 openstack user list The --os-auth-plugin option can be omitted; if so the CLI will attempt to guess which plugin to use from the other options. Change-Id: I330c20ddb8d96b3a4287c68b57c36c4a0f869669 Co-Authored-By: Florent Flament <florent.flament-ext@cloudwatt.com>
* Fix issues with object related commandsSteve Martinelli2014-10-061-2/+3
| | | | | | | | | | | | | | | 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-011-0/+381
| | | | | | | | 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
* Add low-level API base classDean Troyer2014-09-292-0/+349
Adds the foundation of a low-level REST API client. This is the final prep stage in the conversion of the object-store commands from the old restapi interface to the keystoneclient.session-based API. * api.api.BaseAPI holds the common operations Change-Id: I8fba980e3eb2d787344f766507a9d0dae49dcadf