api.vm.replica

/vm/(hostname_or_uuid)/replica

api.vm.replica.views.vm_replica_list(*args, **kwargs)

List (GET) current VM replicas.

GET /vm/(hostname_or_uuid)/replica
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • data.full (boolean) – Return list of objects with all VM replica details (default: false)
Status Codes:

/vm/(hostname_or_uuid)/replica/(repname)

api.vm.replica.views.vm_replica(*args, **kwargs)

Show (GET), create (POST), remove (DELETE) or update (PUT) a VM replica.

Note

One slave server takes up the same amount of datacenter/compute node resources as master server.

GET /vm/(hostname_or_uuid)/replica/(repname)

Display slave VM info.

DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • repname (string) – required - Slave server identifier
Status Codes:
POST /vm/(hostname_or_uuid)/replica/(repname)

Create slave VM and replication service on target node.

DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • repname (string) – required - Slave server identifier
  • data.node (string) – required - Target compute node hostname
  • data.root_zpool (string) – New zpool for the VM zone or OS zone including data disk
  • data.disk_zpools (dict) – New zpools for VM’s disks ({disk_id: zpool})
  • data.reserve_resources (boolean) – Whether to reserve resources (vCPU, RAM) on target compute node (default: true); NOTE: When disabled, the resources must be available (and will be reserved) before the failover action.
  • data.sleep_time (integer) – Amount of time to pause (in seconds) between two syncs (default: 60)
  • data.enabled (boolean) – Start the replication service immediately after first sync (default: true)
  • data.bwlimit (integer) – Transfer rate limit in bytes (default: null => no limit)
Status Codes:
PUT /vm/(hostname_or_uuid)/replica/(repname)

Update replication service parameters on target node.

DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • repname (string) – required - Slave server identifier
  • data.reserve_resources – Whether to reserve resources (vCPU, RAM) on target compute node; NOTE: When disabled, the resources must be available (and will be reserved) before the failover action.
  • data.sleep_time (integer) – Amount of time to pause (in seconds) between two syncs
  • data.enabled (boolean) – Pause or start the replication service
  • data.bwlimit (integer) – Transfer rate limit in bytes
Status Codes:
DELETE /vm/(hostname_or_uuid)/replica/(repname)

Destroy slave VM and replication service on target node.

DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • repname (string) – required - Slave server identifier
Status Codes:

/vm/(hostname_or_uuid)/replica/(repname)/failover

api.vm.replica.views.vm_replica_failover(*args, **kwargs)

Fail over (PUT) to slave VM.

PUT /vm/(hostname_or_uuid)/replica/(repname)/failover

The slave VM will be promoted to a master VM and the current master VM will be stopped. The old master VM can be properly degraded to a slave VM by using PUT /vm/(hostname_or_uuid)/replica/(repname)/reinit.

DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • repname (string) – required - Slave server identifier
  • data.force (boolean) – Perform failover even if VM has pending tasks (default: false)
Status Codes:

/vm/(hostname_or_uuid)/replica/(repname)/reinit

api.vm.replica.views.vm_replica_reinit(*args, **kwargs)

Reinitialize (PUT) slave VM (former master VM).

PUT /vm/(hostname_or_uuid)/replica/(repname)/reinit

Degrade old master VM to slave VM and reinitialize/start replication after successful failover.

DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • repname (string) – required - Slave server identifier
Status Codes: