summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/process.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-04-28 16:13:03 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-05-04 13:16:21 +0000
commit3895fec34bca8addd0ce049614bf2f8305225559 (patch)
treece3bf5d92273c5d99f7a7c5b3807a0baf61068a1 /src/osmo_gsm_tester/process.py
parentc9506b8b6289baa30318767d6fd52b17f1070cfb (diff)
Add remote user for RemoteProcress
Use it to set root user for SysmoBTS, otherwise if osmo-gsm-tester is run by another user it will fail to connect Change-Id: I67d4126fc75cb9c2d249c713cd6f14db1f1e21da
Diffstat (limited to 'src/osmo_gsm_tester/process.py')
-rw-r--r--src/osmo_gsm_tester/process.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py
index 78814c0..16f7905 100644
--- a/src/osmo_gsm_tester/process.py
+++ b/src/osmo_gsm_tester/process.py
@@ -210,8 +210,9 @@ class Process(log.Origin):
class RemoteProcess(Process):
- def __init__(self, name, run_dir, remote_host, remote_cwd, popen_args, **popen_kwargs):
+ def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, popen_args, **popen_kwargs):
super().__init__(name, run_dir, popen_args, **popen_kwargs)
+ self.remote_user = remote_user
self.remote_host = remote_host
self.remote_cwd = remote_cwd
@@ -222,7 +223,7 @@ class RemoteProcess(Process):
cd = 'cd "%s"; ' % self.remote_cwd
else:
cd = ''
- self.popen_args = ['ssh', self.remote_host,
+ self.popen_args = ['ssh', self.remote_user+'@'+self.remote_host,
'%s%s' % (cd,
' '.join(self.popen_args))]
self.dbg(self.popen_args, dir=self.run_dir, conf=self.popen_kwargs)