Browse Source

Error check project creation.

Kenny Woodson 7 years ago
parent
commit
a80a97e33d

+ 3 - 0
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()
 

+ 3 - 0
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()