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; |