public class JcloudsSshMachineLocation extends SshMachineLocation implements JcloudsMachineLocation
BrooklynObject.TagSupportConfigurable.ConfigurationSupportBrooklynObjectInternal.ConfigurationSupportInternalALL_SSH_CONFIG_KEY_NAMES, ALL_SSH_CONFIG_KEYS, ALLOCATE_PTY, CLOSE_CONNECTION, DETECT_MACHINE_DETAILS, LOCAL_TEMP_DIR, LOG_PREFIX, logSsh, MACHINE_DETAILS, NO_STDERR_LOGGING, NO_STDOUT_LOGGING, PASSWORD, PRIVATE_KEY_DATA, PRIVATE_KEY_FILE, PRIVATE_KEY_PASSPHRASE, REUSABLE_SSH_PROPS, SCP_EXECUTABLE, SCRIPT_DIR, SSH_CACHE_EXPIRY_DURATION, SSH_CONFIG_GIVEN_TO_PROPS, SSH_ENV_MAP, SSH_EXECUTABLE, SSH_HOST, SSH_PORT, STDERR, STDOUT, UNIQUE_IDPARENT_LOCATION, TEMPORARY_LOCATIONFINAL_SPEC, NAMED_SPEC_NAME, ORIGINAL_SPEC| Constructor and Description |
|---|
JcloudsSshMachineLocation() |
JcloudsSshMachineLocation(java.util.Map<?,?> flags,
JcloudsLocation jcloudsParent,
org.jclouds.compute.domain.NodeMetadata node)
Deprecated.
since 0.6; use LocationSpec (which calls no-arg constructor)
|
| Modifier and Type | Method and Description |
|---|---|
void |
execRemoteScript(java.lang.String... commands)
uses submitRunScript to execute the commands, and throws error if it fails or returns non-zero
|
java.lang.String |
getHostname()
note
|
java.lang.String |
getJcloudsId() |
org.jclouds.compute.domain.NodeMetadata |
getNode() |
JcloudsLocation |
getParent()
Get the 'parent' of this location.
|
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 |
getSubnetHostname()
In most clouds, the public hostname is the only way to ensure VMs in different zones can access each other.
|
java.lang.String |
getSubnetIp()
returns an IP for use internally within a subnet / VPC
|
org.jclouds.compute.domain.Template |
getTemplate() |
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.
|
void |
rebind()
Called by framework on rebind (in new-style instances):
after configuring, but
before the instance is managed, and
before adjuncts are attached to entities, and
before a reference to an object is shared.
|
com.google.common.util.concurrent.ListenableFuture<org.jclouds.compute.domain.ExecResponse> |
submitRunScript(org.jclouds.scriptbuilder.domain.Statement script) |
com.google.common.util.concurrent.ListenableFuture<org.jclouds.compute.domain.ExecResponse> |
submitRunScript(org.jclouds.scriptbuilder.domain.Statement script,
org.jclouds.compute.options.RunScriptOptions options) |
com.google.common.util.concurrent.ListenableFuture<org.jclouds.compute.domain.ExecResponse> |
submitRunScript(java.lang.String... statements)
executes the given statements on the server using jclouds ScriptBuilder,
wrapping in a script which is polled periodically.
|
java.util.Map<java.lang.String,java.lang.String> |
toMetadataRecord()
Get a record of the metadata of this location.
|
java.lang.String |
toVerboseString() |
java.lang.String |
waitForPassword()
Retrieves the password for this VM, if one exists.
|
acquireMutex, close, configure, copyFrom, copyFrom, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, execCommands, execCommands, execCommands, execCommands, execScript, execScript, execScript, execScript, findKeyPair, findPassword, getAddress, getMachineDetails, getOsDetails, getPort, getSshHostAndPort, getUser, hasMutex, installTo, installTo, installTo, installTo, isSshable, obtainPort, obtainSpecificPort, releaseMutex, releasePort, toString, tryAcquireMutexaddChild, addExtension, config, containsLocation, equals, getAllConfig, getAllConfigBag, getChildren, getConfig, getConfig, getDisplayName, getExtension, getHostGeoInfo, getLocalConfigBag, getRawLocalConfigBag, getRebindSupport, hasConfig, hasExtension, hashCode, isManaged, onManagementStarted, onManagementStopped, removeChild, setConfig, setDisplayName, setHostGeoInfo, setManagementContext, setName, setParent, setParentgetCatalogItemId, getId, getManagementContext, getTagSupport, setCatalogItemId, tagsgetPort, getUsergetAddress, getMachineDetails, getOsDetailscontainsLocation, getAllConfig, getChildren, getConfig, getConfig, getDisplayName, getExtension, getId, hasConfig, hasExtension, setParentgetCatalogItemId, getTagSupport, tagsconfig, setConfiggetManagementContextsetCatalogItemIdpublic JcloudsSshMachineLocation()
@Deprecated
public JcloudsSshMachineLocation(java.util.Map<?,?> flags,
JcloudsLocation jcloudsParent,
org.jclouds.compute.domain.NodeMetadata node)
public void init()
AbstractBrooklynObjectTo 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 AbstractBrooklynObjectpublic void rebind()
AbstractBrooklynObjectAbstractBrooklynObject.init() will not be called on rebind.
If you need to intercept behaviour after adjuncts are attached,
consider AbstractEntity.onManagementStarting()
(but probably worth raising a discussion on the mailing list!)
rebind in class AbstractBrooklynObjectpublic java.lang.String toVerboseString()
toVerboseString in interface LocationtoVerboseString in class SshMachineLocationpublic org.jclouds.compute.domain.NodeMetadata getNode()
getNode in interface JcloudsMachineLocationpublic org.jclouds.compute.domain.Template getTemplate()
getTemplate in interface JcloudsMachineLocationpublic JcloudsLocation getParent()
Locationnull if this location is the tree root.getParent in interface JcloudsMachineLocationgetParent in interface LocationgetParent in class AbstractLocationnull if this location is the tree root.public java.lang.String getHostname()
HasNetworkAddressesgetHostname in interface HasNetworkAddressesgetHostname in class SshMachineLocationpublic java.util.Set<java.lang.String> getPublicAddresses()
HasNetworkAddressesgetPublicAddresses in interface HasNetworkAddressesgetPublicAddresses in class SshMachineLocationpublic java.util.Set<java.lang.String> getPrivateAddresses()
HasNetworkAddressesgetPrivateAddresses in interface HasNetworkAddressesgetPrivateAddresses in class SshMachineLocationpublic java.lang.String getSubnetHostname()
getSubnetHostname in interface HasSubnetHostnamegetSubnetHostname in interface JcloudsMachineLocationpublic java.lang.String getSubnetIp()
HasSubnetHostnamegetSubnetIp in interface HasSubnetHostnamepublic java.lang.String getJcloudsId()
getJcloudsId in interface JcloudsMachineLocationpublic com.google.common.util.concurrent.ListenableFuture<org.jclouds.compute.domain.ExecResponse> submitRunScript(java.lang.String... statements)
public com.google.common.util.concurrent.ListenableFuture<org.jclouds.compute.domain.ExecResponse> submitRunScript(org.jclouds.scriptbuilder.domain.Statement script)
public com.google.common.util.concurrent.ListenableFuture<org.jclouds.compute.domain.ExecResponse> submitRunScript(org.jclouds.scriptbuilder.domain.Statement script,
org.jclouds.compute.options.RunScriptOptions options)
public void execRemoteScript(java.lang.String... commands)
public java.lang.String waitForPassword()
public java.util.Map<java.lang.String,java.lang.String> toMetadataRecord()
LocationInternalMetadata records are used to record an audit trail of events relating to location usage (for billing purposes, for example). Implementations (and subclasses) should override this method to return information useful for this purpose.
toMetadataRecord in interface LocationInternaltoMetadataRecord in class AbstractLocation