Fix exec example to use new configuration model

This commit is contained in:
mbohlool 2017-10-03 13:07:48 -07:00
parent bc2aac4897
commit 77a504e294
2 changed files with 5 additions and 3 deletions

View File

@ -1,13 +1,15 @@
import time
from kubernetes import config
from kubernetes.client import configuration
from kubernetes.client import Configuration
from kubernetes.client.apis import core_v1_api
from kubernetes.client.rest import ApiException
from kubernetes.stream import stream
config.load_kube_config()
configuration.assert_hostname = False
c = Configuration()
c.assert_hostname = False
Configuration.set_default(c)
api = core_v1_api.CoreV1Api()
name = 'busybox-test'

View File

@ -46,7 +46,7 @@ setup(
tests_require=TESTS_REQUIRES,
packages=['kubernetes', 'kubernetes.client', 'kubernetes.config',
'kubernetes.watch', 'kubernetes.client.apis',
'kubernetes.client.models', 'kubernetes.stream'],
'kubernetes.stream', 'kubernetes.client.models'],
include_package_data=True,
long_description="""\
Python client for kubernetes http://kubernetes.io/