diff options
| -rw-r--r-- | nova/volume/cinder.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/volume/cinder.py b/nova/volume/cinder.py index ed6b3cd59..590b7d8a0 100644 --- a/nova/volume/cinder.py +++ b/nova/volume/cinder.py @@ -170,8 +170,12 @@ class API(base.Base): def create(self, context, size, name, description, snapshot=None, volume_type=None, metadata=None, availability_zone=None): + if snapshot is not None: + snapshot_id = snapshot['id'] + else: + snapshot_id = None item = cinderclient(context).volumes.create(size, - snapshot, + snapshot_id, name, description, volume_type, |
