Skip to main content

Module groups

Module groups 

Source
Expand description

ClusterShell node-group lookup shared by claw and cast.

Two sources, in order:

  1. groups.conf ($XDG_CONFIG_HOME/clustershell/groups.conf, default ~/.config/clustershell/groups.conf, then /etc/clustershell/groups.conf) through GroupResolverConfig — the same upcall-driven resolver claw -g uses.
  2. Flat groups.d files ($XDG_CONFIG_HOME/clustershell/groups.d/*, then /etc/clustershell/groups.d/*; YAML files are skipped) with one group: nodeset per line, where the nodeset is a whitespace- or comma-separated list of node patterns.

@group and @source:group spellings are accepted; with flat files the source selects the file stem inside groups.d.

Functions§

expand_pattern
Expand a --on pattern whose top-level comma-separated tokens may be @group references, resolving each through lookup, into a NodeSet. Plain tokens keep full bracket/range syntax.
find_groups_conf
Find groups.conf config files in standard locations.
group_nodes
Resolve a group spelled group or source:group (without the leading @) to node patterns: groups.conf first, then flat groups.d files.
groups_d_dirs
The groups.d directories holding flat group files, user first.
load_group_resolver
Load a GroupResolverConfig from standard config file locations.
lookup_flat_group
Look group up in the flat files under dirs. source restricts the search to files whose stem equals it. The first match wins.
parse_flat_groups
(group, nodeset) pairs from a flat group: nodeset file. Blank lines and # comments are ignored.
user_config_dir
The user’s ClusterShell config directory: $XDG_CONFIG_HOME/clustershell or ~/.config/clustershell.