summaryrefslogtreecommitdiff
path: root/openstackclient/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | add multi-delete support for compute/image/net/volumewanghong2014-12-234-4/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part1, add support for these objects: compute.server imagev1.image imagev2.image network.network volume.volume volume.backup volume.snapshot Closes-Bug: #1400597 Change-Id: Ice21fee85203a8a55417e0ead8b509b8fd6705c1
* | | add multi-delete support for identitywanghong2014-12-236-6/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This is part2. Add support for these objects: identity.project(v2.0) identity.role(v2.0) identity.user(v2.0) identity.project(v3) identity.role(v3) identity.user(v3) identity.group(v3) Closes-Bug: #1400597 Change-Id: I270434d657cf4ddc23c3aba2c704d6ef184b0dbc
* | Don't import form keystoneclient.openstack.commonJamie Lennox2014-12-173-3/+3
|/ | | | | | | | 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 "Liberalize version matching a bit"Jenkins2014-11-211-3/+3
|\
| * Liberalize version matching a bitDean Troyer2014-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For class-loading purposes we can just use the major version, so accept that. Only Identity and Compute were affected; Compute is included just to be pedantically complete. For command groups we also just use the major version so fix Compute and the version option handling. Change the internal default for Identity to a simple '2' so it is also consistent with the rest of the world. Then comes microversioning... Closes-Bug: #1292638 Change-Id: Ibaf823b31caa288a83de38d2c258860b128b87d8
* | Merge "Fix volume create --image"Jenkins2014-11-192-0/+159
|\ \
| * | Fix volume create --imageDean Troyer2014-11-182-0/+159
| | | | | | | | | | | | | | | | | | | | | 'volume create --image' should allow an image name to be used. Closes-Bug: #1383333 Change-Id: I996d46db321eef2d75c3d19b480319f8a78c09b3
* | | Merge "add keystone v3 region object"Jenkins2014-11-192-0/+421
|\ \ \ | |/ / |/| |
| * | add keystone v3 region objectwanghong2014-11-182-0/+421
| | | | | | | | | | | | | | | | | | | | | Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Change-Id: Ia6f607630dbf507681733c3ab3b9b7c55de30f49 Closes-Bug: #1387932
* | | Merge "Add arg to 'server image create' tests"Jenkins2014-11-182-5/+10
|\ \ \
| * | | Add arg to 'server image create' testsDean Troyer2014-11-142-5/+10
| | |/ | |/| | | | | | | | | | | | | | | | The 'protected' column was not being checked. Also add it to image.fakes.IMAGE. Change-Id: Ie431e9871a7da78b5a3924bfbc51d5575d994d86
* | | Add additional support for --or-showSteve Martinelli2014-11-142-0/+156
|/ / | | | | | | | | | | | | | | Add --or-show for the following: * v2 roles * v2 projects Change-Id: Ibbae19cda668575b9527fbd259f1298c48b8265b
* | Merge "Beef up object-store tests"Jenkins2014-11-135-58/+228
|\ \
| * | Beef up object-store testsDean Troyer2014-10-225-58/+228
| | | | | | | | | | | | | | | | | | | | | | | | * Add object top-to-bottom tests * Move some fakes around * Clean up existing object tests Change-Id: If8406da611c11bbd2b1bf5153e45b720b0eea442
* | | Merge "Use fixtures from keystoneclient for static data"Jenkins2014-11-121-134/+11
|\ \ \
| * | | Use fixtures from keystoneclient for static dataJamie Lennox2014-10-311-134/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We should use the fixture generation code from keystoneclient rather than keep our own copies of the token and discovery structure. Change-Id: I53c1d2935d1d65c39b8abea89427af2fc3edd181
* | | | Swap remaining assertEqual argumentsDean Troyer2014-11-071-22/+22
| | | | | | | | | | | | | | | | Change-Id: I1abdebb298b93074657a7ba65a7186d814969780
* | | | Add --or-show option to user createDean Troyer2014-11-072-0/+80
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --or-show option is added to create commands for the common case of needing to ensure an object exists and getting its properties if it does or creating a new one if it does not exist. Note that if the object exists, any additional options that would set values in a newly created object are ignored if the object exists. FakeResource needs the __name__ attribute to fall through utils.find_resource. Prove the concept on v2 user create then propogate once we're happy with it... Change-Id: I6268566514840c284e6a1d44b409a81d6699ef99
* | | Unscoped federated user-specific commandsMatthieu Huin2014-10-303-0/+146
|/ / | | | | | | | | | | | | | | | | | | | | | | A federated user can authenticate with the v3unscopedsaml plugin and list the domains and projects she is allowed to scope to. This patch introduces the new commands 'federation domain list' and 'federation project list'. Note that for these commands -and plugin- to be available, the lxml library must be installed. Change-Id: I2707b624befcfb0a01b40a094e12fd68a3ee7773 Co-Authored-By: Florent Flament <florent.flament-ext@cloudwatt.com>
* | Fix server create for boot-from-volumeDean Troyer2014-10-241-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * server create required --image even when booting the server from a volume. Change options to require either --image or --volume to specify the server boot disk. Using --volume currently uses device 'vda' for the block mapping and ignores any other block mappings given in --block-device-mapping. * server create and server show are both affected by bug 1378842 where an excepion was thrown when no image ID was present in the returned server object, which is the case for a server booted from a volume. * Fix the remaining assertEqual() order problems in test_server.py Closes-Bug: 1378842 Closes-Bug: 1383338 Change-Id: I5daebf4e50a765d4920088dfead95b6295af6a4d
* | Merge "Close files on image create"Jenkins2014-10-241-5/+12
|\ \
| * | Close files on image createDean Troyer2014-10-141-5/+12
| | | | | | | | | | | | | | | | | | | | | 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-243-1/+180
|\ \ \
| * | | Close files on server create, add testsDean Troyer2014-10-143-1/+180
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-242-26/+26
|\ \ \
| * | | Change --os-auth-plugin to --os-auth-typeDean Troyer2014-10-232-26/+26
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+17
|\ \ \
| * | | Update use of open() in object APIDean Troyer2014-10-131-4/+17
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | Fix token issue after auth changeupDean Troyer2014-10-202-6/+8
| |/ |/| | | | | | | | | | | | | | | | | | | 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
* | Remove ClientManager._service_catalogDean Troyer2014-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | 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-181-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-12/+36
|\ \
| * | Add plugin to support token-endpoint authDean Troyer2014-10-121-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | 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 "Add 'command list' command"Jenkins2014-10-142-0/+49
|\ \ \
| * | | Add 'command list' commandDean Troyer2014-10-082-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add method to CommandManager to retrieve command names by group * Add ListCommands To list command groups loaded by cliff Change-Id: I37fe2471aa2fafa8aa223159452d52b1981021d6
* | | | Merge "Remove 'links' section from several v3 Identity objects"Jenkins2014-10-133-24/+9
|\ \ \ \ | |_|_|/ |/| | |
| * | | Remove 'links' section from several v3 Identity objectsSteve Martinelli2014-10-113-24/+9
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Fix issue token for v3Steve Martinelli2014-10-112-2/+5
|/ / | | | | | | | | | | | | | | Currently the code is broken as it references a part of keystoneclient that does not exist. Change-Id: I7fbc754537fbb4acffb166b5854840acfaef1fb8 Closes-Bug: #1379871
* | Support for keystone auth pluginsMatthieu Huin2014-10-093-88/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-8/+8
|\ \ | |/
| * Update for cliff commandmanager >=1.6.1Dean Troyer2014-10-081-8/+8
| | | | | | | | | | | | | | | | | | 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-092-0/+209
|\ \
| * | CRUD operations for federated protocolsMarek Denis2014-10-082-0/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-2/+2
|\ \ \ | |/ / |/| |
| * | Pass in domain and project as positional args, not kwargsSteve Martinelli2014-10-021-2/+2
| |/ | | | | | | | | | | | | | | | | | | 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 "Implement CRUD operations for Mapping objects"Jenkins2014-10-082-0/+300
|\ \ | |/ |/|
| * Implement CRUD operations for Mapping objectsMarek Denis2014-10-082-0/+300
| | | | | | | | | | Change-Id: I4b8f2e77e741cf74f50aba98ab975af7321b02c6 Implements: bp/add-openstackclient-federation-crud
* | Move object-store commands to low-level APIDean Troyer2014-10-017-612/+362
| | | | | | | | | | | | | | | | 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/+362
| | | | | | | | | | | | | | | | | | | | 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