summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/library/oc_service.py
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-02-27 19:01:32 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-02-28 09:29:21 -0500
commit74e890482f2be933634286f8b4cf488287cf6d39 (patch)
tree26ace727f85fa25e6629f3cf10c4f2c1d05f80b4 /roles/lib_openshift/library/oc_service.py
parente0090381732d43de74715b9d41480b3c43391783 (diff)
downloadopenshift-74e890482f2be933634286f8b4cf488287cf6d39.tar.gz
openshift-74e890482f2be933634286f8b4cf488287cf6d39.tar.bz2
openshift-74e890482f2be933634286f8b4cf488287cf6d39.tar.xz
openshift-74e890482f2be933634286f8b4cf488287cf6d39.zip
Modified base debug statements. Fixed oc_secret debug/verbose flag. Added reencrypt for route.
Diffstat (limited to 'roles/lib_openshift/library/oc_service.py')
-rw-r--r--roles/lib_openshift/library/oc_service.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/roles/lib_openshift/library/oc_service.py b/roles/lib_openshift/library/oc_service.py
index c789bbdac..83d0579a5 100644
--- a/roles/lib_openshift/library/oc_service.py
+++ b/roles/lib_openshift/library/oc_service.py
@@ -1317,8 +1317,8 @@ class Utils(object):
elif value != user_def[key]:
if debug:
print('value should be identical')
- print(value)
print(user_def[key])
+ print(value)
return False
# recurse on a dictionary
@@ -1338,8 +1338,8 @@ class Utils(object):
if api_values != user_values:
if debug:
print("keys are not equal in dict")
- print(api_values)
print(user_values)
+ print(api_values)
return False
result = Utils.check_def_equal(user_def[key], value, skip_keys=skip_keys, debug=debug)
@@ -1463,6 +1463,7 @@ class Service(Yedit):
port_path = "spec.ports"
portal_ip = "spec.portalIP"
cluster_ip = "spec.clusterIP"
+ selector_path = 'spec.selector'
kind = 'Service'
def __init__(self, content):
@@ -1473,6 +1474,10 @@ class Service(Yedit):
''' get a list of ports '''
return self.get(Service.port_path) or []
+ def get_selector(self):
+ ''' get the service selector'''
+ return self.get(Service.selector_path) or {}
+
def add_ports(self, inc_ports):
''' add a port object to the ports list '''
if not isinstance(inc_ports, list):
@@ -1546,7 +1551,7 @@ class OCService(OpenShiftCLI):
kubeconfig='/etc/origin/master/admin.kubeconfig',
verbose=False):
''' Constructor for OCVolume '''
- super(OCService, self).__init__(namespace, kubeconfig)
+ super(OCService, self).__init__(namespace, kubeconfig, verbose)
self.namespace = namespace
self.config = ServiceConfig(sname, namespace, ports, selector, labels,
cluster_ip, portal_ip, session_affinity, service_type)
@@ -1617,7 +1622,9 @@ class OCService(OpenShiftCLI):
params['portalip'],
params['ports'],
params['session_affinity'],
- params['service_type'])
+ params['service_type'],
+ params['kubeconfig'],
+ params['debug'])
state = params['state']