apps.utils.keystone
Utility functions used across various wrappers for interacting with keystone
Module Contents
- ResponseContentType
- ParsedResponseContent
- KEYSTONE_URL = 'https://keystone.crc.pitt.edu'
- KEYSTONE_AUTH_ENDPOINT = 'authentication/new/'
- RAWUSAGE_RESET_DATE
- get_request_allocations(session: keystone_client.KeystoneClient, request_pk: int) dict
Get All Allocation information from keystone for a given request
- get_active_requests(session: keystone_client.KeystoneClient, team_pk: int) [dict]
Get all active AllocationRequest information from keystone for a given team
- get_team_id(session: keystone_client.KeystoneClient, account_name: str) int
Get the Team ID from keystone for the specified Slurm account
- get_earliest_startdate(alloc_requests: [dict]) datetime.date
Given a number of requests, determine the earliest start date across them. This takes the most recent rawusage reset into account for accuracy against current limits and to prevent seeing >100% usage.
- get_most_recent_expired_request(session: keystone_client.KeystoneClient, team_pk: int) [dict]
Get the single most recently expired AllocationRequest information from keystone for a given team
- get_enabled_cluster_ids(session: keystone_client.KeystoneClient)
Get the list of enabled clusters defined in Keystone along with their IDs
- get_per_cluster_totals(session: keystone_client.KeystoneClient, alloc_requests: [dict], clusters: dict, per_request: bool = False) dict
Gather the awarded totals across the given requests on each cluster into a dictionary