summaryrefslogtreecommitdiff
path: root/openstackclient/tests/common
Commit message (Collapse)AuthorAgeFilesLines
* Fix find_resource for keystone and cinderTerry Howe2014-06-171-2/+2
| | | | | | | | | | | | | | | | | | | The find_resource method had two hacks in in to support cinder and keystone and I have removed those in favor of a monkey patch for cinder. The find_resource method used to attempt to UUID parse the id, but it would do a manager.get anyway. I changed it to skip the UUID parsing. This will make things run minorly faster and it supports LDAP for keystone. The find_resource used to attempt to use display_name=name_or_id when finding. This was a hack for cinder support, but it breaks keystone because keystone totally messes up with the bogus filter and keystone refuses to fix it. Change-Id: I66e45a6341f704900f1d5321a0e70eac3d051665 Closes-Bug: #1306699
* Merge "Ignore most of the new hacking 0.9.2 rules"Jenkins2014-06-141-2/+3
|\
| * Ignore most of the new hacking 0.9.2 rulesDean Troyer2014-06-131-2/+3
| | | | | | | | | | | | | | | | So we can update requriements.txt. But fix a couple of easy ones: * Fix E251 (1 occurrance) * Fix E131 (1 occurrance) Change-Id: I62aaa423aa6da9e9f0ca026ec586b51cc6a6df03
* | Add support for extension listMatt Fischer2014-06-111-0/+128
|/ | | | | | | | | | | | - Add support in the common section for extension list. This only supports Identity for now. Once the APIs for volume and compute are supported in the respective APIs, they will be added. Once network is added to this client, it will be added (the API already supports it). - Include extension fakes for volume and compute for pre-enablement. Change-Id: Iebb0156a779887d2ab06488a2a27b70b56369376 Closes-Bug: #1319115
* Fixed several typos throughout the codebaseAlex Gaynor2014-05-211-1/+1
| | | | Change-Id: I048ee857fc1215fea7f60978364894e1b5abdf66
* Produce a useful error message for NoUniqueMatchTerry Howe2014-03-171-0/+72
| | | | | | | | | Most of the CLIs use a NoUniqueMatch, so produce a useful error message if that happens. Added some tests for find_resource as well. Change-Id: I85ba61d5f6d1be5bd336a1cc4b02501492905f33 Closes-Bug: #1293846
* Merge "Add ability to prompt for passwords for user create and set"Jenkins2014-02-221-0/+59
|\
| * Add ability to prompt for passwords for user create and setTerry Howe2014-02-211-0/+59
| | | | | | | | | | | | | | | | | | | | * Add get_password method to the utilities * Add --password-prompt option * Call the get_password method if a prompt is requested * Various tests Change-Id: I1786ad531e2a2fbcc21b8bc86aac0ccd7985995a Closes-Bug: 1100116
* | Python 3: the content of a FakeResponse must be bytesCyril Roelandt2014-02-181-0/+3
|/ | | | | | Encode '_content' if necessary. Change-Id: I25c1e1cd5330f0519bf062be840045d0ef520b28
* FakeResponse: use a default status codeCyril Roelandt2014-02-111-1/+1
| | | | | | | | | | | | | | | When running some tests from test_restapi.py, the following error happens: TypeError: unorderable types: NoneType() < int() In Python 2, comparing NoneType and integers is possible: >>> None < 2 True But in Python 3, it's not allowed. Fix this by using a default status code. Change-Id: Ic0fad5c68f3bf2dd8a2b98423549903f982192c9
* Remove copyright from empty filesAlexander Ignatov2014-01-201-14/+0
| | | | | | | | | 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
* Merge "Bring RESTApi closer to ithe imminent keystoneclient.Session"Jenkins2013-12-061-51/+73
|\
| * Bring RESTApi closer to ithe imminent keystoneclient.SessionDean Troyer2013-12-031-51/+73
| | | | | | | | | | | | | | Prepare to use the (soon to be) common Session from keystoneclient * Rework RESTApi to eventually be a subclass of keystoneclient.Session Change-Id: I68e610f8b19a3f6267a93f7bf3de54a228be68aa
* | Merge "Add module list command"Jenkins2013-12-051-0/+88
|\ \
| * | Add module list commandDean Troyer2013-12-031-0/+88
| |/ | | | | | | | | | | | | | | Lists versions of installed python modules (Origianlly proposed as 'version list') Change-Id: I76a51d3d6783f46ef2daa0a41626019a880a2a50
* | Update OSC's CommandManager subclassDean Troyer2013-12-031-1/+18
|/ | | | | | | | | | | | | | cliff.commandmanager.CommandManager gained an option, update openstackclient.common.commandmanager.ComamndManager to match. Also add CommandManager.get_command_groups() to return a list of the currently loaded command groups. I expect this to be useful in upcoming client diagnostic commands for plugins/extensions. If these turn out to be generally useful we'll propose them to upstream cliff. Change-Id: Ic15a7ca0ef975ca679e753be861be7c628b8e10c
* Add to clientmanager testsDean Troyer2013-09-051-1/+24
| | | | Change-Id: Iea59c494f31de9c3e1d662f89e6e2babcc8fbd61
* Create a new base REST API interfaceDean Troyer2013-08-232-0/+334
| | | | | | | | | | | * restapi module provides basic REST API support * uses dicts rather than Resource classes * JSON serialization/deserialization * log requests in 'curl' format * basic API boilerplate for create/delete/list/set/show verbs * ignore H302 due to urllib import Change-Id: I3cb91e44e631ee19e9f5dea19b6bac5d599d19ce
* Move tests into project package.Monty Taylor2013-06-303-0/+210
There are several reasons for this. One is that the majority of OpenStack packages behave this way. The second is that it makes writing software that extends something easier to test (which is a clear usecase for openstackclient) And third, tests/__init__.py implies a global package named "tests" - which I'm pretty sure we're not providing. Change-Id: Ic708ffd92aea78c2ffc1a8579af0587af4fca4ff