org.jclouds.cloudservers.domain
Class Server

java.lang.Object
  extended by org.jclouds.cloudservers.domain.Server

public class Server
extends Object

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

Author:
Adrian Cole

Nested Class Summary
static class Server.Builder<T extends Server.Builder<T>>
           
 
Constructor Summary
protected Server(int id, String name, Map<String,String> metadata, Addresses addresses, String adminPass, Integer flavorId, String hostId, Integer imageId, Integer sharedIpGroupId, Integer progress, ServerStatus status)
           
 
Method Summary
static Server.Builder<?> builder()
           
 boolean equals(Object obj)
           
 Addresses getAddresses()
           
 String getAdminPass()
           
 Integer getFlavorId()
           
 String getHostId()
          The Cloud Servers provisioning algorithm has an anti-affinity property that attempts to spread out customer VMs across hosts.
 int getId()
           
 Integer getImageId()
           
 Map<String,String> getMetadata()
           
 String getName()
           
 Integer getProgress()
           
 Integer getSharedIpGroupId()
           
 ServerStatus getStatus()
          Servers contain a status attribute that can be used as an indication of the current server state.
 int hashCode()
           
protected  com.google.common.base.Objects.ToStringHelper string()
           
 Server.Builder<?> toBuilder()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Server

@ConstructorProperties(value={"id","name","metadata","addresses","adminPass","flavorId","hostId","imageId","sharedIpGroupId","progress","status"})
protected Server(int id,
                                            String name,
                                            @Nullable
                                            Map<String,String> metadata,
                                            @Nullable
                                            Addresses addresses,
                                            @Nullable
                                            String adminPass,
                                            @Nullable
                                            Integer flavorId,
                                            @Nullable
                                            String hostId,
                                            @Nullable
                                            Integer imageId,
                                            @Nullable
                                            Integer sharedIpGroupId,
                                            @Nullable
                                            Integer progress,
                                            @Nullable
                                            ServerStatus status)
Method Detail

builder

public static Server.Builder<?> builder()

toBuilder

public Server.Builder<?> toBuilder()

getId

public int getId()

getName

public String getName()

getMetadata

@Nullable
public Map<String,String> getMetadata()

getAddresses

@Nullable
public Addresses getAddresses()

getAdminPass

@Nullable
public String getAdminPass()

getFlavorId

@Nullable
public Integer getFlavorId()

getHostId

@Nullable
public String getHostId()
The Cloud Servers provisioning algorithm has an anti-affinity property that attempts to spread out customer VMs across hosts. Under certain situations, VMs from the same customer may be placed on the same host. hostId represents the host your cloud server runs on and can be used to determine this scenario if it's relevant to your application.

Note: hostId is unique PER ACCOUNT and is not globally unique.


getImageId

@Nullable
public Integer getImageId()

getSharedIpGroupId

@Nullable
public Integer getSharedIpGroupId()

getProgress

@Nullable
public Integer getProgress()

getStatus

public ServerStatus getStatus()
Servers contain a status attribute that can be used as an indication of the current server state. Servers with an ACTIVE status are available for use.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

string

protected com.google.common.base.Objects.ToStringHelper string()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012 jclouds. All Rights Reserved.