summaryrefslogtreecommitdiff
path: root/openstackclient/tests/common/test_restapi.py
Commit message (Collapse)AuthorAgeFilesLines
* Use Keystone client session.SessionDean Troyer2014-09-081-341/+0
| | | | | | | | | | | | | | This replaces the restapi requests wrapper with the one from Keystone client so we can take advantage of the auth plugins. As a first step only the v2 and v3 token and password plugins are supported. This maintainis no changes to the command options or environment variables. The next steps will include reworking the other API client interfaces to fully utilize the single auth session. Blueprint: ksc-session-auth Change-Id: I47ec63291e4c3cf36c8061299a4764f60b36ab89
* Fix PEP8 E265 errorsDean Troyer2014-06-271-4/+0
| | | | Change-Id: Ieb9a9af1da27d3935d1a4d3cfb61b0ccb03d099a
* 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
* 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
* Create a new base REST API interfaceDean Troyer2013-08-231-0/+320
* 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