GCS設定伺服器
public class GCSConfigurationServer
extends Object
implements IConfigurationServer
java.lang.Object |
↳ | com.android.tradefed.config.gcs.GCSConfigurationServer |
配置伺服器從 Google Cloud Storage (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 :集群名稱。 |
相同主機
protected boolean sameHost (String currentHostname,
String hostname)
檢查兩個主機名稱是否屬於同一主機。在設定檔中,我們有時會使用主機的短名稱。
參數 |
---|
currentHostname | String : 目前主機名 |
hostname | String : config 中的主機名稱。 |
退貨 |
---|
boolean | 如果它們是同一台主機則為 true,否則為 false; |