summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorCerberus <matt.dietz@rackspace.com>2010-12-27 12:08:22 -0600
committerCerberus <matt.dietz@rackspace.com>2010-12-27 12:08:22 -0600
commit3490fde00fd8bfb00834b1085de62d86c9c9d061 (patch)
treedb349e6a5c063206549e1c5984ad25b7daa6f82f /nova/api
parent59c3e5bf0dda0c0c1b77307a339f3102c7179885 (diff)
A few fixes
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/backup_schedules.py5
-rw-r--r--nova/api/openstack/servers.py3
-rw-r--r--nova/api/openstack/sharedipgroups.py1
3 files changed, 7 insertions, 2 deletions
diff --git a/nova/api/openstack/backup_schedules.py b/nova/api/openstack/backup_schedules.py
index fc70b5c6c..c484023e0 100644
--- a/nova/api/openstack/backup_schedules.py
+++ b/nova/api/openstack/backup_schedules.py
@@ -24,12 +24,14 @@ import nova.image.service
class Controller(wsgi.Controller):
+ """ The backup schedule API controller for the Openstack API """
def __init__(self):
pass
def index(self, req, server_id):
- return faults.Fault(exc.HTTPNotFound())
+ """ Returns the list of backup schedules for a given instance """
+ return dict(backup_schedules=[])
def create(self, req, server_id):
""" No actual update method required, since the existing API allows
@@ -37,4 +39,5 @@ class Controller(wsgi.Controller):
return faults.Fault(exc.HTTPNotFound())
def delete(self, req, server_id, id):
+ """ Deletes an existing backup schedule """
return faults.Fault(exc.HTTPNotFound())
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 8d60e2cab..c8851387d 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -43,6 +43,7 @@ def _entity_list(entities):
def _entity_detail(inst):
""" Maps everything to Rackspace-like attributes for return"""
power_mapping = {
+ None: 'build',
power_state.NOSTATE: 'build',
power_state.RUNNING: 'active',
power_state.BLOCKED: 'active',
@@ -153,7 +154,7 @@ class Controller(wsgi.Controller):
try:
self.compute_api.update_instance(req.environ['nova.context'],
- instance['id'],
+ inst_dict['id'],
**update_dict)
except exception.NotFound:
return faults.Fault(exc.HTTPNotFound())
diff --git a/nova/api/openstack/sharedipgroups.py b/nova/api/openstack/sharedipgroups.py
index 4f4bb1016..7e98b0712 100644
--- a/nova/api/openstack/sharedipgroups.py
+++ b/nova/api/openstack/sharedipgroups.py
@@ -18,6 +18,7 @@
from webob import exc
from nova import wsgi
+from nova.api.openstack import faults
class Controller(wsgi.Controller):