@_assure_identity
def auth_with_token(token, tenant_id=None, tenant_name=None, region=None):
 global regions, services
 identity.auth_with_token(token, tenant_id=tenant_id, tenant_name=tenant_name)
 regions = tuple(identity.regions)
 services = tuple(identity.services.keys())
 connect_to_services(region=region)

@ _assure_identity def auth_with_token ( token , tenant_id = None , tenant_name = None , region = None ) : global regions , services identity . auth_with_token ( token , tenant_id = tenant_id , tenant_name = tenant_name ) regions = tuple ( identity . regions ) services = tuple ( identity . services . keys ( ) ) connect_to_services ( region = region )
if you already have a valid token and either a tenant id or name .