summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/lib_openshift/library/oc_adm_registry.py31
-rw-r--r--roles/lib_openshift/src/class/oc_adm_registry.py31
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oadm_manage_node.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_env.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_label.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_process.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_route.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_scale.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_secret.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_service.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_openshift/src/test/unit/test_oc_version.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_utils/src/test/unit/test_repoquery.py0
-rwxr-xr-x[-rw-r--r--]roles/lib_utils/src/test/unit/test_yedit.py0
15 files changed, 12 insertions, 50 deletions
diff --git a/roles/lib_openshift/library/oc_adm_registry.py b/roles/lib_openshift/library/oc_adm_registry.py
index 8b83c61d7..d08defc6c 100644
--- a/roles/lib_openshift/library/oc_adm_registry.py
+++ b/roles/lib_openshift/library/oc_adm_registry.py
@@ -2170,10 +2170,6 @@ class Registry(OpenShiftCLI):
''' setter method for prepared_registry attribute '''
self.__prepared_registry = data
- def force_prepare_registry(self):
- '''force a registry prep'''
- self.__prepared_registry = None
-
def get(self):
''' return the self.registry_parts '''
self.deploymentconfig = None
@@ -2284,9 +2280,6 @@ class Registry(OpenShiftCLI):
def update(self):
'''run update for the registry. This performs a delete and then create '''
# Store the current service IP
- self.force_prepare_registry()
-
- self.get()
if self.service:
svcip = self.service.get('spec.clusterIP')
if svcip:
@@ -2295,18 +2288,6 @@ class Registry(OpenShiftCLI):
if portip:
self.portal_ip = portip
- #parts = self.delete(complete=False)
- #for part in parts:
- # if part['returncode'] != 0:
- # if part.has_key('stderr') and 'not found' in part['stderr']:
- # # the object is not there, continue
- # continue
- # # something went wrong
- # return parts
-
- # Ugly built in sleep here.
- #time.sleep(10)
-
results = []
if self.prepared_registry['deployment_update']:
results.append(self._replace(self.prepared_registry['deployment_file']))
@@ -2361,7 +2342,7 @@ class Registry(OpenShiftCLI):
return deploymentconfig.yaml_dict
- def needs_update(self, verbose=False):
+ def needs_update(self):
''' check to see if we need to update '''
if not self.service or not self.deploymentconfig:
return True
@@ -2370,7 +2351,7 @@ class Registry(OpenShiftCLI):
if not Utils.check_def_equal(self.prepared_registry['service'].yaml_dict,
self.service.yaml_dict,
exclude_list,
- verbose):
+ debug=self.verbose):
self.prepared_registry['service_update'] = True
exclude_list = ['dnsPolicy',
@@ -2378,7 +2359,6 @@ class Registry(OpenShiftCLI):
'restartPolicy', 'timeoutSeconds',
'livenessProbe', 'readinessProbe',
'terminationMessagePath',
- 'rollingParams',
'securityContext',
'imagePullPolicy',
'protocol', # ports.portocol: TCP
@@ -2390,7 +2370,7 @@ class Registry(OpenShiftCLI):
if not Utils.check_def_equal(self.prepared_registry['deployment'].yaml_dict,
self.deploymentconfig.yaml_dict,
exclude_list,
- verbose):
+ debug=self.verbose):
self.prepared_registry['deployment_update'] = True
return self.prepared_registry['deployment_update'] or self.prepared_registry['service_update'] or False
@@ -2422,14 +2402,15 @@ class Registry(OpenShiftCLI):
})
- ocregistry = Registry(rconfig)
+ ocregistry = Registry(rconfig, params['debug'])
+
+ api_rval = ocregistry.get()
state = params['state']
########
# get
########
if state == 'list':
- api_rval = ocregistry.get()
if api_rval['returncode'] != 0:
return {'failed': True, 'msg': api_rval}
diff --git a/roles/lib_openshift/src/class/oc_adm_registry.py b/roles/lib_openshift/src/class/oc_adm_registry.py
index 505c4db81..8cb7aea31 100644
--- a/roles/lib_openshift/src/class/oc_adm_registry.py
+++ b/roles/lib_openshift/src/class/oc_adm_registry.py
@@ -98,10 +98,6 @@ class Registry(OpenShiftCLI):
''' setter method for prepared_registry attribute '''
self.__prepared_registry = data
- def force_prepare_registry(self):
- '''force a registry prep'''
- self.__prepared_registry = None
-
def get(self):
''' return the self.registry_parts '''
self.deploymentconfig = None
@@ -212,9 +208,6 @@ class Registry(OpenShiftCLI):
def update(self):
'''run update for the registry. This performs a delete and then create '''
# Store the current service IP
- self.force_prepare_registry()
-
- self.get()
if self.service:
svcip = self.service.get('spec.clusterIP')
if svcip:
@@ -223,18 +216,6 @@ class Registry(OpenShiftCLI):
if portip:
self.portal_ip = portip
- #parts = self.delete(complete=False)
- #for part in parts:
- # if part['returncode'] != 0:
- # if part.has_key('stderr') and 'not found' in part['stderr']:
- # # the object is not there, continue
- # continue
- # # something went wrong
- # return parts
-
- # Ugly built in sleep here.
- #time.sleep(10)
-
results = []
if self.prepared_registry['deployment_update']:
results.append(self._replace(self.prepared_registry['deployment_file']))
@@ -289,7 +270,7 @@ class Registry(OpenShiftCLI):
return deploymentconfig.yaml_dict
- def needs_update(self, verbose=False):
+ def needs_update(self):
''' check to see if we need to update '''
if not self.service or not self.deploymentconfig:
return True
@@ -298,7 +279,7 @@ class Registry(OpenShiftCLI):
if not Utils.check_def_equal(self.prepared_registry['service'].yaml_dict,
self.service.yaml_dict,
exclude_list,
- verbose):
+ debug=self.verbose):
self.prepared_registry['service_update'] = True
exclude_list = ['dnsPolicy',
@@ -306,7 +287,6 @@ class Registry(OpenShiftCLI):
'restartPolicy', 'timeoutSeconds',
'livenessProbe', 'readinessProbe',
'terminationMessagePath',
- 'rollingParams',
'securityContext',
'imagePullPolicy',
'protocol', # ports.portocol: TCP
@@ -318,7 +298,7 @@ class Registry(OpenShiftCLI):
if not Utils.check_def_equal(self.prepared_registry['deployment'].yaml_dict,
self.deploymentconfig.yaml_dict,
exclude_list,
- verbose):
+ debug=self.verbose):
self.prepared_registry['deployment_update'] = True
return self.prepared_registry['deployment_update'] or self.prepared_registry['service_update'] or False
@@ -350,14 +330,15 @@ class Registry(OpenShiftCLI):
})
- ocregistry = Registry(rconfig)
+ ocregistry = Registry(rconfig, params['debug'])
+
+ api_rval = ocregistry.get()
state = params['state']
########
# get
########
if state == 'list':
- api_rval = ocregistry.get()
if api_rval['returncode'] != 0:
return {'failed': True, 'msg': api_rval}
diff --git a/roles/lib_openshift/src/test/unit/test_oadm_manage_node.py b/roles/lib_openshift/src/test/unit/test_oadm_manage_node.py
index b0786dfac..b0786dfac 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oadm_manage_node.py
+++ b/roles/lib_openshift/src/test/unit/test_oadm_manage_node.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_env.py b/roles/lib_openshift/src/test/unit/test_oc_env.py
index 15bd7e464..15bd7e464 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_env.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_env.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_label.py b/roles/lib_openshift/src/test/unit/test_oc_label.py
index 3176987b0..3176987b0 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_label.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_label.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_process.py b/roles/lib_openshift/src/test/unit/test_oc_process.py
index 450ff7071..450ff7071 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_process.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_process.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_route.py b/roles/lib_openshift/src/test/unit/test_oc_route.py
index 361b61f4b..361b61f4b 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_route.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_route.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_scale.py b/roles/lib_openshift/src/test/unit/test_oc_scale.py
index f15eb164d..f15eb164d 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_scale.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_scale.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_secret.py b/roles/lib_openshift/src/test/unit/test_oc_secret.py
index 645aac82b..645aac82b 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_secret.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_secret.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_service.py b/roles/lib_openshift/src/test/unit/test_oc_service.py
index 4a845e9f3..4a845e9f3 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_service.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_service.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py b/roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py
index 256b569eb..256b569eb 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_serviceaccount.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py b/roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py
index 213c581aa..213c581aa 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_serviceaccount_secret.py
diff --git a/roles/lib_openshift/src/test/unit/test_oc_version.py b/roles/lib_openshift/src/test/unit/test_oc_version.py
index 67dea415b..67dea415b 100644..100755
--- a/roles/lib_openshift/src/test/unit/test_oc_version.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_version.py
diff --git a/roles/lib_utils/src/test/unit/test_repoquery.py b/roles/lib_utils/src/test/unit/test_repoquery.py
index c487ab254..c487ab254 100644..100755
--- a/roles/lib_utils/src/test/unit/test_repoquery.py
+++ b/roles/lib_utils/src/test/unit/test_repoquery.py
diff --git a/roles/lib_utils/src/test/unit/test_yedit.py b/roles/lib_utils/src/test/unit/test_yedit.py
index ed07ac96e..ed07ac96e 100644..100755
--- a/roles/lib_utils/src/test/unit/test_yedit.py
+++ b/roles/lib_utils/src/test/unit/test_yedit.py