rctab_infrastructure.utils

General infrastructure code utilities.

Functions

assert_is_file(filepath)

Raise an error if filepath is not a valid path to a real file.

assert_str_true_or_false(checkstr)

Raise an error if checkstr is not 'true' or 'false'.

assert_valid_int_list(int_list)

Check the integer list provided is a list of valid integers or an empty string.

assert_valid_log_level(log_level)

Check the log level is a valid log level.

assert_valid_uuid_list(whitelist)

Check the UUID list provided is a list of valid UUIDs or an empty string.

check_valid_ip_address(ip2check)

Check an IP address is a valid IP address.

format_list_int(input_str)

Convert a comma-separated list of ints into a JSON compatible list.

format_list_str(input_str)

Convert a comma-separated list of strings into a JSON compatible list.

format_secret_list_str(input_str)

Convert a comma-separated list into a JSON compatible list.

is_valid_uuid(check_uuid)

Check a provided UUID is a valid UUID.

raise_if_none(value)

Raise an exception if value is None.

validate_sku_type(sku_type)

Validate the sku_type is one of the allowed types.

validate_ticker_stack_combination(ticker, stack)

Raise an error if ticker and stack names are not valid names.