summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/lib/service.py
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-03-01 16:34:48 -0500
committerGitHub <noreply@github.com>2017-03-01 16:34:48 -0500
commitef3aa534d7b54c92c076f89c91f514972ba64612 (patch)
tree6031a633254d5e0a6803186a88e4ff0bb14599b3 /roles/lib_openshift/src/lib/service.py
parent0a782a06d49942dadb2b8d51509e94f656570ec4 (diff)
parente62a4bf341637bc26503a9ba5246afb9b016ea36 (diff)
downloadopenshift-ef3aa534d7b54c92c076f89c91f514972ba64612.tar.gz
openshift-ef3aa534d7b54c92c076f89c91f514972ba64612.tar.bz2
openshift-ef3aa534d7b54c92c076f89c91f514972ba64612.tar.xz
openshift-ef3aa534d7b54c92c076f89c91f514972ba64612.zip
Merge pull request #3493 from kwoodson/registry_reencyrpt_route
Adding support for a route with reencrypt and certificates.
Diffstat (limited to 'roles/lib_openshift/src/lib/service.py')
-rw-r--r--roles/lib_openshift/src/lib/service.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/lib/service.py b/roles/lib_openshift/src/lib/service.py
index ffe27da47..eef568779 100644
--- a/roles/lib_openshift/src/lib/service.py
+++ b/roles/lib_openshift/src/lib/service.py
@@ -67,6 +67,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):
@@ -77,6 +78,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):