summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift
diff options
context:
space:
mode:
Diffstat (limited to 'roles/lib_openshift')
-rw-r--r--roles/lib_openshift/library/oadm_manage_node.py6
-rw-r--r--roles/lib_openshift/library/oc_scale.py2
2 files changed, 3 insertions, 5 deletions
diff --git a/roles/lib_openshift/library/oadm_manage_node.py b/roles/lib_openshift/library/oadm_manage_node.py
index dc605a574..39e6384da 100644
--- a/roles/lib_openshift/library/oadm_manage_node.py
+++ b/roles/lib_openshift/library/oadm_manage_node.py
@@ -814,12 +814,11 @@ class OpenShiftCLI(object):
cmd = ['get', resource]
if selector:
cmd.append('--selector=%s' % selector)
+ elif rname:
+ cmd.append(rname)
cmd.extend(['-o', 'json'])
- if rname:
- cmd.append(rname)
-
rval = self.openshift_cmd(cmd, output=True)
# Ensure results are retuned in an array
@@ -1430,7 +1429,6 @@ class ManageNode(OpenShiftCLI):
return {'changed': changed, 'results': results, 'state': "present"}
-
# -*- -*- -*- End included fragment: class/oadm_manage_node.py -*- -*- -*-
# -*- -*- -*- Begin included fragment: ansible/oadm_manage_node.py -*- -*- -*-
diff --git a/roles/lib_openshift/library/oc_scale.py b/roles/lib_openshift/library/oc_scale.py
index 6ae85e220..87b71fe0a 100644
--- a/roles/lib_openshift/library/oc_scale.py
+++ b/roles/lib_openshift/library/oc_scale.py
@@ -901,7 +901,7 @@ class OpenShiftCLI(object):
if self.all_namespaces:
cmds.extend(['--all-namespaces'])
- elif self.namespace:
+ elif self.namespace is not None and self.namespace.lower() not in ['none', 'emtpy']: # E501
cmds.extend(['-n', self.namespace])
cmds.extend(cmd)