GCSConfigurationServer
public
class
GCSConfigurationServer
extends Object
implements
IConfigurationServer
java.lang.Object
|
↳ |
com.android.tradefed.config.gcs.GCSConfigurationServer
|
Config server loads configs from Google Cloud Storage (GCS).
Summary
Public methods |
InputStream
|
getConfig(String name)
Get config content by its name.
|
String
|
getCurrentHostConfig()
Get current host's config file name for the current Tradefed session.
|
Protected methods |
File
|
downloadFile(String name)
|
String
|
getHostConfig(String hostname, String cluster)
Get tradefed global config for host.
|
boolean
|
sameHost(String currentHostname, String hostname)
Check if two hostnames are for the same host.
|
Public constructors
GCSConfigurationServer
public GCSConfigurationServer ()
Public methods
getConfig
public InputStream getConfig (String name)
Get config content by its name.
Parameters |
name |
String : config's name |
getCurrentHostConfig
public String getCurrentHostConfig ()
Get current host's config file name for the current Tradefed session. Instead of reading the
host config file from local files, Tradefed start with an IConfigurationServer
will
get the host config from the server.
Returns |
String |
a host config file name. |
Protected methods
downloadFile
protected File downloadFile (String name)
getHostConfig
protected String getHostConfig (String hostname,
String cluster)
Get tradefed global config for host. Use cluster name if cluster name if provided, otherwise
use hostname.
Parameters |
hostname |
String : host name |
cluster |
String : cluster name. |
Returns |
String |
path relative to gcs bucket. |
sameHost
protected boolean sameHost (String currentHostname,
String hostname)
Check if two hostnames are for the same host. In config files, we sometimes use short name
for host.
Parameters |
currentHostname |
String : current host's name |
hostname |
String : the hostname in config. |
Returns |
boolean |
true if they are the same host, otherwise false; |