From 4d262e3b29faeb6499ca2befe52d81aea3583ef7 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Fri, 12 Oct 2012 13:45:11 +0100 Subject: [PATCH] heat : Remove cloudwatch functionalty from metadata server Remove the cloudwatch metric functionality from the heat-metadata service, since all stats should now be sent via the CloudWatch api via the PutMetricData action (ref cfn-push-stats update) Note that after this change you will need to rebuild your jeos images to get the new version of cfn-push-stats from heat-jeos Signed-off-by: Steven Hardy Change-Id: I5eec60d3dd0abfb32e2b4777635f1b0e2714a2c2 --- heat/metadata/api/v1/__init__.py | 8 -------- heat/metadata/api/v1/metadata.py | 19 ------------------- 2 files changed, 27 deletions(-) diff --git a/heat/metadata/api/v1/__init__.py b/heat/metadata/api/v1/__init__.py index 7489929171..7f7efb6e64 100644 --- a/heat/metadata/api/v1/__init__.py +++ b/heat/metadata/api/v1/__init__.py @@ -53,14 +53,6 @@ class API(wsgi.Router): mapper.connect('/events/', controller=metadata_controller, action='create_event', conditions=dict(method=['POST'])) - mapper.connect('/stats/:watch_name/data/', - controller=metadata_controller, - action='create_watch_data', - conditions=dict(method=['PUT'])) -# mapper.connect('/stats/:watch_name/data/', -# controller=metadata_controller, -# action='list_watch_data', -# conditions=dict(method=['GET'])) # TODO(shadower): make sure all responses are JSON-encoded # currently, calling an unknown route uses the default handler which diff --git a/heat/metadata/api/v1/metadata.py b/heat/metadata/api/v1/metadata.py index 68c0effb1c..13c2ad105a 100644 --- a/heat/metadata/api/v1/metadata.py +++ b/heat/metadata/api/v1/metadata.py @@ -102,25 +102,6 @@ class MetadataController: return json_error(400, error) return json_response(201, event) - def create_watch_data(self, req, body, watch_name): - con = context.get_admin_context() - [error, watch_data] = self.engine_rpcapi.create_watch_data(con, - watch_name=watch_name, - stats_data=body) - if error: - return json_error(400, error) - return json_response(201, watch_data) - - def list_watch_data(self, req, watch_name): - con = context.get_admin_context() - data = self.engine_rpcapi.list_watch_data(con, - watch_name=watch_name) - if data: - return data - else: - return json_error(404, - 'The watch "%s" does not exist.' % watch_name) - def create_resource(options): """