From 5a72df366258e9c61c89ae2d1185c5016f721115 Mon Sep 17 00:00:00 2001 From: "Jay Lau (Guangya Liu)" <liugya@cn.ibm.com> Date: Fri, 2 Jan 2015 04:04:26 -0500 Subject: [PATCH] Make baymodel operations working Change-Id: I3d971e52b4032538cbfa089dd5b5a9ad88d4088c --- magnum/conductor/api.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/magnum/conductor/api.py b/magnum/conductor/api.py index e53101ea8a..f80478e8c9 100644 --- a/magnum/conductor/api.py +++ b/magnum/conductor/api.py @@ -30,18 +30,18 @@ class API(rpc_service.API): # Bay Model Operations - def baymodel_create(self, ctxt, bay): - return self._call('baymodel_create', ctxt=ctxt, bay=bay) + def baymodel_create(self, ctxt, baymodel): + return baymodel.create(ctxt) - def baymodel_list(self, context, limit, marker, sort_key, sort_dir): - return objects.BayModel.list(context, limit, marker, sort_key, - sort_dir) + def baymodel_list(self, ctxt, limit, marker, sort_key, sort_dir): + return objects.BayModel.list(ctxt, limit, marker, sort_key, sort_dir) def baymodel_delete(self, ctxt, uuid): - return self._call('baymodel_delete', ctxt=ctxt, uuid=uuid) + baymodel = objects.BayModel.get_by_uuid(uuid) + return baymodel.destroy() def baymodel_show(self, ctxt, uuid): - return self._call('baymodel_show', ctxt=ctxt, uuid=uuid) + return objects.BayModel.get_by_uuid(uuid) # Bay Operations