From a84cbcde7e3e39780477edd716d309dfe07bff73 Mon Sep 17 00:00:00 2001 From: Sudarsan Reddy Date: Mon, 24 Jan 2022 10:53:32 +0000 Subject: [PATCH] TUN-5669: Change network command to vnet --- cfapi/ip_route_filter.go | 2 +- cmd/cloudflared/tunnel/teamnet_subcommands.go | 8 ++++---- cmd/cloudflared/tunnel/vnets_subcommands.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cfapi/ip_route_filter.go b/cfapi/ip_route_filter.go index 1f0301ac..398a9982 100644 --- a/cfapi/ip_route_filter.go +++ b/cfapi/ip_route_filter.go @@ -36,7 +36,7 @@ var ( Usage: "Show only routes with this comment.", } filterIpRouteByVnet = cli.StringFlag{ - Name: "filter-virtual-network-id", + Name: "filter-vnet-id", Usage: "Show only routes that are attached to the given virtual network ID.", } diff --git a/cmd/cloudflared/tunnel/teamnet_subcommands.go b/cmd/cloudflared/tunnel/teamnet_subcommands.go index fbcec009..186efdb1 100644 --- a/cmd/cloudflared/tunnel/teamnet_subcommands.go +++ b/cmd/cloudflared/tunnel/teamnet_subcommands.go @@ -17,7 +17,7 @@ import ( var ( vnetFlag = &cli.StringFlag{ - Name: "virtual-network", + Name: "vnet", Aliases: []string{"vn"}, Usage: "The ID or name of the virtual network to which the route is associated to.", } @@ -35,7 +35,7 @@ determine who can reach certain routes. By default IP routes all exist within a single virtual network. If you use the same IP space(s) in different physical private networks, all meant to be reachable via IP routes, then you have to manage the ambiguous IP routes by associating them to virtual networks. -See "cloudflared tunnel network --help" for more information.`, +See "cloudflared tunnel vnet --help" for more information.`, Subcommands: []*cli.Command{ { Name: "add", @@ -50,9 +50,9 @@ the specified Tunnel, and reach an IP in the given CIDR, as long as that IP is reachable from cloudflared. If the CIDR exists in more than one private network, to be connected with Cloudflare Tunnels, then you have to manage those IP routes with virtual networks (see -"cloudflared tunnel network --help)". In those cases, you then have to tell +"cloudflared tunnel vnet --help)". In those cases, you then have to tell which virtual network's routing table you want to add the route to with: -"cloudflared tunnel route ip add --virtual-network [ID/name] [CIDR] [TUNNEL]".`, +"cloudflared tunnel route ip add --vnet [ID/name] [CIDR] [TUNNEL]".`, Flags: []cli.Flag{vnetFlag}, }, { diff --git a/cmd/cloudflared/tunnel/vnets_subcommands.go b/cmd/cloudflared/tunnel/vnets_subcommands.go index e55327ce..4a65ad96 100644 --- a/cmd/cloudflared/tunnel/vnets_subcommands.go +++ b/cmd/cloudflared/tunnel/vnets_subcommands.go @@ -37,7 +37,7 @@ var ( func buildVirtualNetworkSubcommand(hidden bool) *cli.Command { return &cli.Command{ - Name: "network", + Name: "vnet", Usage: "Configure and query virtual networks to manage private IP routes with overlapping IPs.", UsageText: "cloudflared tunnel [--config FILEPATH] network COMMAND [arguments...]", Description: `cloudflared allows to manage IP routes that expose origins in your private network space via their IP directly @@ -177,7 +177,7 @@ func listVirtualNetworksCommand(c *cli.Context) error { if len(vnets) > 0 { formatAndPrintVnetsList(vnets) } else { - fmt.Println("No virtual networks were found for the given filter flags. You can use 'cloudflared tunnel network add' to add a virtual network.") + fmt.Println("No virtual networks were found for the given filter flags. You can use 'cloudflared tunnel vnet add' to add a virtual network.") } return nil