volume
¶
Manage storage volumes.
- class compute.storage.volume.DiskConfig(disk_type: str, source: str | pathlib.Path, target: str, readonly: bool = False)¶
Disk XML config builder.
Generate XML config for attaching or detaching storage volumes to compute instances.
- __init__(disk_type: str, source: str | pathlib.Path, target: str, readonly: bool = False) None ¶
- to_xml() str ¶
Return XML config for libvirt.
- class compute.storage.volume.Volume(pool: virStoragePool, vol: virStorageVol)¶
Storage volume manipulating class.
- __init__(pool: virStoragePool, vol: virStorageVol)¶
Initialise Volume.
- Parameters:
pool – libvirt virStoragePool object
vol – libvirt virStorageVol object
- clone(vol_conf: VolumeConfig) None ¶
Make a copy of volume to the same storage pool.
- Parameters:
VolumeInfo (vol_info) – New storage volume dataclass object
- delete() None ¶
Delete volume from storage pool.
- dump_xml() str ¶
Return volume XML description as string.