Skip to navigation

slurm.ParsedDrainReason

View as MarkdownOpen in Claude

A parsed drain reason object containing tags and cleaned reason.

Members

get_tags

slurm.ParsedDrainReason.get_tags()

Get a list of all tag names present in the drain reason

Returns
tagslist[string]List of all tag names

has_all_tags

slurm.ParsedDrainReason.has_all_tags(tags)

Check if all of the specified tags are present in the drain reason

Parameters
tagslist[string]List of tag names to check for
Returns
presentboolTrue if all of the tags are present, false otherwise

has_any_tag

slurm.ParsedDrainReason.has_any_tag(tags)

Check if any of the specified tags are present in the drain reason

Parameters
tagslist[string]List of tag names to check for
Returns
presentboolTrue if any of the tags are present, false otherwise

has_only_tags_from

slurm.ParsedDrainReason.has_only_tags_from(allowed_tags)

Check if all tags present in the drain reason are in the allowed list. Returns true if there are no tags.

Parameters
allowed_tagslist[string]List of allowed tag names
Returns
validboolTrue if all present tags are in the allowed list, false otherwise

has_tag

slurm.ParsedDrainReason.has_tag(tag)

Check if a specific tag is present in the drain reason

Parameters
tagstringThe tag name to check for
Returns
presentboolTrue if the tag is present, false otherwise