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: session.Session, *, service_type: str | None = None, service_name: str | None = None, interface: str | None = None, region_name: str | None = None, endpoint_override: str | None = None, version: str | None = None, auth: plugin.BaseAuthPlugin | None = None, user_agent: str | None = None, connect_retries: int | None = None, logger: logging.Logger | None = None, allow: dict[str, ty.Any] | None = None, additional_headers: collections.abc.MutableMapping[str, str] | None = None, client_name: str | None = None, client_version: str | None = None, allow_version_hack: bool | None = None, global_request_id: str | None = None, min_version: str | None = None, max_version: str | None = None, default_microversion: str | None = None, status_code_retries: int | None = None, retriable_status_codes: list[int] | None = None, raise_exc: bool | None = None, rate_limit: float | None = None, concurrency: int | None = None, connect_retry_delay: float | None = None, status_code_retry_delay: float | None = None, statsd_client: statsd_client.StatsClient | None = None, statsd_prefix: str | None = None, prometheus_counter: prometheus_client.Counter | None = None, prometheus_histogram: prometheus_client.Histogram | None = None, influxdb_config: dict[str, ty.Any] | None = None, influxdb_client: influxdb_client.InfluxDBClient | None = None)
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