<div dir="ltr">On Fri, Jan 10, 2014 at 11:24 PM, Sergey Skripnick <span dir="ltr"><<a href="mailto:sskripnick@mirantis.com" target="_blank">sskripnick@mirantis.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I appreciate that we want to fix the ssh client. I'm not certain that writing our own is the best >answer.<br>
</blockquote>
<br></div>
I was supposed to fix oslo.processutils.ssh with this class, but it may<br>
be fixed without it, not big deal.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
In his comments on your pull request, the paramiko author recommended looking at Fabric. I know that >Fabric has a long history in production. Does it provide the required features?<br>
<br>
</blockquote>
<br></div>
Fabric is too much for just command execution on remote server. Spur seems like<br>
good choice for this.<br></blockquote><div><br></div><div>I'd go with Fabric. It support several remote server operations, file upload/download among them. We could just import the methods we are interested. It in turn use paramiko supporting most of ssh client options. If we begin using fabric for file upload/download, it'll open door for more remote server operations. Bringing in fabric as part of oslo will be cool.</div>
<div><br></div><div>A quick demo script to upload/download files using fabric.</div><div><br></div><div><div>from fabric.api import get, put, run, settings                                  </div><div>                                                                                </div>
<div>remote_host = 'localhost'                                                       </div><div>with settings(host_string=remote_host):                                         </div><div>    # what is the remote hostname?                                              </div>
<div>    run('hostname -f')                                                          </div><div>    # download /etc/hosts file                                                  </div><div>    get('/etc/hosts')                                                           </div>
<div>    # upload /etc/bashrc to /tmp directory                                      </div><div>    put('/etc/bashrc', '/tmp/bashrc')                 </div></div><div><br></div><div>The output may look like:</div>
<div><br></div><div><div>[localhost] run: hostname -f</div><div>[localhost] out: rainbow.local</div><div>[localhost] out: </div><div><br></div><div>[localhost] download: /Users/bhuvan/localhost/hosts <- /etc/hosts</div>
<div>[localhost] put: /etc/bashrc -> /tmp/bashrc</div></div></div><div><br></div>-- <br><div dir="ltr">Regards,<br>Bhuvan Arumugam<div><a href="http://www.livecipher.com" target="_blank">www.livecipher.com</a></div></div>

</div></div>