diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-03-08 13:03:35 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2017-03-08 13:32:27 -0500 |
commit | 49f46a7686cab15eb2ec9335ca00e9cd7eb547b3 (patch) | |
tree | 74ab2f9e445c6145cf7856ae81530c97fc55c021 /roles/lib_openshift/library/oc_adm_router.py | |
parent | 842b69be27aa97bb1df5dde97029d6cbf82aebfb (diff) | |
download | openshift-49f46a7686cab15eb2ec9335ca00e9cd7eb547b3.tar.gz openshift-49f46a7686cab15eb2ec9335ca00e9cd7eb547b3.tar.bz2 openshift-49f46a7686cab15eb2ec9335ca00e9cd7eb547b3.tar.xz openshift-49f46a7686cab15eb2ec9335ca00e9cd7eb547b3.zip |
Removing ordereddict. Replaced with sorted keys.
Diffstat (limited to 'roles/lib_openshift/library/oc_adm_router.py')
-rw-r--r-- | roles/lib_openshift/library/oc_adm_router.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/roles/lib_openshift/library/oc_adm_router.py b/roles/lib_openshift/library/oc_adm_router.py index 00a1015a9..ab06a5141 100644 --- a/roles/lib_openshift/library/oc_adm_router.py +++ b/roles/lib_openshift/library/oc_adm_router.py @@ -33,7 +33,6 @@ from __future__ import print_function import atexit -import collections import copy import json import os @@ -1474,7 +1473,7 @@ class OpenShiftCLIConfig(object): self.kubeconfig = kubeconfig self.name = rname self.namespace = namespace - self._options = collections.OrderedDict(options) + self._options = options @property def config_options(self): @@ -1488,10 +1487,11 @@ class OpenShiftCLIConfig(object): def stringify(self): ''' return the options hash as cli params in a string ''' rval = [] - for key, data in self.config_options.items(): + for key in sorted(self.config_options.keys()): + data = self.config_options[key] if data['include'] \ and (data['value'] or isinstance(data['value'], int)): - rval.append('--%s=%s' % (key.replace('_', '-'), data['value'])) + rval.append('--{}={}'.format(key.replace('_', '-'), data['value'])) return rval @@ -2730,7 +2730,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']) |