ssh.py: add flag to keep stdin open 11/24311/5
authorRoss Brattain <ross.b.brattain@intel.com>
Mon, 14 Nov 2016 02:08:57 +0000 (18:08 -0800)
committerRoss Brattain <ross.b.brattain@intel.com>
Tue, 22 Nov 2016 00:44:22 +0000 (16:44 -0800)
commita8db6ed817a39632bed19e0ece64f1862231db16
treee7cab8e0abd900eff48f8804ca1bb0a35d89887f
parent0e23c697e6329a57ba168cc57886b436ea87cdc4
ssh.py: add flag to keep stdin open

For some VNFs we may want to send periodic commands, for example to print
statistics, but otherwise not write anything for long periods of time.

Currently when we can no longer read from stdin we close it.

A workaround is to constantly spam stdin with newlines to keep forcing
stdin open.  We don't want to have to do this, so add an enable flag to
keep stdin open.  If the caller wants to close stdin at some point it
can.

Change-Id: I9496022295dfd19804572e484fe4f170ca7d4ac3
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
tests/unit/test_ssh.py
yardstick/ssh.py