summaryrefslogtreecommitdiff
path: root/openstackclient
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "Close files on image create"Jenkins2014-10-242-28/+42
|\ \
| * | Close files on image createDean Troyer2014-10-142-28/+42
| | | | | | | | | | | | | | | | | | | | | The file opened for --file was never closed. Close it if it is a file object. Change-Id: I7bd120a2413de42339771d01e8fd1894d38c3011
* | | Merge "Close files on server create, add tests"Jenkins2014-10-244-4/+194
|\ \ \
| * | | Close files on server create, add testsDean Troyer2014-10-144-4/+194
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | The files opened for the --files and --user-data options were never closed, potentially leaking memory in a long-running client. Close them if they are file objects. Add a couple of basic tests for server create. Change-Id: I1658b0caa2d6af17308149cb52196ee28266ddf2
* | | Merge "Change --os-auth-plugin to --os-auth-type"Jenkins2014-10-244-68/+66
|\ \ \
| * | | Change --os-auth-plugin to --os-auth-typeDean Troyer2014-10-234-68/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-242-5/+24
|\ \ \ \
| * | | | Update use of open() in object APIDean Troyer2014-10-132-5/+24
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | Merge "Clean up shell authentication"Jenkins2014-10-223-126/+74
|\ \ \ \ | | |/ / | |/| |
| * | | Clean up shell authenticationDean Troyer2014-10-213-126/+74
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | Merge "Fix token issue after auth changeup"Jenkins2014-10-213-9/+9
|\ \ \ | |/ / |/| |
| * | Fix token issue after auth changeupDean Troyer2014-10-203-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IssueToken.take_action() was missed in updating the structure of the ClientManager. Also, TOKEN_WITH_TENANT_ID in v3 is just wrong... Closes-Bug: #1383396 Change-Id: If2dd82a26af1d743ee9df73e0c1aebce497bf22e
* | | only generate one clientmanager instance in interactive modewanghong2014-10-201-5/+11
|/ / | | | | | | | | | | | | | | Currently, we repeated to generate clientmanager instance when run command in interactive mode. This should be avoided. Change-Id: I0536a690bc173be38af08a2e4443115532041efd Closes-Bug: #1383083
* | Remove ClientManager._service_catalogDean Troyer2014-10-187-40/+29
| | | | | | | | | | | | | | | | | | | | 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
* | Remove now-unnecessary client creation hacksDean Troyer2014-10-186-41/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients that can use ksc Session don't need the old junk to fake auth anymore: * compute * volume Clients that still need to be fed credentials can pick directly from the auth object in clientmanager. The _token attribute is removed, the token can be retrieved from the auth object: openstackclient/tests/common/test_clientmanager.py This change will break any plugin that relies on getting a token from instance._token. They should be updated to use the above, or preferable, to use keystoneclient.session.Session to create its HTTP interface object. Change-Id: I877a29de97a42f85f12a14c274fc003e6fba5135
* | Merge "Add plugin to support token-endpoint auth"Jenkins2014-10-174-58/+121
|\ \
| * | Add plugin to support token-endpoint authDean Troyer2014-10-124-58/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "use jsonutils in oslo.serialization instead of keystoneclient"Jenkins2014-10-171-1/+1
|\ \ \
| * | | use jsonutils in oslo.serialization instead of keystoneclientwanghong2014-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keystoneclient/openstack/common/jsonutils.py is removed in this patch https://review.openstack.org/#/c/128454/ Now, we should use jsonutils in oslo.serialization package. Change-Id: I7c8e8e6d5dffa85244368fd578616c9b19f4fd21
* | | | Merge "Move plugin stuff to clientmanager"Jenkins2014-10-172-18/+30
|\ \ \ \ | |/ / / |/| | |
| * | | Move plugin stuff to clientmanagerDean Troyer2014-10-132-18/+30
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OSC plugins work by adding an object as an attribute to a ClientManager instance. The initialization and management of thos plugins belongs in clientmanager.py. At this point the only part not moved is the API version dict initialization bcause the timing and connection to the CommandManager initialization. It gets refactored anyway when API discovery becomes operational. Change-Id: If9cb9a0c45a3a577082a5cdbb793769211f20ebb
* | | Merge "Add 'command list' command"Jenkins2014-10-144-0/+80
|\ \ \
| * | | Add 'command list' commandDean Troyer2014-10-084-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add method to CommandManager to retrieve command names by group * Add ListCommands To list command groups loaded by cliff Change-Id: I37fe2471aa2fafa8aa223159452d52b1981021d6
* | | | Merge "Fix operation on clouds with availability-zones"Jenkins2014-10-144-5/+6
|\ \ \ \
| * | | | Fix operation on clouds with availability-zonesMonty Taylor2014-10-114-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a cloud with AZs, you can get multiple entries back from the service catalog - one for each AZ and then one that is AZ agnostic that's tied to the region. If the region_name is plumbed all the way through, this works as intended. Change-Id: I3b365ea306e8111fc80830672ae8080a5d1dc8e0
* | | | | Merge "Remove 'links' section from several v3 Identity objects"Jenkins2014-10-1312-44/+32
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Remove 'links' section from several v3 Identity objectsSteve Martinelli2014-10-1112-44/+32
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The links field in the returned objects from the v3 Identity API aren't really useful, so let's remove them. Managed to remove most of them from the core API. I'll likely remove the extension/contribution (oauth/federation) related ones in another patch. Also in this patch the code for setting services and projects was changed. Though not incorrect, it was not needed to copy the entire returned object, we should just need to pass in the fields we want to update. Change-Id: I164ca9ad8b28fa10b291e9115ef40753e387c547
* | | | Merge "Mark identity v2 resources for translation"Jenkins2014-10-127-60/+64
|\ \ \ \
| * | | | Mark identity v2 resources for translationSteve Martinelli2014-10-097-60/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mark v2 catalog, ec2, endpoint, project, role, service and token Change-Id: I14a5852bfee4ca9e25130d001fdadd7778ad0996
* | | | | Merge "Update compute server messages for translation"Jenkins2014-10-121-121/+118
|\ \ \ \ \
| * | | | | Update compute server messages for translationSteve Martinelli2014-10-081-121/+118
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark some of the messages from the server for translation implements bp use_i18n Change-Id: I503efcfb4ca3dec1c427b58ee4a85de9a241dacd
* | | | | Merge "Add translation markers for user v2 actions"Jenkins2014-10-122-21/+22
|\ \ \ \ \
| * | | | | Add translation markers for user v2 actionsSteve Martinelli2014-10-092-21/+22
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | implements bp use_i18n Change-Id: I86508a232c9cf88695b7982dad0b9b02eaf8b3a1
* | | | | Merge "Fix issue token for v3"Jenkins2014-10-123-4/+7
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Fix issue token for v3Steve Martinelli2014-10-113-4/+7
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Currently the code is broken as it references a part of keystoneclient that does not exist. Change-Id: I7fbc754537fbb4acffb166b5854840acfaef1fb8 Closes-Bug: #1379871
* | | | Allow --domain to be used for identity commands without lookupNathan Kinder2014-10-093-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performing create, list, or set operations for users, groups, and projects with the --domain option attempts to look up the domain for name to ID conversion. In the case of an environment using Keystone domains, it is desired to allow a domain admin to perform these operations for objects in their domain without allowing them to list or show domains. The current behavior prevents the domain admin from performing these operations since they will be forbidden to perform the underlying list_domains operation. This patch makes the domain lookup error a soft failure, and falls back to using the passed in domain argument directly as a domain ID in the request that it sends to Keystone. Change-Id: I5139097f8cedc53693f6f71297518917ac72e50a Closes-Bug: #1378565
* | | | Add domain parameters to user show for Identity V3Steve Martinelli2014-10-094-21/+75
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update `user show` for Identity V3 to account for a domain argument, in doing so, also update `find resource` to be more flexible by allowing **kwargs. Also update `group show` and `project show` since they follow the same logic as a user within a group. Change-Id: Ib828e4dbeb0bd31164396069ce8a64c873179779 Closes-Bug: #1378165
* | | Support for keystone auth pluginsMatthieu Huin2014-10-097-305/+579
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge "Update for cliff commandmanager >=1.6.1"Jenkins2014-10-092-22/+12
|\ \ \ | | |/ | |/|
| * | Update for cliff commandmanager >=1.6.1Dean Troyer2014-10-082-22/+12
| |/ | | | | | | | | | | | | | | | | Cliff 1.6.1 added CommandManager.load_commands() so we can adopt it rather than rolling our own. Also, that second group is Greek, not Latin. Jeez... Change-Id: I4a63c22f37bcfd0ef5d83c2dbd08b58fda0db35c
* | Merge "CRUD operations for federated protocols"Jenkins2014-10-093-0/+391
|\ \
| * | CRUD operations for federated protocolsMarek Denis2014-10-083-0/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | Openstackclient needs to have a capability to manage federated protocols (like saml2, openid connect, abfab). This patch allows users to administrate such operations from the commandline. Change-Id: I59eef2acdda60c7ec795d1bfe31e8e960b4478a1 Implements: bp/add-openstackclient-federation-crud
* | | Merge "Pass in domain and project as positional args, not kwargs"Jenkins2014-10-092-4/+4
|\ \ \ | |/ / |/| |
| * | Pass in domain and project as positional args, not kwargsSteve Martinelli2014-10-022-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature for users.set in keystoneclient dictates that domain and project be sent in, not domainId and projectId, which are being incorrectly sent in as 'extra' data. Closes-Bug: #1376833 Change-Id: I44df3e492f61eab2241f3758dee622417bb6f399
* | | Merge "Fix issues with object related commands"Jenkins2014-10-082-8/+3
|\ \ \
| * | | Fix issues with object related commandsSteve Martinelli2014-10-062-8/+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
* | | Merge "Implement CRUD operations for Mapping objects"Jenkins2014-10-083-0/+509
|\ \ \ | |/ / |/| |
| * | Implement CRUD operations for Mapping objectsMarek Denis2014-10-083-0/+509
| | | | | | | | | | | | | | | Change-Id: I4b8f2e77e741cf74f50aba98ab975af7321b02c6 Implements: bp/add-openstackclient-federation-crud
* | | Remove duplicate env function in shell.pySteve Martinelli2014-10-021-25/+12
| |/ |/| | | | | | | | | | | There already exists an env() function in utils. Let's use that one since it's common. Change-Id: I661984394cf0c0543b2f35bf76e3929dead54d1d
* | Move object-store commands to low-level APIDean Troyer2014-10-0113-1066/+773
| | | | | | | | | | | | | | | | 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