13 Commits

Author SHA1 Message Date
Spyros Trigazis
c18bd6f247 Fix empty object returned by successful response
Return of objects like capacity and allocatable were returning
an empty object. Fix deserialize method and pass the corresponding
value.

Change-Id: Ia55d01a7cfd6e11448272e5859dd84e40147b618
Closes-Bug: #1595373
2017-01-21 22:59:49 +01:00
Andrey Pavlov
5d0f2a67a3 Adding batch_v1 api support
Change-Id: I37cfdc92f1ff9cf4ff96b9d0ca14e3b777890ffc
2016-05-27 17:23:29 -04:00
Andrey Pavlov
07a77b71ef Adding extensions_v1beta1 api support
Change-Id: I8213bb00ccb154fc593ad1dab3f0fc1aa64598fd
2016-05-26 13:35:03 +03:00
Davanum Srinivas
6d1d7ea3d9 Default to application/json
We should end up with a specific type as the default
if '*/*' is specified. Note that the default is
'application/json'

Change-Id: I2107da25de8abd19c0d5a87d756e14916aa7fada
2016-04-22 22:37:33 -04:00
Davanum Srinivas
1f3d16883e Add python 3 support
Replaced unicode with six.text_type

copied from I9f084ef4fae1ec1111e26142e2e89bad18acbf45

Change-Id: Icba62cb7a76884289ffd93f61a16cdf89fcdce86
2016-04-22 14:53:36 -04:00
Davanum Srinivas
b6b461b895 Keep py3.X compatibility for urllib
Copied from If6c1b016c726070b5b326296ead933cbd74bd408

Change-Id: I971f1f587ef5b3cf4d81325ee3731a9ec6dadfaf
2016-04-22 14:45:07 -04:00
Davanum Srinivas
c1d099e7f2 TLS integration for latest pythonk8sclient
swagger_client uses PoolManager from urllib3. PoolManager keeps the
connection_pool_kw passed during the init time and uses the same later
while initiating HTTPSConnection. Existing implementation instantiates
RESTClientObject() at import time, without giving an option to pass
the security parameters, viz. key_file, ca_certs etc. So we needed to
change the way instantiation/initialization was happening.

(copied from I3b490bbb47eb5f961951708dabe6c1abfbcece4e)

Change-Id: I6df227bcd030cb8c374bc83bb44dfea980c893b3
2016-04-22 14:41:31 -04:00
Davanum Srinivas
3b09cf2bc1 Fix up sanitize_for_serialization
Picked up from I046931ad491e8b7ee45943852901eac5c3df913e

Change-Id: Ib422f75909d1e0da5ff95a8a15b6ff73bb2bb2a6
2016-04-22 14:26:56 -04:00
Davanum Srinivas
7b1385dd3e Remove unsafe usage of eval
eval will execute a function before it has been determined to be
a python data type.  Instead, use ast.literal_eval which validates
the object is a data type before executing it.

See:
    http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html

(copied from Ia3d74747e66d72e97a3fb9029bd51331c902f874)

Change-Id: Iae0d42f8d14f66d6ea6cf2201646d8a796cc0cc9
2016-04-22 14:12:37 -04:00
Davanum Srinivas
5d1a429016 Run swagger codegen for latest Kubernetes API
Update to Kubernetes 1.2.2 version

Fixes to v1.json:
* Change 'any' types to 'object'

Fixes to rest.py:
* Fix __init__ to accept ca_certs

Change-Id: I190f26fac76480bc59ea5ceab7f1c94f16059086
2016-04-22 13:33:25 -04:00
Davanum Srinivas
9a07ef5129 Switch file location and repo path
* We are no longer in magnum repo
* file path to v1.json has changed

Fix minor flake8 issues

Change-Id: I077127d387399864e490d242806053237af32e0b
2016-04-04 10:10:43 -04:00
Davanum Srinivas
9fd934047d Get tests working in py34 2016-04-01 17:26:32 -04:00
Davanum Srinivas
6294d9f6b9 Restructure directories 2016-04-01 14:05:01 -04:00