Skip to content

Check Core

chaos.lib.checkers

Handles listing of roles/explanations/aliases with rich rendering.

Notes
  • some validity checks for vault

checkAliases(ROLE_ALIASES)

Checks if the provided aliases are valid.

Parameters:

Name Type Description Default
ROLE_ALIASES dict

A dictionary of role aliases to check.

required

Returns:

Type Description
ResultPayload[dict[str, str]]

ResultPayload[dict[str, str]]: The result payload containing the valid aliases, and any warnings/messages.

checkBoats(boats)

Checks if the provided boats are valid.

Parameters:

Name Type Description Default
boats dict

A dictionary of boats to check.

required

Returns:

Type Description
ResultPayload[list[str]]

ResultPayload[list[str]]: The result payload containing a list of valid boats.

checkExplanations(EXPLANATIONS)

Checks if the provided explanations are valid.

Parameters:

Name Type Description Default
EXPLANATIONS dict

A dictionary of explanations to check.

required

Returns:

Type Description
ResultPayload[list[str]]

ResultPayload[list[str]]: The result payload containing a list of valid explanations.

checkLimanis(limanis)

Checks if the provided limanis are valid.

Parameters:

Name Type Description Default
limanis dict

A dictionary of limanis to check.

required

Returns:

Type Description
ResultPayload[list[str]]

ResultPayload[list[str]]: The result payload containing a list of valid limanis.

checkProviders(providers)

Checks if the provided providers are valid.

Parameters:

Name Type Description Default
providers dict

A dictionary of providers to check.

required

Returns:

Type Description
ResultPayload[list[str]]

ResultPayload[list[str]]: The result payload containing a list of valid providers.

checkRoles(ROLES_DISPATCHER)

Checks if the provided roles are valid.

Parameters:

Name Type Description Default
ROLES_DISPATCHER dict

A dictionary of roles to check.

required

Returns:

Type Description
ResultPayload[list[str]]

ResultPayload[list[str]]: The result payload containing a list of valid roles.

checkSecrets(secrets_file)

Checks if the secrets in the specified file are valid.

Parameters:

Name Type Description Default
secrets_file str

The path to the secrets file.

required

Returns:

Type Description
ResultPayload[list[str]]

ResultPayload[list[str]]: The result payload containing a list of flattened secrets keys if successful.

checkTemplates(keys)

Checks if the provided templates are valid.

Parameters:

Name Type Description Default
keys dict

A dictionary of templates to check.

required

Returns:

Type Description
ResultPayload[list[str]]

ResultPayload[list[str]]: The result payload containing a list of valid templates.

handle_check(payload)

Handles various check commands based on the payload.

Parameters:

Name Type Description Default
payload CheckPayload

The payload containing the check command and related context.

required

Returns:

Type Description
ResultPayload[list[str] | dict[str, str] | None]

ResultPayload[list[str] | dict[str, str] | None]: The result payload of the requested check.