'Return all migrations of an instance in progress.'

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

    context = req.environ['nova.context']
    context.can((sm_policies.POLICY_ROOT % 'index'))
    common.get_instance(self.compute_api, context, server_id)
    migrations = self.compute_api.get_migrations_in_progress_by_instance(context, server_id, 'live-migration')
    return {'migrations': [output(migration) for migration in migrations]}
