'Delete a server group.'

@wsgi.response(204)
@extensions.expected_errors(404)
def delete(self, req, id):

    context = _authorize_context(req, 'delete')
    try:
        sg = objects.InstanceGroup.get_by_uuid(context, id)
    except nova.exception.InstanceGroupNotFound as e:
        raise webob.exc.HTTPNotFound(explanation=e.format_message())
    try:
        sg.destroy()
    except nova.exception.InstanceGroupNotFound as e:
        raise webob.exc.HTTPNotFound(explanation=e.format_message())
