public class Utils extends Object
コンストラクタと説明 |
---|
Utils() |
修飾子とタイプ | メソッドと説明 |
---|---|
static Map<String,String> |
convertDeviceToMap(io.swagger.client.model.DeviceListResponseDevices device)
Convert DeviceListResponseDevices class instance to Map
|
static Map<String,String> |
expandVariables(hudson.EnvVars envVars,
Map<String,String> buildVars,
Map<String,String> filter)
Expands the variable in the given string to its value in the variables available to this build.
|
static Charset |
getDefaultCharset()
Gets default charset on node.
|
static List<io.swagger.client.model.DeviceListResponseDevices> |
getDeviceList() |
static List<io.swagger.client.model.DeviceListResponseDevices> |
getDeviceList(Map<String,String> filter)
Gets a list of devices that match the given filter.
|
static hudson.util.ListBoxModel |
getSTFDeviceAttributeListBoxItems()
Gets Attribute names of the STF device.
|
static hudson.util.ComboBoxModel |
getSTFDeviceAttributeValueComboBoxItems(String attribute)
Gets Attribute values of the STF device.
|
static hudson.util.ListBoxModel |
getSTFDeviceAttributeValueListBoxItems(String attribute)
Gets Attribute values of the STF device.
|
static io.swagger.client.model.DeviceListResponseDevices |
getSTFDeviceById(String deviceId)
Gets a STF device that matches the given id.
|
static void |
releaseSTFDevice(io.swagger.client.model.DeviceListResponseDevices device)
Release a STF device.
|
static void |
remoteConnectSTFDevice(io.swagger.client.model.DeviceListResponseDevices device)
Remote connect to a STF device.
|
static void |
remoteDisconnectSTFDevice(io.swagger.client.model.DeviceListResponseDevices device)
Remote disconnect to a STF device.
|
static void |
reserveSTFDevice(io.swagger.client.model.DeviceListResponseDevices device)
Reserve a STF device.
|
static void |
setupSTFApiClient(String stfApiEndpoint,
boolean ignoreCertError,
String stfToken)
Set the STF API client up by using given information.
|
static boolean |
validateDeviceFilter(Map<String,String> filter)
Validates whether the given device filter looks like a valid Regex value.
|
static boolean |
validateRegexValue(String value)
Validates whether the given string looks like a valid Regex value.
|
static hudson.util.FormValidation |
validateSTFApiEndpoint(String stfApiEndpoint,
boolean ignoreCertError)
Validates whether the given URL looks like a valid STF API endpoint.
|
static hudson.util.FormValidation |
validateSTFToken(String stfApiEndpoint,
boolean ignoreCertError,
String stfToken)
Validates whether the given token looks like a valid STF access token.
|
public static Map<String,String> convertDeviceToMap(io.swagger.client.model.DeviceListResponseDevices device)
device
- DeviceListResponseDevices class instance.public static Map<String,String> expandVariables(hudson.EnvVars envVars, Map<String,String> buildVars, Map<String,String> filter)
envVars
- Map of the environment variables.buildVars
- Map of the build-specific variables.filter
- The json token set which may or may not contain variables in the format
${foo}.public static Charset getDefaultCharset()
public static hudson.util.ListBoxModel getSTFDeviceAttributeListBoxItems()
public static hudson.util.ComboBoxModel getSTFDeviceAttributeValueComboBoxItems(String attribute)
attribute
- Attribute name you want to get the values.public static hudson.util.ListBoxModel getSTFDeviceAttributeValueListBoxItems(String attribute)
attribute
- Attribute name you want to get the values.public static void setupSTFApiClient(String stfApiEndpoint, boolean ignoreCertError, String stfToken)
stfApiEndpoint
- stfApiEndpoint The STF API endpoint URL.stfToken
- stfToken The STF access token.public static List<io.swagger.client.model.DeviceListResponseDevices> getDeviceList() throws ApiFailedException
public static List<io.swagger.client.model.DeviceListResponseDevices> getDeviceList(Map<String,String> filter) throws ApiFailedException
filter
- Conditions of the STF device you want to get.ApiFailedException
- Failed STF API request.public static io.swagger.client.model.DeviceListResponseDevices getSTFDeviceById(String deviceId) throws ApiFailedException
deviceId
- The id of the device you want to get.ApiFailedException
- Failed STF API request.public static void reserveSTFDevice(io.swagger.client.model.DeviceListResponseDevices device) throws ApiFailedException
device
- The device you want to reserve.ApiFailedException
- Failed STF API request.public static void remoteConnectSTFDevice(io.swagger.client.model.DeviceListResponseDevices device) throws ApiFailedException
device
- The device you want to connect.ApiFailedException
- Failed STF API request.public static void remoteDisconnectSTFDevice(io.swagger.client.model.DeviceListResponseDevices device) throws ApiFailedException
device
- The device you want to disconnect.ApiFailedException
- Failed STF API request.public static void releaseSTFDevice(io.swagger.client.model.DeviceListResponseDevices device) throws ApiFailedException
device
- The device you want to release.ApiFailedException
- Failed STF API request.public static boolean validateRegexValue(String value)
value
- The Regex string, such as: "/REGEX_VALUE/"public static boolean validateDeviceFilter(Map<String,String> filter)
filter
- The device condition set.public static hudson.util.FormValidation validateSTFApiEndpoint(String stfApiEndpoint, boolean ignoreCertError)
stfApiEndpoint
- The URL string to validate.public static hudson.util.FormValidation validateSTFToken(String stfApiEndpoint, boolean ignoreCertError, String stfToken)
stfApiEndpoint
- The STF API Endpoint URL for use in verification.stfToken
- The token string to validate.Copyright © 2016–2018. All rights reserved.