Package com.xensource.xenapi
Class ClusterHost
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.ClusterHost
Cluster member metadata
First published in XenServer 7.6.
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents all the fields in a ClusterHost -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Remove the host from an existing cluster.Remove the host from an existing cluster.void
Disable cluster membership for an enabled cluster host.Disable cluster membership for an enabled cluster host.void
enable
(Connection c) Enable cluster membership for a disabled cluster host.Enable cluster membership for a disabled cluster host.boolean
If obj is a ClusterHost, compares XenAPI references for equality.void
Remove a host from an existing cluster forcefully.Remove a host from an existing cluster forcefully.static Set<ClusterHost>
getAll
(Connection c) Return a list of all the Cluster_hosts known to the system.Get the allowed_operations field of the given Cluster_host.static Map<ClusterHost,
ClusterHost.Record> Return a map of Cluster_host references to Cluster_host records for all Cluster_hosts known to the system.static ClusterHost
getByUuid
(Connection c, String uuid) Get a reference to the Cluster_host instance with the specified UUID.Get the cluster field of the given Cluster_host.Get the current_operations field of the given Cluster_host.Get the enabled field of the given Cluster_host.Get the host field of the given Cluster_host.Get the joined field of the given Cluster_host.Get the last_update_live field of the given Cluster_host.Get the live field of the given Cluster_host.Get the other_config field of the given Cluster_host.getPIF
(Connection c) Get the PIF field of the given Cluster_host.Get a record containing the current state of the given Cluster_host.Get the uuid field of the given Cluster_host.int
hashCode()
Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireString
in classXenAPIObject
- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a ClusterHost, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public ClusterHost.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get a record containing the current state of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- all fields from the object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByUuid
public static ClusterHost getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, IOException Get a reference to the Cluster_host instance with the specified UUID. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made onuuid
- UUID of object to return- Returns:
- reference to the object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the uuid field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getCluster
public Cluster getCluster(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the cluster field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getHost
public Host getHost(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the host field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getEnabled
public Boolean getEnabled(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the enabled field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getPIF
Get the PIF field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getJoined
public Boolean getJoined(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the joined field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getLive
public Boolean getLive(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the live field of the given Cluster_host. Minimum allowed role: read-only Experimental. First published in 24.3.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getLastUpdateLive
public Date getLastUpdateLive(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the last_update_live field of the given Cluster_host. Minimum allowed role: read-only Experimental. First published in 24.3.0.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllowedOperations
public Set<Types.ClusterHostOperation> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the allowed_operations field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getCurrentOperations
public Map<String,Types.ClusterHostOperation> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the current_operations field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getOtherConfig
public Map<String,String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the other_config field of the given Cluster_host. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
create
public static ClusterHost create(Connection c, Cluster cluster, Host host, PIF pif) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.PifNotAttachedToHost, Types.NoClusterHostsReachable Add a new host to an existing cluster. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made oncluster
- Cluster to joinhost
- new cluster memberpif
- Network interface to use for communication- Returns:
- the newly created cluster_host object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.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 joining
-
createAsync
public static Task createAsync(Connection c, Cluster cluster, Host host, PIF pif) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.PifNotAttachedToHost, Types.NoClusterHostsReachable Add a new host to an existing cluster. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made oncluster
- Cluster to joinhost
- new cluster memberpif
- Network interface to use for communication- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.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 joining
-
destroy
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.ClusterStackInUse, Types.ClusteringDisabled, Types.ClusterHostIsLast Remove the host from an existing cluster. This operation is allowed even if a cluster host is not enabled. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.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 instead
-
destroyAsync
public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.ClusterStackInUse, Types.ClusteringDisabled, Types.ClusterHostIsLast Remove the host from an existing cluster. This operation is allowed even if a cluster host is not enabled. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.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 instead
-
enable
public void enable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.PifAllowsUnplug, Types.RequiredPifIsUnplugged Enable cluster membership for a disabled cluster host. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.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.
-
enableAsync
public Task enableAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.PifAllowsUnplug, Types.RequiredPifIsUnplugged Enable cluster membership for a disabled cluster host. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.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.
-
forceDestroy
public void forceDestroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.ClusterStackInUse Remove a host from an existing cluster forcefully. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.
-
forceDestroyAsync
public Task forceDestroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.ClusterStackInUse Remove a host from an existing cluster forcefully. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.
-
disable
public void disable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.ClusterStackInUse Disable cluster membership for an enabled cluster host. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.
-
disableAsync
public Task disableAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException, Types.ClusterStackInUse Disable cluster membership for an enabled cluster host. Minimum allowed role: pool-operator First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.Types.ClusterStackInUse
- The cluster stack is still in use by at least one plugged PBD.
-
getAll
public static Set<ClusterHost> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return a list of all the Cluster_hosts known to the system. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- references to all objects
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllRecords
public static Map<ClusterHost,ClusterHost.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return a map of Cluster_host references to Cluster_host records for all Cluster_hosts known to the system. Minimum allowed role: read-only First published in XenServer 7.6.- Parameters:
c
- The connection the call is made on- Returns:
- records of all objects
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-