summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift
diff options
context:
space:
mode:
authorOpenShift Bot <dmcphers+openshiftbot@redhat.com>2017-03-15 10:43:39 -0400
committerGitHub <noreply@github.com>2017-03-15 10:43:39 -0400
commit72d189902167f86ac8164b44ad4bd5175db171bb (patch)
tree799f025950adb6456fa9f456c56784f92ebf04d5 /roles/lib_openshift
parent15130f01c9c80b67528d4e76b237822921a0a0c9 (diff)
parent0ef91c501ad62fd915836f7a6802d70812ae78a0 (diff)
downloadopenshift-72d189902167f86ac8164b44ad4bd5175db171bb.tar.gz
openshift-72d189902167f86ac8164b44ad4bd5175db171bb.tar.bz2
openshift-72d189902167f86ac8164b44ad4bd5175db171bb.tar.xz
openshift-72d189902167f86ac8164b44ad4bd5175db171bb.zip
Merge pull request #3634 from kwoodson/raise_on_prep_failures
Merged by openshift-bot
Diffstat (limited to 'roles/lib_openshift')
-rw-r--r--roles/lib_openshift/library/oc_adm_registry.py8
-rw-r--r--roles/lib_openshift/src/class/oc_adm_registry.py8
2 files changed, 8 insertions, 8 deletions
diff --git a/roles/lib_openshift/library/oc_adm_registry.py b/roles/lib_openshift/library/oc_adm_registry.py
index c398c5551..9eb268388 100644
--- a/roles/lib_openshift/library/oc_adm_registry.py
+++ b/roles/lib_openshift/library/oc_adm_registry.py
@@ -2235,8 +2235,8 @@ class Registry(OpenShiftCLI):
''' prepared_registry property '''
if not self.__prepared_registry:
results = self.prepare_registry()
- if not results:
- raise RegistryException('Could not perform registry preparation.')
+ if not results or ('returncode' in results and results['returncode'] != 0):
+ raise RegistryException('Could not perform registry preparation. {}'.format(results))
self.__prepared_registry = results
return self.__prepared_registry
@@ -2301,8 +2301,8 @@ class Registry(OpenShiftCLI):
# probably need to parse this
# pylint thinks results is a string
# pylint: disable=no-member
- if results['returncode'] != 0 and 'items' in results['results']:
- return results
+ if results['returncode'] != 0 and 'items' not in results['results']:
+ raise RegistryException('Could not perform registry preparation. {}'.format(results))
service = None
deploymentconfig = None
diff --git a/roles/lib_openshift/src/class/oc_adm_registry.py b/roles/lib_openshift/src/class/oc_adm_registry.py
index c083cd179..25519c9c9 100644
--- a/roles/lib_openshift/src/class/oc_adm_registry.py
+++ b/roles/lib_openshift/src/class/oc_adm_registry.py
@@ -87,8 +87,8 @@ class Registry(OpenShiftCLI):
''' prepared_registry property '''
if not self.__prepared_registry:
results = self.prepare_registry()
- if not results:
- raise RegistryException('Could not perform registry preparation.')
+ if not results or ('returncode' in results and results['returncode'] != 0):
+ raise RegistryException('Could not perform registry preparation. {}'.format(results))
self.__prepared_registry = results
return self.__prepared_registry
@@ -153,8 +153,8 @@ class Registry(OpenShiftCLI):
# probably need to parse this
# pylint thinks results is a string
# pylint: disable=no-member
- if results['returncode'] != 0 and 'items' in results['results']:
- return results
+ if results['returncode'] != 0 and 'items' not in results['results']:
+ raise RegistryException('Could not perform registry preparation. {}'.format(results))
service = None
deploymentconfig = None