cloudos_cli.utils.resources

Functions

format_bytes(size)

Convert bytes to human-readable format (e.g., 1.2 MB).

ssl_selector(disable_ssl_verification, ssl_cert)

Verify value selector.

cloudos_cli.utils.resources.format_bytes(size)[source]

Convert bytes to human-readable format (e.g., 1.2 MB).

cloudos_cli.utils.resources.ssl_selector(disable_ssl_verification, ssl_cert)[source]

Verify value selector.

This function stablish the value that will be passed to requests.verify variable.

Parameters:
  • disable_ssl_verification (bool) – Whether to disable SSL verification.

  • ssl_cert (string) – String indicating the path to the SSL certificate file to use.

Returns:

verify_ssl – Either a bool or a path string to be passed to requests.verify to control SSL verification.

Return type:

[bool | string]