apps.utils.keystone ============================= .. autoapi-nested-parse:: Utility functions used across various wrappers for interacting with keystone Module Contents --------------- .. py:data:: ResponseContentType .. py:data:: ParsedResponseContent .. py:data:: KEYSTONE_URL :value: 'https://keystone.crc.pitt.edu' .. py:data:: KEYSTONE_AUTH_ENDPOINT :value: 'authentication/new/' .. py:data:: RAWUSAGE_RESET_DATE .. py:function:: get_request_allocations(session: keystone_client.KeystoneClient, request_pk: int) -> dict Get All Allocation information from keystone for a given request .. py:function:: get_active_requests(session: keystone_client.KeystoneClient, account_name: str) -> list[dict] Get all active AllocationRequest information from keystone for a given team .. py:function:: 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. .. py:function:: get_most_recent_expired_request(session: keystone_client.KeystoneClient, account_name: str) -> list[dict] Get the single most recently expired AllocationRequest information from keystone for a given team .. py:function:: get_enabled_cluster_ids(session: keystone_client.KeystoneClient) -> dict Get the list of enabled clusters defined in Keystone along with their IDs .. py:function:: 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