Skip to main content

Module utils

Module utils 

Source

Functionsยง

get_node_details
Get components data. Currently, CSM will throw an error if many xnames are sent in the request, therefore, this method will paralelize multiple calls, each with a batch of xnames
nodes_to_string_format_discrete_columns
nodes_to_string_format_one_line
validate_nid_format
Check if input is a NID
validate_nid_format_regex
Check if input is a NID
validate_nid_format_vec
Check if input is a NID
validate_target_hsm_members
Validate user has access to a list of HSM group members provided. HSM members user is asking for are taken from cli command Exit if user does not have access to any of the members provided. By not having access to a HSM members means, the node belongs to an HSM group which the user does not have access
validate_xname_format
Validate xname is correct (it uses regex taken from HPE Cray CSM docs)
validate_xname_format_regex
Validate xname is correct (it uses regex taken from HPE Cray CSM docs)
validate_xname_format_vec
Validate xname is correct (it uses regex taken from HPE Cray CSM docs)
validate_xnames_format_and_membership_agaisnt_single_hsm
Validates a list of xnames. Checks xnames strings are valid If hsm_group_name_opt provided, then checks all xnames belongs to that hsm_group