]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Consolidated api-paste.ini file
authorSteve Baker <sbaker@redhat.com>
Sat, 13 Apr 2013 17:14:11 +0000 (10:14 -0700)
committerSteve Baker <sbaker@redhat.com>
Tue, 23 Apr 2013 21:18:15 +0000 (09:18 +1200)
Load a single api-paste.ini file, specified by config
Delete unused paste.ini files
Update docs for new paste.ini and config arrangement

There will be a corresponding devstack change, and once this is in
I will email the packagers on the packaging implications

Change-Id: Ic10b1a486094d15bfd832f0f934e6268ec323085

doc/source/getting_started/on_fedora.rst
doc/source/getting_started/on_ubuntu.rst
doc/source/man/heat-api-cfn.rst
doc/source/man/heat-api-cloudwatch.rst
doc/source/man/heat-api.rst
docs/GettingStarted.rst
etc/heat/api-paste.ini [new file with mode: 0644]
etc/heat/heat-api-cfn-paste.ini [deleted file]
etc/heat/heat-api-cloudwatch-paste.ini [deleted file]
etc/heat/heat-api-paste.ini [deleted file]
heat/common/config.py

index d7917632f82d6c56bfdd05623addf063248794d2..90d6ddea81efdfdb3bb5ee65fbd78cc2c175dbe8 100644 (file)
@@ -157,9 +157,9 @@ In the heat directory, run the install script::
 
 If running OpenStack grizzly installed via tools/openstack, it is necessary to modify the default service user password::
 
-    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-cfn-paste.ini
-    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-cloudwatch-paste.ini
-    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-paste.ini
+    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-cfn.conf
+    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-cloudwatch.conf
+    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api.conf
 
 Source the keystone credentials created with tools/openstack
 ------------------------------------------------------------
index a582b0f2d5797920feec67f3686d8bf138351304..70bdac44ad582f3e6a9ce509d386c5e626ea1a46 100644 (file)
@@ -101,13 +101,13 @@ Modify configuration for admin password
 Later a keystone user called '''heat''' will be created. At this point a password for that user needs to be chosen.
 The following files will need editing:
 
-- /etc/heat/heat-api-cfn-paste.ini
-- /etc/heat/heat-api-cloudwatch-paste.ini
-- /etc/heat/heat-api-paste.ini
+- /etc/heat/heat-api-cfn.conf
+- /etc/heat/heat-api-cloudwatch.conf
+- /etc/heat/heat-api.conf
 
 ::
 
-    [filter:authtoken]
+    [keystone_authtoken]
     admin_password=<heat admin password>
 
 
index 57760a383426775a57a08c70029a5750bf39a60d..9fb7220e74f08af6c91eaa39502feff58dec8e79 100644 (file)
@@ -37,4 +37,3 @@ FILES
 ========
 
 * /etc/heat/heat-api-cfn.conf
-* /etc/heat/heat-api-cfn-paste.ini
\ No newline at end of file
index 488cbebd91a72cc76a8ba3e68bfae306177cd7cf..192ff251786386400365433fec8cd5f14fb374d8 100644 (file)
@@ -31,4 +31,3 @@ FILES
 ========
 
 * /etc/heat/heat-api-cloudwatch.conf
-* /etc/heat/heat-api-cloudwatch-paste.ini
\ No newline at end of file
index 1bcf86bf944430212aec547aac8203943be1dfbb..3b3823992a653623a15aa287ac96b093a4ede9a2 100644 (file)
@@ -37,4 +37,3 @@ FILES
 ========
 
 * /etc/heat/heat-api.conf
-* /etc/heat/heat-api-paste.ini
\ No newline at end of file
index 13f6731638c4ba26c705dc3e5f23bfd19b6fb525..e0472e25f370ba60d2763edf5a1c88b068ae1281 100644 (file)
@@ -155,9 +155,9 @@ In the heat directory, run the install script::
 
 If running OpenStack grizzly installed via tools/openstack, it is necessary to modify the default service user password::
 
-    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-cfn-paste.ini
-    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-cloudwatch-paste.ini
-    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-paste.ini
+    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-cfn.conf
+    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api-cloudwatch.conf
+    sudo sed -i "s/verybadpass/secrete/" /etc/heat/heat-api.conf
 
 Source the keystone credentials created with tools/openstack
 ------------------------------------------------------------
diff --git a/etc/heat/api-paste.ini b/etc/heat/api-paste.ini
new file mode 100644 (file)
index 0000000..9ac9f71
--- /dev/null
@@ -0,0 +1,56 @@
+
+# heat-api pipeline
+[pipeline:heat-api]
+pipeline = versionnegotiation authtoken context apiv1app
+
+# heat-api pipeline for custom cloud backends
+# i.e. in heat-api.conf:
+#   [paste_deploy]
+#   flavor = custombackend
+#
+[pipeline:heat-api-custombackend]
+pipeline = versionnegotiation context custombackendauth apiv1app
+
+# heat-api-cfn pipeline
+[pipeline:heat-api-cfn]
+pipeline = cfnversionnegotiation ec2authtoken authtoken context apicfnv1app
+
+# heat-api-cloudwatch pipeline
+[pipeline:heat-api-cloudwatch]
+pipeline = versionnegotiation ec2authtoken authtoken context apicwapp
+
+[app:apiv1app]
+paste.app_factory = heat.common.wsgi:app_factory
+heat.app_factory = heat.api.openstack.v1:API
+
+[app:apicfnv1app]
+paste.app_factory = heat.common.wsgi:app_factory
+heat.app_factory = heat.api.cfn.v1:API
+
+[app:apicwapp]
+paste.app_factory = heat.common.wsgi:app_factory
+heat.app_factory = heat.api.cloudwatch:API
+
+[filter:versionnegotiation]
+paste.filter_factory = heat.common.wsgi:filter_factory
+heat.filter_factory = heat.api.openstack:version_negotiation_filter
+
+[filter:cfnversionnegotiation]
+paste.filter_factory = heat.common.wsgi:filter_factory
+heat.filter_factory = heat.api.cfn:version_negotiation_filter
+
+[filter:cwversionnegotiation]
+paste.filter_factory = heat.common.wsgi:filter_factory
+heat.filter_factory = heat.api.cloudwatch:version_negotiation_filter
+
+[filter:context]
+paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory
+
+[filter:ec2authtoken]
+paste.filter_factory = heat.api.aws.ec2token:EC2Token_filter_factory
+
+[filter:authtoken]
+paste.filter_factory = heat.common.auth_token:filter_factory
+
+[filter:custombackendauth]
+paste.filter_factory = heat.common.custom_backend_auth:filter_factory
\ No newline at end of file
diff --git a/etc/heat/heat-api-cfn-paste.ini b/etc/heat/heat-api-cfn-paste.ini
deleted file mode 100644 (file)
index 3f496ee..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-# Default pipeline
-[pipeline:heat-api-cfn]
-pipeline = versionnegotiation ec2authtoken authtoken context apicfnv1app
-
-# Use the following pipeline for keystone auth
-# i.e. in heat-api-cfn.conf:
-#   [paste_deploy]
-#   flavor = keystone
-#
-[pipeline:heat-api-cfn-keystone]
-pipeline = versionnegotiation ec2authtoken authtoken context apicfnv1app
-
-[app:apicfnv1app]
-paste.app_factory = heat.common.wsgi:app_factory
-heat.app_factory = heat.api.cfn.v1:API
-
-[filter:versionnegotiation]
-paste.filter_factory = heat.common.wsgi:filter_factory
-heat.filter_factory = heat.api.cfn:version_negotiation_filter
-
-[filter:context]
-paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory
-
-[filter:ec2authtoken]
-paste.filter_factory = heat.api.aws.ec2token:EC2Token_filter_factory
-
-[filter:authtoken]
-paste.filter_factory = heat.common.auth_token:filter_factory
diff --git a/etc/heat/heat-api-cloudwatch-paste.ini b/etc/heat/heat-api-cloudwatch-paste.ini
deleted file mode 100644 (file)
index b71d7ed..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-# Default pipeline
-[pipeline:heat-api-cloudwatch]
-pipeline = versionnegotiation ec2authtoken authtoken context apicwapp
-
-# Use the following pipeline for keystone auth
-# i.e. in heat-api-cloudwatch.conf:
-#   [paste_deploy]
-#   flavor = keystone
-#
-[pipeline:heat-api-cloudwatch-keystone]
-pipeline = versionnegotiation ec2authtoken authtoken context apicwapp
-
-[app:apicwapp]
-paste.app_factory = heat.common.wsgi:app_factory
-heat.app_factory = heat.api.cloudwatch:API
-
-[filter:versionnegotiation]
-paste.filter_factory = heat.common.wsgi:filter_factory
-heat.filter_factory = heat.api.cloudwatch:version_negotiation_filter
-
-[filter:context]
-paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory
-
-[filter:ec2authtoken]
-paste.filter_factory = heat.api.aws.ec2token:EC2Token_filter_factory
-
-[filter:authtoken]
-paste.filter_factory = heat.common.auth_token:filter_factory
diff --git a/etc/heat/heat-api-paste.ini b/etc/heat/heat-api-paste.ini
deleted file mode 100644 (file)
index ebe584c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-# Default pipeline
-[pipeline:heat-api]
-pipeline = versionnegotiation authtoken context apiv1app
-
-# Use the following pipeline for keystone auth
-# i.e. in heat-api.conf:
-#   [paste_deploy]
-#   flavor = keystone
-#
-[pipeline:heat-api-keystone]
-pipeline = versionnegotiation authtoken context apiv1app
-
-# Use the following pipeline for custom cloud backends
-# i.e. in heat-api.conf:
-#   [paste_deploy]
-#   flavor = custombackend
-#
-[pipeline:heat-api-custombackend]
-pipeline = versionnegotiation context custombackendauth apiv1app
-
-[app:apiv1app]
-paste.app_factory = heat.common.wsgi:app_factory
-heat.app_factory = heat.api.openstack.v1:API
-
-[filter:versionnegotiation]
-paste.filter_factory = heat.common.wsgi:filter_factory
-heat.filter_factory = heat.api.openstack:version_negotiation_filter
-
-[filter:context]
-paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory
-
-[filter:authtoken]
-paste.filter_factory = heat.common.auth_token:filter_factory
-
-[filter:custombackendauth]
-paste.filter_factory = heat.common.custom_backend_auth:filter_factory
index 9d631d9bacd6058ad04fbd48c12e835057625d22..02df22cf10d0f5b34f630edaa8629e7c86748be0 100644 (file)
@@ -34,7 +34,8 @@ DEFAULT_PORT = 8000
 paste_deploy_group = cfg.OptGroup('paste_deploy')
 paste_deploy_opts = [
     cfg.StrOpt('flavor'),
-    cfg.StrOpt('config_file')]
+    cfg.StrOpt('api_paste_config', default="api-paste.ini",
+               help="The API paste config file to use")]
 
 
 bind_opts = [
@@ -157,17 +158,10 @@ def _get_deployment_config_file():
     absolute pathname.
     """
     _register_paste_deploy_opts()
-    config_file = cfg.CONF.paste_deploy.config_file
-    if not config_file:
-        if cfg.CONF.config_file:
-            # Assume paste config is in a paste.ini file corresponding
-            # to the last config file
-            path = os.path.splitext(cfg.CONF.config_file[-1])[0] + "-paste.ini"
-        else:
-            return None
-    else:
-        path = config_file
-    return os.path.abspath(path)
+    config_path = os.path.abspath(cfg.CONF.find_file(
+        cfg.CONF.paste_deploy['api_paste_config']))
+
+    return os.path.abspath(config_path)
 
 
 def load_paste_app(app_name=None):