From 1ab59c999e918e86c4bd0224db9ef98b585138a4 Mon Sep 17 00:00:00 2001 From: yugsuo Date: Mon, 31 Dec 2012 16:03:54 +0800 Subject: Add conditions in compute APIRouter The Route of versions should add HTTP GET methods conditions, because it only has a 'show' action, thus other methods will not match. Fixes bug 1088530 Change-Id: Ib21381324cf7067015d0a6e36a0f0292eb902fe9 --- nova/api/openstack/compute/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/api/openstack/compute/__init__.py b/nova/api/openstack/compute/__init__.py index f88671733..92c84c13f 100644 --- a/nova/api/openstack/compute/__init__.py +++ b/nova/api/openstack/compute/__init__.py @@ -57,7 +57,8 @@ class APIRouter(nova.api.openstack.APIRouter): self.resources['versions'] = versions.create_resource() mapper.connect("versions", "/", controller=self.resources['versions'], - action='show') + action='show', + conditions={"method": ['GET']}) mapper.redirect("", "/") -- cgit