org.jclouds.openstack.nova.v2_0.domain
Class Server

java.lang.Object
  extended by org.jclouds.openstack.v2_0.domain.Resource
      extended by org.jclouds.openstack.nova.v2_0.domain.Server
All Implemented Interfaces:
Comparable<org.jclouds.openstack.v2_0.domain.Resource>
Direct Known Subclasses:
ServerWithSecurityGroups

public class Server
extends org.jclouds.openstack.v2_0.domain.Resource

A server is a virtual machine instance in the compute system. Flavor and image are requisite elements when creating a server.

See Also:

Nested Class Summary
static class Server.Builder<T extends Server.Builder<T>>
           
static class Server.Status
          Servers contain a status attribute that can be used as an indication of the current server state.
 
Field Summary
static String DISK_CONFIG_AUTO
           
static String DISK_CONFIG_MANUAL
           
 
Constructor Summary
protected Server(String id, String name, Set<org.jclouds.openstack.v2_0.domain.Link> links, String uuid, String tenantId, String userId, Date updated, Date created, String hostId, String accessIPv4, String accessIPv6, Server.Status status, org.jclouds.openstack.v2_0.domain.Resource image, org.jclouds.openstack.v2_0.domain.Resource flavor, String keyName, String configDrive, com.google.common.collect.Multimap<String,Address> addresses, Map<String,String> metadata, ServerExtendedStatus extendedStatus, ServerExtendedAttributes extendedAttributes, String diskConfig)
           
 
Method Summary
static Server.Builder<?> builder()
           
 String getAccessIPv4()
           
 String getAccessIPv6()
           
 com.google.common.collect.Multimap<String,Address> getAddresses()
           
 String getConfigDrive()
           
 Date getCreated()
           
 com.google.common.base.Optional<String> getDiskConfig()
          Disk config attribute from the Disk Config Extension (alias "OS-DCF").
 com.google.common.base.Optional<ServerExtendedAttributes> getExtendedAttributes()
          Retrieves the extended server attributes fields (alias "OS-EXT-SRV-ATTR")

NOTE: This field is only present if the The Extended Server Attributes API extension is installed.

 com.google.common.base.Optional<ServerExtendedStatus> getExtendedStatus()
          Retrieves the extended server status fields (alias "OS-EXT-STS")

NOTE: This field is only present if the Extended Status extension is installed.

 org.jclouds.openstack.v2_0.domain.Resource getFlavor()
           
 String getHostId()
           
 org.jclouds.openstack.v2_0.domain.Resource getImage()
           
 String getKeyName()
           
 Map<String,String> getMetadata()
           
 Server.Status getStatus()
           
 String getTenantId()
           
 Date getUpdated()
           
 String getUserId()
           
 String getUuid()
          only present until the id is in uuid form
protected  com.google.common.base.Objects.ToStringHelper string()
           
 Server.Builder<?> toBuilder()
           
 
Methods inherited from class org.jclouds.openstack.v2_0.domain.Resource
compareTo, equals, getId, getLinks, getName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DISK_CONFIG_MANUAL

public static final String DISK_CONFIG_MANUAL
See Also:
Constant Field Values

DISK_CONFIG_AUTO

public static final String DISK_CONFIG_AUTO
See Also:
Constant Field Values
Constructor Detail

Server

@ConstructorProperties(value={"id","name","links","uuid","tenant_id","user_id","updated","created","hostId","accessIPv4","accessIPv6","status","image","flavor","key_name","config_drive","addresses","metadata","extendedStatus","extendedAttributes","OS-DCF:diskConfig"})
protected Server(String id,
                                            @Nullable
                                            String name,
                                            Set<org.jclouds.openstack.v2_0.domain.Link> links,
                                            @Nullable
                                            String uuid,
                                            String tenantId,
                                            String userId,
                                            @Nullable
                                            Date updated,
                                            Date created,
                                            @Nullable
                                            String hostId,
                                            @Nullable
                                            String accessIPv4,
                                            @Nullable
                                            String accessIPv6,
                                            Server.Status status,
                                            @Nullable
                                            org.jclouds.openstack.v2_0.domain.Resource image,
                                            org.jclouds.openstack.v2_0.domain.Resource flavor,
                                            @Nullable
                                            String keyName,
                                            @Nullable
                                            String configDrive,
                                            com.google.common.collect.Multimap<String,Address> addresses,
                                            Map<String,String> metadata,
                                            @Nullable
                                            ServerExtendedStatus extendedStatus,
                                            @Nullable
                                            ServerExtendedAttributes extendedAttributes,
                                            @Nullable
                                            String diskConfig)
Method Detail

builder

public static Server.Builder<?> builder()

toBuilder

public Server.Builder<?> toBuilder()
Overrides:
toBuilder in class org.jclouds.openstack.v2_0.domain.Resource

getUuid

@Nullable
public String getUuid()
only present until the id is in uuid form

Returns:
uuid, if id is an integer val

getTenantId

public String getTenantId()

getUserId

public String getUserId()

getUpdated

@Nullable
public Date getUpdated()

getCreated

public Date getCreated()

getHostId

@Nullable
public String getHostId()
Returns:
host identifier, or null if in Server.Status.BUILD

getAccessIPv4

@Nullable
public String getAccessIPv4()

getAccessIPv6

@Nullable
public String getAccessIPv6()

getStatus

public Server.Status getStatus()

getConfigDrive

@Nullable
public String getConfigDrive()

getImage

public org.jclouds.openstack.v2_0.domain.Resource getImage()

getFlavor

public org.jclouds.openstack.v2_0.domain.Resource getFlavor()

getMetadata

public Map<String,String> getMetadata()

getAddresses

public com.google.common.collect.Multimap<String,Address> getAddresses()
Returns:
the ip addresses assigned to the server

getKeyName

@Nullable
public String getKeyName()
Returns:
keyName if extension is present and there is a value for this server
See Also:
KeyPairApi

getExtendedStatus

public com.google.common.base.Optional<ServerExtendedStatus> getExtendedStatus()
Retrieves the extended server status fields (alias "OS-EXT-STS")

NOTE: This field is only present if the Extended Status extension is installed.

See Also:
org.jclouds.openstack.nova.v2_0.features.ExtensionApi#getExtensionByAlias, ExtensionNamespaces.EXTENDED_STATUS

getExtendedAttributes

public com.google.common.base.Optional<ServerExtendedAttributes> getExtendedAttributes()
Retrieves the extended server attributes fields (alias "OS-EXT-SRV-ATTR")

NOTE: This field is only present if the The Extended Server Attributes API extension is installed.

See Also:
org.jclouds.openstack.nova.v2_0.features.ExtensionApi#getExtensionByAlias, ExtensionNamespaces.EXTENDED_STATUS

getDiskConfig

public com.google.common.base.Optional<String> getDiskConfig()
Disk config attribute from the Disk Config Extension (alias "OS-DCF"). One of DISK_CONFIG_AUTO or DISK_CONFIG_MANUAL. This field is only present if the Disk Config extension is installed.

NOTE: Typically a field like this would be implemented as an enum but this field was originally implmented as a String and DISK_CONFIG_AUTO and DISK_CONFIG_MANUAL were added later as Strings to preserve backwards compatibility.

See Also:
org.jclouds.openstack.nova.v2_0.features.ExtensionApi#getExtensionByAlias, ExtensionNamespaces.DISK_CONFIG, CreateServerOptions#getDiskConfig()

string

protected com.google.common.base.Objects.ToStringHelper string()
Overrides:
string in class org.jclouds.openstack.v2_0.domain.Resource


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.