'Return the migration of an instance in progress by id.'

@wsgi.Controller.api_version('2.23')
@extensions.expected_errors(404)
def show(self, req, server_id, id):

    context = req.environ['nova.context']
    context.can((sm_policies.POLICY_ROOT % 'show'))
    common.get_instance(self.compute_api, context, server_id)
    try:
        migration = self.compute_api.get_migration_by_id_and_instance(context, id, server_id)
    except exception.MigrationNotFoundForInstance:
        msg = (_('In-progress    live    migration    %(id)s    is    not    found    for    server    %(uuid)s.') % {'id': id, 'uuid': server_id})
        raise exc.HTTPNotFound(explanation=msg)
    if (migration.get('migration_type') != 'live-migration'):
        msg = (_('Migration    %(id)s    for    server    %(uuid)s    is    not    live-migration.') % {'id': id, 'uuid': server_id})
        raise exc.HTTPNotFound(explanation=msg)
    in_progress = ['queued', 'preparing', 'running', 'post-migrating']
    if (migration.get('status') not in in_progress):
        msg = (_('Live    migration    %(id)s    for    server    %(uuid)s    is    not    in    progress.') % {'id': id, 'uuid': server_id})
        raise exc.HTTPNotFound(explanation=msg)
    return {'migration': output(migration)}
