Develop for XenServer

Class: Cluster_host

Cluster member metadata

Fields for class: Cluster_host

Field Type Qualifier Description
allowed_operations cluster_host_operation set RO/runtime list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client.
cluster Cluster ref RO/constructor Reference to the Cluster object
current_operations (string -> cluster_host_operation) map RO/runtime links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
enabled bool RO/runtime Whether the cluster host believes that clustering should be enabled on this host. This field can be altered by calling the enable/disable message on a cluster host. Only enabled members run the underlying cluster stack. Disabled members are still considered a member of the cluster (see joined), and can be re-enabled by the user.
host host ref RO/constructor Reference to the Host object
joined bool RO/runtime Whether the cluster host has joined the cluster. Contrary to enabled, a host that is not joined is not considered a member of the cluster, and hence enable and disable operations cannot be performed on this host.
last_update_live datetime RO/runtime Time when the live field was last updated based on information from the cluster stack
live bool RO/runtime Whether the underlying cluster stack thinks we are live. This field is set automatically based on updates from the cluster stack and cannot be altered by the user.
other_config (string -> string) map RO/constructor Additional configuration
PIF PIF ref RO/constructor Reference to the PIF object
uuid string RO/runtime Unique identifier/object reference

RPCs associated with class: Cluster_host

RPC name: create

Overview:

Add a new host to an existing cluster.

Signature:

Cluster_host ref create (session ref session_ref, Cluster ref cluster, host ref host, PIF ref pif)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster ref cluster Cluster to join
host ref host new cluster member
PIF ref pif Network interface to use for communication

Minimum Role: pool-operator

Return Type: Cluster_host ref

the newly created cluster_host object

Possible Error Codes: PIF_NOT_ATTACHED_TO_HOST, NO_CLUSTER_HOSTS_REACHABLE

RPC name: destroy

Overview:

Remove the host from an existing cluster. This operation is allowed even if a cluster host is not enabled.

Signature:

void destroy (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self the cluster_host to remove from the cluster

Minimum Role: pool-operator

Return Type: void

Possible Error Codes: CLUSTER_STACK_IN_USE, CLUSTERING_DISABLED, CLUSTER_HOST_IS_LAST

RPC name: disable

Overview:

Disable cluster membership for an enabled cluster host.

Signature:

void disable (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self the cluster_host to disable

Minimum Role: pool-operator

Return Type: void

Possible Error Codes: CLUSTER_STACK_IN_USE

RPC name: enable

Overview:

Enable cluster membership for a disabled cluster host.

Signature:

void enable (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self the cluster_host to enable

Minimum Role: pool-operator

Return Type: void

Possible Error Codes: PIF_ALLOWS_UNPLUG, REQUIRED_PIF_IS_UNPLUGGED

RPC name: force_destroy

Overview:

Remove a host from an existing cluster forcefully.

Signature:

void force_destroy (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self the cluster_host to remove from the cluster

Minimum Role: pool-operator

Return Type: void

Possible Error Codes: CLUSTER_STACK_IN_USE

RPC name: get_all

Overview:

Return a list of all the Cluster_hosts known to the system.

Signature:

Cluster_host ref set get_all (session ref session_ref)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session

Minimum Role: read-only

Return Type: Cluster_host ref set

references to all objects

RPC name: get_all_records

Overview:

Return a map of Cluster_host references to Cluster_host records for all Cluster_hosts known to the system.

Signature:

(Cluster_host ref -> Cluster_host record) map get_all_records (session ref session_ref)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session

Minimum Role: read-only

Return Type: (Cluster_host ref -> Cluster_host record) map

records of all objects

RPC name: get_allowed_operations

Overview:

Get the allowed_operations field of the given Cluster_host.

Signature:

cluster_host_operation set get_allowed_operations (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: cluster_host_operation set

value of the field

RPC name: get_by_uuid

Overview:

Get a reference to the Cluster_host instance with the specified UUID.

Signature:

Cluster_host ref get_by_uuid (session ref session_ref, string uuid)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
string uuid UUID of object to return

Minimum Role: read-only

Return Type: Cluster_host ref

reference to the object

RPC name: get_cluster

Overview:

Get the cluster field of the given Cluster_host.

Signature:

Cluster ref get_cluster (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: Cluster ref

value of the field

RPC name: get_current_operations

Overview:

Get the current_operations field of the given Cluster_host.

Signature:

(string -> cluster_host_operation) map get_current_operations (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: (string -> cluster_host_operation) map

value of the field

RPC name: get_enabled

Overview:

Get the enabled field of the given Cluster_host.

Signature:

bool get_enabled (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_host

Overview:

Get the host field of the given Cluster_host.

Signature:

host ref get_host (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: host ref

value of the field

RPC name: get_joined

Overview:

Get the joined field of the given Cluster_host.

Signature:

bool get_joined (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_last_update_live

Overview:

Get the last_update_live field of the given Cluster_host.

Signature:

datetime get_last_update_live (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: datetime

value of the field

RPC name: get_live

Overview:

Get the live field of the given Cluster_host.

Signature:

bool get_live (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_other_config

Overview:

Get the other_config field of the given Cluster_host.

Signature:

(string -> string) map get_other_config (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: (string -> string) map

value of the field

RPC name: get_PIF

Overview:

Get the PIF field of the given Cluster_host.

Signature:

PIF ref get_PIF (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: PIF ref

value of the field

RPC name: get_record

Overview:

Get a record containing the current state of the given Cluster_host.

Signature:

Cluster_host record get_record (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: Cluster_host record

all fields from the object

RPC name: get_uuid

Overview:

Get the uuid field of the given Cluster_host.

Signature:

string get_uuid (session ref session_ref, Cluster_host ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Cluster_host ref self reference to the object

Minimum Role: read-only

Return Type: string

value of the field