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:
VapiInterface
The
Archives
class 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:
VapiStruct
The
Archives.FilterSpec
class 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 (
str
orNone
) – Matches Backup archives withArchives.Info.archive
equal 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 (
bool
orNone
) – Matches Backup archives withArchives.Info.usable
equal 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:
VapiStruct
The
Archives.Info
contains 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 (
list
ofstr
) – 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 tofalse
in following cases:The
supervisor
is not found.Backup was taken on a newer vCenter Server. i.e. Supervisor build version component of the
supervisorVersion
value is more recent than Supervisor build version component ofsupervisor
com.vmware.vcenter.namespace_management.software_client.Clusters.Info.current_version
and all of thecom.vmware.vcenter.namespace_management.software_client.Clusters.Info.available_versions
.Kubernetes version component of the
supervisorVersion
value 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 theunusableReasons
field. This attribute was added in vSphere API 8.0.3.0.unusable_reasons (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) – Reasons that make Bacup archive unusable. Will be empty ifusable
value 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.FilterSpec
orNone
) – 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.Error
if the system reports an error while responding to the request.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticated
if the user cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorized
if the user is missing the System.Read privilege.
- class com.vmware.vcenter.namespace_management.supervisors.recovery.backup_client.Jobs(config)
Bases:
VapiInterface
The
Jobs
class 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:
VapiStruct
The
Jobs.CreateSpec
class 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 (
str
orNone
) – 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 (
bool
orNone
) – Ignore Supervisor health check failure when taking Supervisor backup. Supervisor is considered unhealthy if eithercom.vmware.vcenter.namespace_management.supervisors_client.Summary.Info.config_status
orcom.vmware.vcenter.namespace_management.supervisors_client.Summary.Info.kubernetes_status
value, 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
Archives
class 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.Error
if the system reports an error while responding to the request.- Raise:
com.vmware.vapi.std.errors_client.AlreadyExists
if a backup job is already pending for the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if Supervisor is not healthy and {#member CreateSpec.ignoreHealthCheckFailure} is not set totrue
or if Supervisor is not fully enabled yet.- Raise:
com.vmware.vapi.std.errors_client.NotFound
if the given Supervisor cannot be found.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticated
if the user cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorized
if the user is missing the Namespaces.Backup privilege on the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.Unsupported
if version of the specified Supervisor does not support backup.
- class com.vmware.vcenter.namespace_management.supervisors.recovery.backup_client.StubFactory(stub_config)
Bases:
StubFactoryBase
Initialize 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:
VapiInterface
The
Jobs
class 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.Archives
class 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.Error
if the system reports an error while responding to the request.- Raise:
com.vmware.vapi.std.errors_client.InvalidArgument
if specified Backup archive is not a backup of the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.AlreadyExists
if a restore job is already pending for the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if specified Backup archivecom.vmware.vcenter.namespace_management.supervisors.recovery.backup_client.Archives.Info.usable
value is set tofalse
.- Raise:
com.vmware.vapi.std.errors_client.NotFound
if the given Supervisor or Backup archive cannot be found.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticated
if the user cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorized
if the user is missing the Namespaces.Manage privilege on the Supervisor.- Raise:
com.vmware.vapi.std.errors_client.Unsupported
if version of the specified Supervisor does not support restore.
- class com.vmware.vcenter.namespace_management.supervisors.recovery.restore_client.StubFactory(stub_config)
Bases:
StubFactoryBase
Initialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance