public class SshAdaptor extends Adaptor
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ADAPTOR_DESCRIPTION
A description of this adaptor
|
private static ImmutableArray<java.lang.String> |
ADAPTOR_LOCATIONS
The locations supported by this adaptor
|
static java.lang.String |
ADAPTOR_NAME
The name of this adaptor
|
protected static ImmutableArray<java.lang.String> |
ADAPTOR_SCHEME
The schemes supported by this adaptor
|
static java.lang.String |
AGENT
Enable the use of an ssh-agent
|
static java.lang.String |
AGENT_FORWARDING
Enable the use of ssh-agent-forwarding
|
static java.lang.String |
AUTOMATICALLY_ADD_HOST_KEY
Enable strict host key checking.
|
private SshCredentials |
credentialsAdaptor |
protected static int |
DEFAULT_PORT
The default SSH port
|
private SshFiles |
filesAdaptor |
static java.lang.String |
GATEWAY
Add gateway to access machine.
|
static java.lang.String |
INFO
Ssh adaptor information start with this prefix.
|
static java.lang.String |
JOBS
Ssh job information start with this prefix.
|
private SshJobs |
jobsAdaptor |
private com.jcraft.jsch.JSch |
jsch |
static java.lang.String |
LOAD_SSH_CONFIG
Load the OpenSSH config file by default.
|
static java.lang.String |
LOAD_STANDARD_KNOWN_HOSTS
Load the known_hosts file by default.
|
private static org.slf4j.Logger |
LOGGER |
static java.lang.String |
MAX_HISTORY
Maximum history length for finished jobs
|
static java.lang.String |
MULTIQ
Local multi queue properties start with this prefix.
|
static java.lang.String |
MULTIQ_MAX_CONCURRENT
Property for the maximum number of concurrent jobs in the multi queue.
|
static java.lang.String |
POLLING_DELAY
Property for maximum history length for finished jobs
|
static java.lang.String |
PREFIX
All our own properties start with this prefix.
|
static java.lang.String |
QUEUE
All our own queue properties start with this prefix.
|
static java.lang.String |
SSH_CONFIG_FILE
OpenSSH config filename.
|
static java.lang.String |
STRICT_HOST_KEY_CHECKING
Enable strict host key checking.
|
static java.lang.String |
SUBMITTED
How many jobs have been submitted using this adaptor.
|
private boolean |
useAgent |
private boolean |
useAgentForwarding |
private static ImmutableArray<XenonPropertyDescription> |
VALID_PROPERTIES
List of properties supported by this SSH adaptor
|
Constructor and Description |
---|
SshAdaptor(XenonEngine xenonEngine,
com.jcraft.jsch.JSch jsch,
java.util.Map<java.lang.String,java.lang.String> properties) |
SshAdaptor(XenonEngine xenonEngine,
java.util.Map<java.lang.String,java.lang.String> properties) |
Modifier and Type | Method and Description |
---|---|
protected SshMultiplexedSession |
createNewSession(SshLocation location,
Credential credential,
XenonProperties properties) |
Credentials |
credentialsAdaptor() |
void |
end() |
Files |
filesAdaptor() |
java.util.Map<java.lang.String,java.lang.String> |
getAdaptorSpecificInformation() |
com.jcraft.jsch.ConfigRepository |
getSshConfig() |
XenonPropertyDescription[] |
getSupportedProperties() |
Jobs |
jobsAdaptor() |
private void |
setConfigFile(java.lang.String sshConfigFile) |
private void |
setKnownHostsFile(java.lang.String knownHostsFile) |
protected boolean |
useAgentForwarding()
Returns if agent forwarding should be used according to the adaptor properties.
|
protected boolean |
usingAgent() |
getAdaptorStatus, getName, getProperties, getSupportedLocations, getSupportedProperties, getSupportedSchemes, getXenonEngine, supports, toString
private static final org.slf4j.Logger LOGGER
public static final java.lang.String ADAPTOR_NAME
protected static final int DEFAULT_PORT
private static final java.lang.String ADAPTOR_DESCRIPTION
protected static final ImmutableArray<java.lang.String> ADAPTOR_SCHEME
private static final ImmutableArray<java.lang.String> ADAPTOR_LOCATIONS
public static final java.lang.String PREFIX
public static final java.lang.String STRICT_HOST_KEY_CHECKING
public static final java.lang.String AGENT
public static final java.lang.String AGENT_FORWARDING
public static final java.lang.String LOAD_STANDARD_KNOWN_HOSTS
public static final java.lang.String LOAD_SSH_CONFIG
public static final java.lang.String SSH_CONFIG_FILE
public static final java.lang.String AUTOMATICALLY_ADD_HOST_KEY
public static final java.lang.String GATEWAY
public static final java.lang.String QUEUE
public static final java.lang.String MAX_HISTORY
public static final java.lang.String POLLING_DELAY
public static final java.lang.String MULTIQ
public static final java.lang.String MULTIQ_MAX_CONCURRENT
public static final java.lang.String INFO
public static final java.lang.String JOBS
public static final java.lang.String SUBMITTED
private static final ImmutableArray<XenonPropertyDescription> VALID_PROPERTIES
private final SshFiles filesAdaptor
private final SshJobs jobsAdaptor
private final SshCredentials credentialsAdaptor
private final boolean useAgent
private final boolean useAgentForwarding
private com.jcraft.jsch.JSch jsch
public SshAdaptor(XenonEngine xenonEngine, java.util.Map<java.lang.String,java.lang.String> properties) throws XenonException
XenonException
public SshAdaptor(XenonEngine xenonEngine, com.jcraft.jsch.JSch jsch, java.util.Map<java.lang.String,java.lang.String> properties) throws XenonException
XenonException
protected boolean useAgentForwarding()
private void setKnownHostsFile(java.lang.String knownHostsFile) throws XenonException
XenonException
private void setConfigFile(java.lang.String sshConfigFile) throws XenonException
XenonException
public XenonPropertyDescription[] getSupportedProperties()
getSupportedProperties
in class Adaptor
public Files filesAdaptor()
filesAdaptor
in class Adaptor
public Jobs jobsAdaptor()
jobsAdaptor
in class Adaptor
public Credentials credentialsAdaptor()
credentialsAdaptor
in class Adaptor
public com.jcraft.jsch.ConfigRepository getSshConfig()
protected SshMultiplexedSession createNewSession(SshLocation location, Credential credential, XenonProperties properties) throws XenonException
XenonException
protected boolean usingAgent()
public java.util.Map<java.lang.String,java.lang.String> getAdaptorSpecificInformation()
getAdaptorSpecificInformation
in class Adaptor