public class WinRmMachineLocation extends AbstractLocation implements MachineLocation
AbstractLocation.BasicSubscriptionSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
Modifier and Type | Field and Description |
---|---|
static ConfigKey<java.net.InetAddress> |
ADDRESS |
static java.util.Set<java.lang.String> |
ALL_WINRM_CONFIG_KEY_NAMES |
static java.util.Set<ConfigKey.HasConfigKey<?>> |
ALL_WINRM_CONFIG_KEYS |
static ConfigKey<java.lang.Integer> |
COPY_FILE_CHUNK_SIZE_BYTES |
static ConfigKey<java.lang.Integer> |
EXEC_TRIES |
static ConfigKey<java.lang.Integer> |
EXECUTION_ATTEMPTS
Deprecated.
since 0.9.0; config never read; will be removed in future version.
|
static ConfigKey<java.lang.String> |
OPERATION_TIMEOUT |
static ConfigKey<java.lang.String> |
PASSWORD |
static ConfigKey<java.lang.Iterable<java.lang.String>> |
PRIVATE_ADDRESSES |
static ConfigKey<java.lang.Integer> |
RETRIES_OF_NETWORK_FAILURES |
static ConfigKey<java.util.Map<java.lang.Integer,java.lang.String>> |
TCP_PORT_MAPPINGS |
static ConfigKey<java.lang.Boolean> |
USE_HTTPS_WINRM |
static ConfigKey<java.lang.Boolean> |
USE_NTLM
Flag which tells winrm whether to use Basic Authentication
or Negotiate plus NTLM.
|
static ConfigKey<java.lang.String> |
USER |
static ConfigKey<java.lang.Integer> |
WINRM_CONFIG_PORT |
static ConfigKey<java.lang.String> |
WINRM_TOOL_CLASS |
static java.lang.String |
WINRM_TOOL_CLASS_PROPERTIES_PREFIX
Prefix for config key:values to be passed to the winrm tool on construction.
|
PARENT_LOCATION, TEMPORARY_LOCATION
FINAL_SPEC, NAMED_SPEC_NAME, ORIGINAL_SPEC
Constructor and Description |
---|
WinRmMachineLocation() |
Modifier and Type | Method and Description |
---|---|
int |
copyTo(java.io.File source,
java.lang.String destination) |
int |
copyTo(java.io.InputStream source,
java.lang.String destination) |
int |
copyTo(java.util.Map<?,?> props,
java.io.InputStream source,
java.lang.String destination) |
WinRmToolResponse |
executeCommand(java.util.List<java.lang.String> script) |
WinRmToolResponse |
executeCommand(java.util.Map<?,?> props,
java.util.List<java.lang.String> script) |
WinRmToolResponse |
executeCommand(java.lang.String script) |
WinRmToolResponse |
executePsScript(java.util.List<java.lang.String> psScript) |
WinRmToolResponse |
executePsScript(java.util.Map<?,?> props,
java.util.List<java.lang.String> psScript) |
WinRmToolResponse |
executePsScript(java.lang.String psScript) |
WinRmToolResponse |
executeScript(java.util.List<java.lang.String> script)
Deprecated.
since 0.9.0; use
executeCommand(List) |
WinRmToolResponse |
executeScript(java.util.Map<?,?> props,
java.util.List<java.lang.String> script)
Deprecated.
since 0.9.0; use
executeCommand(Map, List) |
WinRmToolResponse |
executeScript(java.lang.String script)
Deprecated.
since 0.9.0; use
executeCommand(String) |
java.net.InetAddress |
getAddress()
Return the single most appropriate address for this location.
|
static java.lang.String |
getDefaultUserMetadataString(BrooklynObjectInternal.ConfigurationSupportInternal config) |
java.lang.String |
getHostname()
note
|
MachineDetails |
getMachineDetails() |
OsDetails |
getOsDetails() |
int |
getPort() |
java.util.Set<java.lang.String> |
getPrivateAddresses()
All private IP addresses.
|
java.util.Set<java.lang.String> |
getPublicAddresses()
All public IP addresses, potentially including shared ips.
|
java.lang.String |
getUser() |
void |
init()
Called by framework (in new-style instances where spec was used) after configuring etc,
but before a reference to this instance is shared.
|
addChild, addExtension, config, configure, containsLocation, equals, getAllConfig, getAllConfigBag, getChildren, getConfig, getConfig, getDisplayName, getExtension, getHostGeoInfo, getLocalConfigBag, getParent, getRawLocalConfigBag, getRebindSupport, hasConfig, hasExtension, hashCode, isManaged, onManagementStarted, onManagementStopped, relations, removeChild, setConfig, setDisplayName, setHostGeoInfo, setManagementContext, setName, setParent, setParent, subscriptions, toMetadataRecord, toString, toVerboseString
getCatalogItemId, getId, getManagementContext, rebind, setCatalogItemId, tags
containsLocation, getAllConfig, getChildren, getConfig, getDisplayName, getExtension, getId, getParent, hasConfig, hasExtension, relations, setParent, toVerboseString
getCatalogItemId, subscriptions, tags
config, getConfig, setConfig
getManagementContext
setCatalogItemId
public static final ConfigKey<java.net.InetAddress> ADDRESS
public static final ConfigKey<java.lang.Integer> WINRM_CONFIG_PORT
public static final ConfigKey<java.lang.String> OPERATION_TIMEOUT
public static final ConfigKey<java.lang.Integer> RETRIES_OF_NETWORK_FAILURES
public static final ConfigKey<java.lang.Boolean> USE_HTTPS_WINRM
public static final ConfigKey<java.lang.Boolean> USE_NTLM
public static final ConfigKey<java.lang.String> USER
public static final ConfigKey<java.lang.String> PASSWORD
public static final ConfigKey<java.lang.Integer> COPY_FILE_CHUNK_SIZE_BYTES
public static final ConfigKey<java.lang.String> WINRM_TOOL_CLASS
public static final java.lang.String WINRM_TOOL_CLASS_PROPERTIES_PREFIX
com.acme.brooklyn.MyCustomWinrmTool
, calling its constructor with a
Map<String, Object>
that contained the configuration. In this case, the map would
include: address=1.2.3.4
; user=myname
; and myparam=myvalue
.
brooklyn.location.named.myLocation = byon:(hosts=1.2.3.4,user=myname)
brooklyn.location.named.myLocation.winrmToolClass = com.acme.brooklyn.MyCustomWinrmTool
brooklyn.location.named.myLocation.winrmToolClass.myparam = myvalue
}
@Deprecated public static final ConfigKey<java.lang.Integer> EXECUTION_ATTEMPTS
public static final ConfigKey<java.lang.Integer> EXEC_TRIES
public static final ConfigKey<java.lang.Iterable<java.lang.String>> PRIVATE_ADDRESSES
public static final ConfigKey<java.util.Map<java.lang.Integer,java.lang.String>> TCP_PORT_MAPPINGS
public static final java.util.Set<ConfigKey.HasConfigKey<?>> ALL_WINRM_CONFIG_KEYS
public static final java.util.Set<java.lang.String> ALL_WINRM_CONFIG_KEY_NAMES
public void init()
AbstractBrooklynObject
To preserve backwards compatibility for if the instance is constructed directly, one can call the code below, but that means it will be called after references to this policy have been shared with other entities.
if (isLegacyConstruction()) {
init();
}
init
in class AbstractBrooklynObject
public java.lang.String getUser()
public java.net.InetAddress getAddress()
AddressableLocation
getAddress
in interface AddressableLocation
getAddress
in interface MachineLocation
public OsDetails getOsDetails()
getOsDetails
in interface MachineLocation
public MachineDetails getMachineDetails()
getMachineDetails
in interface MachineLocation
@Nullable public java.lang.String getHostname()
HasNetworkAddresses
getHostname
in interface HasNetworkAddresses
public int getPort()
public java.util.Set<java.lang.String> getPublicAddresses()
HasNetworkAddresses
getPublicAddresses
in interface HasNetworkAddresses
public java.util.Set<java.lang.String> getPrivateAddresses()
HasNetworkAddresses
getPrivateAddresses
in interface HasNetworkAddresses
@Deprecated public WinRmToolResponse executeScript(java.lang.String script)
executeCommand(String)
@Deprecated public WinRmToolResponse executeScript(java.util.List<java.lang.String> script)
executeCommand(List)
@Deprecated public WinRmToolResponse executeScript(java.util.Map<?,?> props, java.util.List<java.lang.String> script)
executeCommand(Map, List)
public WinRmToolResponse executeCommand(java.lang.String script)
executeScript(String)
public WinRmToolResponse executeCommand(java.util.List<java.lang.String> script)
executeScript(List)
public WinRmToolResponse executeCommand(java.util.Map<?,?> props, java.util.List<java.lang.String> script)
executeScript(Map, List)
public WinRmToolResponse executePsScript(java.lang.String psScript)
public WinRmToolResponse executePsScript(java.util.List<java.lang.String> psScript)
public WinRmToolResponse executePsScript(java.util.Map<?,?> props, java.util.List<java.lang.String> psScript)
public int copyTo(java.io.File source, java.lang.String destination)
public int copyTo(java.io.InputStream source, java.lang.String destination)
public int copyTo(java.util.Map<?,?> props, java.io.InputStream source, java.lang.String destination)
public static java.lang.String getDefaultUserMetadataString(BrooklynObjectInternal.ConfigurationSupportInternal config)