disk#

async idem_vra.exec.vra.iaas.disk.attach_machine_disk(hub, ctx, p_id, blockDeviceId, **kwargs)[source]#

Attach machine disk Attach a disk to a machine. Performs POST /iaas/api/machines/{id}/disks

Parameters:
  • p_id (string) – (required in path) The ID of the machine.

  • blockDeviceId (string) – (required in body) The id of the existing block device

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

  • scsiController (string) – (optional in body) Deprecated: The SCSI controller to be assigned

  • name (string) – (optional in body) A human-friendly name used as an identifier in APIs that support this option.

  • description (string) – (optional in body) A human-friendly description.

  • unitNumber (string) – (optional in body) Deprecated: The Unit Number to be assigned

  • diskAttachmentProperties (object) – (optional in body) Disk Attachment specific properties

async idem_vra.exec.vra.iaas.disk.create_block_device_snapshot(hub, ctx, p_id, **kwargs)[source]#

Create snapshot operation for Block Device Second day create snapshot operation for Block device Performs POST /iaas/api/block-devices/{id}/operations/snapshots

Parameters:
  • p_id (string) – (required in path) The ID of the block device.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

  • name (string) – (optional in body) A human-friendly name used as an identifier in APIs that support this option.

  • description (string) – (optional in body) A human-friendly description.

  • snapshotProperties (object) – (optional in body) Cloud specific snapshot properties supplied in as name value pairs

  • tags (array) – (optional in body) A set of tag keys and optional values that have to be set on the snapshot in the cloud. Currently supported for Azure Snapshots

async idem_vra.exec.vra.iaas.disk.create_block_device(hub, ctx, capacityInGB, name, projectId, **kwargs)[source]#
Create BlockDevice Following disk custom properties can be passed while creating a block device:

. dataStore: Defines name of the datastore in which the disk has to be provisioned. . storagePolicy: Defines name of the storage policy in which the disk has to be provisioned. If name of the datastore is specified in the custom properties then, datastore takes precedence. . provisioningType: Defines the type of provisioning. For eg. thick/thin. . resourceGroupName: Defines the Azure resource group name where the disk needs to be provisioned. Performs POST /iaas/api/block-devices

Parameters:
  • capacityInGB (integer) – (required in body) Capacity of the block device in GB.

  • name (string) – (required in body) A human-friendly name used as an identifier in APIs that support this option.

  • projectId (string) – (required in body) The id of the project the current user belongs to.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

  • sourceReference (string) – (optional in body) Reference to URI using which the block device has to be created.

  • customProperties (object) – (optional in body) Additional custom properties that may be used to extend this resource.

  • encrypted (boolean) – (optional in body) Indicates whether the block device should be encrypted or not.

  • deploymentId (string) – (optional in body) The id of the deployment that is associated with this resource

  • description (string) – (optional in body) A human-friendly description.

  • diskContentBase64 (string) – (optional in body) Content of a disk, base64 encoded.

  • persistent (boolean) – (optional in body) Indicates whether the block device survives a delete action.

  • constraints (array) – (optional in body) Constraints that are used to drive placement policies for the block device that is produced from this specification. Constraint expressions are matched against tags on existing placement targets.

  • tags (array) – (optional in body) A set of tag keys and optional values that should be set on any resource that is produced from this specification.

async idem_vra.exec.vra.iaas.disk.delete_block_device_snapshot(hub, ctx, p_id, p_id1, **kwargs)[source]#

Delete snapshot operation for Block device Second day delete snapshot operation for Block device Performs DELETE /iaas/api/block-devices/{id}/snapshots/{id1}

Parameters:
  • p_id (string) – (required in path) The ID of the block device.

  • p_id1 (string) – (required in path) Snapshot id to delete.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.delete_block_device(hub, ctx, p_id, **kwargs)[source]#
Delete a BlockDevice Delete a BlockDevice

. A block device cannot be deleted when attached to a machine. . A block device with persistent property set to ‘false’ is deleted. . A block device with persistent property set to ‘true’ needs an additional parameter ‘purge’ to be set to true, for deletion. Performs DELETE /iaas/api/block-devices/{id}

Parameters:
  • p_id (string) – (required in path) The ID of the block device.

  • purge (boolean) – (optional in query) Indicates if the disk has to be completely destroyed or should be kept in the system. Valid only for block devices with ‘persistent’ set to true.

  • forceDelete (boolean) – (optional in query) Controls whether this is a force delete operation. If true, best effort is made for deleting this block device. Use with caution as force deleting may cause inconsistencies between the cloud provider and vRA.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.delete_machine_disk(hub, ctx, p_id, p_diskId, **kwargs)[source]#

Delete machine disk Remove a disk from a given machine. Performs DELETE /iaas/api/machines/{id}/disks/{diskId}

Parameters:
  • p_id (string) – (required in path) The ID of the machine.

  • p_diskId (string) – (required in path) The ID of the disk.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.get_block_device(hub, ctx, p_id, **kwargs)[source]#

Get BlockDevice Get a single BlockDevice Performs GET /iaas/api/block-devices/{id}

Parameters:
  • p_id (string) – (required in path) The ID of the block device.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.get_block_devices(hub, ctx, **kwargs)[source]#

Get BlockDevices Get all BlockDevices Performs GET /iaas/api/block-devices

Parameters:
  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

  • top (integer) – (optional in query) Number of records you want to get.

  • skip (integer) – (optional in query) Number of records you want to skip.

  • count (boolean) – (optional in query) Flag which when specified, regardless of the assigned value, shows the total number of records. If the collection has a filter it shows the number of records matching the filter.

  • filter (string) – (optional in query) Filter the results by a specified predicate expression. Operators: eq, ne, and, or.

async idem_vra.exec.vra.iaas.disk.get_disk_snapshot(hub, ctx, p_id, p_id1, **kwargs)[source]#

Get disk snapshot Get snapshot with a given id for specific disk Performs GET /iaas/api/block-devices/{id}/snapshots/{id1}

Parameters:
  • p_id (string) – (required in path) The ID of the disk.

  • p_id1 (string) – (required in path) The ID of the snapshot.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.get_disk_snapshots(hub, ctx, p_id, **kwargs)[source]#

Get disk snapshots information Get disk snapshots information Performs GET /iaas/api/block-devices/{id}/snapshots

Parameters:
  • p_id (string) – (required in path) The ID of the disk.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.get_machine_disk(hub, ctx, p_id, p_diskId, **kwargs)[source]#

Get machine disk Get disk with a given id for specific machine Performs GET /iaas/api/machines/{id}/disks/{diskId}

Parameters:
  • p_id (string) – (required in path) The ID of the machine.

  • p_diskId (string) – (required in path) The ID of the disk.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.get_machine_disks(hub, ctx, p_id, **kwargs)[source]#

Get machine disks Get all machine disks Performs GET /iaas/api/machines/{id}/disks

Parameters:
  • p_id (string) – (required in path) The ID of the machine.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.promote_disk(hub, ctx, p_id, **kwargs)[source]#

Promote operation on disk Second day promote operation on disk. Applicable for vSphere Block Devices only Performs POST /iaas/api/block-devices/{id}/operations/promote

Parameters:
  • p_id (string) – (required in path) The id of the Disk.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.resize_block_device(hub, ctx, p_id, q_capacityInGB, **kwargs)[source]#

Resize BlockDevice Resize operation on block device. Performs POST /iaas/api/block-devices/{id}

Parameters:
  • p_id (string) – (required in path) The ID of the block device.

  • q_capacityInGB (integer) – (required in query) Resize Capacity in GB

  • useSdrs (boolean) – (optional in query) Only applicable for vSphere block-devices deployed on SDRS cluster. If set to true, SDRS Recommendation will be used for resize operation.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about

async idem_vra.exec.vra.iaas.disk.revert_disk_snapshot(hub, ctx, p_id, q_sid, **kwargs)[source]#

Revert snapshot operation for Block device Second day revert snapshot operation for Block device Performs POST /iaas/api/block-devices/{id}/operations/revert

Parameters:
  • p_id (string) – (required in path) The id of the Disk.

  • q_sid (string) – (required in query) Snapshot id to revert.

  • apiVersion (string) – (optional in query) The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about