GCSConfigurationServer

public class GCSConfigurationServer
extends Object implements IConfigurationServer

java.lang.Object
   ↳ com.android.tradefed.config.gcs.GCSConfigurationServer


구성 서버는 Google Cloud Storage (GCS)에서 구성을 로드합니다.

요약

공개 생성자

GCSConfigurationServer()

공개 메서드

InputStream getConfig(String name)

이름으로 구성 콘텐츠를 가져옵니다.

String getCurrentHostConfig()

현재 Tradefed 세션의 현재 호스트 구성 파일 이름을 가져옵니다.

보호된 메서드

File downloadFile(String name)
String getHostConfig(String hostname, String cluster)

호스트의 tradefed 전역 구성을 가져옵니다.

boolean sameHost(String currentHostname, String hostname)

두 호스트 이름이 동일한 호스트의 이름인지 확인합니다.

공개 생성자

GCSConfigurationServer

public GCSConfigurationServer ()

공개 메서드

getConfig

public InputStream getConfig (String name)

이름으로 구성 콘텐츠를 가져옵니다.

매개변수
name String: 구성 이름

반환 값
InputStream ERROR(/InputStream)는 구성 파일 콘텐츠입니다.

생성 값
ConfigurationException

getCurrentHostConfig

public String getCurrentHostConfig ()

현재 Tradefed 세션의 현재 호스트 구성 파일 이름을 가져옵니다. 로컬 파일에서 호스트 구성 파일을 읽는 대신 Tradefed를 IConfigurationServer로 시작하면 서버에서 호스트 구성을 가져옵니다.

반환 값
String 호스트 구성 파일 이름입니다.

생성 값
ConfigurationException

보호된 메서드

downloadFile

protected File downloadFile (String name)

매개변수
name String

반환 값
File

생성 값
ConfigurationException

getHostConfig

protected String getHostConfig (String hostname, 
                String cluster)

호스트의 tradefed 전역 구성을 가져옵니다. 클러스터 이름이 제공된 경우 클러스터 이름을 사용하고, 그렇지 않은 경우에는 호스트 이름을 사용합니다.

매개변수
hostname String: 호스트 이름

cluster String: 클러스터 이름

반환 값
String GCS 버킷을 기준으로 한 경로입니다.

생성 값
com.android.tradefed.config.ConfigurationException
ConfigurationException

sameHost

protected boolean sameHost (String currentHostname, 
                String hostname)

두 호스트 이름이 동일한 호스트의 이름인지 확인합니다. 구성 파일에서는 호스트에 약어를 사용하는 경우가 있습니다.

매개변수
currentHostname String: 현재 호스트 이름

hostname String: 구성의 호스트 이름입니다.

반환 값
boolean 호스트가 동일하면 true이고, 그렇지 않으면 false입니다.