summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-01-05 16:41:50 -0600
committerEd Leafe <ed@leafe.com>2011-01-05 16:41:50 -0600
commitf67802d62ee530b4e81aaf108dfd3813c84550b2 (patch)
treea549aff26986d2004acc7d410d01ed605912e911 /nova/api
parent69ca1170952826ca40c447df0417eff3be730c3d (diff)
downloadnova-f67802d62ee530b4e81aaf108dfd3813c84550b2.tar.gz
nova-f67802d62ee530b4e81aaf108dfd3813c84550b2.tar.xz
nova-f67802d62ee530b4e81aaf108dfd3813c84550b2.zip
intermediate work
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/__init__.py14
-rw-r--r--nova/api/openstack/servers.py7
2 files changed, 16 insertions, 5 deletions
diff --git a/nova/api/__init__.py b/nova/api/__init__.py
index 26fed847b..ff936bed2 100644
--- a/nova/api/__init__.py
+++ b/nova/api/__init__.py
@@ -59,13 +59,23 @@ class API(wsgi.Router):
mapper.connect("/", controller=self.osapi_versions,
conditions=osapi_subdomain)
- mapper.connect("/v1.0/{path_info:.*}", controller=openstack.API(),
- conditions=osapi_subdomain)
+ mapper.connect("/v1.0/{path_info:.*}", controller=openstack.API())
mapper.connect("/", controller=self.ec2api_versions,
conditions=ec2api_subdomain)
mapper.connect("/services/{path_info:.*}", controller=ec2.API(),
conditions=ec2api_subdomain)
+
+# mapper.connect("/", controller=self.osapi_versions,
+# conditions=osapi_subdomain)
+# mapper.connect("/v1.0/{path_info:.*}", controller=openstack.API(),
+# conditions=osapi_subdomain)
+#
+# mapper.connect("/", controller=self.ec2api_versions,
+# conditions=ec2api_subdomain)
+# mapper.connect("/services/{path_info:.*}", controller=ec2.API(),
+# conditions=ec2api_subdomain)
+
mrh = metadatarequesthandler.MetadataRequestHandler()
for s in ['/latest',
'/2009-04-04',
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index c5cbe21ef..4bdb14d04 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -152,9 +152,10 @@ class Controller(wsgi.Controller):
try:
ctxt = req.environ['nova.context']
- self.compute_api.update_instance(ctxt,
- id,
- **update_dict)
+ # The ID passed in is actually the internal_id of the
+ # instance, not the value of the id column in the DB.
+ instance = self.compute_api.get_instance(ctxt, id)
+ self.compute_api.update_instance(ctxt, instance.id, **update_dict)
except exception.NotFound:
return faults.Fault(exc.HTTPNotFound())
return exc.HTTPNoContent()