public class ClusterHost extends XenAPIObject
Modifier and Type | Class and Description |
---|---|
static class |
ClusterHost.Record
Represents all the fields in a ClusterHost
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
ref
The XenAPI reference (OpaqueRef) to this object.
|
Modifier and Type | Method and Description |
---|---|
static ClusterHost |
create(Connection c,
Cluster cluster,
Host host,
PIF pif)
Add a new host to an existing cluster.
|
static Task |
createAsync(Connection c,
Cluster cluster,
Host host,
PIF pif)
Add a new host to an existing cluster.
|
void |
destroy(Connection c)
Remove a host from an existing cluster.
|
Task |
destroyAsync(Connection c)
Remove a host from an existing cluster.
|
void |
disable(Connection c)
Disable cluster membership for an enabled cluster host.
|
Task |
disableAsync(Connection c)
Disable cluster membership for an enabled cluster host.
|
void |
enable(Connection c)
Enable cluster membership for a disabled cluster host.
|
Task |
enableAsync(Connection c)
Enable cluster membership for a disabled cluster host.
|
boolean |
equals(java.lang.Object obj)
If obj is a ClusterHost, compares XenAPI references for equality.
|
void |
forceDestroy(Connection c)
Remove a host from an existing cluster forcefully.
|
Task |
forceDestroyAsync(Connection c)
Remove a host from an existing cluster forcefully.
|
static java.util.Set<ClusterHost> |
getAll(Connection c)
Return a list of all the Cluster_hosts known to the system.
|
java.util.Set<Types.ClusterHostOperation> |
getAllowedOperations(Connection c)
Get the allowed_operations field of the given Cluster_host.
|
static java.util.Map<ClusterHost,ClusterHost.Record> |
getAllRecords(Connection c)
Return a map of Cluster_host references to Cluster_host records for all Cluster_hosts known to the system.
|
static ClusterHost |
getByUuid(Connection c,
java.lang.String uuid)
Get a reference to the Cluster_host instance with the specified UUID.
|
Cluster |
getCluster(Connection c)
Get the cluster field of the given Cluster_host.
|
java.util.Map<java.lang.String,Types.ClusterHostOperation> |
getCurrentOperations(Connection c)
Get the current_operations field of the given Cluster_host.
|
java.lang.Boolean |
getEnabled(Connection c)
Get the enabled field of the given Cluster_host.
|
Host |
getHost(Connection c)
Get the host field of the given Cluster_host.
|
java.lang.Boolean |
getJoined(Connection c)
Get the joined field of the given Cluster_host.
|
java.util.Map<java.lang.String,java.lang.String> |
getOtherConfig(Connection c)
Get the other_config field of the given Cluster_host.
|
PIF |
getPIF(Connection c)
Get the PIF field of the given Cluster_host.
|
ClusterHost.Record |
getRecord(Connection c)
Get a record containing the current state of the given Cluster_host.
|
java.lang.String |
getUuid(Connection c)
Get the uuid field of the given Cluster_host.
|
int |
hashCode() |
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 ClusterHost.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 ClusterHost 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 Cluster getCluster(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 Host getHost(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 getEnabled(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 PIF getPIF(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 getJoined(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.ClusterHostOperation> 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.ClusterHostOperation> 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.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 static Task createAsync(Connection c, Cluster cluster, Host host, PIF pif) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.PifNotAttachedToHost, Types.NoClusterHostsReachable
c
- The connection the call is made oncluster
- Cluster to joinhost
- new cluster memberpif
- Network interface to use for communicationTypes.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.PifNotAttachedToHost
- Cluster_host creation failed as the PIF provided is not attached to the host.Types.NoClusterHostsReachable
- No other cluster host was reachable when joiningpublic static ClusterHost create(Connection c, Cluster cluster, Host host, PIF pif) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.PifNotAttachedToHost, Types.NoClusterHostsReachable
c
- The connection the call is made oncluster
- Cluster to joinhost
- new cluster memberpif
- Network interface to use for communicationTypes.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.PifNotAttachedToHost
- Cluster_host creation failed as the PIF provided is not attached to the host.Types.NoClusterHostsReachable
- No other cluster host was reachable when joiningpublic Task destroyAsync(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 destroy(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 enableAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.PifAllowsUnplug, Types.RequiredPifIsUnplugged
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.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 void enable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.PifAllowsUnplug, Types.RequiredPifIsUnplugged
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.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 forceDestroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.public void forceDestroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.public Task disableAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.public void disable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.public static java.util.Set<ClusterHost> 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<ClusterHost,ClusterHost.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.