public class Cluster extends XenAPIObject
Modifier and Type | Class and Description |
---|---|
static class |
Cluster.Record
Represents all the fields in a Cluster
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
ref
The XenAPI reference (OpaqueRef) to this object.
|
Modifier and Type | Method and Description |
---|---|
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 Cluster.
|
static Cluster |
create(Connection c,
PIF PIF,
java.lang.String clusterStack,
java.lang.Boolean poolAutoJoin,
java.lang.Double tokenTimeout,
java.lang.Double tokenTimeoutCoefficient)
Creates a Cluster object and one Cluster_host object as its first member
Experimental.
|
static Task |
createAsync(Connection c,
PIF PIF,
java.lang.String clusterStack,
java.lang.Boolean poolAutoJoin,
java.lang.Double tokenTimeout,
java.lang.Double tokenTimeoutCoefficient)
Creates a Cluster object and one Cluster_host object as its first member
Experimental.
|
void |
destroy(Connection c)
Destroys a Cluster object and the one remaining Cluster_host member
Experimental.
|
Task |
destroyAsync(Connection c)
Destroys a Cluster object and the one remaining Cluster_host member
Experimental.
|
boolean |
equals(java.lang.Object obj)
If obj is a Cluster, compares XenAPI references for equality.
|
static java.util.Set<Cluster> |
getAll(Connection c)
Return a list of all the Clusters known to the system.
|
java.util.Set<Types.ClusterOperation> |
getAllowedOperations(Connection c)
Get the allowed_operations field of the given Cluster.
|
static java.util.Map<Cluster,Cluster.Record> |
getAllRecords(Connection c)
Return a map of Cluster references to Cluster records for all Clusters known to the system.
|
static Cluster |
getByUuid(Connection c,
java.lang.String uuid)
Get a reference to the Cluster instance with the specified UUID.
|
java.util.Map<java.lang.String,java.lang.String> |
getClusterConfig(Connection c)
Get the cluster_config field of the given Cluster.
|
java.util.Set<ClusterHost> |
getClusterHosts(Connection c)
Get the cluster_hosts field of the given Cluster.
|
java.lang.String |
getClusterStack(Connection c)
Get the cluster_stack field of the given Cluster.
|
java.lang.String |
getClusterToken(Connection c)
Get the cluster_token field of the given Cluster.
|
java.util.Map<java.lang.String,Types.ClusterOperation> |
getCurrentOperations(Connection c)
Get the current_operations field of the given Cluster.
|
Network |
getNetwork(Connection c)
Returns the network used by the cluster for inter-host communication, i.e.
|
Task |
getNetworkAsync(Connection c)
Returns the network used by the cluster for inter-host communication, i.e.
|
java.util.Map<java.lang.String,java.lang.String> |
getOtherConfig(Connection c)
Get the other_config field of the given Cluster.
|
java.util.Set<java.lang.String> |
getPendingForget(Connection c)
Get the pending_forget field of the given Cluster.
|
java.lang.Boolean |
getPoolAutoJoin(Connection c)
Get the pool_auto_join field of the given Cluster.
|
Cluster.Record |
getRecord(Connection c)
Get a record containing the current state of the given Cluster.
|
java.lang.Double |
getTokenTimeout(Connection c)
Get the token_timeout field of the given Cluster.
|
java.lang.Double |
getTokenTimeoutCoefficient(Connection c)
Get the token_timeout_coefficient field of the given Cluster.
|
java.lang.String |
getUuid(Connection c)
Get the uuid field of the given Cluster.
|
int |
hashCode() |
static Cluster |
poolCreate(Connection c,
Network network,
java.lang.String clusterStack,
java.lang.Double tokenTimeout,
java.lang.Double tokenTimeoutCoefficient)
Attempt to create a Cluster from the entire pool
Experimental.
|
static Task |
poolCreateAsync(Connection c,
Network network,
java.lang.String clusterStack,
java.lang.Double tokenTimeout,
java.lang.Double tokenTimeoutCoefficient)
Attempt to create a Cluster from the entire pool
Experimental.
|
void |
poolDestroy(Connection c)
Attempt to destroy the Cluster_host objects for all hosts in the pool and then destroy the Cluster.
|
Task |
poolDestroyAsync(Connection c)
Attempt to destroy the Cluster_host objects for all hosts in the pool and then destroy the Cluster.
|
void |
poolForceDestroy(Connection c)
Attempt to force destroy the Cluster_host objects, and then destroy the Cluster.
|
Task |
poolForceDestroyAsync(Connection c)
Attempt to force destroy the Cluster_host objects, and then destroy the Cluster.
|
void |
poolResync(Connection c)
Resynchronise the cluster_host objects across the pool.
|
Task |
poolResyncAsync(Connection c)
Resynchronise the cluster_host objects across the pool.
|
void |
removeFromOtherConfig(Connection c,
java.lang.String key)
Remove the given key and its corresponding value from the other_config field of the given Cluster.
|
void |
setOtherConfig(Connection c,
java.util.Map<java.lang.String,java.lang.String> otherConfig)
Set the other_config field of the given Cluster.
|
java.lang.String |
toWireString() |
isNull
protected final java.lang.String ref
public java.lang.String toWireString()
toWireString
in class XenAPIObject
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Cluster.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static Cluster getByUuid(Connection c, java.lang.String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onuuid
- UUID of object to returnTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Set<ClusterHost> getClusterHosts(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Set<java.lang.String> getPendingForget(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.String getClusterToken(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.String getClusterStack(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Set<Types.ClusterOperation> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Map<java.lang.String,Types.ClusterOperation> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.Boolean getPoolAutoJoin(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.Double getTokenTimeout(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.lang.Double getTokenTimeoutCoefficient(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Map<java.lang.String,java.lang.String> getClusterConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public void setOtherConfig(Connection c, java.util.Map<java.lang.String,java.lang.String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onotherConfig
- New value to setTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public void addToOtherConfig(Connection c, java.lang.String key, java.lang.String value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onkey
- Key to addvalue
- Value to addTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public void removeFromOtherConfig(Connection c, java.lang.String key) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onkey
- Key to removeTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static Task createAsync(Connection c, PIF PIF, java.lang.String clusterStack, java.lang.Boolean poolAutoJoin, java.lang.Double tokenTimeout, java.lang.Double tokenTimeoutCoefficient) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.InvalidClusterStack, Types.InvalidValue, Types.PifAllowsUnplug, Types.RequiredPifIsUnplugged
c
- The connection the call is made onPIF
- The PIF to connect the cluster's first cluster_host toclusterStack
- simply the string 'corosync'. No other cluster stacks are currently supportedpoolAutoJoin
- true if xapi is automatically joining new pool members to the clustertokenTimeout
- Corosync token timeout in secondstokenTimeoutCoefficient
- Corosync token timeout coefficient in secondsTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.InvalidClusterStack
- The cluster stack provided is not supported.Types.InvalidValue
- The value given is invalidTypes.PifAllowsUnplug
- The operation you requested cannot be performed because the specified PIF allows unplug.Types.RequiredPifIsUnplugged
- The operation you requested cannot be performed because the specified PIF is currently unplugged.public static Cluster create(Connection c, PIF PIF, java.lang.String clusterStack, java.lang.Boolean poolAutoJoin, java.lang.Double tokenTimeout, java.lang.Double tokenTimeoutCoefficient) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.InvalidClusterStack, Types.InvalidValue, Types.PifAllowsUnplug, Types.RequiredPifIsUnplugged
c
- The connection the call is made onPIF
- The PIF to connect the cluster's first cluster_host toclusterStack
- simply the string 'corosync'. No other cluster stacks are currently supportedpoolAutoJoin
- true if xapi is automatically joining new pool members to the clustertokenTimeout
- Corosync token timeout in secondstokenTimeoutCoefficient
- Corosync token timeout coefficient in secondsTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.InvalidClusterStack
- The cluster stack provided is not supported.Types.InvalidValue
- The value given is invalidTypes.PifAllowsUnplug
- The operation you requested cannot be performed because the specified PIF allows unplug.Types.RequiredPifIsUnplugged
- The operation you requested cannot be performed because the specified PIF is currently unplugged.public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterDoesNotHaveOneNode, Types.ClusterStackInUse
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.ClusterDoesNotHaveOneNode
- An operation failed as it expected the cluster to have only one node but found multiple cluster_hosts.Types.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterDoesNotHaveOneNode, Types.ClusterStackInUse
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.ClusterDoesNotHaveOneNode
- An operation failed as it expected the cluster to have only one node but found multiple cluster_hosts.Types.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.public Task getNetworkAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public Network getNetwork(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static Task poolCreateAsync(Connection c, Network network, java.lang.String clusterStack, java.lang.Double tokenTimeout, java.lang.Double tokenTimeoutCoefficient) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onnetwork
- the single network on which corosync carries out its inter-host communicationsclusterStack
- simply the string 'corosync'. No other cluster stacks are currently supportedtokenTimeout
- Corosync token timeout in secondstokenTimeoutCoefficient
- Corosync token timeout coefficient in secondsTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static Cluster poolCreate(Connection c, Network network, java.lang.String clusterStack, java.lang.Double tokenTimeout, java.lang.Double tokenTimeoutCoefficient) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onnetwork
- the single network on which corosync carries out its inter-host communicationsclusterStack
- simply the string 'corosync'. No other cluster stacks are currently supportedtokenTimeout
- Corosync token timeout in secondstokenTimeoutCoefficient
- Corosync token timeout coefficient in secondsTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public Task poolForceDestroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterForceDestroyFailed
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.ClusterForceDestroyFailed
- Force destroy failed on a Cluster_host while force destroying the cluster.public void poolForceDestroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterForceDestroyFailed
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.ClusterForceDestroyFailed
- Force destroy failed on a Cluster_host while force destroying the cluster.public Task poolDestroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterStackInUse, Types.ClusteringDisabled, Types.ClusterHostIsLast
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.Types.ClusteringDisabled
- An operation was attempted while clustering was disabled on the cluster_host.Types.ClusterHostIsLast
- The last cluster host cannot be destroyed. Destroy the cluster insteadpublic void poolDestroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterStackInUse, Types.ClusteringDisabled, Types.ClusterHostIsLast
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.Types.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.Types.ClusteringDisabled
- An operation was attempted while clustering was disabled on the cluster_host.Types.ClusterHostIsLast
- The last cluster host cannot be destroyed. Destroy the cluster insteadpublic Task poolResyncAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public void poolResync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static java.util.Set<Cluster> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.public static java.util.Map<Cluster,Cluster.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
c
- The connection the call is made onTypes.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.