Summary: | [api] Need a Utility to send commands and receive output without prompt | ||
---|---|---|---|
Product: | [Tools] Target Management | Reporter: | Martin Oberhuber <mober.at+eclipse> |
Component: | RSE | Assignee: | David McKnight <dmcknigh> |
Status: | NEW --- | QA Contact: | Martin Oberhuber <mober.at+eclipse> |
Severity: | enhancement | ||
Priority: | P3 | CC: | kjdoyle, lokuz |
Version: | 2.0 | Keywords: | api, plan |
Target Milestone: | Future | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg00269.html | ||
Whiteboard: |
Description
Martin Oberhuber
2007-12-12 09:00:18 EST
This issue is probably related to improper prompt handling in shells in general: See also bug 162857, bug 149285, bug 164101. One problem of a generic solution (in RemoteCommandShellOperation) is that it doesn't easily know what the command separator or "echo" command on a remote system is supposed to be, or whether it's even possible to join multiple commands on a single command-line with a separator. One problem of an API with specific implementations in the shell service is that a service like SSH also doesn't know the kind of remote shell exactly, and thus a lot of code which would really belong in a higher level needs to be duplicated in multiple services. I'd rather keep the shell service really simple. Personally, I'm slightly in favor of a high-level solution based on RemoteCommandShellOperation, since this is the only possible solution that also supports multiplexing of multiple commands, or deferred operation if an existing command is still running, even if the kind of remote shell is really limited (like Telnet). The open question is, what to do if a remote system does not support an "echo" command or a command separator. Perhaps it could filter out the prompt based on pattern matching? The dstore command miner also does this, any line that ends with a ">" character is considered a prompt and potentially filtered out. The code in http://dev.eclipse.org/newslists/news.eclipse.dsdp.tm/msg00281.html actually works fine on dstore and ssh, but relies on the fact that the remote side echos commands: because the BEGIN-END-TAG from the original command echo is taken as the begin tag. Can we take it for granted, that (a) commands are always echoed by the remote, and (b) the command echo is not interleaved with output from a previous still running command? Bulk reassign missed M5 tasks to M6 Moving this to future as it's API and for now we can try to use RemoteCommandShellOperation. Actually, if we go the route of changing implementation of SSH (and Telnet) IHostShell, such that they are in sync with what DStore does, it's not an API change... I'm not giving up yet. Not for M7 Bulk update of target milestone This is one of the most frequently requested enhancements by adopters. I think we'll have to do this in 3.1 if we want to further grow the Community. Also, having a proper Utility class for this might simplify User Actions. Moving deferred 3.3 api items to 3.4 We are post API freeze. |