summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/library
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-02-21 09:16:30 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-02-21 09:16:30 -0500
commitb21a62a937eb2abb7d32d64c826ba5a357a35a05 (patch)
tree8dd2d4500c197e5ec4dc9b1fd4598b7ef85307d6 /roles/lib_openshift/library
parent9979e0702f097f92feb6d64991ec405e0bff86ce (diff)
downloadopenshift-b21a62a937eb2abb7d32d64c826ba5a357a35a05.tar.gz
openshift-b21a62a937eb2abb7d32d64c826ba5a357a35a05.tar.bz2
openshift-b21a62a937eb2abb7d32d64c826ba5a357a35a05.tar.xz
openshift-b21a62a937eb2abb7d32d64c826ba5a357a35a05.zip
Removed unused code. Made tests executable.
Diffstat (limited to 'roles/lib_openshift/library')
-rw-r--r--roles/lib_openshift/library/oc_adm_registry.py31
1 files changed, 6 insertions, 25 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}