From 2f9a1310e3d7e1f14ed1987b1371a2d693833481 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 30 Aug 2012 13:32:47 +0200 Subject: [PATCH] Rename heat-api to heat-api-cfn The previous heat-api is, in fact, a CloudFormation-compatible API. Rename it to heat-api-cfn, analogous to how the EC2 API in Nova is named nova-api-ec2. Change-Id: I9759f10cee6a60cdc9cb917966eb9fb95a618f85 Signed-off-by: Zane Bitter --- bin/{heat-api => heat-api-cfn} | 2 +- docs/GettingStarted.rst | 2 +- docs/man/man1/{heat-api.1 => heat-api-cfn.1} | 2 +- ...t-api-paste.ini => heat-api-cfn-paste.ini} | 36 +++++++++---------- etc/{heat-api.conf => heat-api-cfn.conf} | 4 +-- etc/heat-engine.conf | 2 +- .../{test_api_v1.py => test_api_cfn_v1.py} | 2 +- install.sh | 12 +++++++ run_tests.sh | 2 +- setup.py | 2 +- tools/uninstall-heat | 3 +- 11 files changed, 41 insertions(+), 28 deletions(-) rename bin/{heat-api => heat-api-cfn} (97%) rename docs/man/man1/{heat-api.1 => heat-api-cfn.1} (96%) rename etc/{heat-api-paste.ini => heat-api-cfn-paste.ini} (82%) rename etc/{heat-api.conf => heat-api-cfn.conf} (85%) rename heat/tests/{test_api_v1.py => test_api_cfn_v1.py} (99%) diff --git a/bin/heat-api b/bin/heat-api-cfn similarity index 97% rename from bin/heat-api rename to bin/heat-api-cfn index 5082ec0012..2bf0caf08c 100755 --- a/bin/heat-api +++ b/bin/heat-api-cfn @@ -43,7 +43,7 @@ LOG = logging.getLogger('heat.api') if __name__ == '__main__': try: - cfg.CONF(project='heat', prog='heat-api') + cfg.CONF(project='heat', prog='heat-api-cfn') config.setup_logging() config.register_api_opts() diff --git a/docs/GettingStarted.rst b/docs/GettingStarted.rst index f2310e8b38..73b0ade80f 100644 --- a/docs/GettingStarted.rst +++ b/docs/GettingStarted.rst @@ -196,7 +196,7 @@ Launch the Heat services :: - sudo -E bash -c 'heat-api & heat-engine & heat-metadata &' + sudo -E bash -c 'heat-api-cfn & heat-engine & heat-metadata &' .. sleep 5 diff --git a/docs/man/man1/heat-api.1 b/docs/man/man1/heat-api-cfn.1 similarity index 96% rename from docs/man/man1/heat-api.1 rename to docs/man/man1/heat-api-cfn.1 index 7e07f85c0c..9158b45fd0 100644 --- a/docs/man/man1/heat-api.1 +++ b/docs/man/man1/heat-api-cfn.1 @@ -19,7 +19,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -heat-api \- The external api to the heat engine +heat-api-cfn \- The external api to the heat engine .SH "SYNOPSIS" .sp heat-engine diff --git a/etc/heat-api-paste.ini b/etc/heat-api-cfn-paste.ini similarity index 82% rename from etc/heat-api-paste.ini rename to etc/heat-api-cfn-paste.ini index 5ceeae0694..e09404bff3 100644 --- a/etc/heat-api-paste.ini +++ b/etc/heat-api-cfn-paste.ini @@ -1,49 +1,49 @@ # Default pipeline -[pipeline:heat-api] -pipeline = versionnegotiation ec2authtoken authtoken context apiv1app +[pipeline:heat-api-cfn] +pipeline = versionnegotiation ec2authtoken authtoken context apicfnv1app # Use the following pipeline for keystone auth -# i.e. in heat-api.conf: +# i.e. in heat-api-cfn.conf: # [paste_deploy] # flavor = keystone # -[pipeline:heat-api-keystone] -pipeline = versionnegotiation ec2authtoken authtoken context apiv1app +[pipeline:heat-api-cfn-keystone] +pipeline = versionnegotiation ec2authtoken authtoken context apicfnv1app # Use the following pipeline to enable transparent caching of image files -# i.e. in heat-api.conf: +# i.e. in heat-api-cfn.conf: # [paste_deploy] # flavor = caching # -[pipeline:heat-api-caching] -pipeline = versionnegotiation ec2authtoken authtoken context cache apiv1app +[pipeline:heat-api-cfn-caching] +pipeline = versionnegotiation ec2authtoken authtoken context cache apicfnv1app # Use the following pipeline for keystone auth with caching -# i.e. in heat-api.conf: +# i.e. in heat-api-cfn.conf: # [paste_deploy] # flavor = keystone+caching # -[pipeline:heat-api-keystone+caching] -pipeline = versionnegotiation ec2authtoken authtoken context cache apiv1app +[pipeline:heat-api-cfn-keystone+caching] +pipeline = versionnegotiation ec2authtoken authtoken context cache apicfnv1app # Use the following pipeline to enable the Image Cache Management API -# i.e. in heat-api.conf: +# i.e. in heat-api-cfn.conf: # [paste_deploy] # flavor = cachemanagement # -[pipeline:heat-api-cachemanagement] -pipeline = versionnegotiation ec2authtoken authtoken context cache cachemanage apiv1app +[pipeline:heat-api-cfn-cachemanagement] +pipeline = versionnegotiation ec2authtoken authtoken context cache cachemanage apicfnv1app # Use the following pipeline for keystone auth with cache management -# i.e. in heat-api.conf: +# i.e. in heat-api-cfn.conf: # [paste_deploy] # flavor = keystone+cachemanagement # -[pipeline:heat-api-keystone+cachemanagement] -pipeline = versionnegotiation ec2authtoken authtoken auth-context cache cachemanage apiv1app +[pipeline:heat-api-cfn-keystone+cachemanagement] +pipeline = versionnegotiation ec2authtoken authtoken auth-context cache cachemanage apicfnv1app -[app:apiv1app] +[app:apicfnv1app] paste.app_factory = heat.common.wsgi:app_factory heat.app_factory = heat.api.v1:API diff --git a/etc/heat-api.conf b/etc/heat-api-cfn.conf similarity index 85% rename from etc/heat-api.conf rename to etc/heat-api-cfn.conf index c06c01b589..176f4b2be8 100644 --- a/etc/heat-api.conf +++ b/etc/heat-api-cfn.conf @@ -11,9 +11,9 @@ bind_host = 0.0.0.0 # Port the bind the server to bind_port = 8000 -# Log to this file. Make sure the user running heat-api has +# Log to this file. Make sure the user running heat-api-cfn has # permissions to write to this file! -log_file = /var/log/heat/api.log +log_file = /var/log/heat/api-cfn.log # ================= Syslog Options ============================ diff --git a/etc/heat-engine.conf b/etc/heat-engine.conf index 0998d2e9cf..b84b0533d1 100644 --- a/etc/heat-engine.conf +++ b/etc/heat-engine.conf @@ -11,7 +11,7 @@ bind_host = 0.0.0.0 # Port the bind the server to bind_port = 8001 -# Log to this file. Make sure the user running heat-api has +# Log to this file. Make sure the user running heat-engine has # permissions to write to this file! log_file = /var/log/heat/engine.log diff --git a/heat/tests/test_api_v1.py b/heat/tests/test_api_cfn_v1.py similarity index 99% rename from heat/tests/test_api_v1.py rename to heat/tests/test_api_cfn_v1.py index 0b28c1d3a0..aae253dffc 100644 --- a/heat/tests/test_api_v1.py +++ b/heat/tests/test_api_cfn_v1.py @@ -37,7 +37,7 @@ from heat.api.aws import exception import heat.api.v1.stacks as stacks -@attr(tag=['unit', 'api-v1-stacks', 'StackController']) +@attr(tag=['unit', 'api-cfn-v1-stacks', 'StackController']) @attr(speed='fast') class StackControllerTest(unittest.TestCase): ''' diff --git a/install.sh b/install.sh index 5af037946b..271d370d87 100755 --- a/install.sh +++ b/install.sh @@ -12,6 +12,18 @@ mkdir -p $LOG_DIR mkdir -p $CONF_DIR pushd etc > /dev/null + +# Archive existing heat-api* config files in preparation +# for change to heat-api-cfn*, and future use of heat-api* +# the OpenStack API +for ext in '.conf' '-paste.ini'; do + heat_api_file="${CONF_DIR}/heat-api${ext}" + if [ -e ${heat_api_file} ]; then + echo "archiving configuration file ${heat_api_file}" + mv $heat_api_file ${heat_api_file}.bak + fi +done + for f in * do if [ -d $f ]; then diff --git a/run_tests.sh b/run_tests.sh index 73f8052f24..3663a71d56 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -46,7 +46,7 @@ function run_tests { function run_pep8 { echo "Running pep8..." PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --repeat" - PEP8_INCLUDE="bin/heat bin/heat-boto bin/heat-api bin/heat-engine heat tools setup.py heat/testing/runner.py" + PEP8_INCLUDE="bin/heat bin/heat-boto bin/heat-api-cfn bin/heat-engine heat tools setup.py heat/testing/runner.py" ${wrapper} pep8 $PEP8_OPTIONS $PEP8_INCLUDE } diff --git a/setup.py b/setup.py index 163700edaa..be3ece1854 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ setuptools.setup( 'Environment :: No Input/Output (Daemon)', ], scripts=['bin/heat', - 'bin/heat-api', + 'bin/heat-api-cfn', 'bin/heat-api-cloudwatch', 'bin/heat-boto', 'bin/heat-metadata', diff --git a/tools/uninstall-heat b/tools/uninstall-heat index e05ba01799..915f8c06e6 100755 --- a/tools/uninstall-heat +++ b/tools/uninstall-heat @@ -25,7 +25,7 @@ user_wants() { done } -HEAT_PIDS=`pgrep '^heat-(api|engine|metadata)$'` +HEAT_PIDS=`pgrep '^heat-(api|api-cfn|engine|metadata)$'` if [ -n "$HEAT_PIDS" ]; then echo 'The following Heat processes are running:' 1>&2 ps $HEAT_PIDS 1>&2 @@ -60,6 +60,7 @@ if user_wants 'Delete Heat binaries?'; then sudo rm -f $BIN_PATH/heat-db-setup sudo rm -f $BIN_PATH/heat-metadata sudo rm -f $BIN_PATH/heat-api + sudo rm -f $BIN_PATH/heat-api-cfn sudo rm -f $BIN_PATH/heat-engine sudo rm -f $BIN_PATH/heat