com.xensource.xenapi
Class GPUGroup

java.lang.Object
  extended by com.xensource.xenapi.XenAPIObject
      extended by com.xensource.xenapi.GPUGroup

public class GPUGroup
extends XenAPIObject

A group of compatible GPUs across the resource pool First published in XenServer 6.0.


Nested Class Summary
static class GPUGroup.Record
          Represents all the fields in a GPUGroup
 
Field Summary
protected  java.lang.String ref
          The XenAPI reference (OpaqueRef) to this object.
 
Method Summary
 void addToOtherConfig(Connection c, java.lang.String key, java.lang.String value)
          Add the given key-value pair to the other_config field of the given GPU_group.
static GPUGroup create(Connection c, java.lang.String nameLabel, java.lang.String nameDescription, java.util.Map<java.lang.String,java.lang.String> otherConfig)
          First published in XenServer 6.0.
static Task createAsync(Connection c, java.lang.String nameLabel, java.lang.String nameDescription, java.util.Map<java.lang.String,java.lang.String> otherConfig)
          First published in XenServer 6.0.
 void destroy(Connection c)
          First published in XenServer 6.0.
 Task destroyAsync(Connection c)
          First published in XenServer 6.0.
 boolean equals(java.lang.Object obj)
          If obj is a GPUGroup, compares XenAPI references for equality.
static java.util.Set<GPUGroup> getAll(Connection c)
          Return a list of all the GPU_groups known to the system.
 Types.AllocationAlgorithm getAllocationAlgorithm(Connection c)
          Get the allocation_algorithm field of the given GPU_group.
static java.util.Map<GPUGroup,GPUGroup.Record> getAllRecords(Connection c)
          Return a map of GPU_group references to GPU_group records for all GPU_groups known to the system.
static java.util.Set<GPUGroup> getByNameLabel(Connection c, java.lang.String label)
          Get all the GPU_group instances with the given label.
static GPUGroup getByUuid(Connection c, java.lang.String uuid)
          Get a reference to the GPU_group instance with the specified UUID.
 java.util.Set<VGPUType> getEnabledVGPUTypes(Connection c)
          Get the enabled_VGPU_types field of the given GPU_group.
 java.util.Set<java.lang.String> getGPUTypes(Connection c)
          Get the GPU_types field of the given GPU_group.
 java.lang.String getNameDescription(Connection c)
          Get the name/description field of the given GPU_group.
 java.lang.String getNameLabel(Connection c)
          Get the name/label field of the given GPU_group.
 java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c)
          Get the other_config field of the given GPU_group.
 java.util.Set<PGPU> getPGPUs(Connection c)
          Get the PGPUs field of the given GPU_group.
 GPUGroup.Record getRecord(Connection c)
          Get a record containing the current state of the given GPU_group.
 java.lang.Long getRemainingCapacity(Connection c, VGPUType vgpuType)
          First published in XenServer 6.2 SP1 Tech-Preview.
 Task getRemainingCapacityAsync(Connection c, VGPUType vgpuType)
          First published in XenServer 6.2 SP1 Tech-Preview.
 java.util.Set<VGPUType> getSupportedVGPUTypes(Connection c)
          Get the supported_VGPU_types field of the given GPU_group.
 java.lang.String getUuid(Connection c)
          Get the uuid field of the given GPU_group.
 java.util.Set<VGPU> getVGPUs(Connection c)
          Get the VGPUs field of the given GPU_group.
 int hashCode()
           
 void removeFromOtherConfig(Connection c, java.lang.String key)
          Remove the given key and its corresponding value from the other_config field of the given GPU_group.
 void setAllocationAlgorithm(Connection c, Types.AllocationAlgorithm allocationAlgorithm)
          Set the allocation_algorithm field of the given GPU_group.
 void setNameDescription(Connection c, java.lang.String description)
          Set the name/description field of the given GPU_group.
 void setNameLabel(Connection c, java.lang.String label)
          Set the name/label field of the given GPU_group.
 void setOtherConfig(Connection c, java.util.Map<java.lang.String,java.lang.String> otherConfig)
          Set the other_config field of the given GPU_group.
 java.lang.String toWireString()
           
 
Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final java.lang.String ref
The XenAPI reference (OpaqueRef) to this object.

Method Detail

toWireString

public java.lang.String toWireString()
Specified by:
toWireString in class XenAPIObject
Returns:
The XenAPI reference (OpaqueRef) to this object.

equals

public boolean equals(java.lang.Object obj)
If obj is a GPUGroup, compares XenAPI references for equality.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getRecord

public GPUGroup.Record getRecord(Connection c)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Get a record containing the current state of the given GPU_group. First published in XenServer 6.0.

Returns:
all fields from the object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getByUuid

public static GPUGroup getByUuid(Connection c,
                                 java.lang.String uuid)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Get a reference to the GPU_group instance with the specified UUID. First published in XenServer 6.0.

Parameters:
uuid - UUID of object to return
Returns:
reference to the object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getByNameLabel

public static java.util.Set<GPUGroup> getByNameLabel(Connection c,
                                                     java.lang.String label)
                                              throws Types.BadServerResponse,
                                                     Types.XenAPIException,
                                                     org.apache.xmlrpc.XmlRpcException
Get all the GPU_group instances with the given label. First published in XenServer 6.0.

Parameters:
label - label of object to return
Returns:
references to objects with matching names
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getUuid

public java.lang.String getUuid(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Get the uuid field of the given GPU_group. First published in XenServer 6.0.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getNameLabel

public java.lang.String getNameLabel(Connection c)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException
Get the name/label field of the given GPU_group. First published in XenServer 6.0.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getNameDescription

public java.lang.String getNameDescription(Connection c)
                                    throws Types.BadServerResponse,
                                           Types.XenAPIException,
                                           org.apache.xmlrpc.XmlRpcException
Get the name/description field of the given GPU_group. First published in XenServer 6.0.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getPGPUs

public java.util.Set<PGPU> getPGPUs(Connection c)
                             throws Types.BadServerResponse,
                                    Types.XenAPIException,
                                    org.apache.xmlrpc.XmlRpcException
Get the PGPUs field of the given GPU_group. First published in XenServer 6.0.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getVGPUs

public java.util.Set<VGPU> getVGPUs(Connection c)
                             throws Types.BadServerResponse,
                                    Types.XenAPIException,
                                    org.apache.xmlrpc.XmlRpcException
Get the VGPUs field of the given GPU_group. First published in XenServer 6.0.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getGPUTypes

public java.util.Set<java.lang.String> getGPUTypes(Connection c)
                                            throws Types.BadServerResponse,
                                                   Types.XenAPIException,
                                                   org.apache.xmlrpc.XmlRpcException
Get the GPU_types field of the given GPU_group. First published in XenServer 6.0.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getOtherConfig

public java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c)
                                                                throws Types.BadServerResponse,
                                                                       Types.XenAPIException,
                                                                       org.apache.xmlrpc.XmlRpcException
Get the other_config field of the given GPU_group. First published in XenServer 6.0.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAllocationAlgorithm

public Types.AllocationAlgorithm getAllocationAlgorithm(Connection c)
                                                 throws Types.BadServerResponse,
                                                        Types.XenAPIException,
                                                        org.apache.xmlrpc.XmlRpcException
Get the allocation_algorithm field of the given GPU_group. First published in XenServer 6.2 SP1 Tech-Preview.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getSupportedVGPUTypes

public java.util.Set<VGPUType> getSupportedVGPUTypes(Connection c)
                                              throws Types.BadServerResponse,
                                                     Types.XenAPIException,
                                                     org.apache.xmlrpc.XmlRpcException
Get the supported_VGPU_types field of the given GPU_group. First published in XenServer 6.2 SP1.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getEnabledVGPUTypes

public java.util.Set<VGPUType> getEnabledVGPUTypes(Connection c)
                                            throws Types.BadServerResponse,
                                                   Types.XenAPIException,
                                                   org.apache.xmlrpc.XmlRpcException
Get the enabled_VGPU_types field of the given GPU_group. First published in XenServer 6.2 SP1.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

setNameLabel

public void setNameLabel(Connection c,
                         java.lang.String label)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException
Set the name/label field of the given GPU_group. First published in XenServer 6.0.

Parameters:
label - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

setNameDescription

public void setNameDescription(Connection c,
                               java.lang.String description)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Set the name/description field of the given GPU_group. First published in XenServer 6.0.

Parameters:
description - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

setOtherConfig

public void setOtherConfig(Connection c,
                           java.util.Map<java.lang.String,java.lang.String> otherConfig)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Set the other_config field of the given GPU_group. First published in XenServer 6.0.

Parameters:
otherConfig - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

addToOtherConfig

public void addToOtherConfig(Connection c,
                             java.lang.String key,
                             java.lang.String value)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Add the given key-value pair to the other_config field of the given GPU_group. First published in XenServer 6.0.

Parameters:
key - Key to add
value - Value to add
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

removeFromOtherConfig

public void removeFromOtherConfig(Connection c,
                                  java.lang.String key)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException
Remove the given key and its corresponding value from the other_config field of the given GPU_group. If the key is not in that Map, then do nothing. First published in XenServer 6.0.

Parameters:
key - Key to remove
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

setAllocationAlgorithm

public void setAllocationAlgorithm(Connection c,
                                   Types.AllocationAlgorithm allocationAlgorithm)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException
Set the allocation_algorithm field of the given GPU_group. First published in XenServer 6.2 SP1 Tech-Preview.

Parameters:
allocationAlgorithm - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

createAsync

public static Task createAsync(Connection c,
                               java.lang.String nameLabel,
                               java.lang.String nameDescription,
                               java.util.Map<java.lang.String,java.lang.String> otherConfig)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
First published in XenServer 6.0.

Parameters:
nameLabel -
nameDescription -
otherConfig -
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

create

public static GPUGroup create(Connection c,
                              java.lang.String nameLabel,
                              java.lang.String nameDescription,
                              java.util.Map<java.lang.String,java.lang.String> otherConfig)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException
First published in XenServer 6.0.

Parameters:
nameLabel -
nameDescription -
otherConfig -
Returns:
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

destroyAsync

public Task destroyAsync(Connection c)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException
First published in XenServer 6.0.

Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

destroy

public void destroy(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException
First published in XenServer 6.0.

Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getRemainingCapacityAsync

public Task getRemainingCapacityAsync(Connection c,
                                      VGPUType vgpuType)
                               throws Types.BadServerResponse,
                                      Types.XenAPIException,
                                      org.apache.xmlrpc.XmlRpcException
First published in XenServer 6.2 SP1 Tech-Preview.

Parameters:
vgpuType - The VGPU_type for which the remaining capacity will be calculated
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getRemainingCapacity

public java.lang.Long getRemainingCapacity(Connection c,
                                           VGPUType vgpuType)
                                    throws Types.BadServerResponse,
                                           Types.XenAPIException,
                                           org.apache.xmlrpc.XmlRpcException
First published in XenServer 6.2 SP1 Tech-Preview.

Parameters:
vgpuType - The VGPU_type for which the remaining capacity will be calculated
Returns:
The number of VGPUs of the given type which can still be started on the PGPUs in the group
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAll

public static java.util.Set<GPUGroup> getAll(Connection c)
                                      throws Types.BadServerResponse,
                                             Types.XenAPIException,
                                             org.apache.xmlrpc.XmlRpcException
Return a list of all the GPU_groups known to the system. First published in XenServer 6.0.

Returns:
references to all objects
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAllRecords

public static java.util.Map<GPUGroup,GPUGroup.Record> getAllRecords(Connection c)
                                                             throws Types.BadServerResponse,
                                                                    Types.XenAPIException,
                                                                    org.apache.xmlrpc.XmlRpcException
Return a map of GPU_group references to GPU_group records for all GPU_groups known to the system. First published in XenServer 6.0.

Returns:
records of all objects
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException