GCS配置服务器
public class GCSConfigurationServer
extends Object
implements IConfigurationServer
java.lang.Object |
↳ | com.android.tradefed.config.gcs.GCSConfigurationServer |
配置服务器从谷歌云存储 (GCS) 加载配置。
概括
受保护的方法 |
---|
File | downloadFile (String name) |
String | getHostConfig (String hostname, String cluster) 获取主机的 tradefed 全局配置。 |
boolean | sameHost (String currentHostname, String hostname) 检查两个主机名是否属于同一主机。 |
公共构造函数
GCS配置服务器
public GCSConfigurationServer ()
公共方法
获取配置
public InputStream getConfig (String name)
通过名称获取配置内容。
获取当前主机配置
public String getCurrentHostConfig ()
获取当前 Tradefed 会话的当前主机配置文件名。 Tradefed 从IConfigurationServer
开始,而不是从本地文件读取主机配置文件,将从服务器获取主机配置。
受保护的方法
下载文件
protected File downloadFile (String name)
获取主机配置
protected String getHostConfig (String hostname,
String cluster)
获取主机的 tradefed 全局配置。如果提供了集群名称,则使用集群名称,否则使用主机名。
参数 |
---|
hostname | String :主机名 |
cluster | String :集群名称。 |
退货 |
---|
String | 相对于 gcs bucket 的路径。 |
同一主机
protected boolean sameHost (String currentHostname,
String hostname)
检查两个主机名是否属于同一主机。在配置文件中,我们有时会使用主机的简称。
参数 |
---|
currentHostname | String : 当前主机名 |
hostname | String : 配置中的主机名。 |
退货 |
---|
boolean | 如果它们是同一主机,则为 true,否则为 false; |