Commit Graph

8 Commits

Author SHA1 Message Date
Erno Kuvaja 3dde3204d5 Remove Images API v1 entry points
This change removes option to configure Images API v1
This change removes Images API v1 endpoints from the router
This change removes all v1 tests
This change removes the v1 dependant glance-cache-manage command

This change does not remove all v1 codebase. Further cleanup and
decoupling will be needed.

Change-Id: Ia086230cc8c92f7b7dfd5b001923110d5bc55d4d
2018-07-13 10:21:49 +01:00
kairat_kushaev 616060db65 Do not use service catalog for cache client
Previously cache client used endpoints from service catalog to
request cache items from node. It works perfectly on devstack
but it doesn't work when an OpenStack cloud is deployed with HA
(3/5/7 controllers). We need to use -H option instead.
This option makes cache management client interact with the local
endpoint which is more appropriate as image cache is local to
each node/controller.

Change-Id: I355fb36d9af7e06dcac70b8263dc1a2b915ffc8f
Closes-Bug: #1634486
2016-11-07 16:38:52 +00:00
Victor Stinner 3ba4a591ee Port rpc and wsgi to Python 3
* rpc: allow also exceptions from the builtins module. On Python 3,
  builtin exceptions are part of the builtins module. The exceptions
  module was removed in Python 3.
* Fix usage of reraise(): translate_exception() returns an instance
  which is the second parameter of the reraise() function, not the
  first parameter. The first parameter is the exception type.
* test_rpc: add json_dump_as_bytes() helper to serialize JSON as
  bytes.
* JSONRequestDeserializer: don't compare None to int, it raises a
  TypeError on Python 3.
* Fix Unicode versus bytes issues: HTTP body type is bytes. Encode
  JSON to UTF-8 for example. Replace StringIO with BytesIO.
* Replace filter() with a list-comprehension to get a list on
  Python 3.
* test_client, test_image_cache_client: use bytes for HTTP body.
* tox.ini: add glance.tests.unit.common.test_rpc to Python 3.

Change-Id: I9960d6a810375474f89c1788b7016a8fbb0770e0
2015-10-13 12:27:50 +02:00
Stuart McLaren 60359e9b36 Isolate test from environment variables
One test ('test_get_client_all_creds') will fail if any of the typical
Openstack environment variables have been set (eg OS_PASSWORD).

Change-Id: I982f526168be7a5a07b5cd48af522f7f9bc74f2e
Closes-bug: #1376247
2014-10-13 15:50:23 +00:00
liyingjun 2365a3fb5f Fix assertEqual arguments order
assertEqual method's arguments should be in ('expected', 'actual')
order.

Change-Id: I88b5b0558720a91236b62b6e4a3590901e817f85
Closes-bug: 1277104
2014-09-19 00:25:18 +08:00
Julien Danjou fadbef8511 hacking: upgrade to 0.9.x serie
Change-Id: I252758fd633662de9659a402c5e3d7e3ce1fae0f
2014-10-06 14:41:03 +02:00
Chang Bo Guo 0e470ca468 Replace deprecated method assertEquals
TestCase.assertEquals is deprecated since Python 2.7, so need use new
method name assertEqual.
See http://docs.python.org/2/library/unittest.html#deprecated-aliases

Change-Id: Iae9074f2afe2a572b60f6192aa6c871db42360ec
2013-11-30 05:33:48 -08:00
Julia Varlamova 192e42e232 Add tests for glance/image_cache/client.py
- add test cases for all CacheClient's functions in
CacheClientTestCase class
- add test cases for get_client function in
GetClientTestCase class

Change-Id: Idff48cbc1cf8c1f33125c258e97a4587bb1123bd
2013-11-19 17:37:11 +04:00