summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-08-15 09:52:03 -0400
committerGitHub <noreply@github.com>2017-08-15 09:52:03 -0400
commit1cd05ed2d7e004efa9c05d56992dd7c30776eec9 (patch)
tree56d6ce33f531912c983da0f894574dc7559dda88 /roles/lib_openshift
parent6820f52b30270f3af9e6167102d9edc85af243d4 (diff)
parenta80a97e33de26413f44c47545f27331222097137 (diff)
downloadopenshift-1cd05ed2d7e004efa9c05d56992dd7c30776eec9.tar.gz
openshift-1cd05ed2d7e004efa9c05d56992dd7c30776eec9.tar.bz2
openshift-1cd05ed2d7e004efa9c05d56992dd7c30776eec9.tar.xz
openshift-1cd05ed2d7e004efa9c05d56992dd7c30776eec9.zip
Merge pull request #5058 from kwoodson/project_error_check
Adding error checking to create.
Diffstat (limited to 'roles/lib_openshift')
-rw-r--r--roles/lib_openshift/library/oc_project.py3
-rw-r--r--roles/lib_openshift/src/class/oc_project.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/roles/lib_openshift/library/oc_project.py b/roles/lib_openshift/library/oc_project.py
index a78bc06d2..bf65ef603 100644
--- a/roles/lib_openshift/library/oc_project.py
+++ b/roles/lib_openshift/library/oc_project.py
@@ -1657,6 +1657,9 @@ class OCProject(OpenShiftCLI):
# Create it here
api_rval = oadm_project.create()
+ if api_rval['returncode'] != 0:
+ return {'failed': True, 'msg': api_rval}
+
# return the created object
api_rval = oadm_project.get()
diff --git a/roles/lib_openshift/src/class/oc_project.py b/roles/lib_openshift/src/class/oc_project.py
index 9ad8111a8..298597067 100644
--- a/roles/lib_openshift/src/class/oc_project.py
+++ b/roles/lib_openshift/src/class/oc_project.py
@@ -156,6 +156,9 @@ class OCProject(OpenShiftCLI):
# Create it here
api_rval = oadm_project.create()
+ if api_rval['returncode'] != 0:
+ return {'failed': True, 'msg': api_rval}
+
# return the created object
api_rval = oadm_project.get()