Mainframe

Mainframe related API functions.

GHS.ghs_identify(identity_flag: bool) str[source]

Enable or disable the identification sound of the connected mainframe.

Parameters

identity_flag – Enable or disable flag.

Returns

  • GHSReturnValue - Identify API status.

GHS.ghs_get_disk_space() tuple[str, float | None, float | None][source]

Get total and available mainframe internal disk space.

Returns

  • GHSReturnValue - API return status

  • total - Total mainframe internal disk space in GB

  • available - Available internal disk space in GB

GHS.ghs_get_sync_status() tuple[str, str | None][source]

Determine the mainframe sync status.

Returns

  • GHSReturnValue - API return status

  • GHSSyncStatus - Sync status

GHS.ghs_get_slot_count() tuple[str, int | None][source]

Retrieve the number of slots in the mainframe.

Returns

  • GHSReturnValue - API return status

  • slot_count - The number of slots in the mainframe

GHS.ghs_get_user_mode() tuple[str, str | None][source]

Retrieve the user mode.

Returns

  • GHSReturnValue - API return status

  • GHSUserMode - The user mode

GHS.ghs_set_user_mode(user_mode: str | int) str[source]

Set the user mode.

The system needs to be idle before calling this function.

Parameters

user_mode – The desired user mode.

Returns

  • GHSReturnValue - API return status

GHS.ghs_get_mainframe_info() tuple[str, str | None, str | None, str | None, str | None][source]

Determine type, name, serial number and firmware version information for the connected mainframe.

The mainframeType, mainframeName, serialNumber and firmwareVersion parameters are UTF-8 encoded.

Returns

  • GHSReturnValue - API return status

  • mainframe_type - The type of the mainframe

  • mainframe_name - The name of the mainframe

  • serial_number - The serial number of the mainframe

  • firmware_version - The firmware version of the mainframe

Accepted values:

  • identity_flag - “Enable”, “Disable”

  • user_mode - “Sweeps”, “Continuous”, “Dual”

Note: Storage locations needs to be set to local mainframe storage to get disk space.