Skip to content

Commit db48f79

Browse files
committed
Merge branch 'release/v1.3.0' into develop
2 parents 73597d2 + b55f70b commit db48f79

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

CHANGELOG.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
Changelog
22
=========
33

4+
v1.2.0 (2023-05-25)
5+
-------------------
6+
47
* Added support for volume cloning
58

6-
v1.2.0 (2023-05-25)
9+
v1.2.0 (2023-04-24)
710
-------------------
811

912
* Added support for deploying a new instance with existing volumes

datacrunch/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '1.1.2'
1+
VERSION = '1.3.0'

examples/storage_volumes.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
all_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
2830
nvme_volume = datacrunch.volumes.create(type=NVMe,
@@ -51,5 +53,14 @@
5153
# increase volume size
5254
datacrunch.volumes.increase_size(nvme_volume_id, 300)
5355

56+
# clone volume
57+
datacrunch.volumes.clone(nvme_volume_id)
58+
59+
# clone volume and give it a new name and storage type (from NVMe to HDD)
60+
datacrunch.volumes.clone(nvme_volume_id, name="my-cloned-volume", type=HDD)
61+
62+
# clone multiple volumes at once
63+
datacrunch.volumes.clone([nvme_volume_id, hdd_volume_id])
64+
5465
# delete volumes
5566
datacrunch.volumes.delete([nvme_volume_id, hdd_volume_id])

0 commit comments

Comments
 (0)