summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-08-10 20:12:38 +0000
committerKenny Woodson <kwoodson@redhat.com>2017-08-10 20:12:38 +0000
commita80a97e33de26413f44c47545f27331222097137 (patch)
treebf18e5c968ebdd8b7a627eac7801311eadf41911 /roles/lib_openshift
parent6528031d5ec24d62ffe28687bb134bc1237f0210 (diff)
downloadopenshift-a80a97e33de26413f44c47545f27331222097137.tar.gz
openshift-a80a97e33de26413f44c47545f27331222097137.tar.bz2
openshift-a80a97e33de26413f44c47545f27331222097137.tar.xz
openshift-a80a97e33de26413f44c47545f27331222097137.zip
Error check project creation.
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()