'Return all migrations in progress.'

@extensions.expected_errors(())
def index(self, req):

    context = req.environ['nova.context']
    context.can((migrations_policies.POLICY_ROOT % 'index'))
    migrations = self.compute_api.get_migrations(context, req.GET)
    if api_version_request.is_supported(req, min_version='2.23'):
        return {'migrations': self._output(req, migrations, True)}
    return {'migrations': self._output(req, migrations)}
