]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat : Remove cloudwatch functionalty from metadata server
authorSteven Hardy <shardy@redhat.com>
Fri, 12 Oct 2012 12:45:11 +0000 (13:45 +0100)
committerSteven Hardy <shardy@redhat.com>
Fri, 12 Oct 2012 15:34:06 +0000 (16:34 +0100)
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 <shardy@redhat.com>
Change-Id: I5eec60d3dd0abfb32e2b4777635f1b0e2714a2c2

heat/metadata/api/v1/__init__.py
heat/metadata/api/v1/metadata.py

index 748992917137ec91c2a6d2358faf72825b80635c..7f7efb6e64702dabec57b2588bd023d8144966a9 100644 (file)
@@ -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
index 68c0effb1cf6c405287fba7cea4957e035c12187..13c2ad105a22d05fb137f57f2c393a7628bb9dd0 100644 (file)
@@ -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):
     """