org.jclouds.compute.domain.internal
Class NodeMetadataImpl

java.lang.Object
  extended by org.jclouds.domain.internal.ResourceMetadataImpl<ComputeType>
      extended by org.jclouds.compute.domain.internal.ComputeMetadataImpl
          extended by org.jclouds.compute.domain.internal.NodeMetadataImpl
All Implemented Interfaces:
Serializable, Comparable<ResourceMetadata<ComputeType>>, ComputeMetadata, NodeMetadata, ResourceMetadata<ComputeType>

public class NodeMetadataImpl
extends ComputeMetadataImpl
implements NodeMetadata

Author:
Adrian Cole, Ivan Meredith
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jclouds.compute.domain.internal.ComputeMetadataImpl
tags
 
Constructor Summary
NodeMetadataImpl(String providerId, String name, String id, Location location, URI uri, Map<String,String> userMetadata, Set<String> tags, String group, Hardware hardware, String imageId, OperatingSystem os, NodeState state, int loginPort, Iterable<String> publicAddresses, Iterable<String> privateAddresses, String adminPassword, Credentials credentials, String hostname)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getAdminPassword()
          secures access to root with a password.
 Credentials getCredentials()
          If possible, these are returned upon all detail requests.
 String getGroup()
          Tag used for all resources that belong to the same logical group.
 Hardware getHardware()
          The hardware this node is running, if possible to determine.
 String getHostname()
          note
 String getImageId()
          The id of the image this node was created from, if possible to correlate.
 int getLoginPort()
          
 OperatingSystem getOperatingSystem()
          The operating system this node is running, if possible to determine.
 Set<String> getPrivateAddresses()
          All private IP addresses.
 Set<String> getPublicAddresses()
          All public IP addresses, potentially including shared ips.
 NodeState getState()
          Current State of the node
 String getTag()
          
 int hashCode()
           
 String toString()
           
 
Methods inherited from class org.jclouds.compute.domain.internal.ComputeMetadataImpl
getId, getTags, getType
 
Methods inherited from class org.jclouds.domain.internal.ResourceMetadataImpl
compareTo, getLocation, getName, getProviderId, getUri, getUserMetadata
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jclouds.compute.domain.ComputeMetadata
getId, getName, getProviderId, getTags, getType
 
Methods inherited from interface org.jclouds.domain.ResourceMetadata
getLocation, getUri, getUserMetadata
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

NodeMetadataImpl

public NodeMetadataImpl(String providerId,
                        String name,
                        String id,
                        Location location,
                        URI uri,
                        Map<String,String> userMetadata,
                        Set<String> tags,
                        @Nullable
                        String group,
                        @Nullable
                        Hardware hardware,
                        @Nullable
                        String imageId,
                        @Nullable
                        OperatingSystem os,
                        NodeState state,
                        int loginPort,
                        Iterable<String> publicAddresses,
                        Iterable<String> privateAddresses,
                        @Nullable
                        String adminPassword,
                        @Nullable
                        Credentials credentials,
                        String hostname)
Method Detail

getTag

public String getTag()

Specified by:
getTag in interface NodeMetadata
See Also:
NodeMetadata.getGroup()

getGroup

public String getGroup()
Tag used for all resources that belong to the same logical group. run, destroy commands are scoped to group.

Specified by:
getGroup in interface NodeMetadata
Returns:
group for this node, or null, if not a part of a group

getHardware

public Hardware getHardware()
The hardware this node is running, if possible to determine.

Specified by:
getHardware in interface NodeMetadata

getAdminPassword

public String getAdminPassword()
secures access to root with a password. This password is required to access either the console or run sudo as root.

ex. echo 'password' |sudo -S command

Specified by:
getAdminPassword in interface NodeMetadata
Returns:
root or console password, if configured, or null.

getCredentials

public Credentials getCredentials()
If possible, these are returned upon all detail requests. However, it is often the case that credentials are only available at "run" time.

Specified by:
getCredentials in interface NodeMetadata

getPublicAddresses

public Set<String> getPublicAddresses()
All public IP addresses, potentially including shared ips.

Specified by:
getPublicAddresses in interface NodeMetadata

getPrivateAddresses

public Set<String> getPrivateAddresses()
All private IP addresses.

Specified by:
getPrivateAddresses in interface NodeMetadata

getState

public NodeState getState()
Current State of the node

Specified by:
getState in interface NodeMetadata

getLoginPort

public int getLoginPort()

Specified by:
getLoginPort in interface NodeMetadata
Returns:
the TCP port used for terminal connections. Generally, this is port 22 for ssh.

getImageId

public String getImageId()
The id of the image this node was created from, if possible to correlate.

Specified by:
getImageId in interface NodeMetadata

getOperatingSystem

public OperatingSystem getOperatingSystem()
The operating system this node is running, if possible to determine.

Specified by:
getOperatingSystem in interface NodeMetadata

getHostname

public String getHostname()

note

hostname is something that is set in the operating system image, so this value, if present, cannot be guaranteed on images not directly controlled by the cloud provider.

Specified by:
getHostname in interface NodeMetadata
Returns:
hostname of the node, or null if unknown

toString

public String toString()
Overrides:
toString in class ResourceMetadataImpl<ComputeType>

hashCode

public int hashCode()
Overrides:
hashCode in class ComputeMetadataImpl

equals

public boolean equals(Object obj)
Overrides:
equals in class ComputeMetadataImpl


Copyright © 2009-2011 jclouds. All Rights Reserved.