diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2a10dac..7a3aa3c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ Changelog ========= +v1.7.0 (2024-11-21) +------------------- + +* Fix volume.increase_size() +* Fix volumes.get() + v1.6.1 (2023-10-02) ------------------- diff --git a/datacrunch/__version__.py b/datacrunch/__version__.py index 26e0f58..81af483 100644 --- a/datacrunch/__version__.py +++ b/datacrunch/__version__.py @@ -1 +1 @@ -VERSION = '1.6.1' +VERSION = '1.7.0' diff --git a/datacrunch/constants.py b/datacrunch/constants.py index afedab2..15a4681 100644 --- a/datacrunch/constants.py +++ b/datacrunch/constants.py @@ -13,7 +13,7 @@ class VolumeActions: ATTACH = 'attach' DETACH = 'detach' RENAME = 'rename' - INCREASE_SIZE = 'increase-size' + INCREASE_SIZE = 'resize' DELETE = 'delete' CLONE = 'clone' diff --git a/datacrunch/volumes/volumes.py b/datacrunch/volumes/volumes.py index f6bee53..60ce1ac 100644 --- a/datacrunch/volumes/volumes.py +++ b/datacrunch/volumes/volumes.py @@ -179,7 +179,21 @@ def create_from_dict(cls: 'Volume', volume_dict: dict) -> 'Volume': :return: Volume :rtype: Volume """ - return cls(**volume_dict) + + return cls( + id = volume_dict['id'], + status = volume_dict['status'], + name = volume_dict['name'], + size = volume_dict['size'], + type = volume_dict['type'], + is_os_volume = volume_dict['is_os_volume'], + created_at = volume_dict['created_at'], + target = volume_dict['target'], + location = volume_dict['location'], + instance_id = volume_dict['instance_id'], + ssh_key_ids = volume_dict['ssh_key_ids'], + deleted_at = volume_dict.get('deleted_at'), + ) def __str__(self) -> str: """Returns a string of the json representation of the volume