summaryrefslogtreecommitdiff
path: root/openstackclient/tests/fakes.py
Commit message (Collapse)AuthorAgeFilesLines
* Check volume status before extending sizelin-hua-cheng2015-02-061-1/+22
| | | | | | | Added test for Volume Set as well. Change-Id: I8e6794f67b160ca328fcafa8f1d67138b4f3becd Closes-Bug: #1415182
* Add helpful messages when authN'ing with passwordSteve Martinelli2015-01-161-0/+1
| | | | | | | | | | 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
* Upgrade hacking to 0.10Steve Martinelli2015-01-121-1/+1
| | | | | | Also resolve the only error that was produced. Change-Id: Ic81ab01aa0cddc15bb27419d7fec3e5a6d4ec0c7
* 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
* | Add --or-show option to user createDean Troyer2014-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-0/+1
|/ | | | | | | | | | | | 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>
* Support for keystone auth pluginsMatthieu Huin2014-10-091-0/+136
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Test top-to-bottom: object-store containersDean Troyer2014-09-291-1/+7
| | | | | | | | | | Replicate the object-store container command tests but use requests_mock to test the entire stack down to the requests module. These will be useful regressions tests when the existing object-store lib modules are moved to the low-level API object. Change-Id: Ibf25be46156eb1009f1b66f02f2073d3913b846d
* Change app.restapi to app.client_manager.sessionDean Troyer2014-08-251-1/+16
| | | | | | | | | | | 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
* Network CRUDTerry Howe2014-06-241-0/+1
| | | | | | | bp/neutron https://wiki.openstack.org/wiki/OpenStackClient/Commands#Network_2 Change-Id: I89ee083154afa544b03587e84becace36d9d522a
* Use six.iteritems() rather than dict.iteritems()Cyril Roelandt2014-02-111-1/+2
| | | | | | This is compatible with both Python 2 and 3. Change-Id: I6fe3e9bf9ece699badbdb9933118af90642a91e9
* Merge "Add module list command"Jenkins2013-12-051-0/+6
|\
| * Add module list commandDean Troyer2013-12-031-0/+6
| | | | | | | | | | | | | | | | Lists versions of installed python modules (Origianlly proposed as 'version list') Change-Id: I76a51d3d6783f46ef2daa0a41626019a880a2a50
* | Expand support for command extensionsDean Troyer2013-11-211-0/+1
|/ | | | | | | | | | | | 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
* Complete basic test infrastructureDean Troyer2013-11-181-0/+4
| | | | | | | This finally gets all of the API tests into a common framework regarding test classes and so forth. Change-Id: If675347129c50dcba0bfc5b6c58f5a2ca57ff46c
* Prepare for Identity v3 testsDean Troyer2013-09-091-1/+5
| | | | | | | | | * Split identity/fakes.py for v2_0 and v3 * Split identity/test_identity.py for v2_0 and v3 * Fix issues in commands with enable/disable * Clean up v2 commands Change-Id: I6e536b6a130fc556dbd7dcf9f2e76d939ca1bc1c
* Refactor fake data for projects and usersDean Troyer2013-09-041-5/+1
| | | | | | | * Move fake data structures into tests/identity/fakes.py * Use fake clients correctly and support multiple client versions Change-Id: Icacbb2ca740b63937bd2c4442af61b620638b53e
* Object API commands using our REST API layerDean Troyer2013-08-281-0/+5
| | | | | | | | | | | | | * 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
* Add Identity v2 project testsDean Troyer2013-08-161-0/+62
* establish the the form of cliff command classes * implement some common fake objects * implement Identity command tests for v2 project * fix stdout/stderr capture Also re-work the project create and set commands for exclusive options (--enable|--disable) to actually behave properly. Yay tests! Change-Id: Icbb313db544c1f8dd3c9af7709971838b5a4d115