public class XmlConfig
extends java.lang.Object
ConnectionInfo
instance:
address (required)
port (optional, defaults to: 22/SSH)
fingerprint (required)
user (required)
password (optional, if not specified password authentication is disabled)
The <key-file> child element can be used for private key authentication.
The value should be the path to a file containing the private key. The 'type'
attribute specifies the key type. If not specified, auto-detection will be attempted.
The following attributes are supported:
type ('OpenSSH', 'OpenSSHv1', 'PuTTY', 'PKCS5' or PKCS8')
password (needed if the private key file is password protected)
Child elements are used for creating a ClusterConfig
instance:
<job-folder> (required)
<tmp-folder>, <tmp-folder-debug> (optional, defauls to ${TMPDIR})
<date-command> (optional, the command must return date+time in format 2016-11-25 14:18:27,
defaults to: date +'%Y-%m-%d %T')
<host-info-command> (optional)
<opengrid-info-command> (optional)
<job-agent-id> (optional)
<nodes> (optional, should contain one or more <node name="..." /> child elements)Modifier and Type | Field and Description |
---|---|
private java.util.List<OpenGridCluster> |
clusters |
private static org.slf4j.Logger |
logger |
Constructor and Description |
---|
XmlConfig()
Create a new configuration instance.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<OpenGridCluster> |
getClusters()
Get all clusters loaded so far.
|
void |
readFromResource(java.lang.String path)
Read cluster configuration from a resource on the class path.
|
private java.lang.String |
readTextFile(java.io.File f) |
private static final org.slf4j.Logger logger
private java.util.List<OpenGridCluster> clusters
public void readFromResource(java.lang.String path)
public java.util.List<OpenGridCluster> getClusters()
private java.lang.String readTextFile(java.io.File f) throws java.io.IOException
java.io.IOException