-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
Description
Summary
Add a --rest flag (or --backend=rest) to GCM CLI monitoring commands that routes Slurm queries through the REST API (SlurmRestClient) instead of the default CLI-based SlurmCliClient.
Motivation
The SlurmRestClient (PR #62) implements the same SlurmClient Protocol as SlurmCliClient, making it a drop-in replacement. However, there's currently no CLI-level switch to choose between backends. A --rest flag would allow operators to use the REST API without code changes, which is especially useful for:
- Monitoring hosts that don't have Slurm CLI tools installed
- Environments where slurmrestd is the preferred access method
- Reducing subprocess overhead in high-frequency collection loops
Proposed Interface
# Use REST API instead of CLI
gcm squeue --rest --rest-url=http://slurmctl:6820 --rest-token=<jwt> --sink=stdout --once
# Or via config file
gcm squeue --backend=rest --sink=stdout --onceAdditional context
Reactions are currently unavailable