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


Nested Class Summary
static class GPUGroup.Record
          Represents all the fields in a GPUGroup
 
Field Summary
protected  String ref
          The XenAPI reference (OpaqueRef) to this object.
 
Method Summary
 void addToOtherConfig(Connection c, String key, String value)
          Add the given key-value pair to the other_config field of the given GPU_group.
 boolean equals(Object obj)
          If obj is a GPUGroup, compares XenAPI references for equality.
static Set<GPUGroup> getAll(Connection c)
          Return a list of all the GPU_groups known to the system.
static 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 Set<GPUGroup> getByNameLabel(Connection c, String label)
          Get all the GPU_group instances with the given label.
static GPUGroup getByUuid(Connection c, String uuid)
          Get a reference to the GPU_group instance with the specified UUID.
 Set<String> getGPUTypes(Connection c)
          Get the GPU_types field of the given GPU_group.
 String getNameDescription(Connection c)
          Get the name/description field of the given GPU_group.
 String getNameLabel(Connection c)
          Get the name/label field of the given GPU_group.
 Map<String,String> getOtherConfig(Connection c)
          Get the other_config field of the given GPU_group.
 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.
 String getUuid(Connection c)
          Get the uuid field of the given GPU_group.
 Set<VGPU> getVGPUs(Connection c)
          Get the VGPUs field of the given GPU_group.
 int hashCode()
           
 void removeFromOtherConfig(Connection c, String key)
          Remove the given key and its corresponding value from the other_config field of the given GPU_group.
 void setNameDescription(Connection c, String description)
          Set the name/description field of the given GPU_group.
 void setNameLabel(Connection c, String label)
          Set the name/label field of the given GPU_group.
 void setOtherConfig(Connection c, Map<String,String> otherConfig)
          Set the other_config field of the given GPU_group.
 String toWireString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

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

Method Detail

toWireString

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

equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class 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.

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

getByUuid

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

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

getByNameLabel

public static Set<GPUGroup> getByNameLabel(Connection c,
                                           String label)
                                    throws Types.BadServerResponse,
                                           Types.XenAPIException,
                                           org.apache.xmlrpc.XmlRpcException
Get all the GPU_group instances with the given label.

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 String getUuid(Connection c)
               throws Types.BadServerResponse,
                      Types.XenAPIException,
                      org.apache.xmlrpc.XmlRpcException
Get the uuid field of the given GPU_group.

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

getNameLabel

public String getNameLabel(Connection c)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Get the name/label field of the given GPU_group.

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

getNameDescription

public String getNameDescription(Connection c)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Get the name/description field of the given GPU_group.

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

getPGPUs

public Set<PGPU> getPGPUs(Connection c)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException
Get the PGPUs field of the given GPU_group.

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

getVGPUs

public Set<VGPU> getVGPUs(Connection c)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException
Get the VGPUs field of the given GPU_group.

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

getGPUTypes

public Set<String> getGPUTypes(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Get the GPU_types field of the given GPU_group.

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

getOtherConfig

public Map<String,String> getOtherConfig(Connection c)
                                  throws Types.BadServerResponse,
                                         Types.XenAPIException,
                                         org.apache.xmlrpc.XmlRpcException
Get the other_config field of the given GPU_group.

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

setNameLabel

public void setNameLabel(Connection c,
                         String label)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException
Set the name/label field of the given GPU_group.

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

setNameDescription

public void setNameDescription(Connection c,
                               String description)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Set the name/description field of the given GPU_group.

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

setOtherConfig

public void setOtherConfig(Connection c,
                           Map<String,String> otherConfig)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Set the other_config field of the given GPU_group.

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

addToOtherConfig

public void addToOtherConfig(Connection c,
                             String key,
                             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.

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

removeFromOtherConfig

public void removeFromOtherConfig(Connection c,
                                  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.

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

getAll

public static 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.

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

getAllRecords

public static 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.

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