com.vmware.vcenter.vcha package¶
Submodules¶
com.vmware.vcenter.vcha.cluster_client module¶
The com.vmware.vcenter.vcha.cluster_client module provides classes for
redeploying and monitoring a vCenter High Availability (VCHA) Cluster after a
successful initial deployment.
-
class
com.vmware.vcenter.vcha.cluster_client.Active(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Activeclass provides methods to get information related to the active vCenter High Availability (VCHA) node. This class was added in vSphere API 6.7.1.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
-
class
Info(management=None, ha=None, placement=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Active.Infoclass contains the network and placement information of the active node of a VCHA Cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
management (
com.vmware.vcenter.vcha_client.IpSpec) – IP specification for the Management network. This attribute was added in vSphere API 6.7.1.ha (
com.vmware.vcenter.vcha_client.IpSpecorNone) – IP specification for the HA network. This attribute was added in vSphere API 6.7.1. If None, then the second NIC of the Active Node of the VCHA cluster is not configured.placement (
com.vmware.vcenter.vcha_client.PlacementInfoorNone) – Contains the placement information of the active node. This attribute was added in vSphere API 6.7.1. If None, the request specified that placement information of the active node should not be included.
-
get(vc_spec=None, partial=None)¶ Retrieves information about the active node of a VCHA cluster. This method was added in vSphere API 6.7.1.
- Parameters
vc_spec (
com.vmware.vcenter.vcha_client.CredentialsSpecorNone) – Contains active node’s management vCenter server credentials. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.partial (
boolorNone) –If true, then return only the information that does not require connecting to the Active vCenter Server.
If false or unset, then return all the information.
If None, then return all the information.
- Return type
- Returns
Info Information about the VCHA network and placement of the active node.
- Raise
com.vmware.vapi.std.errors_client.InvalidArgumentIf the credentials provided for authentincating with the active node’s management vCenter server are invalid.- Raise
com.vmware.vapi.std.errors_client.UnauthorizedIf the user has insufficient privilege to perform the operation.If
partialis false or unset, then the operation execution requires the Global.VCServer privilege.If
partialis true, then the operation execution requires the System.Read privilege.
- Raise
com.vmware.vapi.std.errors_client.UnverifiedPeerIf the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute ofcom.vmware.vapi.std.errors_client.Errorwill be a class that contains all the attributes defined incom.vmware.vcenter.vcha_client.CertificateInfo.- Raise
com.vmware.vapi.std.errors_client.InvalidElementConfigurationIf the active node is on more than one datastore.- Raise
com.vmware.vapi.std.errors_client.NotFoundIf the active virtual machine is not managed by the specified vCenter server for the active node.- Raise
com.vmware.vapi.std.errors_client.ErrorIf the management interface IP address assignment is not static.- Raise
com.vmware.vapi.std.errors_client.ErrorIf any other error occurs.
-
class
com.vmware.vcenter.vcha.cluster_client.DeploymentType(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe DeploymentType class provides methods to get the deployment type of a vCenter High Availability Cluster (VCHA Cluster). This class was added in vSphere API 6.7.1.
- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
-
class
Info(deployment_type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
DeploymentType.Infoclass contains the deployment type of the VCHA Cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
deployment_type (
DeploymentType.Type) – Identifies the deployment type of the VCHA cluster. This attribute was added in vSphere API 6.7.1.
-
class
Type(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
DeploymentType.Typeclass defines the possible deployment types for a VCHA Cluster. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str) – String value for theTypeinstance.
-
AUTO= Type(string='AUTO')¶ VCHA Cluster was deployed automatically. This class attribute was added in vSphere API 6.7.1.
-
MANUAL= Type(string='MANUAL')¶ VCHA Cluster was deployed manually. This class attribute was added in vSphere API 6.7.1.
-
NONE= Type(string='NONE')¶ VCHA Cluster is not configured. This class attribute was added in vSphere API 6.7.1.
-
get()¶ Retrieves the deployment type of a VCHA cluster. This method was added in vSphere API 6.7.1.
- Return type
- Returns
Info structure containing the deployment type information of the the VCHA cluster.
- Raise
com.vmware.vapi.std.errors_client.UnauthorizedIf the user has insufficient privilege to perform the operation. Operation execution requires the System.Read privilege.- Raise
com.vmware.vapi.std.errors_client.ErrorIf any other error occurs.
-
class
com.vmware.vcenter.vcha.cluster_client.Mode(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe Mode class provides methods to manage the operating mode of a vCenter High Availability Cluster (VCHA Cluster). This class was added in vSphere API 6.7.1.
- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
-
class
ClusterMode(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThe
Mode.ClusterModeclass defines the possible modes for a VCHA Cluster. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str) – String value for theClusterModeinstance.
-
DISABLED= ClusterMode(string='DISABLED')¶ VCHA Cluster is disabled. State replication between the Active and Passive node is disabled and automatic failover is not allowed. This class attribute was added in vSphere API 6.7.1.
-
ENABLED= ClusterMode(string='ENABLED')¶ VCHA Cluster is enabled. State replication between the Active and Passive node is enabled and automatic failover is allowed. This class attribute was added in vSphere API 6.7.1.
-
MAINTENANCE= ClusterMode(string='MAINTENANCE')¶ VCHA Cluster is in maintenance mode. State replication between the and Passive node is enabled but automatic failover is not allowed. This class attribute was added in vSphere API 6.7.1.
-
class
Info(mode=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Mode.Infoclass contains the mode of the VCHA Cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
mode (
Mode.ClusterMode) – Identifies the mode of the VCHA cluster. This attribute was added in vSphere API 6.7.1.
-
get()¶ Retrieves the current mode of a VCHA cluster. This method was added in vSphere API 6.7.1.
- Return type
- Returns
Info structure containing the mode of the the VCHA cluster.
- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateIf the VCHA cluster is not configured.- Raise
com.vmware.vapi.std.errors_client.UnauthorizedIf the user has insufficient privilege to perform the operation. Operation execution requires the System.Read privilege.- Raise
com.vmware.vapi.std.errors_client.ErrorIf any other error occurs.
-
set_task(mode)¶ Manipulates the mode of a VCHA Cluster. Following mode transitions are allowed:
enabled -> disabled - Allowed only in healthy and degraded states. enabled -> maintenance - Allowed only in healthy state. disabled -> enabled - Allowed only in healthy state.
maintenance -> enabled - Allowed only in healthy state with all nodes are running the same version. maintenance -> disabled - Allowed only in healthy state with all nodes are running the same version.
All other transitions are not allowed.
VCHA Cluster configuration remains intact in any of the cluster modes.. This method was added in vSphere API 6.7.1.
- Parameters
mode (
Mode.ClusterMode) – Clustermode to change the VCHA cluster mode to.- Raise
com.vmware.vapi.std.errors_client.UnauthorizedIf the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.- Raise
com.vmware.vapi.std.errors_client.ErrorIf any other error occurs.
-
class
com.vmware.vcenter.vcha.cluster_client.Passive(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Passiveclass provides methods to validate a passive’s placement configuration and redeploy the passive node in a vCenter High Availability (VCHA) cluster. This class was added in vSphere API 6.7.1.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
-
class
CheckResult(warnings=None, errors=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Passive.CheckResultclass contains the warnings and errors that will occur during the clone operation. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
warnings (
listofcom.vmware.vapi.std_client.LocalizableMessage) – A list of problems which may require attention, but which are not fatal. This attribute was added in vSphere API 6.7.1.errors (
listofcom.vmware.vapi.std_client.LocalizableMessage) – A list of problems which are fatal to the operation and the operation will fail. This attribute was added in vSphere API 6.7.1.
-
class
CheckSpec(vc_spec=None, placement=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Passive.CheckSpecclass contains placement information for validation. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vc_spec (
com.vmware.vcenter.vcha_client.CredentialsSpecorNone) – Contains the active node’s management vCenter server credentials. This attribute was added in vSphere API 6.7.1. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.placement (
com.vmware.vcenter.vcha_client.PlacementSpec) – Contains the node’s placement information for validation. This attribute was added in vSphere API 6.7.1.
-
class
RedeploySpec(vc_spec=None, placement=None, ha_ip=None, failover_ip=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Passive.RedeploySpecclass contains the redeploy specification. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vc_spec (
com.vmware.vcenter.vcha_client.CredentialsSpecorNone) – Contains the active node’s management vCenter server credentials. This attribute was added in vSphere API 6.7.1. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.placement (
com.vmware.vcenter.vcha_client.PlacementSpec) – Contains the node’s placement information. This attribute was added in vSphere API 6.7.1.ha_ip (
com.vmware.vcenter.vcha_client.IpSpecorNone) – Contains the VCHA HA network configuration of the node. All cluster communication (state replication, heartbeat, cluster messages) happens over this network. This attribute was added in vSphere API 6.7.1. If None, then the stored network configuration for the VCHA HA network for the passive node will be used.failover_ip (
com.vmware.vcenter.vcha_client.IpSpecorNone) – Failover IP address that this node must assume after the failover to serve client requests. This attribute was added in vSphere API 6.7.1. If None, then the public IP address of the Active vCenter Server is assumed.
-
check(spec)¶ Validates the specified passive node’s placement configuration. This method was added in vSphere API 6.7.1.
- Parameters
spec (
Passive.CheckSpec) – Contains the passive node’s placement specification.- Return type
- Returns
CheckResult structure containing errors and warnings.
- Raise
com.vmware.vapi.std.errors_client.InvalidArgumentIf the credentials provided for authentincating with the active node’s management vCenter server are invalid.- Raise
com.vmware.vapi.std.errors_client.InvalidArgumentIf the specified resource spec is deemed invalid for the clone operation.- Raise
com.vmware.vapi.std.errors_client.UnverifiedPeerIf the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute ofcom.vmware.vapi.std.errors_client.Errorwill be a class that contains all the attributes defined incom.vmware.vcenter.vcha_client.CertificateInfo.- Raise
com.vmware.vapi.std.errors_client.NotFoundIf the active virtual machine is not managed by the specified vCenter server for the active node.- Raise
com.vmware.vapi.std.errors_client.InvalidElementConfigurationIf the active node is on more than one datastore.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateIf the clone operation is not allowed in the current state of the system.- Raise
com.vmware.vapi.std.errors_client.UnauthorizedIf the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.- Raise
com.vmware.vapi.std.errors_client.ErrorIf any other error occurs.
-
redeploy_task(spec)¶ Creates the passive node in a degraded cluster with node location information and pre-existing VCHA cluster configuration from the active node. This method was added in vSphere API 6.7.1.
- Parameters
spec (
Passive.RedeploySpec) – Contains the passive node’s redeploy specification.- Raise
com.vmware.vapi.std.errors_client.InvalidArgumentIf the credentials provided for authentincating with the active node’s management vCenter server are invalid.- Raise
com.vmware.vapi.std.errors_client.UnauthorizedIf the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.- Raise
com.vmware.vapi.std.errors_client.UnverifiedPeerIf the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute ofcom.vmware.vapi.std.errors_client.Errorwill be a class that contains all the attributes defined incom.vmware.vcenter.vcha_client.CertificateInfo.- Raise
com.vmware.vapi.std.errors_client.ErrorIf any other error occurs.
-
class
com.vmware.vcenter.vcha.cluster_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBaseInitialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
-
class
com.vmware.vcenter.vcha.cluster_client.Witness(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
Witnessclass provides methods to validate a witness’s placement configuration and redeploy the witness node in a vCenter High Availability (VCHA) cluster. This class was added in vSphere API 6.7.1.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
-
class
CheckResult(warnings=None, errors=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Witness.CheckResultclass contains the warnings and errors that will occur during the clone operation. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
warnings (
listofcom.vmware.vapi.std_client.LocalizableMessage) – A list of problems which may require attention, but which are not fatal. This attribute was added in vSphere API 6.7.1.errors (
listofcom.vmware.vapi.std_client.LocalizableMessage) – A list of problems which are fatal to the operation and the operation will fail. This attribute was added in vSphere API 6.7.1.
-
class
CheckSpec(vc_spec=None, placement=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Witness.CheckSpecclass contains placement information for validation. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vc_spec (
com.vmware.vcenter.vcha_client.CredentialsSpecorNone) – Contains the active node’s management vCenter server credentials. This attribute was added in vSphere API 6.7.1. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.placement (
com.vmware.vcenter.vcha_client.PlacementSpec) – Contains the node’s placement information for validation. This attribute was added in vSphere API 6.7.1.
-
class
RedeploySpec(vc_spec=None, placement=None, ha_ip=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Witness.RedeploySpecclass contains the redeploy specification. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vc_spec (
com.vmware.vcenter.vcha_client.CredentialsSpecorNone) – Contains the active node’s management vCenter server credentials. This attribute was added in vSphere API 6.7.1. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.placement (
com.vmware.vcenter.vcha_client.PlacementSpec) – Contains the node’s placement information. This attribute was added in vSphere API 6.7.1.ha_ip (
com.vmware.vcenter.vcha_client.IpSpecorNone) – Contains the VCHA HA network configuration of the node. All cluster communication (state replication, heartbeat, cluster messages) happens over this network. This attribute was added in vSphere API 6.7.1. If None, then the stored network configuration for the VCHA HA network for the witness node will be used.
-
check(spec)¶ Validates the specified witness node’s placement configuration. This method was added in vSphere API 6.7.1.
- Parameters
spec (
Witness.CheckSpec) – Contains the witness node’s placement specification.- Return type
- Returns
CheckResult structure containing errors and warnings.
- Raise
com.vmware.vapi.std.errors_client.InvalidArgumentIf the credentials provided for authentincating with the active node’s management vCenter server are invalid.- Raise
com.vmware.vapi.std.errors_client.InvalidArgumentIf the specified resource spec is deemed invalid for the clone operation.- Raise
com.vmware.vapi.std.errors_client.UnverifiedPeerIf the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute ofcom.vmware.vapi.std.errors_client.Errorwill be a class that contains all the attributes defined incom.vmware.vcenter.vcha_client.CertificateInfo.- Raise
com.vmware.vapi.std.errors_client.NotFoundIf the active virtual machine is not managed by the specified vCenter server for the active node.- Raise
com.vmware.vapi.std.errors_client.InvalidElementConfigurationIf the active node is on more than one datastore.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateIf the clone operation is not allowed in the current state of the system.- Raise
com.vmware.vapi.std.errors_client.UnauthorizedIf the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.- Raise
com.vmware.vapi.std.errors_client.ErrorIf any other error occurs.
-
redeploy_task(spec)¶ Creates the witness node in a degraded cluster with node location information and pre-existing VCHA cluster configuration from the active node. This method was added in vSphere API 6.7.1.
- Parameters
spec (
Witness.RedeploySpec) – Contains the witness node’s redeploy specification.- Raise
com.vmware.vapi.std.errors_client.InvalidArgumentIf the credentials provided for authentincating with the active node’s management vCenter server are invalid.- Raise
com.vmware.vapi.std.errors_client.UnauthorizedIf the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.- Raise
com.vmware.vapi.std.errors_client.UnverifiedPeerIf the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute ofcom.vmware.vapi.std.errors_client.Errorwill be a class that contains all the attributes defined incom.vmware.vcenter.vcha_client.CertificateInfo.- Raise
com.vmware.vapi.std.errors_client.ErrorIf any other error occurs.