public class WinRmMachineLocation extends AbstractLocation implements MachineLocation
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal
Modifier and Type | Field and Description |
---|---|
static ConfigKey<java.net.InetAddress> |
ADDRESS |
static ConfigKey<java.lang.Integer> |
COPY_FILE_CHUNK_SIZE_BYTES |
static ConfigKey<java.lang.Integer> |
EXEC_TRIES |
static ConfigKey<java.lang.Integer> |
EXECUTION_ATTEMPTS |
static ConfigKey<java.lang.String> |
PASSWORD |
static ConfigKey<java.lang.String> |
USER |
static ConfigKey<java.lang.Integer> |
WINRM_PORT |
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) |
io.cloudsoft.winrm4j.winrm.WinRmToolResponse |
executePsScript(java.util.List<java.lang.String> psScript) |
io.cloudsoft.winrm4j.winrm.WinRmToolResponse |
executePsScript(java.lang.String psScript) |
io.cloudsoft.winrm4j.winrm.WinRmToolResponse |
executePsScriptNoRetry(java.util.List<java.lang.String> psScript) |
io.cloudsoft.winrm4j.winrm.WinRmToolResponse |
executeScript(java.util.List<java.lang.String> script) |
io.cloudsoft.winrm4j.winrm.WinRmToolResponse |
executeScript(java.lang.String script) |
java.net.InetAddress |
getAddress()
Return the single most appropriate address for this location.
|
static java.lang.String |
getDefaultUserMetadataString() |
java.lang.String |
getHostname()
note
|
MachineDetails |
getMachineDetails() |
OsDetails |
getOsDetails() |
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, removeChild, setConfig, setDisplayName, setHostGeoInfo, setManagementContext, setName, setParent, setParent, toMetadataRecord, toString, toVerboseString
getCatalogItemId, getId, getManagementContext, getTagSupport, rebind, setCatalogItemId, tags
containsLocation, getAllConfig, getChildren, getConfig, getConfig, getDisplayName, getExtension, getId, getParent, hasConfig, hasExtension, setParent, toVerboseString
getCatalogItemId, getTagSupport, tags
config, setConfig
getManagementContext
setCatalogItemId
public static final ConfigKey<java.lang.Integer> WINRM_PORT
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.net.InetAddress> ADDRESS
public static final ConfigKey<java.lang.Integer> EXECUTION_ATTEMPTS
public static final ConfigKey<java.lang.Integer> EXEC_TRIES
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 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
public io.cloudsoft.winrm4j.winrm.WinRmToolResponse executeScript(java.lang.String script)
public io.cloudsoft.winrm4j.winrm.WinRmToolResponse executeScript(java.util.List<java.lang.String> script)
public io.cloudsoft.winrm4j.winrm.WinRmToolResponse executePsScript(java.lang.String psScript)
public io.cloudsoft.winrm4j.winrm.WinRmToolResponse executePsScript(java.util.List<java.lang.String> psScript)
public io.cloudsoft.winrm4j.winrm.WinRmToolResponse executePsScriptNoRetry(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 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 static java.lang.String getDefaultUserMetadataString()