heat metadata : Remove all non-waitcondition related logic

Remove all logic except that required by cfn-signal, since both
cfn-hup and cfn-push-stats have been ported to use the CFN and
Cloudwatch APIs respectively

Change-Id: I087349ff3ab901c880a248bd124396a1383c0a5e
Signed-off-by: Steven Hardy <shardy@redhat.com>
changes/79/14879/5
Steven Hardy 10 years ago
parent 997a2165e7
commit c8ec051a67

@ -34,25 +34,10 @@ class API(wsgi.Router):
mapper.connect('/',
controller=metadata_controller, action='entry_point',
conditions=dict(method=['GET']))
mapper.connect('/stacks/',
controller=metadata_controller, action='list_stacks',
conditions=dict(method=['GET']))
mapper.connect('/stacks/:stack_name/resources/',
controller=metadata_controller, action='list_resources',
conditions=dict(method=['GET']))
mapper.connect('/stacks/:stack_name/resources/:resource_name',
controller=metadata_controller, action='get_resource',
conditions=dict(method=['GET']))
mapper.connect('/stacks/:stack_name',
controller=metadata_controller, action='create_stack',
conditions=dict(method=['PUT']))
mapper.connect('/stacks/:stack_id/resources/:resource_name',
controller=metadata_controller,
action='update_metadata',
conditions=dict(method=['PUT']))
mapper.connect('/events/',
controller=metadata_controller, action='create_event',
conditions=dict(method=['POST']))
# TODO(shadower): make sure all responses are JSON-encoded
# currently, calling an unknown route uses the default handler which

@ -48,35 +48,6 @@ class MetadataController:
'version': '1',
}
def list_stacks(self, req):
con = context.get_admin_context()
resp = self.engine_rpcapi.metadata_list_stacks(con)
return resp
def list_resources(self, req, stack_name):
con = context.get_admin_context()
resources = self.engine_rpcapi.metadata_list_resources(con,
stack_name=stack_name)
if resources:
return resources
else:
return json_error(404,
'The stack "%s" does not exist.' % stack_name)
def get_resource(self, req, stack_name, resource_name):
con = context.get_admin_context()
[error, metadata] = self.engine_rpcapi.metadata_get_resource(con,
stack_name=stack_name,
resource_name=resource_name)
if error:
if error == 'stack':
return json_error(404,
'The stack "%s" does not exist.' % stack_name)
else:
return json_error(404,
'The resource "%s" does not exist.' % resource_name)
return metadata
def update_metadata(self, req, body, stack_id, resource_name):
con = context.get_admin_context()
[error, metadata] = self.engine_rpcapi.metadata_update(con,
@ -95,13 +66,6 @@ class MetadataController:
'metadata': body,
})
def create_event(self, req, body=None):
con = context.get_admin_context()
[error, event] = self.engine_rpcapi.event_create(con, event=body)
if error:
return json_error(400, error)
return json_response(201, event)
def create_resource(options):
"""

Loading…
Cancel
Save