uac_cli.utils package

Submodules

uac_cli.utils.config module

uac_cli.utils.config.ask_profile(profile)[source]
uac_cli.utils.config.read_config()[source]
uac_cli.utils.config.read_profile(profile_name)[source]
uac_cli.utils.config.simple_decrypt(encrypted_password, key)[source]
uac_cli.utils.config.simple_encrypt(password, key)[source]
uac_cli.utils.config.write_config(profiles)[source]
uac_cli.utils.config.write_profile(profile_name, profile)[source]

uac_cli.utils.options module

uac_cli.utils.process module

uac_cli.utils.process.add_payload_value(vars_dict, _input, binary)[source]

Modify vars_dict with payload data extracted from _input.

If _input is non-binary, it is read as a dictionary. Values in vars_dict (from command line arguments) are converted and used to overwrite corresponding keys in the payload dictionary.

If _input is binary, the raw data is stored directly under the “data” key in vars_dict.

Parameters:
  • vars_dict (dict) – Dictionary of existing key-value pairs.

  • _input (file-like or None) – Optional input stream with data to be added.

  • binary (bool) – Flag indicating if _input is binary data.

Note: Command Line keys will only overwrite existing keys in the payload; new keys will NOT be added.

uac_cli.utils.process.create_payload(args)[source]
uac_cli.utils.process.input_value_parsing(value)[source]
uac_cli.utils.process.process_input(args, _input=None, binary=False)[source]

Processes input arguments (including argument file) into a dictionary of key-value pairs.

Converts a list of “key=value” strings into a dictionary.If an argument file exists, reads additional key-value pairs from it, adding keys not present.

If _input is provided and the keys “retain_sys_ids” or “retainSysIds” are absent, adds “retain_sys_ids” = “true”. Then calls add_payload_value to overwrite duplicate keys.

Parameters:
  • args (list of str) – Command line arguments as “key=value” strings.

  • _input (optional) – Input stream supplying JSON or binary payload.

  • binary (bool) – Whether _input is binary data.

Returns:

Dictionary of all parsed and merged key-value pairs.

Return type:

dict

uac_cli.utils.process.process_output(output, select, response, text=False, binary=False)[source]
uac_cli.utils.process.snake_to_camel(snake_case_str)[source]

Converts a snake_case string to camelCase.

Parameters:

snake_case_str – The string in snake_case format.

Returns:

The converted string in camelCase format.

Module contents