summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCerberus <matt.dietz@rackspace.com>2010-12-28 15:48:48 -0600
committerCerberus <matt.dietz@rackspace.com>2010-12-28 15:48:48 -0600
commit902df6eb4968743dd451e54cde27ce88fc83ddaa (patch)
tree16aa091004f04ff7fb588706481c72d6cd43e558
parent31d3aed581302e73b3f155b1dd72586324433e91 (diff)
Whoops
-rw-r--r--nova/api/openstack/backup_schedules.py4
-rw-r--r--nova/api/openstack/sharedipgroups.py15
2 files changed, 7 insertions, 12 deletions
diff --git a/nova/api/openstack/backup_schedules.py b/nova/api/openstack/backup_schedules.py
index 9b8e605f6..fcc07bdd3 100644
--- a/nova/api/openstack/backup_schedules.py
+++ b/nova/api/openstack/backup_schedules.py
@@ -23,7 +23,7 @@ from nova.api.openstack import faults
import nova.image.service
-def _entity_inst(inst):
+def _translate_keys(inst):
""" Coerces the backup schedule into proper dictionary format """
return dict(backupSchedule=inst)
@@ -41,7 +41,7 @@ class Controller(wsgi.Controller):
def index(self, req, server_id):
""" Returns the list of backup schedules for a given instance """
- return _entity_inst({})
+ return _translate_keys({})
def create(self, req, server_id):
""" No actual update method required, since the existing API allows
diff --git a/nova/api/openstack/sharedipgroups.py b/nova/api/openstack/sharedipgroups.py
index 32ebfa45a..845f5bead 100644
--- a/nova/api/openstack/sharedipgroups.py
+++ b/nova/api/openstack/sharedipgroups.py
@@ -21,17 +21,12 @@ from nova import wsgi
from nova.api.openstack import faults
-def _entity_list(entities):
- """ Coerces a list of shared IP groups into proper dictionary format """
- return dict(sharedIpGroups=entities)
-
-
-def _entity_inst(inst):
+def _translate_keys(inst):
""" Coerces a shared IP group instance into proper dictionary format """
return dict(sharedIpGroup=inst)
-def _entity_detail(inst):
+def _translate_detail_keys(inst):
""" Coerces a shared IP group instance into proper dictionary format with
correctly mapped attributes """
return dict(sharedIpGroup=inst)
@@ -47,11 +42,11 @@ class Controller(wsgi.Controller):
def index(self, req):
""" Returns a list of Shared IP Groups for the user """
- return _entity_list([])
+ return dict(sharedIpGroups=[])
def show(self, req, id):
""" Shows in-depth information on a specific Shared IP Group """
- return _entity_inst({})
+ return _translate_keys({})
def update(self, req, id):
""" You can't update a Shared IP Group """
@@ -63,7 +58,7 @@ class Controller(wsgi.Controller):
def detail(self, req, id):
""" Returns a complete list of Shared IP Groups """
- return _entity_detail({})
+ return _translate_detail_keys({})
def create(self, req):
""" Creates a new Shared IP group """