File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919all_volumes = datacrunch .volumes .get ()
2020
2121# Get all attached volumes
22- all_attached_volumes = datacrunch .volumes .get (status = datacrunch .constants .volume_status .ATTACHED )
22+ all_attached_volumes = datacrunch .volumes .get (
23+ status = datacrunch .constants .volume_status .ATTACHED )
2324
2425# Get volume by id
25- random_volume = datacrunch .volumes .get_by_id ("0c41e387-3dd8-495f-a285-e861527f2f3d" )
26+ random_volume = datacrunch .volumes .get_by_id (
27+ "0c41e387-3dd8-495f-a285-e861527f2f3d" )
2628
2729# Create a 200 GB detached NVMe volume
2830nvme_volume = datacrunch .volumes .create (type = NVMe ,
5153# increase volume size
5254datacrunch .volumes .increase_size (nvme_volume_id , 300 )
5355
56+ # clone volume
57+ datacrunch .volumes .clonse (nvme_volume_id )
58+
5459# delete volumes
5560datacrunch .volumes .delete ([nvme_volume_id , hdd_volume_id ])
You can’t perform that action at this time.
0 commit comments