com.xensource.xenapi
Class PoolPatch

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

public class PoolPatch
extends XenAPIObject

Pool-wide patches First published in XenServer 4.1.


Nested Class Summary
static class PoolPatch.Record
          Represents all the fields in a PoolPatch
 
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 pool_patch.
 java.lang.String apply(Connection c, Host host)
          Apply the selected patch to a host and return its output First published in XenServer 4.1.
 Task applyAsync(Connection c, Host host)
          Apply the selected patch to a host and return its output First published in XenServer 4.1.
 void clean(Connection c)
          Removes the patch's files from the server First published in XenServer 4.1.
 Task cleanAsync(Connection c)
          Removes the patch's files from the server First published in XenServer 4.1.
 void cleanOnHost(Connection c, Host host)
          Removes the patch's files from the specified host First published in XenServer 6.1.
 Task cleanOnHostAsync(Connection c, Host host)
          Removes the patch's files from the specified host First published in XenServer 6.1.
 void destroy(Connection c)
          Removes the patch's files from all hosts in the pool, and removes the database entries.
 Task destroyAsync(Connection c)
          Removes the patch's files from all hosts in the pool, and removes the database entries.
 boolean equals(java.lang.Object obj)
          If obj is a PoolPatch, compares XenAPI references for equality.
 java.util.Set<Types.AfterApplyGuidance> getAfterApplyGuidance(Connection c)
          Get the after_apply_guidance field of the given pool_patch.
static java.util.Set<PoolPatch> getAll(Connection c)
          Return a list of all the pool_patchs known to the system.
static java.util.Map<PoolPatch,PoolPatch.Record> getAllRecords(Connection c)
          Return a map of pool_patch references to pool_patch records for all pool_patchs known to the system.
static java.util.Set<PoolPatch> getByNameLabel(Connection c, java.lang.String label)
          Get all the pool_patch instances with the given label.
static PoolPatch getByUuid(Connection c, java.lang.String uuid)
          Get a reference to the pool_patch instance with the specified UUID.
 java.util.Set<HostPatch> getHostPatches(Connection c)
          Get the host_patches field of the given pool_patch.
 java.lang.String getNameDescription(Connection c)
          Get the name/description field of the given pool_patch.
 java.lang.String getNameLabel(Connection c)
          Get the name/label field of the given pool_patch.
 java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c)
          Get the other_config field of the given pool_patch.
 java.lang.Boolean getPoolApplied(Connection c)
          Get the pool_applied field of the given pool_patch.
 PoolPatch.Record getRecord(Connection c)
          Get a record containing the current state of the given pool_patch.
 java.lang.Long getSize(Connection c)
          Get the size field of the given pool_patch.
 java.lang.String getUuid(Connection c)
          Get the uuid field of the given pool_patch.
 java.lang.String getVersion(Connection c)
          Get the version field of the given pool_patch.
 int hashCode()
           
 void poolApply(Connection c)
          Apply the selected patch to all hosts in the pool and return a map of host_ref -> patch output First published in XenServer 4.1.
 Task poolApplyAsync(Connection c)
          Apply the selected patch to all hosts in the pool and return a map of host_ref -> patch output First published in XenServer 4.1.
 void poolClean(Connection c)
          Removes the patch's files from all hosts in the pool, but does not remove the database entries First published in XenServer 6.1.
 Task poolCleanAsync(Connection c)
          Removes the patch's files from all hosts in the pool, but does not remove the database entries First published in XenServer 6.1.
 java.lang.String precheck(Connection c, Host host)
          Execute the precheck stage of the selected patch on a host and return its output First published in XenServer 4.1.
 Task precheckAsync(Connection c, Host host)
          Execute the precheck stage of the selected patch on a host and return its output First published in XenServer 4.1.
 void removeFromOtherConfig(Connection c, java.lang.String key)
          Remove the given key and its corresponding value from the other_config field of the given pool_patch.
 void setOtherConfig(Connection c, java.util.Map<java.lang.String,java.lang.String> otherConfig)
          Set the other_config field of the given pool_patch.
 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 PoolPatch, 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 PoolPatch.Record getRecord(Connection c)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException
Get a record containing the current state of the given pool_patch. First published in XenServer 4.1.

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

getByUuid

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

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<PoolPatch> getByNameLabel(Connection c,
                                                      java.lang.String label)
                                               throws Types.BadServerResponse,
                                                      Types.XenAPIException,
                                                      org.apache.xmlrpc.XmlRpcException
Get all the pool_patch instances with the given label. First published in XenServer 4.1.

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 pool_patch. First published in XenServer 4.1.

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 pool_patch. First published in XenServer 4.1.

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 pool_patch. First published in XenServer 4.1.

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

getVersion

public java.lang.String getVersion(Connection c)
                            throws Types.BadServerResponse,
                                   Types.XenAPIException,
                                   org.apache.xmlrpc.XmlRpcException
Get the version field of the given pool_patch. First published in XenServer 4.1.

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

getSize

public java.lang.Long getSize(Connection c)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException
Get the size field of the given pool_patch. First published in XenServer 4.1.

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

getPoolApplied

public java.lang.Boolean getPoolApplied(Connection c)
                                 throws Types.BadServerResponse,
                                        Types.XenAPIException,
                                        org.apache.xmlrpc.XmlRpcException
Get the pool_applied field of the given pool_patch. First published in XenServer 4.1.

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

getHostPatches

public java.util.Set<HostPatch> getHostPatches(Connection c)
                                        throws Types.BadServerResponse,
                                               Types.XenAPIException,
                                               org.apache.xmlrpc.XmlRpcException
Get the host_patches field of the given pool_patch. First published in XenServer 4.1.

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

getAfterApplyGuidance

public java.util.Set<Types.AfterApplyGuidance> getAfterApplyGuidance(Connection c)
                                                              throws Types.BadServerResponse,
                                                                     Types.XenAPIException,
                                                                     org.apache.xmlrpc.XmlRpcException
Get the after_apply_guidance field of the given pool_patch. First published in XenServer 4.1.

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 pool_patch. First published in XenServer 4.1.

Returns:
value of the field
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 pool_patch. First published in XenServer 4.1.

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 pool_patch. First published in XenServer 4.1.

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 pool_patch. If the key is not in that Map, then do nothing. First published in XenServer 4.1.

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

applyAsync

public Task applyAsync(Connection c,
                       Host host)
                throws Types.BadServerResponse,
                       Types.XenAPIException,
                       org.apache.xmlrpc.XmlRpcException
Apply the selected patch to a host and return its output First published in XenServer 4.1.

Parameters:
host - The host to apply the patch too
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

apply

public java.lang.String apply(Connection c,
                              Host host)
                       throws Types.BadServerResponse,
                              Types.XenAPIException,
                              org.apache.xmlrpc.XmlRpcException
Apply the selected patch to a host and return its output First published in XenServer 4.1.

Parameters:
host - The host to apply the patch too
Returns:
the output of the patch application process
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

poolApplyAsync

public Task poolApplyAsync(Connection c)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Apply the selected patch to all hosts in the pool and return a map of host_ref -> patch output First published in XenServer 4.1.

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

poolApply

public void poolApply(Connection c)
               throws Types.BadServerResponse,
                      Types.XenAPIException,
                      org.apache.xmlrpc.XmlRpcException
Apply the selected patch to all hosts in the pool and return a map of host_ref -> patch output First published in XenServer 4.1.

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

precheckAsync

public Task precheckAsync(Connection c,
                          Host host)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException
Execute the precheck stage of the selected patch on a host and return its output First published in XenServer 4.1.

Parameters:
host - The host to run the prechecks on
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

precheck

public java.lang.String precheck(Connection c,
                                 Host host)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Execute the precheck stage of the selected patch on a host and return its output First published in XenServer 4.1.

Parameters:
host - The host to run the prechecks on
Returns:
the output of the patch prechecks
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

cleanAsync

public Task cleanAsync(Connection c)
                throws Types.BadServerResponse,
                       Types.XenAPIException,
                       org.apache.xmlrpc.XmlRpcException
Removes the patch's files from the server First published in XenServer 4.1.

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

clean

public void clean(Connection c)
           throws Types.BadServerResponse,
                  Types.XenAPIException,
                  org.apache.xmlrpc.XmlRpcException
Removes the patch's files from the server First published in XenServer 4.1.

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

poolCleanAsync

public Task poolCleanAsync(Connection c)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Removes the patch's files from all hosts in the pool, but does not remove the database entries First published in XenServer 6.1.

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

poolClean

public void poolClean(Connection c)
               throws Types.BadServerResponse,
                      Types.XenAPIException,
                      org.apache.xmlrpc.XmlRpcException
Removes the patch's files from all hosts in the pool, but does not remove the database entries First published in XenServer 6.1.

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

destroyAsync

public Task destroyAsync(Connection c)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException
Removes the patch's files from all hosts in the pool, and removes the database entries. Only works on unapplied patches. First published in XenServer 4.1.

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
Removes the patch's files from all hosts in the pool, and removes the database entries. Only works on unapplied patches. First published in XenServer 4.1.

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

cleanOnHostAsync

public Task cleanOnHostAsync(Connection c,
                             Host host)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Removes the patch's files from the specified host First published in XenServer 6.1.

Parameters:
host - The host on which to clean the patch
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

cleanOnHost

public void cleanOnHost(Connection c,
                        Host host)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException
Removes the patch's files from the specified host First published in XenServer 6.1.

Parameters:
host - The host on which to clean the patch
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAll

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

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

getAllRecords

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

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