com.vmware.appliance.recovery package
Subpackages
Submodules
com.vmware.appliance.recovery.backup_client module
- class com.vmware.appliance.recovery.backup_client.Job(config)
Bases:
VapiInterface
The
Job
class provides methods to be performed on a backup job.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
- class BackupJobStatus(id=None, state=None, messages=None, progress=None, start_time=None, end_time=None)
Bases:
VapiStruct
The
Job.BackupJobStatus
class represents the status of a backup/restore job.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
id (
str
) – TimeStamp based ID.state (
Job.BackupRestoreProcessState
) – The state of the backup job.messages (
list
ofJob.LocalizableMessage
) – List of messages.progress (
long
) – Progress of the job in percentage.start_time (
datetime.datetime
) – Time when the backup was started.end_time (
datetime.datetime
orNone
) – Time when the backup was finished. If None end time is None until backup is finished.
- class BackupRequest(parts=None, backup_password=None, location_type=None, location=None, location_user=None, location_password=None, comment=None, fast_backup=None)
Bases:
VapiStruct
The
Job.BackupRequest
class represents a requested backup piece.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
parts (
list
ofstr
) – List of optional parts that will be included in the backup. Use theParts.list()
method to get information about the supported parts.backup_password (
str
orNone
) – Password for a backup piece. The backupPassword must adhere to the following password requirements: At least 8 characters, cannot be more than 20 characters in length. At least 1 uppercase letter. At least 1 lowercase letter. At least 1 numeric digit. At least 1 special character (i.e. any character not in [0-9,a-z,A-Z]). Only visible ASCII characters (for example, no space). backupPassword If no password then the piece will not be encryptedlocation_type (
Job.LocationType
) – Type of backup location.location (
str
) – Path or URL of the backup location.location_user (
str
orNone
) – Username for the given location. If None authentication will not be used for the specified location.location_password (
str
orNone
) – Password for the given location. If None authentication will not be used for the specified location.comment (
str
orNone
) – Custom comment provided by the user. If None comment will be empty.fast_backup (
bool
orNone
) – Option to enable Postgres DB/ VCDB fast backup If None backup will proceed at slow rate
- class BackupRestoreProcessState(string)
Bases:
Enum
The
Job.BackupRestoreProcessState
class defines the possible states of a backup/restore process.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 theBackupRestoreProcessState
instance.
- FAILED = BackupRestoreProcessState(string='FAILED')
Backup/Restore job failed.
- INPROGRESS = BackupRestoreProcessState(string='INPROGRESS')
Backup/Restore job is in progress.
- NONE = BackupRestoreProcessState(string='NONE')
Backup/Restore job is not started.
- SUCCEEDED = BackupRestoreProcessState(string='SUCCEEDED')
Backup/Restore job completed successfully.
- class LocalizableMessage(id=None, default_message=None, args=None)
Bases:
VapiStruct
The
Job.LocalizableMessage
class represents a localizable message.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
id (
str
) – Id in message bundle.default_message (
str
) – Text in english.args (
list
ofstr
) – Nested data.
- class LocationType(string)
Bases:
Enum
The
Job.LocationType
class defines the type of destination location for backup/restore. You specify the location type when you create a backup job. SeeJob.BackupRequest
.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 theLocationType
instance.
- FTP = LocationType(string='FTP')
Destination is FTP server.
- FTPS = LocationType(string='FTPS')
Destination is FTPS server.
- HTTP = LocationType(string='HTTP')
Destination is HTTP server.
- HTTPS = LocationType(string='HTTPS')
Destination is HTTPS server.
- NFS = LocationType(string='NFS')
Destination is NFS server. This class attribute was added in vSphere API 6.7.2.
- SCP = LocationType(string='SCP')
Destination is SSH server.
- SFTP = LocationType(string='SFTP')
Destination is SFTP server.
- SMB = LocationType(string='SMB')
Destination is SMB server. This class attribute was added in vSphere API 6.7.2.
- class ReturnResult(status=None, messages=None)
Bases:
VapiStruct
The
Job.ReturnResult
class contains the result information for the cancel operation.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
status (
Job.ReturnStatus
) – Status of the cancel operation.messages (
list
ofJob.LocalizableMessage
) – List of messages.
- class ReturnStatus(string)
Bases:
Enum
The
Job.ReturnStatus
class defines the return type for the cancel operation. You specify the return status when you return the result of cancel job. SeeJob.ReturnResult
.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 theReturnStatus
instance.
- FAIL = ReturnStatus(string='FAIL')
Cancel operation failed.
- OK = ReturnStatus(string='OK')
Cancel operation succeeded.
- WARNING = ReturnStatus(string='WARNING')
Cancel operation passed with warnings.
- cancel(id)
Cancel the backup job.
- Parameters:
id (
str
) – ID (ID of job) The parameter must be an identifier for the resource type:com.vmware.appliance.recovery.backup.job
.- Return type:
- Returns:
BackupJobStatus Structure
- Raise:
com.vmware.vapi.std.errors_client.NotFound
if backup associated with id does not exist.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- create(piece)
Initiate backup.
- Parameters:
piece (
Job.BackupRequest
) – BackupRequest Structure- Return type:
- Returns:
BackupJobStatus Structure
- Raise:
com.vmware.vapi.std.errors_client.FeatureInUse
A backup or restore is already in progress.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- get(id)
See backup job progress/result.
- Parameters:
id (
str
) – ID (ID of job) The parameter must be an identifier for the resource type:com.vmware.appliance.recovery.backup.job
.- Return type:
- Returns:
BackupJobStatus Structure
- Raise:
com.vmware.vapi.std.errors_client.NotFound
if backup associated with id does not exist.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- list()
Get list of backup jobs
- Return type:
list
ofstr
- Returns:
list of BackupJob IDs The return value will contain identifiers for the resource type:
com.vmware.appliance.recovery.backup.job
.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- class com.vmware.appliance.recovery.backup_client.LocationSpec(location=None, location_user=None, location_password=None)
Bases:
VapiStruct
The
LocationSpec
class has fields to represent a location on the backup server. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
location (
str
) – Backup location URL. This attribute was added in vSphere API 6.7.location_user (
str
orNone
) – Username for the given location. This attribute was added in vSphere API 6.7. If None authentication will not be used.location_password (
str
orNone
) – Password for the given location. This attribute was added in vSphere API 6.7. If None authentication will not be used.
- class com.vmware.appliance.recovery.backup_client.Parts(config)
Bases:
VapiInterface
Parts
class provides methods Provides list of parts optional for the backup- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
- class LocalizableMessage(id=None, default_message=None, args=None)
Bases:
VapiStruct
Parts.LocalizableMessage
class Structure representing messageTip
The arguments are used to initialize data attributes with the same names.
- Parameters:
id (
str
) – id in message bundledefault_message (
str
) – text in englishargs (
list
ofstr
) – nested data
- class Part(id=None, name=None, description=None, selected_by_default=None, optional=None, standalone=None)
Bases:
VapiStruct
Parts.Part
class Structure representing backup restore partTip
The arguments are used to initialize data attributes with the same names.
- Parameters:
id (
str
) – part ID When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.appliance.recovery.backup.parts
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.appliance.recovery.backup.parts
.name (
Parts.LocalizableMessage
) – part name id in message bundledescription (
Parts.LocalizableMessage
) – part description id in message bundleselected_by_default (
bool
) – Is this part selected by default in the user interface.optional (
bool
) – Is this part optional.standalone (
bool
orNone
) – This flag will betrue
if this part can be restored independently of an entire VCSA restore. This attribute was added in vSphere API 8.0.3.0. This attribute is optional because it was added in a newer version than its parent node.
- get(id)
Gets the size (in MB) of the part.
- Parameters:
id (
str
) – Identifier of the part. The parameter must be an identifier for the resource type:com.vmware.appliance.recovery.backup.parts
.- Return type:
long
- Returns:
long Size of the part in megabytes.
- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- list()
Gets a list of the backup parts.
- Return type:
list
ofParts.Part
- Returns:
Information about each of the backup parts.
- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- class com.vmware.appliance.recovery.backup_client.Schedules(config)
Bases:
VapiInterface
The
Schedules
class provides methods to be performed to manage backup schedules. This class was added in vSphere API 6.7.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
- class CreateSpec(parts=None, backup_password=None, location=None, location_user=None, location_password=None, enable=None, recurrence_info=None, retention_info=None, fast_backup=None)
Bases:
VapiStruct
The
Schedules.CreateSpec
class contains fields to be specified for creating a new schedule. The structure includes parts, location information, encryption password and enable flag. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
parts (
list
ofstr
orNone
) – List of optional parts to be backed up. Use theParts.list()
method to get information about the supported parts. This attribute was added in vSphere API 6.7. If None all the optional parts will not be backed up.backup_password (
str
orNone
) – Password for a backup piece. The backupPassword must adhere to the following password requirements: At least 8 characters, cannot be more than 20 characters in length. At least 1 uppercase letter. At least 1 lowercase letter. At least 1 numeric digit. At least 1 special character (i.e. any character not in [0-9,a-z,A-Z]). Only visible ASCII characters (for example, no space). This attribute was added in vSphere API 6.7. If None the backup piece will not be encrypted.location (
str
) – URL of the backup location. This attribute was added in vSphere API 6.7.location_user (
str
orNone
) – Username for the given location. This attribute was added in vSphere API 6.7. If None authentication will not be used for the specified location.location_password (
str
orNone
) – Password for the given location. This attribute was added in vSphere API 6.7. If None authentication will not be used for the specified location.enable (
bool
orNone
) – Enable or disable a schedule. This attribute was added in vSphere API 6.7. If None the schedule will be enabled.recurrence_info (
Schedules.RecurrenceInfo
orNone
) – Recurrence information for the schedule. This attribute was added in vSphere API 6.7. If None backup job will not be scheduled. SeeSchedules.RecurrenceInfo
retention_info (
Schedules.RetentionInfo
orNone
) – Retention information for the schedule. This attribute was added in vSphere API 6.7. If None all the completed backup jobs will be retained forever. SeeSchedules.RetentionInfo
fast_backup (
bool
orNone
) – Option to enable Postgres DB/ VCDB fast backup. This attribute was added in vSphere API 6.7. If None backup will proceed at slow rate
- class DayOfWeek(string)
Bases:
Enum
The
Schedules.DayOfWeek
class defines the set of days when backup can be scheduled. The days can be specified as a list of individual days. You specify the days when you set the recurrence for a schedule. SeeSchedules.RecurrenceInfo.days
. This enumeration was added in vSphere API 6.7.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 theDayOfWeek
instance.
- FRIDAY = DayOfWeek(string='FRIDAY')
Friday. This class attribute was added in vSphere API 6.7.
- MONDAY = DayOfWeek(string='MONDAY')
Monday. This class attribute was added in vSphere API 6.7.
- SATURDAY = DayOfWeek(string='SATURDAY')
Saturday. This class attribute was added in vSphere API 6.7.
- SUNDAY = DayOfWeek(string='SUNDAY')
Sunday. This class attribute was added in vSphere API 6.7.
- THURSDAY = DayOfWeek(string='THURSDAY')
Thursday. This class attribute was added in vSphere API 6.7.
- TUESDAY = DayOfWeek(string='TUESDAY')
Tuesday. This class attribute was added in vSphere API 6.7.
- WEDNESDAY = DayOfWeek(string='WEDNESDAY')
Wednesday. This class attribute was added in vSphere API 6.7.
- class Info(parts=None, location=None, location_user=None, enable=None, recurrence_info=None, retention_info=None, fast_backup=None)
Bases:
VapiStruct
The
Schedules.Info
class contains information about an existing schedule. The structure includes Schedule ID, parts, location information, encryption password, enable flag, recurrence and retention information. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
parts (
list
ofstr
) – List of optional parts that will be included in backups based on this schedule details. Use theParts.list()
method to get information about the supported parts. This attribute was added in vSphere API 6.7.location (
str
) – URL of the backup location. This attribute was added in vSphere API 6.7.location_user (
str
orNone
) – Username for the given location. This attribute was added in vSphere API 6.7. If None location user will not be used.enable (
bool
) – Enable or disable a schedule, by default when created a schedule will be enabled. This attribute was added in vSphere API 6.7.recurrence_info (
Schedules.RecurrenceInfo
orNone
) – Recurrence information for the schedule. This attribute was added in vSphere API 6.7. If None backup job is not scheduled. SeeSchedules.RecurrenceInfo
retention_info (
Schedules.RetentionInfo
orNone
) – Retention information for the schedule. This attribute was added in vSphere API 6.7. If None all the completed backup jobs are retained forever. SeeSchedules.RetentionInfo
fast_backup (
bool
orNone
) – Option to enable Postgres DB/ VCDB fast backup. This attribute was added in vSphere API 6.7. If None backup will proceed at slow rate
- class RecurrenceInfo(minute=None, hour=None, days=None)
Bases:
VapiStruct
The
Schedules.RecurrenceInfo
class contains the recurrence information associated with a schedule. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
minute (
long
) – Minute when backup should run. This attribute was added in vSphere API 6.7.hour (
long
) – Hour when backup should run. The hour should be specified in 24-hour clock format. This attribute was added in vSphere API 6.7.days (
list
ofSchedules.DayOfWeek
orNone
) – Day of week when the backup should be run. Days can be specified as list of days. This attribute was added in vSphere API 6.7. If None the backup will be run everyday.
- class RetentionInfo(max_count=None)
Bases:
VapiStruct
The
Schedules.RetentionInfo
class contains retention information associated with a schedule. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
max_count (
long
) – Number of backups which should be retained. If retention is not set, all the backups will be retained forever. This attribute was added in vSphere API 6.7.
- class UpdateSpec(parts=None, backup_password=None, location=None, location_user=None, location_password=None, enable=None, recurrence_info=None, retention_info=None, fast_backup=None)
Bases:
VapiStruct
The
Schedules.UpdateSpec
class contains the fields of the existing schedule which can be updated. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
parts (
list
ofstr
orNone
) – List of optional parts. Use theParts.list()
method to get information about the supported parts. This attribute was added in vSphere API 6.7. If None the value will not be changed.backup_password (
str
orNone
) – Password for a backup piece. The backupPassword must adhere to the following password requirements: At least 8 characters, cannot be more than 20 characters in length. At least 1 uppercase letter. At least 1 lowercase letter. At least 1 numeric digit. At least 1 special character (i.e. any character not in [0-9,a-z,A-Z]). Only visible ASCII characters (for example, no space). This attribute was added in vSphere API 6.7. If None the value will not be changed.location (
str
orNone
) – URL of the backup location. This attribute was added in vSphere API 6.7. If None the value will not be changed.location_user (
str
orNone
) – Username for the given location. This attribute was added in vSphere API 6.7. If None the value will not be changed.location_password (
str
orNone
) – Password for the given location. This attribute was added in vSphere API 6.7. If None the value will not be changed.enable (
bool
orNone
) – Enable or disable a schedule. This attribute was added in vSphere API 6.7. If None the value will not be changed.recurrence_info (
Schedules.RecurrenceInfo
orNone
) – Recurrence information for the schedule. This attribute was added in vSphere API 6.7. If None the infomration will not be changed. SeeSchedules.RecurrenceInfo
retention_info (
Schedules.RetentionInfo
orNone
) – Retention information for the schedule. This attribute was added in vSphere API 6.7. If None the information will not be changed. SeeSchedules.RetentionInfo
fast_backup (
bool
orNone
) – Option to enable Postgres DB/ VCDB fast backup. This attribute was added in vSphere API 6.7. If None backup will proceed at slow rate
- create(schedule, spec)
Creates a schedule. This method was added in vSphere API 6.7.
- Parameters:
schedule (
str
) – Identifier of the schedule The parameter must be an identifier for the resource type:com.vmware.appliance.recovery.backup.schedule
.spec (
Schedules.CreateSpec
) – CreateSpec Structure
- Raise:
com.vmware.vapi.std.errors_client.InvalidArgument
if provided with invalid schedule specification.- Raise:
com.vmware.vapi.std.errors_client.AlreadyExists
if the schedule with the given id already exists.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- delete(schedule)
Deletes an existing schedule. This method was added in vSphere API 6.7.
- Parameters:
schedule (
str
) – Identifier of the schedule The parameter must be an identifier for the resource type:com.vmware.appliance.recovery.backup.schedule
.- Raise:
com.vmware.vapi.std.errors_client.NotFound
if schedule associated with id does not exist.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- get(schedule)
Returns an existing schedule information based on id. This method was added in vSphere API 6.7.
- Parameters:
schedule (
str
) – Identifier of the schedule The parameter must be an identifier for the resource type:com.vmware.appliance.recovery.backup.schedule
.- Return type:
- Returns:
Info Structure
- Raise:
com.vmware.vapi.std.errors_client.NotFound
if schedule associated with id does not exist.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- list()
Returns a list of existing schedules with details. This method was added in vSphere API 6.7.
- Return type:
dict
ofstr
andSchedules.Info
- Returns:
Map of schedule id to Info Structure The key in the return value
dict
will be an identifier for the resource type:com.vmware.appliance.recovery.backup.schedule
.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- run(schedule, comment=None)
Initiate backup with the specified schedule. This method was added in vSphere API 6.7.
- Parameters:
schedule (
str
) – Identifier of the schedule The parameter must be an identifier for the resource type:com.vmware.appliance.recovery.backup.schedule
.comment (
str
orNone
) – field that specifies the description for the backup. If None the backup will have an empty comment.
- Return type:
- Returns:
BackupJobStatus Structure
- Raise:
com.vmware.vapi.std.errors_client.FeatureInUse
if a backup or restore is already in progress.- Raise:
com.vmware.vapi.std.errors_client.NotFound
if schedule associated with id does not exist.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- update(schedule, spec)
Updates a schedule. This method was added in vSphere API 6.7.
- Parameters:
schedule (
str
) – Identifier of the schedule The parameter must be an identifier for the resource type:com.vmware.appliance.recovery.backup.schedule
.spec (
Schedules.UpdateSpec
) – UpdateSpec Structure
- Raise:
com.vmware.vapi.std.errors_client.InvalidArgument
if provided with invalid schedule specification.- Raise:
com.vmware.vapi.std.errors_client.NotFound
if schedule associated with id does not exist.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- class com.vmware.appliance.recovery.backup_client.StubFactory(stub_config)
Bases:
StubFactoryBase
Initialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
- class com.vmware.appliance.recovery.backup_client.SystemName(config)
Bases:
VapiInterface
The
SystemName
class provides methods to enumerate system names of appliance backups. This class was added in vSphere API 6.7.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
- list(loc_spec)
Returns a list of system names for which backup archives exist under
loc_spec
. This method was added in vSphere API 6.7.- Parameters:
loc_spec (
LocationSpec
) – LocationSpec Structure- Return type:
list
ofstr
- Returns:
list of system names The return value will contain identifiers for the resource type:
com.vmware.appliance.recovery.backup.system_name
.- Raise:
com.vmware.vapi.std.errors_client.NotFound
ifloc_spec
doesn’t refer to an existing location on the backup server.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
com.vmware.appliance.recovery.reconciliation_client module
- class com.vmware.appliance.recovery.reconciliation_client.Job(config)
Bases:
VapiInterface
The
Job
class provides methods to create and get the status of reconciliation job. This class was added in vSphere API 6.7.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
- class CreateSpec(sso_admin_user_name=None, sso_admin_user_password=None, ignore_warnings=None)
Bases:
VapiStruct
The
Job.CreateSpec
class has the fields to request the start of reconciliation job. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
sso_admin_user_name (
str
orNone
) – Administrators username for SSO. This attribute was added in vSphere API 6.7. If None SSO authentication will not be used. If the vCenter Server is a management node or an embedded node, authentication is required.sso_admin_user_password (
str
orNone
) – Password for SSO admin user. This attribute was added in vSphere API 6.7. If None SSO authentication will not be used. If the vCenter Server is a management node or an embedded node, authentication is required.ignore_warnings (
bool
orNone
) – Flag indicating whether warnings should be ignored during reconciliation. This attribute was added in vSphere API 6.7. If None, validation warnings will fail the reconciliation operation.
- class Info(description=None, service=None, operation=None, parent=None, target=None, status=None, cancelable=None, error=None, start_time=None, end_time=None, messages=None, progress=None)
Bases:
VapiStruct
The
Job.Info
class represents the reconciliation job information. It contains information related to current Status, any associated messages and progress as percentage. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
description (
com.vmware.vapi.std_client.LocalizableMessage
) – Description of the operation associated with the task. This attribute was added in vSphere API 6.7.service (
str
) – Name of the service containing the operation. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.appliance.recovery.reconciliation.job
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.appliance.recovery.reconciliation.job
.operation (
str
) – Name of the operation associated with the task. This attribute was added in vSphere API 6.7.parent (
str
orNone
) – Parent of the current task. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.appliance.recovery.reconciliation.job
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.appliance.recovery.reconciliation.job
. This attribute will be None if the task has no parent.target (
com.vmware.vapi.std_client.DynamicID
orNone
) – Identifier of the target resource the operation modifies. This attribute was added in vSphere API 6.7. This attribute will be None if the task has multiple targets or no target.status (
Job.Status
) – Status of the operation associated with the task. This attribute was added in vSphere API 6.7.cancelable (
bool
orNone
) – Flag to indicate whether or not the operation can be cancelled. The value may change as the operation progresses. This attribute was added in vSphere API 6.7. If None, the operation cannot be canceled.error (
Exception
orNone
) – Description of the error if the operation status is “FAILED”. This attribute was added in vSphere API 6.7. If None the description of why the operation failed will be included in the result of the operation (see Info#result).start_time (
datetime.datetime
) – Time when the operation is started. This attribute was added in vSphere API 6.7. This attribute is optional and it is only relevant when the value ofstatus
is one ofJob.Status.RUNNING
,Job.Status.SUCCEEDED
, orJob.Status.FAILED
.end_time (
datetime.datetime
) – Time when the operation is completed. This attribute was added in vSphere API 6.7. This attribute is optional and it is only relevant when the value ofstatus
is one ofJob.Status.SUCCEEDED
orJob.Status.FAILED
.messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) – A list of localized messages. This attribute was added in vSphere API 6.7.progress (
long
) – The progress of the job as a percentage. This attribute was added in vSphere API 6.7.
- class Status(string)
Bases:
Enum
The
Job.Status
class defines the status values that can be reported for an operation. This enumeration was added in vSphere API 6.7.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 theStatus
instance.
- FAILED = Status(string='FAILED')
The operation failed. This class attribute was added in vSphere API 6.7.
- NONE = Status(string='NONE')
The operation is not running. This class attribute was added in vSphere API 6.7.
- RUNNING = Status(string='RUNNING')
The operation is in progress. This class attribute was added in vSphere API 6.7.
- SUCCEEDED = Status(string='SUCCEEDED')
The operation completed successfully. This class attribute was added in vSphere API 6.7.
- create(spec)
Initiate reconciliation. This method was added in vSphere API 6.7.
- Parameters:
spec (
Job.CreateSpec
) – CreateSpec Structure- Return type:
- Returns:
Info Structure
- Raise:
com.vmware.vapi.std.errors_client.FeatureInUse
A backup or restore is already in progress.- Raise:
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
Reconciliation is allowed only after restore has finished successfully.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- get()
Get reconciliation job progress/result. This method was added in vSphere API 6.7.
- Return type:
- Returns:
Info Structure
- Raise:
com.vmware.vapi.std.errors_client.NotFound
if there is no running reconciliation job.- Raise:
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
- class com.vmware.appliance.recovery.reconciliation_client.StubFactory(stub_config)
Bases:
StubFactoryBase
Initialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.appliance.recovery.restore_client module
- class com.vmware.appliance.recovery.restore_client.Job(config)
Bases:
VapiInterface
Job
class provides methods Performs restore operations- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
- class BackupRestoreProcessState(string)
Bases:
Enum
Job.BackupRestoreProcessState
class Defines state of backup/restore processNote
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 theBackupRestoreProcessState
instance.
- FAILED = BackupRestoreProcessState(string='FAILED')
Failed
- INPROGRESS = BackupRestoreProcessState(string='INPROGRESS')
In progress
- NONE = BackupRestoreProcessState(string='NONE')
Not started
- SUCCEEDED = BackupRestoreProcessState(string='SUCCEEDED')
Completed successfully
- class LocalizableMessage(id=None, default_message=None, args=None)
Bases:
VapiStruct
Job.LocalizableMessage
class Structure representing messageTip
The arguments are used to initialize data attributes with the same names.
- Parameters:
id (
str
) – id in message bundledefault_message (
str
) – text in englishargs (
list
ofstr
) – nested data
- class LocationType(string)
Bases:
Enum
Job.LocationType
class Defines type of all locations for backup/restoreNote
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 theLocationType
instance.
- FTP = LocationType(string='FTP')
Destination is FTP server
- FTPS = LocationType(string='FTPS')
Destination is FTPS server
- HTTP = LocationType(string='HTTP')
Destination is HTTP server
- HTTPS = LocationType(string='HTTPS')
Destination is HTTPS server
- NFS = LocationType(string='NFS')
Destination is NFS server. This class attribute was added in vSphere API 6.7.2.
- SCP = LocationType(string='SCP')
Destination is SSH server
- SFTP = LocationType(string='SFTP')
Destination is SFTP server
- SMB = LocationType(string='SMB')
Destination is SMB server. This class attribute was added in vSphere API 6.7.2.
- class RestoreJobStatus(state=None, messages=None, progress=None, parts=None)
Bases:
VapiStruct
Job.RestoreJobStatus
class Structure representing backup restore statusTip
The arguments are used to initialize data attributes with the same names.
- Parameters:
state (
Job.BackupRestoreProcessState
) – process statemessages (
list
ofJob.LocalizableMessage
) – list of messagesprogress (
long
) – percentage completeparts (
list
ofstr
orNone
) – List of standalone parts requested for restore. Only parts with thecom.vmware.appliance.recovery.backup_client.Parts.Part.standalone
flag set totrue
can be included. This attribute was added in vSphere API 8.0.3.0. If None entire VCSA restore was requested.
- class RestoreRequest(parts=None, backup_password=None, location_type=None, location=None, location_user=None, location_password=None, sso_admin_user_name=None, sso_admin_user_password=None, ignore_warnings=None)
Bases:
VapiStruct
Job.RestoreRequest
class Structure representing requested restore pieceTip
The arguments are used to initialize data attributes with the same names.
- Parameters:
parts (
list
ofstr
orNone
) – List of standalone parts to restore. Only parts with thecom.vmware.appliance.recovery.backup_client.Parts.Part.standalone
flag set totrue
can be included. This attribute was added in vSphere API 8.0.3.0. If None entire VCSA will be restored.backup_password (
str
orNone
) – a password for a backup piece backupPassword If no password then the piece will not be decryptedlocation_type (
Job.LocationType
) – a type of locationlocation (
str
) – path or urllocation_user (
str
orNone
) – username for location locationUser User name for this location if login is required.location_password (
str
orNone
) – password for location locationPassword Password for the specified user if login is required at this location.sso_admin_user_name (
str
orNone
) – Administrators Username for SSO. This attribute was added in vSphere API 6.7. If None SSO authentication will not be used. If the vCenter Server is a management node or an embedded node, authentication is required.sso_admin_user_password (
str
orNone
) – The password for SSO admin user. This attribute was added in vSphere API 6.7. If None SSO authentication will not be used. If the vCenter Server is a management node or an embedded node, authentication is required.ignore_warnings (
bool
orNone
) – The flag to ignore warnings during restore. This attribute was added in vSphere API 6.7. If None, validation warnings will fail the restore operation
- class ReturnResult(status=None, messages=None)
Bases:
VapiStruct
Job.ReturnResult
class Structure representing precheck resultTip
The arguments are used to initialize data attributes with the same names.
- Parameters:
status (
Job.ReturnStatus
) – Check statusmessages (
list
ofJob.LocalizableMessage
) – List of messages
- class ReturnStatus(string)
Bases:
Enum
Job.ReturnStatus
class Defines the state of precheckNote
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 theReturnStatus
instance.
- FAIL = ReturnStatus(string='FAIL')
Check failed
- OK = ReturnStatus(string='OK')
Check passed
- WARNING = ReturnStatus(string='WARNING')
Passed with warnings
- cancel()
Cancel the restore job
- Return type:
- Returns:
RestoreJobStatus Structure
- Raise:
com.vmware.vapi.std.errors_client.Error
Generic error
- create(piece)
Initiate restore. If parts field is set in RestoreRequest, only specified parts will be restored instead of entire VCSA.
- Parameters:
piece (
Job.RestoreRequest
) – RestoreRequest Structure- Return type:
- Returns:
RestoreJobStatus Structure
- Raise:
com.vmware.vapi.std.errors_client.InvalidArgument
if RestoreRequest includes a part that isn’t marked as standalone- Raise:
com.vmware.vapi.std.errors_client.NotFound
if RestoreRequest includes a part that isn’t in the backup- Raise:
com.vmware.vapi.std.errors_client.FeatureInUse
A backup or restore is already in progress- Raise:
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
Restore is allowed only after deployment and before firstboot- Raise:
com.vmware.vapi.std.errors_client.Error
Generic error
- get()
See restore job progress/result.
- Return type:
- Returns:
RestoreJobStatus Structure
- Raise:
com.vmware.vapi.std.errors_client.Error
Generic error
- class com.vmware.appliance.recovery.restore_client.StubFactory(stub_config)
Bases:
StubFactoryBase
Initialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance