Implements operations on volumes residing on VMware datastores.
Bases: object
Manages volume operations.
Cancel retrieval of results if necessary.
Parameters: | retrieve_result – Result from RetrievePropertiesEx |
---|
Clone backing.
If the clone_type is ‘full’, then a full clone of the source volume backing will be created. Else, if it is ‘linked’, then a linked clone of the source volume backing will be created.
Parameters: |
|
---|
Continue retrieval of results if necessary.
Parameters: | retrieve_result – Result from RetrievePropertiesEx |
---|
Copy contents of the src vmdk file to dest vmdk file.
During the copy also coalesce snapshots of src if present. dest_vmdk_file_path will be created if not already present.
Parameters: |
|
---|
Create backing for the volume.
Creates a VM with one VMDK based on the given inputs.
Parameters: |
|
---|---|
Returns: | Reference to the created backing entity |
Creates child folder with given name under the given parent folder.
The method first checks if a child folder already exists, if it does, then it returns a moref for the folder, else it creates one and then return the moref.
Parameters: |
|
---|---|
Returns: | Reference to the child folder with input name if it already exists, else create one and return the reference |
Create snapshot of the backing with given name and description.
Parameters: |
|
---|---|
Returns: | Created snapshot entity reference |
Delete the backing.
Parameters: | backing – Managed object reference to the backing |
---|
Delete file or folder on the datastore.
Parameters: | file_path – Datastore path of the file or folder |
---|
Delete a given snapshot from volume backing.
Parameters: |
|
---|
Delete given vmdk files.
Parameters: |
|
---|
Get the backing based on name.
Parameters: | name – Name of the backing |
---|---|
Returns: | Managed object reference to the backing |
Get datastore where the backing resides.
Parameters: | backing – Reference to the backing |
---|---|
Returns: | Datastore reference to which the backing belongs |
Get parent datacenter up the hierarchy via ‘parent’ property.
Parameters: | child – Reference of the child entity |
---|---|
Returns: | Parent Datacenter of the param child entity |
Get accessible datastores and resource pool of the host.
Parameters: | host – Managed object reference of the host |
---|---|
Returns: | Datastores accessible to the host and resource pool to which the host belongs to |
Get name of the managed entity.
Parameters: | entity – Reference to the entity |
---|---|
Returns: | Name of the managed entity |
Get host under which instance is present.
Parameters: | instance – Managed object reference of the instance VM |
---|---|
Returns: | Host managing the instance VM |
Get all host from the inventory.
Returns: | All the hosts from the inventory |
---|
Get path name of the backing.
Parameters: | backing – Reference to the backing entity |
---|---|
Returns: | Path name of the backing |
Get snapshot of the backing with given name.
Parameters: |
|
---|---|
Returns: | Snapshot entity of the backing with given name |
Get datastore summary.
Parameters: | datastore – Reference to the datastore |
---|---|
Returns: | ‘summary’ property of the datastore |
Get the vmdk file name of the backing.
The vmdk file path of the backing returned is of the form: “[datastore1] my_folder/my_vm.vmdk”
Parameters: | backing – Reference to the backing |
---|---|
Returns: | VMDK file path of the backing |
Get the vmFolder.
Parameters: | datacenter – Reference to the datacenter entity |
---|---|
Returns: | vmFolder property of the datacenter |
Move the volume backing to the folder.
Parameters: |
|
---|
Relocates backing to the input datastore and resource pool.
The implementation uses moveAllDiskBackingsAndAllowSharing disk move type.
Parameters: |
|
---|
Split the datastore path to components.
return the datastore name, relative folder path and the file name
E.g. datastore_path = [datastore1] my_volume/my_volume.vmdk, returns (datastore1, my_volume/, my_volume.vmdk)
Parameters: | datastore_path – Datastore path of a file |
---|---|
Returns: | Parsed datastore name, relative folder path and file name |