otcextensions.sdk.sdrs.v1.protected_instance.ProtectedInstance

The SDRS Protected instance Class

The ProtectedInstance class inherits from Resource.

class otcextensions.sdk.sdrs.v1.protected_instance.ProtectedInstance(_synchronized=False, connection=None, **attrs)

SDRS Protected Instance 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.

resource_key: ty.Optional[str] = 'protected_instance'

Singular form of key for resource.

resources_key: ty.Optional[str] = 'protected_instances'

Plural form of key for resource.

base_path: str = '/protected-instances'

The base part of the URI for this resource.

allow_create = True

Allow create operation for this resource.

allow_list = True

Allow list operation for this resource.

allow_fetch = True

Allow get operation for this resource.

allow_delete = True

Allow delete operation for this resource.

allow_commit = True

Allow update operation for this resource.

attachment

Properties Attached replication pair info

created_at

Creation time

description

Protected instance description

delete_target_eip

Specifies whether to delete EIP on DR site server Default: False

delete_target_server

Specifies whether to delete server on DR site server Default: False

flavorRef

DR site server flavor ID

id

Protected instance ID

job_id

Created task job ID

metadata

Protected instance metadata

name: ty.Union[Body, URI]

Protected instance name

primary_subnet_id

Network ID of the subnet for primary NIC on DR site server

primary_ip_address

IP address of the primary NIC on DR site server

priority_station

Production site of protection group

progress

Protected instance synch progress

server_group_id

Protection group ID

server_id

Production site ECS ID

source_server

Production site server ID

status

Protected instance status

tags

Instance tag list

target_server

DR site server ID

updated_at

Update time

delete(session, delete_target_server=False, delete_target_eip=False, ignore_missing=True)

Delete the remote resource based on this instance.

This function overrides default Resource.delete to enable params

Parameters:
  • session (Adapter) – The session to use for making this request.

  • delete_target_server (bool) – Specifies whether target ECS should be deleted after protection group deletion

  • delete_target_eip (bool) – Specifies whether target ECS should be deleted after protection group deletion

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

Returns:

This Group instance.

attach_pair(session, protected_instance, replication_id, device='/dev/vdb')
Method to attach replication pair to the specified

protected instance

Parameters:
  • session (Adapter) – The session to use for making this request.

  • protected_instance (str) – ID of protected instance on which replication pair will be attached

  • replication_id (str) – ID of replication pair to be attached

  • device (str) – disk device name of a replication pair

detach_pair(session, protected_instance, replication_id)
Method to detach replication pair from the specified

protected instance

Parameters:
  • session (Adapter) – The session to use for making this request.

  • protected_instance (str) – ID of protected instance from which replication pair will be detached

  • replication_id (str) – ID of replication pair to be detached

add_nic(session, protected_instance, subnet_id, security_groups=None, ip_address=None)

Method to add NIC to protected instance

Parameters:
  • session (Adapter) – The session to use for making this request.

  • protected_instance (str) – ID of protected instance for which NIC will be added

  • subnet_id (str) – Subnet ID of the NIC to be added

  • security_groups (list) – list of security groups to be added for NIC in format ‘id’: ‘value’

  • ip_address (str) – IP address of NIC

delete_nic(session, protected_instance, nic_id)

Method to remove NIC to protected instance

Parameters:
  • session (Adapter) – The session to use for making this request.

  • protected_instance (str) – ID of protected instance for which NIC will be added

  • nic_id (str) – ID of Network interface card

modify_instance(session, protected_instance, flavor=None, production_flavor=None, dr_flavor=None)

Method to modify server specifications

Parameters:
  • session (Adapter) – The session to use for making this request.

  • protected_instance (str) – ID of protected instance

  • flavor (str) – flavor ID for both production and DR sites

  • production_flavor (str) – flavor ID for production site If ‘flavor’ is specified this parameter doesn’t take effect

  • dr_flavor (str) – flavor ID for DR site If ‘flavor’ is specified this parameter doesn’t take effect

class otcextensions.sdk.sdrs.v1.protected_instance.Attachment(_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.

replication

Properties Replication pair ID

device

Protected instance attached disk name

class otcextensions.sdk.sdrs.v1.protected_instance.Metadata(_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.

system_frozen

Properties Resource status (frozen or not)

class otcextensions.sdk.sdrs.v1.protected_instance.TagSpec(_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.

key

Properties Tag key

value

Tag value