Dne 4.2.2018 v 18:38 Yesuraj Abraham napsal(a): > Hi, > > Following to my previous question in > > https://www.mail-archive.com/[email protected]/msg00672.html > > > > Unfortunately I have put my automation work on hold and planning to resume > now. > > > > I really want to achieve this synchronization between multiple machines.. > > I am asking this question to check if there is some implementation for this > now. > > > > For example, > > Trigger the test from host machine, and the test should synchronize between > two different targets. > > Say, I want to run iperf server on one target and after that client on > another target. Once done, I want to reverse the same b/w those two targets. > >
Hello Yesuraj,
Unfortunately the situation with multi-host tests hasn't changed (we were busy
with other cards) so I can only offer you the standard python libraries, on
python3 there is a library that supports barriers, on python2 I don't know of
any but I bet there will be some backports of the py3 libs.
If you don't really need multi-host tests, but single test with some
interaction with other hosts, you might for example use `aexpect` library,
where you can spawn `ssh` and simply interact with the other machine:
```python
import aexpect
server = aexpect.ShellSession("iperf -s")
server.read_until_output_matches("------------------------------------------------------------")
# wait until it's initialized
client = aexpect.ShellSession("ssh ...")
client.cmd("iperf -c %s" % server_ip)
client.read_until_output_matches(...)
```
If you don't have password-less access you can use
https://github.com/avocado-framework/avocado-vt/blob/master/virttest/remote.py#L103
as a base for you tool to handle ssh prompt but I vaguely remember having this
function either in Avocado or Avocado-virt as library but can't find it now.
Anyway contributions in this area (or requests for implementations) are
welcome, it should be fairly simple to include in Aexpect library. You can
always join the release meeting to discuss this in real-time, or we can
follow-up this email discussion if something like this would look useful.
Kind regards,
Lukáš
>
> Regards,
>
> Yesuraj
>
signature.asc
Description: OpenPGP digital signature
