From bb10721ffc14abb86ab4d58b2b30fc676e88d394 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Fri, 13 Jan 2012 11:22:50 -0800 Subject: Convert nova.volume.api.API to use volume objects Change-Id: If6b78f7de814116bc93b273ec300dba02e63593d --- nova/vsa/api.py | 4 ++-- nova/vsa/manager.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'nova/vsa') diff --git a/nova/vsa/api.py b/nova/vsa/api.py index 9f17b6e4e..27baff151 100644 --- a/nova/vsa/api.py +++ b/nova/vsa/api.py @@ -246,9 +246,9 @@ class API(base.Base): vol_ref = self.volume_api.create(context, vol_size, - None, vol_name, vol['description'], + None, volume_type=vol_type, metadata=dict(to_vsa_id=str(vsa_id)), availability_zone=availability_zone) @@ -349,7 +349,7 @@ class API(base.Base): vol_name = volume['name'] LOG.info(_("VSA ID %(vsa_id)s: Deleting %(direction)s "\ "volume %(vol_name)s"), locals()) - self.volume_api.delete(context, volume['id']) + self.volume_api.delete(context, volume) except exception.ApiError: LOG.info(_("Unable to delete volume %s"), volume['name']) if force_delete: diff --git a/nova/vsa/manager.py b/nova/vsa/manager.py index d4c414106..850d99581 100644 --- a/nova/vsa/manager.py +++ b/nova/vsa/manager.py @@ -136,7 +136,7 @@ class VsaManager(manager.SchedulerDependentManager): locals()) if status == 'available': try: - # self.volume_api.update(context, volume['id'], + # self.volume_api.update(context, volume, # dict(attach_status="attached")) pass except Exception as ex: -- cgit