summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/library
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2017-02-14 14:03:02 -0500
committerGitHub <noreply@github.com>2017-02-14 14:03:02 -0500
commit7b33cdfaced1ca374b61b7222d32e8d13511f29a (patch)
tree50a1eea9eb673a311c4eccca9cf1fd65e4fb7405 /roles/lib_openshift/library
parentdcbc04be7d1f621d1cf95168c8d1265279d04ed1 (diff)
parent51f8852ed1f18ded531eca7ac14743e3f6fe534b (diff)
downloadopenshift-7b33cdfaced1ca374b61b7222d32e8d13511f29a.tar.gz
openshift-7b33cdfaced1ca374b61b7222d32e8d13511f29a.tar.bz2
openshift-7b33cdfaced1ca374b61b7222d32e8d13511f29a.tar.xz
openshift-7b33cdfaced1ca374b61b7222d32e8d13511f29a.zip
Merge pull request #3351 from detiber/fixConfigClobber
Fix cases where child classes override OpenShiftCLI values
Diffstat (limited to 'roles/lib_openshift/library')
-rw-r--r--roles/lib_openshift/library/oadm_manage_node.py2
-rw-r--r--roles/lib_openshift/library/oc_edit.py5
-rw-r--r--roles/lib_openshift/library/oc_env.py5
-rw-r--r--roles/lib_openshift/library/oc_label.py4
-rw-r--r--roles/lib_openshift/library/oc_obj.py5
-rw-r--r--roles/lib_openshift/library/oc_process.py5
-rw-r--r--roles/lib_openshift/library/oc_route.py3
-rw-r--r--roles/lib_openshift/library/oc_scale.py5
-rw-r--r--roles/lib_openshift/library/oc_secret.py5
-rw-r--r--roles/lib_openshift/library/oc_serviceaccount.py3
-rw-r--r--roles/lib_openshift/library/oc_serviceaccount_secret.py2
11 files changed, 11 insertions, 33 deletions
diff --git a/roles/lib_openshift/library/oadm_manage_node.py b/roles/lib_openshift/library/oadm_manage_node.py
index 8e217ac28..6c0ff9b13 100644
--- a/roles/lib_openshift/library/oadm_manage_node.py
+++ b/roles/lib_openshift/library/oadm_manage_node.py
@@ -1296,7 +1296,7 @@ class ManageNode(OpenShiftCLI):
config,
verbose=False):
''' Constructor for ManageNode '''
- super(ManageNode, self).__init__(None, config.kubeconfig)
+ super(ManageNode, self).__init__(None, kubeconfig=config.kubeconfig, verbose=verbose)
self.config = config
def evacuate(self):
diff --git a/roles/lib_openshift/library/oc_edit.py b/roles/lib_openshift/library/oc_edit.py
index 11b87a015..a565b32f2 100644
--- a/roles/lib_openshift/library/oc_edit.py
+++ b/roles/lib_openshift/library/oc_edit.py
@@ -1314,13 +1314,10 @@ class Edit(OpenShiftCLI):
separator='.',
verbose=False):
''' Constructor for OpenshiftOC '''
- super(Edit, self).__init__(namespace, kubeconfig)
- self.namespace = namespace
+ super(Edit, self).__init__(namespace, kubeconfig=kubeconfig, verbose=verbose)
self.kind = kind
self.name = resource_name
- self.kubeconfig = kubeconfig
self.separator = separator
- self.verbose = verbose
def get(self):
'''return a secret by name '''
diff --git a/roles/lib_openshift/library/oc_env.py b/roles/lib_openshift/library/oc_env.py
index 06c242db6..e00f5cdcc 100644
--- a/roles/lib_openshift/library/oc_env.py
+++ b/roles/lib_openshift/library/oc_env.py
@@ -1630,13 +1630,10 @@ class OCEnv(OpenShiftCLI):
kubeconfig='/etc/origin/master/admin.kubeconfig',
verbose=False):
''' Constructor for OpenshiftOC '''
- super(OCEnv, self).__init__(namespace, kubeconfig)
+ super(OCEnv, self).__init__(namespace, kubeconfig=kubeconfig, verbose=verbose)
self.kind = kind
self.name = resource_name
- self.namespace = namespace
self.env_vars = env_vars
- self.kubeconfig = kubeconfig
- self.verbose = verbose
self._resource = None
@property
diff --git a/roles/lib_openshift/library/oc_label.py b/roles/lib_openshift/library/oc_label.py
index f67eb2552..e168614bd 100644
--- a/roles/lib_openshift/library/oc_label.py
+++ b/roles/lib_openshift/library/oc_label.py
@@ -1294,11 +1294,9 @@ class OCLabel(OpenShiftCLI):
selector=None,
verbose=False):
''' Constructor for OCLabel '''
- super(OCLabel, self).__init__(namespace, kubeconfig)
+ super(OCLabel, self).__init__(namespace, kubeconfig=kubeconfig, verbose=verbose)
self.name = name
- self.namespace = namespace
self.kind = kind
- self.kubeconfig = kubeconfig
self.labels = labels
self._curr_labels = None
self.selector = selector
diff --git a/roles/lib_openshift/library/oc_obj.py b/roles/lib_openshift/library/oc_obj.py
index e4b8ac26c..d73d05472 100644
--- a/roles/lib_openshift/library/oc_obj.py
+++ b/roles/lib_openshift/library/oc_obj.py
@@ -1296,14 +1296,11 @@ class OCObject(OpenShiftCLI):
verbose=False,
all_namespaces=False):
''' Constructor for OpenshiftOC '''
- super(OCObject, self).__init__(namespace, kubeconfig,
+ super(OCObject, self).__init__(namespace, kubeconfig=kubeconfig, verbose=verbose,
all_namespaces=all_namespaces)
self.kind = kind
- self.namespace = namespace
self.name = rname
self.selector = selector
- self.kubeconfig = kubeconfig
- self.verbose = verbose
def get(self):
'''return a kind by name '''
diff --git a/roles/lib_openshift/library/oc_process.py b/roles/lib_openshift/library/oc_process.py
index 702cb02d4..bcb4d2289 100644
--- a/roles/lib_openshift/library/oc_process.py
+++ b/roles/lib_openshift/library/oc_process.py
@@ -1286,14 +1286,11 @@ class OCProcess(OpenShiftCLI):
tdata=None,
verbose=False):
''' Constructor for OpenshiftOC '''
- super(OCProcess, self).__init__(namespace, kubeconfig)
- self.namespace = namespace
+ super(OCProcess, self).__init__(namespace, kubeconfig=kubeconfig, verbose=verbose)
self.name = tname
self.data = tdata
self.params = params
self.create = create
- self.kubeconfig = kubeconfig
- self.verbose = verbose
self._template = None
@property
diff --git a/roles/lib_openshift/library/oc_route.py b/roles/lib_openshift/library/oc_route.py
index 982a43ba3..d5dc84116 100644
--- a/roles/lib_openshift/library/oc_route.py
+++ b/roles/lib_openshift/library/oc_route.py
@@ -1461,9 +1461,8 @@ class OCRoute(OpenShiftCLI):
config,
verbose=False):
''' Constructor for OCVolume '''
- super(OCRoute, self).__init__(config.namespace, config.kubeconfig)
+ super(OCRoute, self).__init__(config.namespace, kubeconfig=config.kubeconfig, verbose=verbose)
self.config = config
- self.namespace = config.namespace
self._route = None
@property
diff --git a/roles/lib_openshift/library/oc_scale.py b/roles/lib_openshift/library/oc_scale.py
index 48a629b5e..be3b7f837 100644
--- a/roles/lib_openshift/library/oc_scale.py
+++ b/roles/lib_openshift/library/oc_scale.py
@@ -1629,13 +1629,10 @@ class OCScale(OpenShiftCLI):
kubeconfig='/etc/origin/master/admin.kubeconfig',
verbose=False):
''' Constructor for OCScale '''
- super(OCScale, self).__init__(namespace, kubeconfig)
+ super(OCScale, self).__init__(namespace, kubeconfig=kubeconfig, verbose=verbose)
self.kind = kind
self.replicas = replicas
self.name = resource_name
- self.namespace = namespace
- self.kubeconfig = kubeconfig
- self.verbose = verbose
self._resource = None
@property
diff --git a/roles/lib_openshift/library/oc_secret.py b/roles/lib_openshift/library/oc_secret.py
index 526474f17..8598cb0ec 100644
--- a/roles/lib_openshift/library/oc_secret.py
+++ b/roles/lib_openshift/library/oc_secret.py
@@ -1418,12 +1418,9 @@ class OCSecret(OpenShiftCLI):
kubeconfig='/etc/origin/master/admin.kubeconfig',
verbose=False):
''' Constructor for OpenshiftOC '''
- super(OCSecret, self).__init__(namespace, kubeconfig)
- self.namespace = namespace
+ super(OCSecret, self).__init__(namespace, kubeconfig=kubeconfig, verbose=verbose)
self.name = secret_name
- self.kubeconfig = kubeconfig
self.decode = decode
- self.verbose = verbose
def get(self):
'''return a secret by name '''
diff --git a/roles/lib_openshift/library/oc_serviceaccount.py b/roles/lib_openshift/library/oc_serviceaccount.py
index cd0847963..fcc5bbfa7 100644
--- a/roles/lib_openshift/library/oc_serviceaccount.py
+++ b/roles/lib_openshift/library/oc_serviceaccount.py
@@ -1396,9 +1396,8 @@ class OCServiceAccount(OpenShiftCLI):
config,
verbose=False):
''' Constructor for OCVolume '''
- super(OCServiceAccount, self).__init__(config.namespace, config.kubeconfig)
+ super(OCServiceAccount, self).__init__(config.namespace, kubeconfig=config.kubeconfig, verbose=verbose)
self.config = config
- self.namespace = config.namespace
self.service_account = None
def exists(self):
diff --git a/roles/lib_openshift/library/oc_serviceaccount_secret.py b/roles/lib_openshift/library/oc_serviceaccount_secret.py
index e22ccbfc2..ef10162c2 100644
--- a/roles/lib_openshift/library/oc_serviceaccount_secret.py
+++ b/roles/lib_openshift/library/oc_serviceaccount_secret.py
@@ -1391,7 +1391,7 @@ class OCServiceAccountSecret(OpenShiftCLI):
kind = 'sa'
def __init__(self, config, verbose=False):
''' Constructor for OpenshiftOC '''
- super(OCServiceAccountSecret, self).__init__(config.namespace, config.kubeconfig)
+ super(OCServiceAccountSecret, self).__init__(config.namespace, kubeconfig=config.kubeconfig, verbose=verbose)
self.config = config
self.verbose = verbose
self._service_account = None