alces-software / adminware

A sandbox CLI for running commands remotely across nodes
1 stars 0 forks source link

Dev/combine group and groups #148

Closed DavidMarchant closed 5 years ago

DavidMarchant commented 5 years ago

In order to be inline with new view tool and view family commands, combines view group and view groups into one. When called with no arguments. it give a list of all groups in the help text.

Involved making functions in Config to create the command hash. I also cached the all_groups hash - like with all_configs and all_families - and reused it in cli_utils to expand the groups.

Also set_nodes_config was made redundant in an earlier commit and I took the liberty to remove it.

If my changes to cli_utils are unwanted the last two commits can be reverted.

Additionally for the time being I defined the methods on group hashes in Config despite the fact they have nothing to do with configs. I feel like a mode general purpose module is needed but I also feel like it'll do for now.

Fixes #138

DavidMarchant commented 5 years ago

As per IRL discussion, this is fit to merge now