10 Commits

Author SHA1 Message Date
Takashi Kajinami
00cdc83150 Drop unused simplejson
simplejson is used only when the json module is not avaialble, but
recent runtime versions provide the built-in json module.

Change-Id: Ife04be18ed3804a90e52025d3a7f688e6daec849
2023-11-05 18:30:02 +09:00
likui
3bdae37673 remove unicode from code
Change-Id: Iadc87779bf513c9d04847b6cf8ecbc60b300d7db
Implements: blueprint remove-unicode
2021-01-03 13:03:32 +08:00
wangzihao
17d2d5175e Remove six
Remove all usages of six.

Change-Id: I6ea8d1cdc3060d5c2a4311c7454b66ba75109b0c
2020-10-13 11:02:06 +08:00
Sean McGinnis
2b8282bb1e
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ib83e626f51e6e01898bb7931c1660a1a548500f3
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:59:46 -05:00
Lance Bragstad
47ad24a358 Fix token response mock
The unit tests mock tokens from keystoneauth. One of the responses
being returned from a mocked keystoneauth method was returning a v2.0
token that didn't have the right expiration attribute of a v2.0
token. This was caught by keystoneauth 3.0.1, which underwent a
significant refactor and added a bunch of new functionality for
version discovery. Keystoneauth was expecting `expires` to be
in the token but instead the mock was using `expires_at`, which isn't
a valid v2.0 token attribute.

Closes-Bug: 1706538

Change-Id: Iea77ef54585d0b3480369e9f5df629e3f46f7e3b
2017-07-26 13:25:38 +00:00
Steve Martinelli
fff88e0a9c switch to keystoneauth
move troveclient to keystoneauth as keystoneclient's auth session,
plugins and adapter code has been deprecated.

Change-Id: I3d57dde9c013038accbab8cc30d9622a142d0f71
2016-05-22 22:06:51 -04:00
Swapnil Kulkarni
cd58da5213 Remove RAX-specific auth in troveclient
Author: Swapnil Kulkarni <swapnilkulkarni2608@gmail.com>
Co-Authored-By: Nikhil Manchanda <SlickNik@gmail.com>
Co-Authored-By: Craig Vyvial <cp16net@gmail.com>

Change-Id: I250777890a1f5240c5f14290cf02eb5a7b34b434
Closes-Bug: #966329
2014-12-09 13:33:33 -06:00
Bob Thyne
4f1fb53ecb Adds support for Keystone V3 API
Updated trove client to support Keystone V3 API. The
Keystoneclient session object is used for authentication, retrieving
the service catalog and HTTP connection/session management.

Added additional CLI parameters for Keystone V3.

Added tests using requests_mock instead of mocking completely the
session object like the previous failed patch:

https://review.openstack.org/#/c/102315

Change-Id: Ib804c0a45b3b4d3f8670ec642b2c2fd1be6cd656
2014-12-01 15:58:36 -08:00
Amrith Kumar
d4c2887854 Reverse fix for 1323866 as it regressed trove CLI
Trove CLI appears to be broken (fresh checkout, devstack as well as
openstack gate). All commands fail with

ERROR: __init__() got an unexpected keyword argument 'http_log_debug'

Correcting the obvious place where this appears to be an issue is
causing additional failures and as it is time-critical to get this
back up and running, I'm proposing a reversal of the change from
3c47a1855b7ee1345dadfb00ae90a6279b7c424e while that change is
completely reworked.

I will ping trove core for an approval on this and if I don't get an
approval, I'll fast track this reversal.

Change-Id: Icac028cfafac57c7e3ef03d4277ae2b7833bf58f
Partial-Bug: 1391840
2014-11-10 12:25:29 -05:00
daniel-a-nguyen
3c47a1855b Adds support for Keystone V3 API
Updated trove client to support Keystone V3 API. The
Keystoneclient session object is used for authentication, retrieving
the service catalog and HTTP connection/session management.

Added additional CLI parameters for Keystone V3.

Change-Id: I800c252234be2ff11d818cf7513c61c5431eb15c
Closes-Bug: 1323866
2014-11-05 15:54:16 -08:00