diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2017-02-13 17:10:02 -0500 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2017-02-13 17:10:02 -0500 |
commit | 51f8852ed1f18ded531eca7ac14743e3f6fe534b (patch) | |
tree | 60151ea76281ceba50b158546b4849012e198c01 /roles/lib_openshift/library | |
parent | 9c09ffbd4b1c2dc9593c6fb1f312172c538f2bec (diff) | |
download | openshift-51f8852ed1f18ded531eca7ac14743e3f6fe534b.tar.gz openshift-51f8852ed1f18ded531eca7ac14743e3f6fe534b.tar.bz2 openshift-51f8852ed1f18ded531eca7ac14743e3f6fe534b.tar.xz openshift-51f8852ed1f18ded531eca7ac14743e3f6fe534b.zip |
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.py | 2 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_edit.py | 5 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_env.py | 5 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_label.py | 4 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_obj.py | 5 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_process.py | 5 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_route.py | 3 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_scale.py | 5 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_secret.py | 5 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_serviceaccount.py | 3 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_serviceaccount_secret.py | 2 |
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 |