mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 17:00:00 +00:00
TUN-3809: Allow routes ip show to output as JSON or YAML
It also fixes the marshelling of CIDR into JSON since otherwise it would show garbled characters as the mask.
This commit is contained in:
@@ -41,7 +41,7 @@ func buildRouteIPSubcommand() *cli.Command {
|
||||
Usage: "Show the routing table",
|
||||
UsageText: "cloudflared tunnel [--config FILEPATH] route ip show [flags]",
|
||||
Description: `Shows your organization's private route table. You can use flags to filter the results.`,
|
||||
Flags: teamnet.FilterFlags,
|
||||
Flags: showRoutesFlags(),
|
||||
},
|
||||
{
|
||||
Name: "delete",
|
||||
@@ -62,6 +62,13 @@ func buildRouteIPSubcommand() *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
func showRoutesFlags() []cli.Flag {
|
||||
flags := make([]cli.Flag, 0)
|
||||
flags = append(flags, teamnet.FilterFlags...)
|
||||
flags = append(flags, outputFormatFlag)
|
||||
return flags
|
||||
}
|
||||
|
||||
func showRoutesCommand(c *cli.Context) error {
|
||||
sc, err := newSubcommandContext(c)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user