|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.adaptation.DistSsh
public class DistSsh
Implements the scp target using the verinec.util ssh classes.
todo: we should consider a mechanism to copy all files in one step to the target system if several exist under the same target, as this implementation gives a lot of overhead when the connection is established and closed for each file.
SshProgramExec,
SshCopy| Field Summary | |
|---|---|
private String |
host
|
private String |
hostVerification
|
private File |
keyfile
|
private Logger |
log
|
private String |
passphrase
|
private String |
password
|
private int |
port
|
private static String |
prefPublicKey
The public key algorithm is fixed to ssh-rsa. |
private String |
remotePrefix
|
private String |
username
|
| Constructor Summary | |
|---|---|
DistSsh()
|
|
| Method Summary | |
|---|---|
void |
distribute(Element config)
Write a file to the target system using scp. |
String |
execute(Element command)
Execute a command over the ssh execute mechanism. |
void |
setTarget(Element target)
Set the connection data from a target element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Logger log
private String username
private String password
private File keyfile
private String passphrase
private String host
private int port
private String remotePrefix
private String hostVerification
private static String prefPublicKey
| Constructor Detail |
|---|
public DistSsh()
| Method Detail |
|---|
public void setTarget(Element target)
throws VerinecException
setTarget in interface IDistributortarget - The tr:target element of the service configuration to be distributed.
VerinecException - if the target has no scp child or is missing required attributes.
public void distribute(Element config)
throws VerinecException
distribute in interface IDistributorconfig - a result-file to distribute.
VerinecException - if the config is not a result-file or there is an error during copying the file.
public String execute(Element command)
throws VerinecException
execute in interface IDistributorcommand - A command element of the pre- or post-process for the configuration.
VerinecException - If the command execution fails (and continueOnError is false) or if the underlying communication protocol fails.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||