summaryrefslogtreecommitdiff
path: root/heat/cmd
diff options
context:
space:
mode:
authorrabi <ramishra@redhat.com>2017-10-27 12:57:24 +0530
committerrabi <ramishra@redhat.com>2018-01-28 09:11:17 +0530
commit6d55417f80384ead56e176beec9e2fc4eb162d61 (patch)
treea14168ea189e69aaf669294ef92b1aebb55bc769 /heat/cmd
parent3057168f5ff38c934ace001bca7170357026f8c3 (diff)
downloadheat-6d55417f80384ead56e176beec9e2fc4eb162d61.tar.gz
Remove CloudWatch API
This patch removes the API, the next set of patches in the series would remove stack watch service and related WatchRule implementation. Change-Id: I8b0472be862907298c8da51f435b5d8b19610ec3 Partial-Bug: #1743707
Diffstat (limited to 'heat/cmd')
-rw-r--r--heat/cmd/all.py4
-rw-r--r--heat/cmd/api_cloudwatch.py78
2 files changed, 1 insertions, 81 deletions
diff --git a/heat/cmd/all.py b/heat/cmd/all.py
index d5ea33f4e..423ef853b 100644
--- a/heat/cmd/all.py
+++ b/heat/cmd/all.py
@@ -25,7 +25,6 @@ import sys
from heat.cmd import api
from heat.cmd import api_cfn
-from heat.cmd import api_cloudwatch
from heat.cmd import engine
from heat.common import config
from heat.common import messaging
@@ -45,7 +44,6 @@ LAUNCH_SERVICES = {
'engine': [engine.launch_engine, {'setup_logging': False}],
'api': [api.launch_api, API_LAUNCH_OPTS],
'api_cfn': [api_cfn.launch_cfn_api, API_LAUNCH_OPTS],
- 'api_cloudwatch': [api_cloudwatch.launch_cloudwatch_api, API_LAUNCH_OPTS],
}
services_opt = cfg.ListOpt(
@@ -53,7 +51,7 @@ services_opt = cfg.ListOpt(
default=['engine', 'api', 'api_cfn'],
help='Specifies the heat services that are enabled when running heat-all. '
'Valid options are all or any combination of '
- 'api, engine, api_cfn, or api_cloudwatch.'
+ 'api, engine or api_cfn.'
)
cfg.CONF.register_opt(services_opt, group='heat_all')
diff --git a/heat/cmd/api_cloudwatch.py b/heat/cmd/api_cloudwatch.py
deleted file mode 100644
index f20eaeb4f..000000000
--- a/heat/cmd/api_cloudwatch.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env python
-#
-# 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.
-
-"""Heat API Server.
-
-This implements an approximation of the Amazon CloudWatch API and translates it
-into a native representation. It then calls the heat-engine via AMQP RPC to
-implement them.
-"""
-
-import eventlet
-eventlet.monkey_patch(os=False)
-
-import sys
-
-from oslo_config import cfg
-import oslo_i18n as i18n
-from oslo_log import log as logging
-from oslo_reports import guru_meditation_report as gmr
-from oslo_service import systemd
-import six
-
-from heat.common import config
-from heat.common import messaging
-from heat.common import profiler
-from heat.common import wsgi
-from heat import version
-
-i18n.enable_lazy()
-
-LOG = logging.getLogger('heat.api.cloudwatch')
-
-
-def launch_cloudwatch_api(setup_logging=True):
- if setup_logging:
- logging.register_options(cfg.CONF)
- cfg.CONF(project='heat',
- prog='heat-api-cloudwatch',
- version=version.version_info.version_string())
- if setup_logging:
- logging.setup(cfg.CONF, 'heat-api-cloudwatch')
- logging.set_defaults()
- config.set_config_defaults()
- messaging.setup()
-
- app = config.load_paste_app()
-
- port = cfg.CONF.heat_api_cloudwatch.bind_port
- host = cfg.CONF.heat_api_cloudwatch.bind_host
- LOG.info('Starting Heat CloudWatch API on %(host)s:%(port)s',
- {'host': host, 'port': port})
- profiler.setup('heat-api-cloudwatch', host)
- gmr.TextGuruMeditation.setup_autorun(version)
- server = wsgi.Server('heat-api-cloudwatch',
- cfg.CONF.heat_api_cloudwatch)
- server.start(app, default_port=port)
- return server
-
-
-def main():
- try:
- server = launch_cloudwatch_api()
- systemd.notify_once()
- server.wait()
- except RuntimeError as e:
- msg = six.text_type(e)
- sys.exit("ERROR: %s" % msg)