m/c/metroctl: implement the "list" command
list prints node IDs of existing nodes.
If no positional arguments are passed, or the only positional argument
equals "all", all existing nodes will be processed.
Otherwise, if any positional arguments are used, the output set will
be limited to node IDs matching the positional arguments. Nonexistent
nodes will not be listed.
The node set can be further narrowed with an optional CEL node filter
expression, set with the new --filter flag.
The output format can be adjusted using the --format (-f) flag.
Currently, only plaintext output is available.
The output will be saved to a file, if a path is specified with the
--output (-o) flag.
Change-Id: I44d57ad52805924673354c70e54cd299a88ad75f
Reviewed-on: https://review.monogon.dev/c/monogon/+/848
Tested-by: Jenkins CI
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/cli/metroctl/install.go b/metropolis/cli/metroctl/install.go
index 07f5d3e..07faad4 100644
--- a/metropolis/cli/metroctl/install.go
+++ b/metropolis/cli/metroctl/install.go
@@ -118,7 +118,7 @@
},
}
} else {
- cc := dialAuthenticated()
+ cc := dialAuthenticated(ctx)
mgmt := api.NewManagementClient(cc)
resT, err := mgmt.GetRegisterTicket(ctx, &api.GetRegisterTicketRequest{})
if err != nil {