Skip to content

Commit 44395d4

Browse files
authored
Merge pull request #31 from kubernetes-incubator/o1
Restructure modules to have a top level kubernetes module
2 parents 880091d + b71a00d commit 44395d4

File tree

795 files changed

+4508
-4755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

795 files changed

+4508
-4755
lines changed

README.md

Lines changed: 9 additions & 807 deletions
Large diffs are not rendered by default.

README.prefix

Lines changed: 0 additions & 60 deletions
This file was deleted.

docs/UnversionedAPIVersions.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/example1.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@
1414

1515
import os
1616

17-
import k8sclient
18-
import k8sutil
17+
from kubernetes import client, util
1918

2019

2120
def main():
2221
# Configs can be set in Configuration class directly or using helper
2322
# utility
24-
k8sutil.load_kube_config(os.environ["HOME"] + '/.kube/config')
23+
util.load_kube_config(os.environ["HOME"] + '/.kube/config')
2524

26-
v1 = k8sclient.CoreV1Api()
25+
v1 = client.CoreV1Api()
2726
print("Listing pods with their IPs:")
2827
ret = v1.list_pod_for_all_namespaces(watch=False)
2928
for i in ret.items:

examples/example2.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@
1414

1515
import os
1616

17-
import k8sclient
18-
import k8sutil
17+
from kubernetes import client, util
1918

2019

2120
def main():
2221
# Configs can be set in Configuration class directly or using helper
2322
# utility
24-
k8sutil.load_kube_config(os.environ["HOME"] + '/.kube/config')
23+
util.load_kube_config(os.environ["HOME"] + '/.kube/config')
2524

26-
v1 = k8sclient.CoreV1Api()
25+
v1 = client.CoreV1Api()
2726
count = 10
28-
watch = k8sutil.Watch()
27+
watch = util.Watch()
2928
for event in watch.stream(v1.list_namespace, timeout_seconds=10):
3029
print("Event: %s %s" % (event['type'], event['object'].metadata.name))
3130
count -= 1

examples/example3.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,18 @@
1414

1515
import os
1616

17-
import k8sclient
18-
import k8sutil
17+
from kubernetes import client, util
1918

2019

2120
def main():
2221
# Configs can be set in Configuration class directly or using helper
2322
# utility
24-
k8sutil.load_kube_config(os.environ["HOME"] + '/.kube/config')
23+
util.load_kube_config(os.environ["HOME"] + '/.kube/config')
2524

2625
print("Supported APIs (* is preferred version):")
2726
print("%-20s %s" %
28-
("core", ",".join(k8sclient.CoreApi().get_api_versions().versions)))
29-
for api in k8sclient.ApisApi().get_api_versions().groups:
27+
("core", ",".join(client.CoreApi().get_api_versions().versions)))
28+
for api in client.ApisApi().get_api_versions().groups:
3029
versions = []
3130
for v in api.versions:
3231
name = ""

.swagger-codegen-ignore renamed to kubernetes/.swagger-codegen-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ requirements.txt
44
test-requirements.txt
55
setup.py
66
.travis.yml
7+
tox.ini

0 commit comments

Comments
 (0)