Skip to content

Commit f57420f

Browse files
Merge pull request #146 from bradmwilliams/ocp-2.0.0
Preparing version 2.0.0
2 parents f523fd8 + 8b4218d commit f57420f

36 files changed

+50
-41
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Can you run `oc project` successfully from the command line? Then write your app
8989

9090
```python
9191
#!/usr/bin/python
92-
import openshift as oc
92+
import openshift_client as oc
9393
9494
print('OpenShift client version: {}'.format(oc.get_client_version()))
9595
print('OpenShift server version: {}'.format(oc.get_server_version()))
@@ -304,7 +304,7 @@ process -- it will consume memory for every oc invocation.*
304304
305305
```python
306306
#!/usr/bin/python
307-
import openshift as oc
307+
import openshift_client as oc
308308
309309
with oc.tracking() as tracker:
310310
try:
@@ -382,7 +382,7 @@ the current oc invocation will be killed.
382382
383383
```python
384384
#!/usr/bin/python
385-
import openshift as oc
385+
import openshift_client as oc
386386
387387
def node_is_ready(node):
388388
ready = node.model.status.conditions.can_match({
@@ -448,7 +448,7 @@ context. Before running this command, you will need to load your ssh agent up wi
448448
appropriate to the target client host.
449449
450450
```python
451-
with openshift.client_host(hostname="my.cluster.com", username="root", auto_add_host=True):
451+
with openshift_client.client_host(hostname="my.cluster.com", username="root", auto_add_host=True):
452452
# oc invocations will take place on my.cluster.com host as the root user.
453453
print("Current project: " + oc.get_project_name())
454454
```

ansible/rebuild_module.digest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d2800ec0e827b83a8423e15704e7699f -
1+
e636ef96934d7b577b5cb42f65904f20 -

ansible/rebuild_module.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ fi
1919

2020
pushd "$PACKAGES_DIR"
2121
# Update module digest so that pr.groovy can ensure it is run after each module change
22-
cat $(find openshift/ -name '*.py' | sort -d) | md5sum > $DIR/rebuild_module.digest
23-
ENCODED_TGZ=$(tar c --owner=0 --numeric-owner --group=0 --mtime='UTC 2019-01-01' $(find openshift/ -name '*.py' | sort -d) | gzip -c -n | base64 --wrap=0)
22+
cat $(find openshift_client/ -name '*.py' | sort -d) | md5sum > $DIR/rebuild_module.digest
23+
ENCODED_TGZ=$(tar c --owner=0 --numeric-owner --group=0 --mtime='UTC 2019-01-01' $(find openshift_client/ -name '*.py' | sort -d) | gzip -c -n | base64 --wrap=0)
2424
popd
2525

2626
echo "#!/usr/bin/env python" > $OUTPUT_FILE

ansible/roles/openshift_client_python/library/openshift_client_python.py

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ansible/roles/openshift_client_python/library/openshift_client_python.template.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
# Allows modules to trigger errors
1919
def error(msg, **kwargs):
20-
import openshift as oc
20+
import openshift_client as oc
2121
raise oc.OpenShiftPythonException(msg, **kwargs)
2222

2323

2424
def main():
25-
import openshift as oc
25+
import openshift_client as oc
2626
script = module.params["script"]
2727
time = module.params["timeout"]
2828
oc.ansible.reset()
@@ -91,9 +91,9 @@ def main():
9191
tf.extractall(client_python_extract_dir)
9292
# Add the newly extacted directory to the python path to resolve the openshift package
9393
sys.path.append(client_python_extract_dir)
94-
# Import openshift as oc so that we can delete the extract directory. module.exit_ type methods
94+
# Import openshift_client as oc so that we can delete the extract directory. module.exit_ type methods
9595
# call sys.exit, so this is our only chance to leave no trace.
96-
import openshift as oc
96+
import openshift_client as oc
9797
shutil.rmtree(client_python_extract_dir)
9898
main()
9999
finally:

examples/cluster_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import logging
88
import traceback
99

10-
import openshift as oc
10+
import openshift_client as oc
1111
from contextlib import contextmanager
1212

1313

examples/coverage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from __future__ import print_function
44
from __future__ import absolute_import
55

6-
import openshift as oc
7-
from openshift import null, Missing, OpenShiftPythonException
6+
import openshift_client as oc
7+
from openshift_client import null, Missing, OpenShiftPythonException
88

99
try:
1010

examples/custom_apiobjects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

3-
import openshift as oc
4-
from openshift import APIObject
3+
import openshift_client as oc
4+
from openshift_client import APIObject
55

66

77
class MyCustomPodClass(APIObject):

examples/dump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
from __future__ import absolute_import
4-
import openshift as oc
4+
import openshift_client as oc
55

66
if __name__ == '__main__':
77
with oc.client_host():

examples/ephemeral_project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import argparse
66
import logging
77
import traceback
8-
import openshift as oc
9-
from openshift import OpenShiftPythonException
10-
from openshift.decorators import ephemeral_project
8+
import openshift_client as oc
9+
from openshift_client import OpenShiftPythonException
10+
from openshift_client.decorators import ephemeral_project
1111

1212
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
1313
logger = logging.getLogger('EphemeralProject')

0 commit comments

Comments
 (0)