org.jclouds.cim
Class ResourceAllocationSettingData

java.lang.Object
  extended by org.jclouds.cim.SettingData
      extended by org.jclouds.cim.ManagedElement
          extended by org.jclouds.cim.ResourceAllocationSettingData
All Implemented Interfaces:
Comparable<SettingData>
Direct Known Subclasses:
EditableResourceAllocationSettingData, VCloudHardDisk, VCloudNetworkAdapter

public class ResourceAllocationSettingData
extends ManagedElement

The ResourceAllocationSettingData class represents settings specifically related to an allocated resource that are outside the scope of the CIM class typically used to represent the resource itself. These settings include information specific to the allocation that may not be visible to the consumer of the resource itself. For example, a virtual processor may look like a 2 ghz processor to the consumer (virtual computer system), however the virtualization system may use time-slicing to schedule the the virtual processor to only allow it to use 1 ghz.

Author:
Adrian Cole
See Also:

Nested Class Summary
static class ResourceAllocationSettingData.Builder
           
static class ResourceAllocationSettingData.ConsumerVisibility
          Describes the consumers visibility to the allocated resource.
static class ResourceAllocationSettingData.MappingBehavior
          Specifies how this resource maps to underlying resourcesIf the HostResource array contains any entries, this property reflects how the resource maps to those specific resources.
static class ResourceAllocationSettingData.ResourceType
          The type of resource this allocation setting represents.
 
Field Summary
protected  String address
           
protected  String addressOnParent
           
protected  String allocationUnits
           
protected  Boolean automaticAllocation
           
protected  Boolean automaticDeallocation
           
protected  List<String> connections
           
protected  ResourceAllocationSettingData.ConsumerVisibility consumerVisibility
           
protected  List<String> hostResources
           
protected  Long limit
           
protected  ResourceAllocationSettingData.MappingBehavior mappingBehavior
           
protected  String otherResourceType
           
protected  String parent
           
protected  String poolID
           
protected  Long reservation
           
protected  String resourceSubType
           
protected  ResourceAllocationSettingData.ResourceType resourceType
           
protected  Long virtualQuantity
           
protected  String virtualQuantityUnits
           
protected  Integer weight
           
 
Fields inherited from class org.jclouds.cim.ManagedElement
caption, description
 
Fields inherited from class org.jclouds.cim.SettingData
elementName, instanceID
 
Constructor Summary
ResourceAllocationSettingData(String elementName, String instanceID, String caption, String description, String address, String addressOnParent, String allocationUnits, Boolean automaticAllocation, Boolean automaticDeallocation, ResourceAllocationSettingData.ConsumerVisibility consumerVisibility, Long limit, ResourceAllocationSettingData.MappingBehavior mappingBehavior, String otherResourceType, String parent, String poolID, Long reservation, String resourceSubType, ResourceAllocationSettingData.ResourceType resourceType, Long virtualQuantity, String virtualQuantityUnits, Integer weight, List<String> connections, List<String> hostResources)
           
 
Method Summary
static ResourceAllocationSettingData.Builder builder()
           
 boolean equals(Object obj)
           
 String getAddress()
          The address of the resource.
 String getAddressOnParent()
          Describes the address of this resource in the context of the Parent.
 String getAllocationUnits()
          This property specifies the units of allocation used by the Reservation and Limit properties.
 List<String> getConnections()
          The thing to which this resource is connected.
 ResourceAllocationSettingData.ConsumerVisibility getConsumerVisibility()
          Describes the consumers visibility to the allocated resource.
 List<String> getHostResources()
          This property exposes specific assignment of resources.
 Long getLimit()
          This property specifies the upper bound, or maximum amount of resource that will be granted for this allocation.
 ResourceAllocationSettingData.MappingBehavior getMappingBehavior()
          Specifies how this resource maps to underlying resourcesIf the HostResource array contains any entries, this property reflects how the resource maps to those specific resources.
 String getOtherResourceType()
          A string that describes the resource type when a well defined value is not available and ResourceType has the value "Other".
 String getParent()
          The Parent of the resource.
 String getPoolID()
          This property specifies which ResourcePool the resource is currently allocated from, or which ResourcePool the resource will be allocated from when the allocation occurs.
 Long getReservation()
          This property specifies the amount of resource guaranteed to be available for this allocation.
 String getResourceSubType()
          A string describing an implementation specific sub-type for this resource.
 ResourceAllocationSettingData.ResourceType getResourceType()
          The type of resource this allocation setting represents.
 Long getVirtualQuantity()
          This property specifies the quantity of resources presented to the consumer.
 String getVirtualQuantityUnits()
          This property specifies the units used by the VirtualQuantity property.
 Integer getWeight()
          This property specifies a relative priority for this allocation in relation to other allocations from the same ResourcePool.
 int hashCode()
           
 Boolean isAutomaticAllocation()
          This property specifies if the resource will be automatically allocated.
 Boolean isAutomaticDeallocation()
          This property specifies if the resource will be automatically de-allocated.
 ResourceAllocationSettingData.Builder toBuilder()
          
 String toString()
           
 
Methods inherited from class org.jclouds.cim.ManagedElement
getCaption, getDescription
 
Methods inherited from class org.jclouds.cim.SettingData
compareTo, getElementName, getInstanceID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

address

protected final String address

addressOnParent

protected final String addressOnParent

allocationUnits

protected final String allocationUnits

automaticAllocation

protected final Boolean automaticAllocation

automaticDeallocation

protected final Boolean automaticDeallocation

consumerVisibility

protected final ResourceAllocationSettingData.ConsumerVisibility consumerVisibility

limit

protected final Long limit

mappingBehavior

protected final ResourceAllocationSettingData.MappingBehavior mappingBehavior

otherResourceType

protected final String otherResourceType

parent

protected final String parent

poolID

protected final String poolID

reservation

protected final Long reservation

resourceSubType

protected final String resourceSubType

resourceType

protected final ResourceAllocationSettingData.ResourceType resourceType

virtualQuantity

protected final Long virtualQuantity

virtualQuantityUnits

protected final String virtualQuantityUnits

weight

protected final Integer weight

connections

protected final List<String> connections

hostResources

protected final List<String> hostResources
Constructor Detail

ResourceAllocationSettingData

public ResourceAllocationSettingData(String elementName,
                                     String instanceID,
                                     String caption,
                                     String description,
                                     String address,
                                     String addressOnParent,
                                     String allocationUnits,
                                     Boolean automaticAllocation,
                                     Boolean automaticDeallocation,
                                     ResourceAllocationSettingData.ConsumerVisibility consumerVisibility,
                                     Long limit,
                                     ResourceAllocationSettingData.MappingBehavior mappingBehavior,
                                     String otherResourceType,
                                     String parent,
                                     String poolID,
                                     Long reservation,
                                     String resourceSubType,
                                     ResourceAllocationSettingData.ResourceType resourceType,
                                     Long virtualQuantity,
                                     String virtualQuantityUnits,
                                     Integer weight,
                                     List<String> connections,
                                     List<String> hostResources)
Method Detail

builder

public static ResourceAllocationSettingData.Builder builder()

toBuilder

public ResourceAllocationSettingData.Builder toBuilder()

Overrides:
toBuilder in class ManagedElement

getAddress

public String getAddress()
The address of the resource. For example, the MAC address of a Ethernet port.


getAddressOnParent

public String getAddressOnParent()
Describes the address of this resource in the context of the Parent. The Parent/AddressOnParent properties are used to describe the controller relationship as well the ordering of devices on a controller.For example, if the parent is a PCI Controller, this property would specify the PCI slot of this child device.


getAllocationUnits

public String getAllocationUnits()
This property specifies the units of allocation used by the Reservation and Limit properties. For example, when ResourceType=Processor, AllocationUnits may be set to hertz*10^6 or percent. When ResourceType=Memory, AllocationUnits may be set to bytes*10^3. It is expected that profiles constrain the units that apply in context of particular resource types. The value of this property shall be a legal value of the Programmatic Units qualifier as defined in Annex C.1 of DSP0004 V2.5 or later.


isAutomaticAllocation

public Boolean isAutomaticAllocation()
This property specifies if the resource will be automatically allocated. For example when set to true, when the consuming virtual computer system is powered on, this resource would be allocated. A value of false indicates the resource must be explicitly allocated. For example, the setting may represent removable media (cdrom, floppy, etc.) where at power on time, the media is not present. An explicit operation is required to allocate the resource.


isAutomaticDeallocation

public Boolean isAutomaticDeallocation()
This property specifies if the resource will be automatically de-allocated. For example, when set to true, when the consuming virtual computer system is powered off, this resource would be de-allocated. When set to false, the resource will remain allocated and must be explicitly de-allocated.


getConsumerVisibility

public ResourceAllocationSettingData.ConsumerVisibility getConsumerVisibility()
Describes the consumers visibility to the allocated resource.


getLimit

public Long getLimit()
This property specifies the upper bound, or maximum amount of resource that will be granted for this allocation. For example, a system which supports memory paging may support setting the Limit of a Memory allocation below that of the VirtualQuantity, thus forcing paging to occur for this allocation. The value of the Limit property is expressed in the unit specified by the value of the AllocationUnits property.


getMappingBehavior

public ResourceAllocationSettingData.MappingBehavior getMappingBehavior()
Specifies how this resource maps to underlying resourcesIf the HostResource array contains any entries, this property reflects how the resource maps to those specific resources.


getOtherResourceType

public String getOtherResourceType()
A string that describes the resource type when a well defined value is not available and ResourceType has the value "Other".


getParent

public String getParent()
The Parent of the resource. For example, a controller for the current allocation


getPoolID

public String getPoolID()
This property specifies which ResourcePool the resource is currently allocated from, or which ResourcePool the resource will be allocated from when the allocation occurs.


getReservation

public Long getReservation()
This property specifies the amount of resource guaranteed to be available for this allocation. On system which support over-commitment of resources, this value is typically used for admission control to prevent an an allocation from being accepted thus preventing starvation. The value of the Reservation property is expressed in the unit specified by the value of the AllocationUnits property.


getResourceSubType

public String getResourceSubType()
A string describing an implementation specific sub-type for this resource. F


getResourceType

public ResourceAllocationSettingData.ResourceType getResourceType()
The type of resource this allocation setting represents.


getVirtualQuantity

public Long getVirtualQuantity()
This property specifies the quantity of resources presented to the consumer. For example, when ResourceType=Processor, this property would reflect the number of discrete Processors presented to the virtual computer system. When ResourceType=Memory, this property could reflect the number of MB reported to the virtual computer system. The value of the VirtualQuantity property should be expressed in units as defined by the value of the VirtualQuantityUnits property.


getVirtualQuantityUnits

public String getVirtualQuantityUnits()
This property specifies the units used by the VirtualQuantity property. For example - if ResourceType=Processor, the value of the VirtualQuantityUnits property may be set to "count", indicating that the value of the VirtualQuantity property is expressed as a count. - if ResourceType=Memory, the value of the VirtualQuantityUnits property may be set to "bytes*10^3", indicating that the value of the VirtualQuantity property is expressed in kilobyte. It is expected that profiles constrain the units that apply in context of particular resource types. The value of this property shall be a legal value of the Programmatic Units qualifier as defined in Annex C.1 of DSP0004 V2.5 or later.


getWeight

public Integer getWeight()
This property specifies a relative priority for this allocation in relation to other allocations from the same ResourcePool. This property has no unit of measure, and is only relevant when compared to other allocations vying for the same host resources.


getConnections

public List<String> getConnections()
The thing to which this resource is connected. For example, a named network or switch port.


getHostResources

public List<String> getHostResources()
This property exposes specific assignment of resources. Each non-null value of the HostResource property shall be formated as a URI per RFC3986. If this resource is modeled then a value should be a WBEM URI (DSP0207). If the resource is not modeled then see the appropriate profile. Profiles may further constrain the type of URI. A NULL value or empty array requests the implementation decide the kind of host resource. If the virtual resource is mapped to more than oneunderlying resource, this property may be left NULL. If NULL, the DeviceAllocatedFromPool or ResourceAllocationFromPool associations may be used to determine the pool of host resources this virtual resource may use. If specific assignment is utilized, all underlying resources used by this virtual resource should be listed.The kind of dependency is specified by the ConsumerVisibility and the MappingBehavior properties. Typically the array contains one item, however multiple host resources may be specified. A client may set the value(s) to indicate that the requested virtual resource allocation be based on host resources that are identified by element values.


toString

public String toString()
Overrides:
toString in class ManagedElement

hashCode

public int hashCode()
Overrides:
hashCode in class SettingData

equals

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


Copyright © 2009-2011 jclouds. All Rights Reserved.