public class LocationConfigUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LocationConfigUtils.OsCredential
Convenience class for holding private/public keys and passwords, inferring from config keys.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BROOKLYN_LOCATION_PREFIX |
Constructor and Description |
---|
LocationConfigUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<ConfigKey<java.lang.String>,java.lang.String> |
finalAndOriginalSpecs(java.lang.String finalSpec,
java.lang.Object... sourcesForOriginalSpec) |
static LocationConfigUtils.OsCredential |
getOsCredential(ConfigBag config)
Creates an instance of
LocationConfigUtils.OsCredential by inspecting LocationConfigKeys.PASSWORD ;
LocationConfigKeys.PRIVATE_KEY_DATA and LocationConfigKeys.PRIVATE_KEY_FILE ;
LocationConfigKeys.PRIVATE_KEY_PASSPHRASE if needed, and
LocationConfigKeys.PRIVATE_KEY_DATA and LocationConfigKeys.PRIVATE_KEY_FILE
(defaulting to the private key file + ".pub"). |
static boolean |
isEnabled(ManagementContext mgmt,
java.lang.String key)
checks enablement, by looking at
key + ".enabled" |
static boolean |
isResolverPrefixEnabled(ManagementContext mgmt,
java.lang.String resolverIdPrefix) |
public static LocationConfigUtils.OsCredential getOsCredential(ConfigBag config)
LocationConfigUtils.OsCredential
by inspecting LocationConfigKeys.PASSWORD
;
LocationConfigKeys.PRIVATE_KEY_DATA
and LocationConfigKeys.PRIVATE_KEY_FILE
;
LocationConfigKeys.PRIVATE_KEY_PASSPHRASE
if needed, and
LocationConfigKeys.PRIVATE_KEY_DATA
and LocationConfigKeys.PRIVATE_KEY_FILE
(defaulting to the private key file + ".pub").public static java.util.Map<ConfigKey<java.lang.String>,java.lang.String> finalAndOriginalSpecs(java.lang.String finalSpec, java.lang.Object... sourcesForOriginalSpec)
public static boolean isResolverPrefixEnabled(ManagementContext mgmt, java.lang.String resolverIdPrefix)
public static boolean isEnabled(ManagementContext mgmt, java.lang.String key)
key + ".enabled"