summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnmesh Gurjar <unmesh.gurjar@vertex.co.in>2012-08-31 05:59:52 -0700
committerUnmesh Gurjar <unmesh.gurjar@vertex.co.in>2012-08-31 07:17:23 -0700
commit1591c94bdd5f2b746be362dee5f0dd4068994ea4 (patch)
tree2ded601477ea4e33638a9a1813198a367b237347
parent68abbbbcf02650d24d65a1455ddd40099616c2bd (diff)
downloadnova-1591c94bdd5f2b746be362dee5f0dd4068994ea4.tar.gz
nova-1591c94bdd5f2b746be362dee5f0dd4068994ea4.tar.xz
nova-1591c94bdd5f2b746be362dee5f0dd4068994ea4.zip
Fixed boot from snapshot failure.
Passed the snapshot_id to cinder client from create API. Previously it was failing since snapshot was being passed instead of snapshot_id. Fixes LP: #1029211 Change-Id: I4aa1aca9067b2a282b9b46d909ef8342bf933a46
-rw-r--r--nova/volume/cinder.py6
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,