[scaleway] Resolve TODOs
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6a3e50a6 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6a3e50a6 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6a3e50a6 Branch: refs/heads/trunk Commit: 6a3e50a686487df958a702f76f147b8270fa9496 Parents: 3315e97 Author: Daniel Hunsaker <[email protected]> Authored: Tue Jun 5 10:09:23 2018 -0600 Committer: Daniel Hunsaker <[email protected]> Committed: Tue Jun 5 10:09:23 2018 -0600 ---------------------------------------------------------------------- libcloud/compute/drivers/scaleway.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/6a3e50a6/libcloud/compute/drivers/scaleway.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/scaleway.py b/libcloud/compute/drivers/scaleway.py index bbe726d..f33a186 100644 --- a/libcloud/compute/drivers/scaleway.py +++ b/libcloud/compute/drivers/scaleway.py @@ -141,8 +141,10 @@ class ScalewayNodeDriver(NodeDriver): name = 'Scaleway' website = 'https://www.scaleway.com/' - SNAPSHOT_STATE_MAP = { # TODO map all states - 'snapshotting': VolumeSnapshotState.CREATING + SNAPSHOT_STATE_MAP = { + 'snapshotting': VolumeSnapshotState.CREATING, + 'available': VolumeSnapshotState.AVAILABLE, + 'error': VolumeSnapshotState.ERROR } def list_locations(self): @@ -245,7 +247,7 @@ class ScalewayNodeDriver(NodeDriver): 'organization': self.key, 'name': name, 'arch': node.extra['arch'], - 'root_volume': node.extra['volumes']['0']['id'] # TODO check this + 'root_volume': node.extra['volumes']['0']['id'] } response = self.connection.request('/images', data=json.dumps(data), region=region,
