public class JcloudsSshMachineLocation extends SshMachineLocation implements JcloudsMachineLocation
AbstractLocation.BasicSubscriptionSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
ALL_SSH_CONFIG_KEY_NAMES, ALL_SSH_CONFIG_KEYS, ALLOCATE_PTY, CLOSE_CONNECTION, LOCAL_TEMP_DIR, LOG_PREFIX, NO_STDERR_LOGGING, NO_STDOUT_LOGGING, PASSWORD, PRIVATE_ADDRESSES, 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, SSH_TOOL_CLASS, SSH_TOOL_CLASS_PROPERTIES_PREFIX, STDERR, STDOUT, TCP_PORT_MAPPINGS, UNIQUE_ID
DETECT_MACHINE_DETAILS, MACHINE_DETAILS
PARENT_LOCATION, TEMPORARY_LOCATION
FINAL_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 |
---|---|
java.lang.String |
getHostname()
note
|
java.lang.String |
getJcloudsId()
Returns the node ID as known at the cloud provider.
|
org.jclouds.compute.domain.NodeMetadata |
getNode()
Deprecated.
since 0.9.0
|
<any> |
getOptionalNode() |
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()
In clouds like AWS, the public hostname is the only way to ensure VMs in different zones can access each other.
|
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
|
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.
|
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()
Deprecated.
since 0.9.0; use the machine to execute commands, so no need to extract the password
|
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, getPort, getSshHostAndPort, getUser, hasMutex, installTo, installTo, installTo, installTo, isSshable, obtainPort, obtainSpecificPort, releaseMutex, releasePort, resolveOnBoxDirFor, toString, tryAcquireMutex
getMachineDetails, getOsDetails, mutexes
addChild, addExtension, config, containsLocation, equals, getChildren, getConfig, getConfig, getDisplayName, getExtension, getHostGeoInfo, getLocationTypeInternal, getRebindSupport, hasExtension, hashCode, isManaged, onManagementStarted, onManagementStopped, relations, removeChild, setDisplayName, setHostGeoInfo, setManagementContext, setParent, setParent, subscriptions
addSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, getManagementContext, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId, tags
getPort, getUser
getAddress, getMachineDetails, getOsDetails
containsLocation, getChildren, getConfig, getDisplayName, getExtension, getId, hasExtension, relations, setParent
getCatalogItemId, getCatalogItemIdSearchPath, subscriptions, tags
config, getConfig
getManagementContext
addSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId
public JcloudsSshMachineLocation()
@Deprecated public JcloudsSshMachineLocation(java.util.Map<?,?> flags, JcloudsLocation jcloudsParent, org.jclouds.compute.domain.NodeMetadata node)
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 SshMachineLocation
public void rebind()
AbstractBrooklynObject
AbstractBrooklynObject.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 AbstractLocation
public java.lang.String toVerboseString()
toVerboseString
in interface Location
toVerboseString
in class SshMachineLocation
public <any> getOptionalNode()
getOptionalNode
in interface JcloudsMachineLocation
@Deprecated public org.jclouds.compute.domain.NodeMetadata getNode()
getNode
in interface JcloudsMachineLocation
public JcloudsLocation getParent()
Location
null
if this location is the tree root.getParent
in interface Location
getParent
in interface JcloudsMachineLocationPublic
getParent
in interface JcloudsMachineLocation
getParent
in class AbstractLocation
null
if this location is the tree root.public java.lang.String getHostname()
HasNetworkAddresses
getHostname
in interface HasNetworkAddresses
getHostname
in class SshMachineLocation
public java.util.Set<java.lang.String> getPublicAddresses()
getPublicAddresses
in interface HasNetworkAddresses
getPublicAddresses
in class SshMachineLocation
public java.util.Set<java.lang.String> getPrivateAddresses()
HasNetworkAddresses
getPrivateAddresses
in interface HasNetworkAddresses
getPrivateAddresses
in class SshMachineLocation
public java.lang.String getSubnetHostname()
JcloudsMachineLocationPublic
getSubnetHostname
in interface HasSubnetHostname
getSubnetHostname
in interface JcloudsMachineLocationPublic
public java.lang.String getSubnetIp()
HasSubnetHostname
getSubnetIp
in interface HasSubnetHostname
public java.lang.String getJcloudsId()
JcloudsMachineLocationPublic
getJcloudsId
in interface JcloudsMachineLocationPublic
@Deprecated public java.lang.String waitForPassword()
public java.util.Map<java.lang.String,java.lang.String> toMetadataRecord()
LocationInternal
Metadata 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 LocationInternal
toMetadataRecord
in class AbstractLocation