def get_os_admin_auth_plugin(cluster):
    ctx = context.current()
    cluster = conductor.cluster_get(ctx, cluster)
    if CONF.use_identity_api_v3 and cluster.trust_id:
        return keystone.auth_for_admin(trust_id=cluster.trust_id)
    return keystone.auth_for_admin(project_name=ctx.tenant_name)
Return an admin auth plugin based on the cluster trust id or project
dataset/ETHPy150Open openstack/sahara/sahara/service/trusts.py/get_os_admin_auth_plugin