diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-03-07 16:39:52 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2017-03-07 16:39:52 -0500 |
commit | e2bad8efff2aaee4906575bc523c57bffa924715 (patch) | |
tree | 56905b6f8d7b3dbaf2e122940885aab0b97eb94a /roles/lib_openshift/library/oc_adm_registry.py | |
parent | de554f408404502319f8bccc8e51f8ab3e7b2ed6 (diff) | |
download | openshift-e2bad8efff2aaee4906575bc523c57bffa924715.tar.gz openshift-e2bad8efff2aaee4906575bc523c57bffa924715.tar.bz2 openshift-e2bad8efff2aaee4906575bc523c57bffa924715.tar.xz openshift-e2bad8efff2aaee4906575bc523c57bffa924715.zip |
Fix to OpenshiftCLIConfig to support an ordereddict. This was breaking test cases.
Diffstat (limited to 'roles/lib_openshift/library/oc_adm_registry.py')
-rw-r--r-- | roles/lib_openshift/library/oc_adm_registry.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/roles/lib_openshift/library/oc_adm_registry.py b/roles/lib_openshift/library/oc_adm_registry.py index dcfc326a9..dc9aadf36 100644 --- a/roles/lib_openshift/library/oc_adm_registry.py +++ b/roles/lib_openshift/library/oc_adm_registry.py @@ -33,6 +33,7 @@ from __future__ import print_function import atexit +import collections import copy import json import os @@ -1448,7 +1449,7 @@ class OpenShiftCLIConfig(object): self.kubeconfig = kubeconfig self.name = rname self.namespace = namespace - self._options = options + self._options = collections.OrderedDict(options) @property def config_options(self): @@ -2266,7 +2267,6 @@ class Registry(OpenShiftCLI): def exists(self): '''does the object exist?''' - self.get() if self.deploymentconfig and self.service: return True @@ -2327,7 +2327,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) |