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 a host from an existing cluster.Remove a 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 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, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getByUuid
public static ClusterHost getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getCluster
public Cluster getCluster(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getHost
public Host getHost(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getEnabled
public Boolean getEnabled(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getPIF
public PIF getPIF(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getJoined
public Boolean getJoined(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getAllowedOperations
public Set<Types.ClusterHostOperation> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getCurrentOperations
public Map<String,Types.ClusterHostOperation> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
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 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
createAsync
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 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
- 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 joining
-
create
public static ClusterHost create(Connection c, Cluster cluster, Host host, PIF pif) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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
- 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 joining
-
destroyAsync
public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterStackInUse, Types.ClusteringDisabled, Types.ClusterHostIsLast Remove a host from an existing cluster. 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
- 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 instead
-
destroy
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterStackInUse, Types.ClusteringDisabled, Types.ClusterHostIsLast Remove a host from an existing cluster. 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
- 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 instead
-
enableAsync
public Task enableAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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
- 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.
-
enable
public void enable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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
- 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.
-
forceDestroyAsync
public Task forceDestroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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
- 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.
-
forceDestroy
public void forceDestroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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
- 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.
-
disableAsync
public Task disableAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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
- 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.
-
disable
public void disable(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, 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
- 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.
-
getAll
public static Set<ClusterHost> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-
getAllRecords
public static Map<ClusterHost,ClusterHost.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException 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
- Thrown if the call failed.org.apache.xmlrpc.XmlRpcException
- Thrown if the result of an asynchronous call could not be parsed.
-