Systems¶
- dapi.systems.list_system_queues(t, system_id, output='df')[source]¶
List batch queues available on a Tapis execution system.
- Parameters:
t (Tapis) – Authenticated Tapis client instance.
system_id (str) – The ID of the execution system (e.g., “stampede3”).
output (str, optional) – “df” for DataFrame (default), “raw” for Tapis objects.
- Returns:
Queues with name, maxNodes, maxMinutes, maxCoresPerNode, etc.
- Return type:
Union[pd.DataFrame, List]
- Raises:
SystemInfoError – If the system is not found or an API error occurs.
ValueError – If system_id is empty or output is invalid.
- dapi.systems.check_credentials(t, system_id, username=None)[source]¶
Check whether TMS credentials exist for a user on a Tapis system.
- Parameters:
t (Tapis) – Authenticated Tapis client instance.
system_id (str) – The ID of the Tapis system (e.g., ‘frontera’, ‘stampede3’).
username (str | None) – The username to check. If None, auto-detected from t.username.
- Returns:
True if credentials exist, False if they do not.
- Raises:
ValueError – If system_id is empty or username cannot be determined.
CredentialError – If an unexpected API error occurs during the check.
- Return type:
bool
- dapi.systems.establish_credentials(t, system_id, username=None, force=False, verbose=True)[source]¶
Establish TMS credentials for a user on a Tapis system.
Idempotent: if credentials already exist and force is False, no action is taken. Only systems with defaultAuthnMethod ‘TMS_KEYS’ are supported.
- Parameters:
t (Tapis) – Authenticated Tapis client instance.
system_id (str) – The ID of the Tapis system (e.g., ‘frontera’, ‘stampede3’).
username (str | None) – The username. If None, auto-detected from t.username.
force (bool) – If True, create credentials even if they already exist.
verbose (bool) – If True, prints status messages.
- Raises:
ValueError – If system_id is empty or username cannot be determined.
CredentialError – If the system does not use TMS_KEYS, if the system is not found, or if credential creation fails.
- Return type:
None
- dapi.systems.revoke_credentials(t, system_id, username=None, verbose=True)[source]¶
Remove TMS credentials for a user on a Tapis system.
Idempotent: if credentials do not exist, no error is raised.
- Parameters:
t (Tapis) – Authenticated Tapis client instance.
system_id (str) – The ID of the Tapis system (e.g., ‘frontera’, ‘stampede3’).
username (str | None) – The username. If None, auto-detected from t.username.
verbose (bool) – If True, prints status messages.
- Raises:
ValueError – If system_id is empty or username cannot be determined.
CredentialError – If credential removal fails unexpectedly.
- Return type:
None
- dapi.systems.setup_tms_credentials(t, systems=None)[source]¶
Check and establish TMS credentials on execution systems.
For each system, checks if credentials exist and creates them if missing. Failures are handled gracefully — a system that can’t be reached or where the user lacks an allocation is skipped with a warning.
- Parameters:
t (Tapis) – Authenticated Tapis client instance.
systems (List[str] | None) – List of system IDs to set up. Defaults to TACC_SYSTEMS (frontera, stampede3, ls6).
- Returns:
“ready”, “created”, or “skipped”.
- Return type:
Dict mapping system_id to status