com.vmware.vcenter.namespace_management.supervisors.recovery package
Submodules
com.vmware.vcenter.namespace_management.supervisors.recovery.backup_client module
The
com.vmware.vcenter.namespace_management.supervisors.recovery.backup_client
module provides classes for Supervisor backup operations.
- class com.vmware.vcenter.namespace_management.supervisors.recovery.backup_client.Archives(config)
Bases:
VapiInterfaceThe
Archivesclass provides methods to manage Supervisor Backup archives stored on vCenter Server Appliance file system. This class was added in vSphere API 8.0.3.0.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
- class FilterSpec(archive=None, usable=None)
Bases:
VapiStructThe
Archives.FilterSpecclass contains attributes used to filter the result when listing Backup archives (seeArchives.list()). This class was added in vSphere API 8.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
archive (
strorNone) – Matches Backup archives withArchives.Info.archiveequal to the specified value. This attribute was added in vSphere API 8.0.3.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.backup.Archive. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.backup.Archive. if None this filter is not applied.usable (
boolorNone) – Matches Backup archives withArchives.Info.usableequal to the specified value. This attribute was added in vSphere API 8.0.3.0. if None this filter is not applied.
- class Info(archive=None, supervisor=None, location=None, timestamp=None, supervisor_version=None, namespaces=None, comment=None, usable=None, unusable_reasons=None)
Bases:
VapiStructThe
Archives.Infocontains information about a Supervisor Backup archive. This class was added in vSphere API 8.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
archive (
str) – Backup archive identifier. This attribute was added in vSphere API 8.0.3.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.backup.Archive. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.backup.Archive.supervisor (
str) – Identifier of the Supervisor captured in the backup. This attribute was added in vSphere API 8.0.3.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.Supervisor. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.Supervisor.location (
str) – Absolute path to Backup archive on vCenter Server Appliance file system. This attribute was added in vSphere API 8.0.3.0.timestamp (
datetime.datetime) – Time when the Supervisor backup method was completed. This attribute was added in vSphere API 8.0.3.0.supervisor_version (
str) – Version of the Supervisor captured in the backup. This is a semantic version string in the form v1.26.1+vmware.2-vsc0.1.1-20805373, where the prefix is the Kubernetes version (v1.26.1) and the suffix is the Supervisor build version (vsc0.1.1-20805373). This attribute was added in vSphere API 8.0.3.0.namespaces (
listofstr) – A list of Supervisor Namespaces captured in the backup. This attribute was added in vSphere API 8.0.3.0. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.vcenter.namespaces.Instance. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.namespaces.Instance.comment (
str) – Comment provided when invokingJobs.create()method. This attribute was added in vSphere API 8.0.3.0.usable (
bool) –Backup archive usability for
com.vmware.vcenter.namespace_management.supervisors.recovery.restore_client.Jobs.create()method. It is set tofalsein following cases:The
supervisoris not found.Backup was taken on a newer vCenter Server. i.e. Supervisor build version component of the
supervisorVersionvalue is more recent than Supervisor build version component ofsupervisorcom.vmware.vcenter.namespace_management.software_client.Clusters.Info.current_versionand all of thecom.vmware.vcenter.namespace_management.software_client.Clusters.Info.available_versions.Kubernetes version component of the
supervisorVersionvalue is not a supported on the current vCenter Server version. Refer “VMware vSphere with Tanzu” Release notes for Kubernetes versions supported on a vCenter Server version.Invalid format.
If
false, the list of reasons that make it unusable will be given in theunusableReasonsfield. This attribute was added in vSphere API 8.0.3.0.unusable_reasons (
listofcom.vmware.vapi.std_client.LocalizableMessage) – Reasons that make Bacup archive unusable. Will be empty ifusablevalue istrue. This attribute was added in vSphere API 8.0.3.0.
- list(filter=None)
List all Backup archives that are stored on vCenter Server Appliance file system. Optionally, apply the filter to Backup archives that match the criteria in the {#link FilterSpec}. This method was added in vSphere API 8.0.3.0.
- Parameters:
filter (
Archives.FilterSpecorNone) – Set of parameters that can be used to constrain the results of the method. if None all records will be returned.- Return type:
- Returns:
Information about Backup archives stored on vCenter Server Appliance file system matching the {#link FilterSpec}.
- Raise:
com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif the user is missing the System.Read privilege.
- class com.vmware.vcenter.namespace_management.supervisors.recovery.backup_client.Jobs(config)
Bases:
VapiInterfaceThe
Jobsclass provides methods to create Supervisor backup jobs. This class was added in vSphere API 8.0.3.0.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
- class CreateSpec(comment=None, ignore_health_check_failure=None)
Bases:
VapiStructThe
Jobs.CreateSpecclass contains inputs to be specified forJobs.create(). This class was added in vSphere API 8.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
comment (
strorNone) – Comment to help identify resulting Backup archive. This attribute was added in vSphere API 8.0.3.0. If None comment will be empty.ignore_health_check_failure (
boolorNone) – Ignore Supervisor health check failure when taking Supervisor backup. Supervisor is considered unhealthy if eithercom.vmware.vcenter.namespace_management.supervisors_client.Summary.Info.config_statusorcom.vmware.vcenter.namespace_management.supervisors_client.Summary.Info.kubernetes_statusvalue, as returned bycom.vmware.vcenter.namespace_management.supervisors_client.Summary.get()method is set to ERROR. This attribute was added in vSphere API 8.0.3.0. if None or set tofalse, health check failure of Supervisor will not be ignored and will result inJobs.create()method to report failure.
- create(supervisor, spec)
Initiate a Supervisor Backup job. The Backup captures Supervisor Control plane state that includes a snapshot of etcd, required certificates and container images for infrastructure components. Once the job succeeds, corresponding Backup archive will be stored on vCenter Appliance file system. These Backup archives can be looked up and managed using operations provided by
Archivesclass and can be used to restore the Supervisor usingcom.vmware.vcenter.namespace_management.supervisors.recovery.restore_client.Jobs.create(). This method was added in vSphere API 8.0.3.0.- Parameters:
supervisor (
str) – Identifier for the Supervisor. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.Supervisor.spec (
Jobs.CreateSpec) – Specifies input parameters for backup create job.
- Return type:
str- Returns:
The task identifier for the backup job. On success, the task’s result property will be set to The return value will be an identifier for the resource type:
com.vmware.cis.task.- Raise:
com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.- Raise:
com.vmware.vapi.std.errors_client.AlreadyExistsif a backup job is already pending for the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif Supervisor is not healthy and {#member CreateSpec.ignoreHealthCheckFailure} is not set totrueor if Supervisor is not fully enabled yet.- Raise:
com.vmware.vapi.std.errors_client.NotFoundif the given Supervisor cannot be found.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif the user is missing the Namespaces.Backup privilege on the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.Unsupportedif version of the specified Supervisor does not support backup.
- class com.vmware.vcenter.namespace_management.supervisors.recovery.backup_client.StubFactory(stub_config)
Bases:
StubFactoryBaseInitialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
com.vmware.vcenter.namespace_management.supervisors.recovery.restore_client module
The
com.vmware.vcenter.namespace_management.supervisors.recovery.restore_client
module provides classes for Supervisor restore operations.
- class com.vmware.vcenter.namespace_management.supervisors.recovery.restore_client.Jobs(config)
Bases:
VapiInterfaceThe
Jobsclass provides methods to create Supervisor restore jobs. This class was added in vSphere API 8.0.3.0.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
- create(supervisor, archive)
Initiate Supervisor restore from a Backup archive. Use
com.vmware.vcenter.namespace_management.supervisors.recovery.backup_client.Archivesclass to get the available Backup archives. This method was added in vSphere API 8.0.3.0.- Parameters:
supervisor (
str) – Identifier for the Supervisor. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.Supervisor.archive (
str) – Identifier for the Backup archive to restore from. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.supervisor.backup.Archive.
- Return type:
str- Returns:
The task identifier for the restore job. The task is cancelable. The return value will be an identifier for the resource type:
com.vmware.cis.task.- Raise:
com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.- Raise:
com.vmware.vapi.std.errors_client.InvalidArgumentif specified Backup archive is not a backup of the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.AlreadyExistsif a restore job is already pending for the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif specified Backup archivecom.vmware.vcenter.namespace_management.supervisors.recovery.backup_client.Archives.Info.usablevalue is set tofalse.- Raise:
com.vmware.vapi.std.errors_client.NotFoundif the given Supervisor or Backup archive cannot be found.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif the user is missing the Namespaces.Manage privilege on the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.Unsupportedif version of the specified Supervisor does not support restore.
- class com.vmware.vcenter.namespace_management.supervisors.recovery.restore_client.StubFactory(stub_config)
Bases:
StubFactoryBaseInitialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance