summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/library
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-03-07 16:39:52 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-03-07 16:39:52 -0500
commite2bad8efff2aaee4906575bc523c57bffa924715 (patch)
tree56905b6f8d7b3dbaf2e122940885aab0b97eb94a /roles/lib_openshift/library
parentde554f408404502319f8bccc8e51f8ab3e7b2ed6 (diff)
downloadopenshift-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')
-rw-r--r--roles/lib_openshift/library/oadm_manage_node.py3
-rw-r--r--roles/lib_openshift/library/oc_adm_ca_server_cert.py3
-rw-r--r--roles/lib_openshift/library/oc_adm_policy_group.py3
-rw-r--r--roles/lib_openshift/library/oc_adm_policy_user.py3
-rw-r--r--roles/lib_openshift/library/oc_adm_registry.py7
-rw-r--r--roles/lib_openshift/library/oc_adm_router.py3
-rw-r--r--roles/lib_openshift/library/oc_edit.py3
-rw-r--r--roles/lib_openshift/library/oc_env.py3
-rw-r--r--roles/lib_openshift/library/oc_label.py3
-rw-r--r--roles/lib_openshift/library/oc_obj.py3
-rw-r--r--roles/lib_openshift/library/oc_objectvalidator.py3
-rw-r--r--roles/lib_openshift/library/oc_process.py3
-rw-r--r--roles/lib_openshift/library/oc_project.py3
-rw-r--r--roles/lib_openshift/library/oc_route.py3
-rw-r--r--roles/lib_openshift/library/oc_scale.py3
-rw-r--r--roles/lib_openshift/library/oc_secret.py3
-rw-r--r--roles/lib_openshift/library/oc_service.py3
-rw-r--r--roles/lib_openshift/library/oc_serviceaccount.py3
-rw-r--r--roles/lib_openshift/library/oc_serviceaccount_secret.py3
-rw-r--r--roles/lib_openshift/library/oc_version.py3
20 files changed, 42 insertions, 22 deletions
diff --git a/roles/lib_openshift/library/oadm_manage_node.py b/roles/lib_openshift/library/oadm_manage_node.py
index 8c0a29ac7..612f62e81 100644
--- a/roles/lib_openshift/library/oadm_manage_node.py
+++ b/roles/lib_openshift/library/oadm_manage_node.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1344,7 +1345,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):
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 bbcd9d0c5..775fefb05 100644
--- a/roles/lib_openshift/library/oc_adm_ca_server_cert.py
+++ b/roles/lib_openshift/library/oc_adm_ca_server_cert.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1352,7 +1353,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):
diff --git a/roles/lib_openshift/library/oc_adm_policy_group.py b/roles/lib_openshift/library/oc_adm_policy_group.py
index 0ab1c8d49..be32d42e0 100644
--- a/roles/lib_openshift/library/oc_adm_policy_group.py
+++ b/roles/lib_openshift/library/oc_adm_policy_group.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1330,7 +1331,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):
diff --git a/roles/lib_openshift/library/oc_adm_policy_user.py b/roles/lib_openshift/library/oc_adm_policy_user.py
index 91bd85122..f76295fb9 100644
--- a/roles/lib_openshift/library/oc_adm_policy_user.py
+++ b/roles/lib_openshift/library/oc_adm_policy_user.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1330,7 +1331,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):
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)
diff --git a/roles/lib_openshift/library/oc_adm_router.py b/roles/lib_openshift/library/oc_adm_router.py
index 68b797577..00a1015a9 100644
--- a/roles/lib_openshift/library/oc_adm_router.py
+++ b/roles/lib_openshift/library/oc_adm_router.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1473,7 +1474,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):
diff --git a/roles/lib_openshift/library/oc_edit.py b/roles/lib_openshift/library/oc_edit.py
index 0347644eb..ae19a9094 100644
--- a/roles/lib_openshift/library/oc_edit.py
+++ b/roles/lib_openshift/library/oc_edit.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1372,7 +1373,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):
diff --git a/roles/lib_openshift/library/oc_env.py b/roles/lib_openshift/library/oc_env.py
index e343c70df..40240b17d 100644
--- a/roles/lib_openshift/library/oc_env.py
+++ b/roles/lib_openshift/library/oc_env.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1339,7 +1340,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):
diff --git a/roles/lib_openshift/library/oc_label.py b/roles/lib_openshift/library/oc_label.py
index c4ed42bbe..e0147790b 100644
--- a/roles/lib_openshift/library/oc_label.py
+++ b/roles/lib_openshift/library/oc_label.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1348,7 +1349,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):
diff --git a/roles/lib_openshift/library/oc_obj.py b/roles/lib_openshift/library/oc_obj.py
index 863443517..54914d484 100644
--- a/roles/lib_openshift/library/oc_obj.py
+++ b/roles/lib_openshift/library/oc_obj.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1351,7 +1352,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):
diff --git a/roles/lib_openshift/library/oc_objectvalidator.py b/roles/lib_openshift/library/oc_objectvalidator.py
index f6802a9b3..3b005f1b7 100644
--- a/roles/lib_openshift/library/oc_objectvalidator.py
+++ b/roles/lib_openshift/library/oc_objectvalidator.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1283,7 +1284,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):
diff --git a/roles/lib_openshift/library/oc_process.py b/roles/lib_openshift/library/oc_process.py
index 03c9d2044..f215b09a7 100644
--- a/roles/lib_openshift/library/oc_process.py
+++ b/roles/lib_openshift/library/oc_process.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1340,7 +1341,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):
diff --git a/roles/lib_openshift/library/oc_project.py b/roles/lib_openshift/library/oc_project.py
index 812c67de5..147813693 100644
--- a/roles/lib_openshift/library/oc_project.py
+++ b/roles/lib_openshift/library/oc_project.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1337,7 +1338,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):
diff --git a/roles/lib_openshift/library/oc_route.py b/roles/lib_openshift/library/oc_route.py
index 2ce3824e9..e487147dc 100644
--- a/roles/lib_openshift/library/oc_route.py
+++ b/roles/lib_openshift/library/oc_route.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1382,7 +1383,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):
diff --git a/roles/lib_openshift/library/oc_scale.py b/roles/lib_openshift/library/oc_scale.py
index c9e9b1790..8257040b3 100644
--- a/roles/lib_openshift/library/oc_scale.py
+++ b/roles/lib_openshift/library/oc_scale.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1326,7 +1327,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):
diff --git a/roles/lib_openshift/library/oc_secret.py b/roles/lib_openshift/library/oc_secret.py
index 6058f0ee2..cff27083f 100644
--- a/roles/lib_openshift/library/oc_secret.py
+++ b/roles/lib_openshift/library/oc_secret.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1372,7 +1373,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):
diff --git a/roles/lib_openshift/library/oc_service.py b/roles/lib_openshift/library/oc_service.py
index 8f6303a66..5b4a8271e 100644
--- a/roles/lib_openshift/library/oc_service.py
+++ b/roles/lib_openshift/library/oc_service.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1378,7 +1379,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):
diff --git a/roles/lib_openshift/library/oc_serviceaccount.py b/roles/lib_openshift/library/oc_serviceaccount.py
index 7d78c96d0..ea178f4ee 100644
--- a/roles/lib_openshift/library/oc_serviceaccount.py
+++ b/roles/lib_openshift/library/oc_serviceaccount.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1324,7 +1325,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):
diff --git a/roles/lib_openshift/library/oc_serviceaccount_secret.py b/roles/lib_openshift/library/oc_serviceaccount_secret.py
index c058c555b..39d2c3ef8 100644
--- a/roles/lib_openshift/library/oc_serviceaccount_secret.py
+++ b/roles/lib_openshift/library/oc_serviceaccount_secret.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1324,7 +1325,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):
diff --git a/roles/lib_openshift/library/oc_version.py b/roles/lib_openshift/library/oc_version.py
index 4e65b8a0a..e4e4833c0 100644
--- a/roles/lib_openshift/library/oc_version.py
+++ b/roles/lib_openshift/library/oc_version.py
@@ -33,6 +33,7 @@
from __future__ import print_function
import atexit
+import collections
import copy
import json
import os
@@ -1296,7 +1297,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):