summaryrefslogtreecommitdiffstats
path: root/images/installer/root
diff options
context:
space:
mode:
authorLuke Meyer <lmeyer@redhat.com>2017-09-13 14:36:49 -0400
committerLuke Meyer <lmeyer@redhat.com>2017-09-13 14:46:13 -0400
commit0ee022ab5a403752d8f8309b63639980871a4edc (patch)
tree8052f1f432be8bab0623bf725102f3113a29e844 /images/installer/root
parentc032e4ca7f1cb0f705226e250752ed6249c731da (diff)
downloadopenshift-0ee022ab5a403752d8f8309b63639980871a4edc.tar.gz
openshift-0ee022ab5a403752d8f8309b63639980871a4edc.tar.bz2
openshift-0ee022ab5a403752d8f8309b63639980871a4edc.tar.xz
openshift-0ee022ab5a403752d8f8309b63639980871a4edc.zip
inventory generate: always use kubeconfig, no login
Diffstat (limited to 'images/installer/root')
-rwxr-xr-ximages/installer/root/usr/local/bin/generate12
1 files changed, 2 insertions, 10 deletions
diff --git a/images/installer/root/usr/local/bin/generate b/images/installer/root/usr/local/bin/generate
index 94a86d7c6..4a6f7ce19 100755
--- a/images/installer/root/usr/local/bin/generate
+++ b/images/installer/root/usr/local/bin/generate
@@ -82,6 +82,8 @@ class OpenShiftClient:
"""Execute a remote call using `oc`"""
cmd = [
self.oc,
+ '--config',
+ self.kubeconfig
] + shlex.split(cmd_str)
try:
out = subprocess.check_output(list(cmd), stderr=subprocess.STDOUT)
@@ -89,16 +91,6 @@ class OpenShiftClient:
raise OpenShiftClientError('[rc {}] {}\n{}'.format(err.returncode, ' '.join(err.cmd), err.output))
return out
- def login(self, host, user):
- """Login using `oc` to the specified host.
- Expects an admin.kubeconfig file to have been provided, and that
- the kubeconfig file has a context stanza for the given user.
- Although a password is not used, a placeholder is automatically
- specified in order to prevent this script from "hanging" in the
- event that no valid user stanza exists in the provided kubeconfig."""
- call_cmd = 'login {host} -u {u} -p none --config {c}'
- return self.call(call_cmd.format(host=host, u=user, c=self.kubeconfig))
-
def whoami(self):
"""Retrieve information about the current user in the given kubeconfig"""
return self.call('whoami')