7 Commits

Author SHA1 Message Date
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