VolumeBackup API

For details on how to use auto scaling, see /sdk/guides/volume_backup (NEEDS TO BE DONE).

The VolumeBackup Class

The VBS high-level interface is available through the volume_backup member of a Connection object. The volume_backup member will only be added if the otcextensions.sdk.register_otc_extensions(conn) method is called.

The Backup itself is an OpenStack entity and supported natively as block_storage.Backup.

Backup Policy Operations

class otcextensions.sdk.volume_backup.v2._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
backup_policies()

Retrieve a generator of backup_policys

Returns:

A generator of backup_policy (BackupPolicy) instances

create_backup_policy(**attrs)

Create a new backup policy from name and scheduled policy attributes

Parameters:

attrs (dict) – Keyword arguments which will be used to create a BackupPolicy

Returns:

The results of backup policy creation

Return type:

BackupPolicy

update_backup_policy(backup_policy, **attrs)

update a backup_policy from backup policy attributes

Parameters:
  • backup_policy – The value can be the ID of a backup_policy or a BackupPolicy instance

  • attrs (dict) – Keyword arguments which will be used to create a ScheduledPolicy, comprised of the properties on the SchedulePolicy class.

Returns:

The results of backup_policy creation

Return type:

BackupPolicy

delete_backup_policy(backup_policy, ignore_missing=True)

Delete a backup policy

Parameters:
  • backup_policy – The value can be the ID of a backup_policy or a BackupPolicy instance

  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the backup_policy does not exist. When set to True, no exception will be set when attempting to delete a nonexistent backup_policy.

Returns:

backup_policy been deleted

Return type:

BackupPolicy

find_backup_policy(name_or_id, ignore_missing=True)

Find a single backup_policy

Parameters:
  • name_or_id – The name or ID of a backup_policy

  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the backup_policy does not exist. When set to True, no exception will be set when attempting to delete a nonexistent backup_policy.

Returns:

None

execute_policy(backup_policy)

Execute policy immediately

::param backup_policy: The value can be the ID of a backup_policy or a

BackupPolicy instance

enable_policy(backup_policy)

Enable policy

::param backup_policy: The value can be the ID of a backup_policy or a

BackupPolicy instance

disable_policy(backup_policy)

disable policy

::param backup_policy: The value can be the ID of a backup_policy or a

BackupPolicy instance

link_resources_to_policy(backup_policy, resources)

link resource to backup policy

Parameters:
  • backup_policy – The value can be the ID of a backup_policy or a BackupPolicy instance

  • resources – resources to bound, should be a list of volume id

Return type:

BackupPolicyResource

unlink_resources_of_policy(backup_policy, resources)

Unlink resources of backup policy

Parameters:
  • backup_policy – The value can be the ID of a backup_policy or a BackupPolicy instance

  • resources – resources to bound, should be a list of volume id

Return type:

BackupPolicyResource