Change ownership of file or directory
Parameters: |
|
---|
Change ownership of file or directory for an id mapped environment
Parameters: |
|
---|
Copy a disk image to an existing directory
Parameters: |
|
---|
Create COW image
Creates a COW image with the given backing file
Parameters: |
|
---|
Create a disk image
Parameters: |
|
---|
Extract a snapshot from a disk image. Note that nobody should write to the disk image during this operation.
Parameters: |
|
---|
Grab image.
Delete (unlink) file
Open file
see built-in file() documentation for more details
Find root device path for instance
May be file or device
Determine the architecture of the guest (or host).
This method determines the CPU architecture that must be supported by the hypervisor. It gets the (guest) arch info from image_meta properties, and it will fallback to the nova-compute (host) arch if no architecture info is provided in image_meta.
Parameters: | image_meta – the metadata associated with the instance image |
---|---|
Returns: | guest (or host) architecture |
Get the backing file of a disk image
Parameters: | path – Path to the disk image |
---|---|
Returns: | a path to the image’s backing store |
Get the (virtual) size of a disk image
Parameters: |
|
---|---|
Returns: | Size (in bytes) of the given disk image as it would be seen by a virtual machine. |
Retrieve disk type (raw, qcow2, lvm) for given file.
Get free/used/total space info for a filesystem
Parameters: | path – Any dirent on the filesystem | ||||||
---|---|---|---|---|---|---|---|
Returns: | A dict containing:
|
Determine the correct path for instance storage.
This method determines the directory name for instance storage, while handling the fact that we changed the naming style to something more unique in the grizzly release.
Parameters: |
|
---|---|
Returns: | a path to store information about that instance |
Get the the instance path on destination node while live migration.
This method determines the directory name for instance storage on destination node, while live migration.
Parameters: |
|
---|---|
Returns: | a path to store information about that instance |
Check if the given source is mounted at given destination point.
Read contents of file
Parameters: | path – File to read |
---|
Returns if path exists
Pick the libvirt primary backend driver name
If the hypervisor supports multiple backend drivers we have to tell libvirt which one should be used.
Xen supports the following drivers: “tap”, “tap2”, “phy”, “file”, or “qemu”, being “qemu” the preferred one. Qemu only supports “qemu”.
Parameters: | is_block_dev – |
---|---|
Returns: | driver_name or None |
Write the given contents to a file
Parameters: |
|
---|