This pull request completely overhauls the slurmutils API to be much better than both the original slurmdbd.conf and slurm.conf editors that I wrote. These changes also enable the editors to share common resources such as parsing/marshalling logic and descriptor generation.
Reasons why the new slurmdbd.conf editor is better than the old slurmdbd.conf editor:
Configuration knobs have much better representation now. Rather than List[Tuple[str, Any]] now the editor uses Dict[str, Any].
Less cut and pasting of common operations. Descriptors for configuration knob attributes are now dynamically generated.
Better parsing mechanism. Instead of lexically analyizing tokens using deque's, now use built-in string splitting.
Reasons why the new slurm.conf editor is better than the old slurm.conf editor:
Better data models for types such as Node, NodeSet, DownNodes, etc. No longer expecting authors to know the magical values to put into dictionaries.
Better mechanism for mutating Nodes, NodeSets, FrontendNodes, etc. Special containers are now used for returning and accessing these objects.
No longer using a clunky context manager class for accessing the slurm.conf file. The edit method is now provided instead. This class made it too difficult to dump and load slurm.conf files from strings.
BREAKING CHANGES: Changes the API of the slurmutils package. An editors module is now used to provide the configuration file editros, and the models module is used for common data objects in Slurm. A context manager class is no longer provided for accessing the slurm.conf file since it's API was clunky.
This pull request completely overhauls the slurmutils API to be much better than both the original slurmdbd.conf and slurm.conf editors that I wrote. These changes also enable the editors to share common resources such as parsing/marshalling logic and descriptor generation.
List[Tuple[str, Any]]
now the editor usesDict[str, Any]
.edit
method is now provided instead. This class made it too difficult to dump and load slurm.conf files from strings.BREAKING CHANGES: Changes the API of the slurmutils package. An
editors
module is now used to provide the configuration file editros, and themodels
module is used for common data objects in Slurm. A context manager class is no longer provided for accessing the slurm.conf file since it's API was clunky.