As it stands creation of the hashes used by generate_commands are done in Config (for tools and tool families) and groups (for node groups). This code is not really tied to the purposes of the respective modules and should be generalized and combined.
The current set up also requires that the Config function __copy_values is imported into groups.
The functions being class functions for some purposes and not for others is also puzzling.
Additionally this results in some code duplication; all 'hashify' methods use similar structure which is repeated. This should be DRYed.
As it stands creation of the hashes used by
generate_commands
are done inConfig
(for tools and tool families) andgroups
(for node groups). This code is not really tied to the purposes of the respective modules and should be generalized and combined.The current set up also requires that the
Config
function__copy_values
is imported intogroups
.The functions being class functions for some purposes and not for others is also puzzling.
Additionally this results in some code duplication; all 'hashify' methods use similar structure which is repeated. This should be DRYed.
also see: https://github.com/alces-software/adminware/pull/148#discussion_r231081079