From 61008d058d4fba59bdeb0b94c36fad96f797b276 Mon Sep 17 00:00:00 2001 From: Steve Leon Date: Fri, 10 May 2013 09:49:40 -0700 Subject: [PATCH] Making the 'volume' param optional This is needed for ephemeral volume support. LP bug https://bugs.launchpad.net/reddwarf/+bug/1175719 Change-Id: I389bf6afe0b29713ff7f299c26731244045c165d --- reddwarfclient/instances.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reddwarfclient/instances.py b/reddwarfclient/instances.py index 5b567b2..66b091c 100644 --- a/reddwarfclient/instances.py +++ b/reddwarfclient/instances.py @@ -55,16 +55,17 @@ class Instances(base.ManagerWithFind): """ resource_class = Instance - def create(self, name, flavor_id, volume, databases=None, users=None, + def create(self, name, flavor_id, volume=None, databases=None, users=None, restorePoint=None): """ Create (boot) a new instance. """ body = {"instance": { "name": name, - "flavorRef": flavor_id, - "volume": volume + "flavorRef": flavor_id }} + if volume: + body["instance"]["volume"] = volume if databases: body["instance"]["databases"] = databases if users: