summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/library
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-03-08 13:03:35 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-03-08 13:32:27 -0500
commit49f46a7686cab15eb2ec9335ca00e9cd7eb547b3 (patch)
tree74ab2f9e445c6145cf7856ae81530c97fc55c021 /roles/lib_openshift/library
parent842b69be27aa97bb1df5dde97029d6cbf82aebfb (diff)
downloadopenshift-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')
-rw-r--r--roles/lib_openshift/library/oadm_manage_node.py8
-rw-r--r--roles/lib_openshift/library/oc_adm_ca_server_cert.py8
-rw-r--r--roles/lib_openshift/library/oc_adm_policy_group.py8
-rw-r--r--roles/lib_openshift/library/oc_adm_policy_user.py8
-rw-r--r--roles/lib_openshift/library/oc_adm_registry.py10
-rw-r--r--roles/lib_openshift/library/oc_adm_router.py10
-rw-r--r--roles/lib_openshift/library/oc_edit.py8
-rw-r--r--roles/lib_openshift/library/oc_env.py8
-rw-r--r--roles/lib_openshift/library/oc_label.py8
-rw-r--r--roles/lib_openshift/library/oc_obj.py8
-rw-r--r--roles/lib_openshift/library/oc_objectvalidator.py8
-rw-r--r--roles/lib_openshift/library/oc_process.py8
-rw-r--r--roles/lib_openshift/library/oc_project.py8
-rw-r--r--roles/lib_openshift/library/oc_route.py8
-rw-r--r--roles/lib_openshift/library/oc_scale.py8
-rw-r--r--roles/lib_openshift/library/oc_secret.py8
-rw-r--r--roles/lib_openshift/library/oc_service.py8
-rw-r--r--roles/lib_openshift/library/oc_serviceaccount.py8
-rw-r--r--roles/lib_openshift/library/oc_serviceaccount_secret.py8
-rw-r--r--roles/lib_openshift/library/oc_version.py8
20 files changed, 82 insertions, 82 deletions
diff --git a/roles/lib_openshift/library/oadm_manage_node.py b/roles/lib_openshift/library/oadm_manage_node.py
index 612f62e81..8bb0538c0 100644
--- a/roles/lib_openshift/library/oadm_manage_node.py
+++ b/roles/lib_openshift/library/oadm_manage_node.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1345,7 +1344,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):
@@ -1359,10 +1358,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
diff --git a/roles/lib_openshift/library/oc_adm_ca_server_cert.py b/roles/lib_openshift/library/oc_adm_ca_server_cert.py
index 775fefb05..4ecfd2bff 100644
--- a/roles/lib_openshift/library/oc_adm_ca_server_cert.py
+++ b/roles/lib_openshift/library/oc_adm_ca_server_cert.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1353,7 +1352,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):
@@ -1367,10 +1366,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
diff --git a/roles/lib_openshift/library/oc_adm_policy_group.py b/roles/lib_openshift/library/oc_adm_policy_group.py
index be32d42e0..28df1cf94 100644
--- a/roles/lib_openshift/library/oc_adm_policy_group.py
+++ b/roles/lib_openshift/library/oc_adm_policy_group.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1331,7 +1330,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):
@@ -1345,10 +1344,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
diff --git a/roles/lib_openshift/library/oc_adm_policy_user.py b/roles/lib_openshift/library/oc_adm_policy_user.py
index f76295fb9..9b26a2159 100644
--- a/roles/lib_openshift/library/oc_adm_policy_user.py
+++ b/roles/lib_openshift/library/oc_adm_policy_user.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1331,7 +1330,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):
@@ -1345,10 +1344,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
diff --git a/roles/lib_openshift/library/oc_adm_registry.py b/roles/lib_openshift/library/oc_adm_registry.py
index dc9aadf36..c398c5551 100644
--- a/roles/lib_openshift/library/oc_adm_registry.py
+++ b/roles/lib_openshift/library/oc_adm_registry.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1449,7 +1448,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):
@@ -1463,10 +1462,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
@@ -2293,7 +2293,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'])
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'])
diff --git a/roles/lib_openshift/library/oc_edit.py b/roles/lib_openshift/library/oc_edit.py
index ae19a9094..7a7eaf40a 100644
--- a/roles/lib_openshift/library/oc_edit.py
+++ b/roles/lib_openshift/library/oc_edit.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1373,7 +1372,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):
@@ -1387,10 +1386,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
diff --git a/roles/lib_openshift/library/oc_env.py b/roles/lib_openshift/library/oc_env.py
index 40240b17d..a1994b0f1 100644
--- a/roles/lib_openshift/library/oc_env.py
+++ b/roles/lib_openshift/library/oc_env.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1340,7 +1339,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):
@@ -1354,10 +1353,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
diff --git a/roles/lib_openshift/library/oc_label.py b/roles/lib_openshift/library/oc_label.py
index e0147790b..109a78184 100644
--- a/roles/lib_openshift/library/oc_label.py
+++ b/roles/lib_openshift/library/oc_label.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1349,7 +1348,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):
@@ -1363,10 +1362,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
diff --git a/roles/lib_openshift/library/oc_obj.py b/roles/lib_openshift/library/oc_obj.py
index 54914d484..bd6e77c2a 100644
--- a/roles/lib_openshift/library/oc_obj.py
+++ b/roles/lib_openshift/library/oc_obj.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1352,7 +1351,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):
@@ -1366,10 +1365,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
diff --git a/roles/lib_openshift/library/oc_objectvalidator.py b/roles/lib_openshift/library/oc_objectvalidator.py
index 3b005f1b7..e691c2ea7 100644
--- a/roles/lib_openshift/library/oc_objectvalidator.py
+++ b/roles/lib_openshift/library/oc_objectvalidator.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1284,7 +1283,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):
@@ -1298,10 +1297,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
diff --git a/roles/lib_openshift/library/oc_process.py b/roles/lib_openshift/library/oc_process.py
index f215b09a7..14d519e52 100644
--- a/roles/lib_openshift/library/oc_process.py
+++ b/roles/lib_openshift/library/oc_process.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1341,7 +1340,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):
@@ -1355,10 +1354,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
diff --git a/roles/lib_openshift/library/oc_project.py b/roles/lib_openshift/library/oc_project.py
index 147813693..4f82abcfe 100644
--- a/roles/lib_openshift/library/oc_project.py
+++ b/roles/lib_openshift/library/oc_project.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1338,7 +1337,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):
@@ -1352,10 +1351,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
diff --git a/roles/lib_openshift/library/oc_route.py b/roles/lib_openshift/library/oc_route.py
index e487147dc..97dd310bc 100644
--- a/roles/lib_openshift/library/oc_route.py
+++ b/roles/lib_openshift/library/oc_route.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1383,7 +1382,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):
@@ -1397,10 +1396,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
diff --git a/roles/lib_openshift/library/oc_scale.py b/roles/lib_openshift/library/oc_scale.py
index 8257040b3..56e4e38f7 100644
--- a/roles/lib_openshift/library/oc_scale.py
+++ b/roles/lib_openshift/library/oc_scale.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1327,7 +1326,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):
@@ -1341,10 +1340,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
diff --git a/roles/lib_openshift/library/oc_secret.py b/roles/lib_openshift/library/oc_secret.py
index cff27083f..ad32d4900 100644
--- a/roles/lib_openshift/library/oc_secret.py
+++ b/roles/lib_openshift/library/oc_secret.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1373,7 +1372,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):
@@ -1387,10 +1386,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
diff --git a/roles/lib_openshift/library/oc_service.py b/roles/lib_openshift/library/oc_service.py
index 5b4a8271e..a4d0ca3f3 100644
--- a/roles/lib_openshift/library/oc_service.py
+++ b/roles/lib_openshift/library/oc_service.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1379,7 +1378,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):
@@ -1393,10 +1392,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
diff --git a/roles/lib_openshift/library/oc_serviceaccount.py b/roles/lib_openshift/library/oc_serviceaccount.py
index ea178f4ee..b6586fca9 100644
--- a/roles/lib_openshift/library/oc_serviceaccount.py
+++ b/roles/lib_openshift/library/oc_serviceaccount.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1325,7 +1324,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):
@@ -1339,10 +1338,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
diff --git a/roles/lib_openshift/library/oc_serviceaccount_secret.py b/roles/lib_openshift/library/oc_serviceaccount_secret.py
index 39d2c3ef8..925a5a088 100644
--- a/roles/lib_openshift/library/oc_serviceaccount_secret.py
+++ b/roles/lib_openshift/library/oc_serviceaccount_secret.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1325,7 +1324,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):
@@ -1339,10 +1338,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
diff --git a/roles/lib_openshift/library/oc_version.py b/roles/lib_openshift/library/oc_version.py
index e4e4833c0..8f59d4d7e 100644
--- a/roles/lib_openshift/library/oc_version.py
+++ b/roles/lib_openshift/library/oc_version.py
@@ -33,7 +33,6 @@
from __future__ import print_function
import atexit
-import collections
import copy
import json
import os
@@ -1297,7 +1296,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):
@@ -1311,10 +1310,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