diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-02-01 15:04:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 15:04:48 -0500 |
commit | 287282e3a1c36ea2c7bc9eb14e463fd347c7d95a (patch) | |
tree | 7a3875c397479c70106d8fbd8a032620075e17ac /roles/lib_openshift/library/oc_edit.py | |
parent | 4431d38b412470f3e20564333afea7cf99ecb298 (diff) | |
parent | 9ef0eb0e1e25b2f4cf6c3cc72d838edf1cfafdf5 (diff) | |
download | openshift-287282e3a1c36ea2c7bc9eb14e463fd347c7d95a.tar.gz openshift-287282e3a1c36ea2c7bc9eb14e463fd347c7d95a.tar.bz2 openshift-287282e3a1c36ea2c7bc9eb14e463fd347c7d95a.tar.xz openshift-287282e3a1c36ea2c7bc9eb14e463fd347c7d95a.zip |
Merge pull request #3224 from kwoodson/oc_service
Adding oc_service to lib_openshift.
Diffstat (limited to 'roles/lib_openshift/library/oc_edit.py')
-rw-r--r-- | roles/lib_openshift/library/oc_edit.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/roles/lib_openshift/library/oc_edit.py b/roles/lib_openshift/library/oc_edit.py index 54036231b..bbbefc610 100644 --- a/roles/lib_openshift/library/oc_edit.py +++ b/roles/lib_openshift/library/oc_edit.py @@ -938,11 +938,13 @@ class OpenShiftCLI(object): def _run(self, cmds, input_data): ''' Actually executes the command. This makes mocking easier. ''' + curr_env = os.environ.copy() + curr_env.update({'KUBECONFIG': self.kubeconfig}) proc = subprocess.Popen(cmds, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - env={'KUBECONFIG': self.kubeconfig}) + env=curr_env) stdout, stderr = proc.communicate(input_data) @@ -953,9 +955,9 @@ class OpenShiftCLI(object): '''Base command for oc ''' cmds = [] if oadm: - cmds = ['/usr/bin/oadm'] + cmds = ['oadm'] else: - cmds = ['/usr/bin/oc'] + cmds = ['oc'] if self.all_namespaces: cmds.extend(['--all-namespaces']) |