'Abort an in progress migration of an instance.'

@wsgi.Controller.api_version('2.24')
@wsgi.response(202)
@extensions.expected_errors((400, 404, 409))
def delete(self, req, server_id, id):

    context = req.environ['nova.context']
    context.can((sm_policies.POLICY_ROOT % 'delete'))
    instance = common.get_instance(self.compute_api, context, server_id)
    try:
        self.compute_api.live_migrate_abort(context, instance, id)
    except exception.InstanceInvalidState as state_error:
        common.raise_http_conflict_for_instance_invalid_state(state_error, 'abort    live    migration', server_id)
    except exception.MigrationNotFoundForInstance as e:
        raise exc.HTTPNotFound(explanation=e.format_message())
    except exception.InvalidMigrationState as e:
        raise exc.HTTPBadRequest(explanation=e.format_message())
