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

java.lang.Object
  extended by org.jclouds.openstack.v2_0.domain.Resource
      extended by org.jclouds.openstack.nova.v2_0.domain.Flavor
All Implemented Interfaces:
Comparable<Resource>

public class Flavor
extends Resource

A flavor is an available hardware configuration for a server. Each flavor has a unique combination of disk space and memory capacity.

Author:
Jeremy Daggett
See Also:

Nested Class Summary
static class Flavor.Builder<T extends Flavor.Builder<T>>
           
 
Constructor Summary
protected Flavor(String id, String name, Set<Link> links, int ram, int disk, int vcpus, String swap, Double rxtxFactor, Integer ephemeral)
           
 
Method Summary
static Flavor.Builder<?> builder()
           
 boolean equals(Object obj)
           
 int getDisk()
           
 com.google.common.base.Optional<Integer> getEphemeral()
          Retrieves ephemeral disk space in GB

NOTE: This field is only present if the Flavor Extra Data extension is installed (alias "OS-FLV-EXT-DATA").

 int getRam()
           
 com.google.common.base.Optional<Double> getRxtxFactor()
           
 com.google.common.base.Optional<String> getSwap()
           
 int getVcpus()
           
 int hashCode()
           
protected  com.google.common.base.Objects.ToStringHelper string()
           
 Flavor.Builder<?> toBuilder()
           
 
Methods inherited from class org.jclouds.openstack.v2_0.domain.Resource
compareTo, getId, getLinks, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Flavor

@ConstructorProperties(value={"id","name","links","ram","disk","vcpus","swap","rxtx_factor","OS-FLV-EXT-DATA:ephemeral"})
protected Flavor(String id,
                                            @Nullable
                                            String name,
                                            Set<Link> links,
                                            int ram,
                                            int disk,
                                            int vcpus,
                                            @Nullable
                                            String swap,
                                            @Nullable
                                            Double rxtxFactor,
                                            @Nullable
                                            Integer ephemeral)
Method Detail

builder

public static Flavor.Builder<?> builder()

toBuilder

public Flavor.Builder<?> toBuilder()
Overrides:
toBuilder in class Resource

getRam

public int getRam()

getDisk

public int getDisk()

getVcpus

public int getVcpus()

getSwap

public com.google.common.base.Optional<String> getSwap()

getRxtxFactor

public com.google.common.base.Optional<Double> getRxtxFactor()

getEphemeral

public com.google.common.base.Optional<Integer> getEphemeral()
Retrieves ephemeral disk space in GB

NOTE: This field is only present if the Flavor Extra Data extension is installed (alias "OS-FLV-EXT-DATA").

See Also:
ExtensionApi.getExtensionByAlias(java.lang.String), ExtensionNamespaces.FLAVOR_EXTRA_DATA

hashCode

public int hashCode()
Overrides:
hashCode in class Resource

equals

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

string

protected com.google.common.base.Objects.ToStringHelper string()
Overrides:
string in class Resource


Copyright © 2009-2012 jclouds. All Rights Reserved.