Systems

dapi.systems.list_system_queues(t, system_id, verbose=True)[source]

Retrieves the list of batch logical queues available on a specific Tapis execution system.

Parameters:
  • t (Tapis) – Authenticated Tapis client instance.

  • system_id (str) – The ID of the execution system (e.g., ‘frontera’, ‘stampede2’).

  • verbose (bool) – If True, prints the found queues.

Returns:

A list of queue objects (typically TapisResult instances or similar dict-like structures) defined for the system. Returns an empty list if the system exists but has no queues defined.

Raises:

SystemInfoError – If the system is not found or an API error occurs.

Return type:

List[Any]

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