From 9ccf18433e421bb769b77ce0991a3ffca05adc36 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Tue, 21 Aug 2012 11:01:25 +0100 Subject: [PATCH] heat API : move aws common files from api/v1 to api/aws Move aws api common files to common directory (so they can be more easily reused by cloudwatch) Change-Id: I1a455ef11226dd960503bac5d79fa5c28607a1f6 Signed-off-by: Steven Hardy --- etc/heat-api-paste.ini | 2 +- heat/api/aws/__init__.py | 14 ++++++++++++++ heat/api/{v1 => aws}/ec2token.py | 0 heat/api/{v1 => aws}/exception.py | 0 heat/api/v1/__init__.py | 2 +- heat/api/v1/stacks.py | 2 +- heat/tests/test_api_v1.py | 2 +- 7 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 heat/api/aws/__init__.py rename heat/api/{v1 => aws}/ec2token.py (100%) rename heat/api/{v1 => aws}/exception.py (100%) diff --git a/etc/heat-api-paste.ini b/etc/heat-api-paste.ini index 7db8d88a56..5ceeae0694 100644 --- a/etc/heat-api-paste.ini +++ b/etc/heat-api-paste.ini @@ -63,7 +63,7 @@ heat.filter_factory = heat.api.middleware.cache_manage:CacheManageFilter paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory [filter:ec2authtoken] -paste.filter_factory = heat.api.v1.ec2token:EC2Token_filter_factory +paste.filter_factory = heat.api.aws.ec2token:EC2Token_filter_factory auth_uri = http://127.0.0.1:5000/v2.0 keystone_ec2_uri = http://localhost:5000/v2.0/ec2tokens diff --git a/heat/api/aws/__init__.py b/heat/api/aws/__init__.py new file mode 100644 index 0000000000..e8e4035941 --- /dev/null +++ b/heat/api/aws/__init__.py @@ -0,0 +1,14 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. diff --git a/heat/api/v1/ec2token.py b/heat/api/aws/ec2token.py similarity index 100% rename from heat/api/v1/ec2token.py rename to heat/api/aws/ec2token.py diff --git a/heat/api/v1/exception.py b/heat/api/aws/exception.py similarity index 100% rename from heat/api/v1/exception.py rename to heat/api/aws/exception.py diff --git a/heat/api/v1/__init__.py b/heat/api/v1/__init__.py index 8e6aa8187d..9ea96535d2 100644 --- a/heat/api/v1/__init__.py +++ b/heat/api/v1/__init__.py @@ -28,7 +28,7 @@ from webob import Request import webob from heat import utils from heat.common import context -from heat.api.v1 import exception +from heat.api.aws import exception from heat.openstack.common import log as logging diff --git a/heat/api/v1/stacks.py b/heat/api/v1/stacks.py index e21ed55a05..0b9ac175ad 100644 --- a/heat/api/v1/stacks.py +++ b/heat/api/v1/stacks.py @@ -24,7 +24,7 @@ import sys import re import urlparse import webob -from heat.api.v1 import exception +from heat.api.aws import exception from heat.common import wsgi from heat.common import config from heat.common import context diff --git a/heat/tests/test_api_v1.py b/heat/tests/test_api_v1.py index bf9bff480c..d725909359 100644 --- a/heat/tests/test_api_v1.py +++ b/heat/tests/test_api_v1.py @@ -32,7 +32,7 @@ from heat.openstack.common import cfg from heat.openstack.common import rpc import heat.openstack.common.rpc.common as rpc_common from heat.common.wsgi import Request -from heat.api.v1 import exception +from heat.api.aws import exception import heat.api.v1.stacks as stacks