summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/class
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@afrolegs.com>2017-03-09 11:41:06 -0500
committerGitHub <noreply@github.com>2017-03-09 11:41:06 -0500
commit573e91d03d7dccd79a03774c6889c2c2753836b1 (patch)
tree06db9fb260c9f3d0c96d18e4d59d92ee3b14ec14 /roles/lib_openshift/src/class
parent20aa8f8919d335042568cb3e6b75aa8fd7a490bb (diff)
parentea6f73440c47ae3c24852f11542e715b3765d9d1 (diff)
downloadopenshift-573e91d03d7dccd79a03774c6889c2c2753836b1.tar.gz
openshift-573e91d03d7dccd79a03774c6889c2c2753836b1.tar.bz2
openshift-573e91d03d7dccd79a03774c6889c2c2753836b1.tar.xz
openshift-573e91d03d7dccd79a03774c6889c2c2753836b1.zip
Merge pull request #3590 from kwoodson/router_registry_unit_tests
Fix to OpenshiftCLIConfig to support an sorted keys. Removed redundant get.
Diffstat (limited to 'roles/lib_openshift/src/class')
-rw-r--r--roles/lib_openshift/src/class/oc_adm_registry.py6
-rw-r--r--roles/lib_openshift/src/class/oc_adm_router.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/roles/lib_openshift/src/class/oc_adm_registry.py b/roles/lib_openshift/src/class/oc_adm_registry.py
index 37904c43f..c083cd179 100644
--- a/roles/lib_openshift/src/class/oc_adm_registry.py
+++ b/roles/lib_openshift/src/class/oc_adm_registry.py
@@ -119,7 +119,6 @@ class Registry(OpenShiftCLI):
def exists(self):
'''does the object exist?'''
- self.get()
if self.deploymentconfig and self.service:
return True
@@ -146,7 +145,7 @@ class Registry(OpenShiftCLI):
''' prepare a registry for instantiation '''
options = self.config.to_option_list()
- cmd = ['registry', '-n', self.config.namespace]
+ cmd = ['registry']
cmd.extend(options)
cmd.extend(['--dry-run=True', '-o', 'json'])
@@ -180,7 +179,8 @@ class Registry(OpenShiftCLI):
service.put('spec.portalIP', self.portal_ip)
# the dry-run doesn't apply the selector correctly
- service.put('spec.selector', self.service.get_selector())
+ if self.service:
+ service.put('spec.selector', self.service.get_selector())
# need to create the service and the deploymentconfig
service_file = Utils.create_tmp_file_from_contents('service', service.yaml_dict)
diff --git a/roles/lib_openshift/src/class/oc_adm_router.py b/roles/lib_openshift/src/class/oc_adm_router.py
index 7b163b120..356d06fdf 100644
--- a/roles/lib_openshift/src/class/oc_adm_router.py
+++ b/roles/lib_openshift/src/class/oc_adm_router.py
@@ -224,7 +224,7 @@ class Router(OpenShiftCLI):
options = self.config.to_option_list()
- cmd = ['router', self.config.name, '-n', self.config.namespace]
+ cmd = ['router', self.config.name]
cmd.extend(options)
cmd.extend(['--dry-run=True', '-o', 'json'])