otcextensions.sdk.cbr.v3.policy

The CBR Policy Class

The Policy class inherits from Resource.

class otcextensions.sdk.cbr.v3.policy.Policy(_synchronized=False, connection=None, **attrs)

CBR Policy Resource

The base resource

Parameters
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

associated_vaults

Properties associated vault

enabled

Whether to enable the policy

id

Policy ID

name

Policy Name Max: 64 chars

operation_definition

Scheduling parameter

operation_type

Policy type values: backup, replication

trigger

Time rule for the policy execution

class otcextensions.sdk.cbr.v3.policy.Vault(_synchronized=False, connection=None, **attrs)

The base resource

Parameters
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

destination_vault_id

Properties ID of the associated remote vault

vault_id

Vault ID

class otcextensions.sdk.cbr.v3.policy.Trigger(_synchronized=False, connection=None, **attrs)

The base resource

Parameters
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

properties

Properties Scheduler attributes

class otcextensions.sdk.cbr.v3.policy.Properties(_synchronized=False, connection=None, **attrs)

The base resource

Parameters
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

pattern

Properties Scheduling rule. In the replication policy, you are advised to set one time point for one day. A max number of 24 rules can be configured. The scheduling rule complies with iCalender RFC 2445, but ita supports only the following params: ‘FREQ’, ‘BYDAY’, ‘BYHOUR’, ‘BYMINUTE’, and ‘INTERVAL. ‘FREQ’ can be set to ‘WEEKLY’ and ‘DAILY’. ‘BYDAY’ can bne set to: MO, TU, WE, TH, FR, SA, SU ‘BYHOUR’ ranges from 0 to 23 hours ‘BYMINUTE’ ranges from 0 to 59 The scheduling interval must not be less than 1 hour. A max of 24 time points are allowed in a day, e.g. If scheduling time is 14:00 from Monday to Sunday, set the scheduling rule as follows: ‘FREQ=WEEKLY;BYDAY=MO;TU;WE;TH;FR;SA;SU;BYHOUR=14;BYMINUTE=00’ If the scheduling time is 14:00 every day: FREQ=DAILY;INTERVAL=1;BYHOUR=14;BYMINUTE=00

start_time

Start time of the scheduler in the format 2020-01-08 09:59:49

class otcextensions.sdk.cbr.v3.policy.OperationDefinition(_synchronized=False, connection=None, **attrs)

The base resource

Parameters
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

day_backups

Properties Specifies the number of retained daily backups The latest backup of each day is saved in the long term. This parameter can be effective together with the max number of retained backups specified by ‘max_backups’.0 value: 0 to 100 If this property is configured, ‘timezone’ is mandatory.

max_backups

Maximum number of retained backups. value: -1 or ranges from 0 to 99999 If -1 is set, the backups will not be cleared even though the configured retained backup quantity is exceeded. If this parameter and ‘retention_duration_days’ are both left blank, the backups will be retained permanently

month_backups

Specifies the number of retained monthly backups. The latest backup of each month is saved in the long term. This parameter can be effective together with the max number of retained backups specified by ‘max_backups’. value: ranges from 0 to 100 If this parameter is configured ‘timezone’ is mandatory.

retention_duration_days

Duration of retaining a backup in days value: -1 or ranges from 0 to 99999 -1 indicates that the backups will not be cleared bassed on the retention duration. if this parameter and ‘max_backups’ are left blank at the same time, the backups will be retained permanently.

timezone

Time where the user is located, e.g.: UTC+08:00 This paramter is only configurable if ‘day_backups, ‘week_backups’, ‘month_backups’ or ‘year_backups’ are set.

week_backups

Specifies the number or retained weekly backups. The latest backup of each week is saved in the long term. This param can be effective together with the max number of retained backups specified by ‘max_backups’. If this param is configured, ‘timezone’ is mandatory. value: ranges from 0 to 100

year_backups

Specifies the number or retained yearly backups. The latest backup of each year is saved in the long term. This param can be effective together with the max number of retained backups specified by ‘max_backups’. If this param is configured, ‘timezone’ is mandatory. value: ranges from 0 to 100