]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Move CloudFormation API to heat.api.cfn package
authorZane Bitter <zbitter@redhat.com>
Thu, 27 Sep 2012 12:57:50 +0000 (14:57 +0200)
committerZane Bitter <zbitter@redhat.com>
Thu, 27 Sep 2012 13:00:30 +0000 (15:00 +0200)
Change-Id: Ib0adf6f38da298b0b87d80272904767066b41087
Signed-off-by: Zane Bitter <zbitter@redhat.com>
bin/heat-api-cfn
etc/heat/heat-api-cfn-paste.ini
heat/api/aws/ec2token.py
heat/api/cfn/__init__.py [new file with mode: 0644]
heat/api/cfn/v1/__init__.py [moved from heat/api/v1/__init__.py with 96% similarity]
heat/api/cfn/v1/stacks.py [moved from heat/api/v1/stacks.py with 99% similarity]
heat/common/wsgi.py
heat/tests/test_api_cfn_v1.py

index 2bf0caf08cc8a1b4667f414d52b1b03f94a4d8f4..4535c45a6e93518f35dd92f1b413e17c8477a085 100755 (executable)
@@ -39,7 +39,7 @@ from heat.common import wsgi
 from heat.openstack.common import cfg
 from heat.openstack.common import log as logging
 
-LOG = logging.getLogger('heat.api')
+LOG = logging.getLogger('heat.api.cfn')
 
 if __name__ == '__main__':
     try:
index e09404bff3209faff18cf28fde4dec652ee47efe..88df75693418cd4959669585d16b7fef99fb37a7 100644 (file)
@@ -45,7 +45,7 @@ pipeline = versionnegotiation ec2authtoken authtoken auth-context cache cacheman
 
 [app:apicfnv1app]
 paste.app_factory = heat.common.wsgi:app_factory
-heat.app_factory = heat.api.v1:API
+heat.app_factory = heat.api.cfn.v1:API
 
 [filter:versionnegotiation]
 paste.filter_factory = heat.common.wsgi:filter_factory
index 58b8869bd5b2ee97520521c2dbf1c2223b6426fa..4c4c0bff062250af15556485776197eb4ffa08ca 100644 (file)
@@ -21,14 +21,13 @@ import gettext
 
 gettext.install('heat', unicode=1)
 
-from heat.api.v1 import stacks
 from heat.common import wsgi
 
 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/cfn/__init__.py b/heat/api/cfn/__init__.py
new file mode 100644 (file)
index 0000000..e8e4035
--- /dev/null
@@ -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.
similarity index 96%
rename from heat/api/v1/__init__.py
rename to heat/api/cfn/v1/__init__.py
index 9ea96535d25629926cd309fdb87cda2b3453151d..cf7c2cd2f8a497ae2a2615f52eed8fa7463c1841 100644 (file)
@@ -21,7 +21,7 @@ import gettext
 
 gettext.install('heat', unicode=1)
 
-from heat.api.v1 import stacks
+from heat.api.cfn.v1 import stacks
 from heat.common import wsgi
 
 from webob import Request
@@ -38,7 +38,7 @@ logger = logging.getLogger(__name__)
 class API(wsgi.Router):
 
     """
-    WSGI router for Heat v1 API requests.
+    WSGI router for Heat CloudFormation v1 API requests.
     """
 
     _actions = {
similarity index 99%
rename from heat/api/v1/stacks.py
rename to heat/api/cfn/v1/stacks.py
index a74f287952ee2077df2b42d34a0819d8cfee6d41..8218d2c39f164e2d0ba223aca83c5f029dea6b5a 100644 (file)
@@ -14,8 +14,9 @@
 #    under the License.
 
 """
-/stack endpoint for heat v1 API
+Stack endpoint for Heat CloudFormation v1 API.
 """
+
 import httplib
 import json
 import os
@@ -37,13 +38,13 @@ from heat.openstack.common import rpc
 import heat.openstack.common.rpc.common as rpc_common
 from heat.openstack.common import log as logging
 
-logger = logging.getLogger('heat.api.v1.stacks')
+logger = logging.getLogger('heat.api.cfn.v1.stacks')
 
 
 class StackController(object):
 
     """
-    WSGI controller for stacks resource in heat v1 API
+    WSGI controller for stacks resource in Heat CloudFormation v1 API
     Implements the API actions
     """
 
index 0a56618813c62dd313135019f636114b0ef585d5..11d990a13c5f1724198060237e6381b2ccec1f10 100644 (file)
@@ -666,7 +666,7 @@ class AppFactory(BasePasteFactory):
 
       [app:apiv1app]
       paste.app_factory = heat.common.wsgi:app_factory
-      heat.app_factory = heat.api.v1:API
+      heat.app_factory = heat.api.cfn.v1:API
 
     The WSGI app constructor must accept a ConfigOpts object and a local config
     dict as its two arguments.
index 0f9a127e8e1315aea6d2461a7acc95e4426bb455..ac81fe00b5da63a8461df3b5f5489c8dfe352dea 100644 (file)
@@ -34,7 +34,7 @@ from heat.openstack.common import rpc
 import heat.openstack.common.rpc.common as rpc_common
 from heat.common.wsgi import Request
 from heat.api.aws import exception
-import heat.api.v1.stacks as stacks
+import heat.api.cfn.v1.stacks as stacks
 
 
 @attr(tag=['unit', 'api-cfn-v1-stacks', 'StackController'])