11 Commits

Author SHA1 Message Date
jacky06
038146d500 Remove six
We don't need this in a Python 3-only world.

Change-Id: I7f39c971de09684ad34cdd21ae6819bde797efb0
2020-05-06 00:42:29 +08:00
Andreas Jaeger
5d93b51900 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 2.0 which
supports Python 3.

Fix problems found.

Change-Id: I81cf5e317bb2f791888e75d87cfd27dfdd2b5f96
2020-03-28 15:54:06 +01:00
Erik Olof Gunnar Andersson
b4120a1352 Use oslo_serialization instead of the json module directly
* Always use oslo jsonutils.
* Consistently import jsonutils as-is.
* Use dump_as_bytes instead of dumps.
https://wiki.openstack.org/wiki/Python3#Serialization:_base64.2C_JSON.2C_etc.

Change-Id: Ifb6c673da24276b0528e5975f63ac326d558936d
2019-01-21 16:32:15 -08:00
Boris Pilka
125a9a5587 Fix crash on Service catalog empty 403 response
Added handling of message body received as bytes ("application/json")
to avoid "TypeError: the JSON object must be str, not 'bytes'"

Change-Id: I007b33e1b9f210ede2df5d1e2aa32535222d5d67
Task:24818
Story: 2003533
Signed-off-by: Boris Pilka <boris.pilka@x-works.io>
2018-08-24 08:38:19 +02:00
Hieu LE
cdc1b5e433 Increase UT Coverage
UT Coverage for magnumclient/common/httpclient.py is increased
from 56% to 81%.

Overall coverage is now 79%

Change-Id: I28d0f3406ed9940cf0dee9d2fa5d238152017151
Partially-Implements: blueprint magnumclient-ut-coverage
2017-01-26 08:47:38 +07:00
OTSUKA, Yuanying
c9eabe965c Support OS_PROJECT_* env variables
OS_TENANT_NAME and OS_TENANT_ID are legacy variables.
so OS_PROJECT_NAME and OS_PROJECT_ID should be supported.

Change-Id: Ibdfa0e14d80313b8087670ccd0bd9bdbf5ba364d
Closes-Bug: #1591027
2016-06-15 10:27:16 +09:00
Hongbin Lu
14efefd01f Handle faultstring when using SessionClient
When the magnum-api returns an error code 400-600, SessionClient
faultstring did not return to users. It should return a detailed
error message.

This commit was ported from Ironic:
https://review.openstack.org/#/c/142021/

Change-Id: I8bc15c0ddab10f0e117fb6acb2f3995929fa65e2
Closes-Bug: #1520363
2015-11-27 18:21:38 -05:00
Davanum Srinivas
2c01237c0c Bump up to newer hacking
global requirements has the newer hacking version, so
we should bump our version as well.

Closes-Bug: #1454853
Change-Id: Ief8c2f6943a7884ed15b264826bb19f2f12962a6
2015-05-13 20:16:22 -04:00
Madhuri Kumari
21792e6bcd Adding test for magnumclient argument parsing.
This patch add test cases for magnum command line
parsing.

Change-Id: Ib0bdfbe39bb99e360085eeccc9bea695de69bdb3
Closes-bug: #1421082
2015-02-20 07:48:53 +00:00
Madhuri Kumari
c70d6ea090 Adding test for shell.py.
This patch includes unit test cases for shell.py.

Change-Id: I63bf86e51f705df021eab359f50c13494eebb578
Closes-bug: #1421082
2015-02-13 06:14:04 +00:00
Jay Lau (Guangya Liu)
61f20c3e01 Add unit test for magnumclient/common/utils.py
Change-Id: If3423ae2a74dedb11e97a424a4bf24d70dbbc7af
2015-01-03 21:27:26 -05:00