Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Mar 8, 2024
1 parent a534ce4 commit 5378580
Show file tree
Hide file tree
Showing 91 changed files with 100 additions and 92 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "all",
Short: "Commands that apply to all resources",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/base/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (dc *DeleteCmd) CobraCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: fmt.Sprintf("delete %s<%s>", opts, strings.ToLower(dc.ResourceNameSingular)),
Short: dc.ShortDescription,
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(dc.NameSuggestions(s.Client()))),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/base/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (dc *DescribeCmd) CobraCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: fmt.Sprintf("describe [options] <%s>", strings.ToLower(dc.ResourceNameSingular)),
Short: dc.ShortDescription,
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(dc.NameSuggestions(s.Client()))),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/base/set_rdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (rc *SetRdnsCmd) CobraCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: fmt.Sprintf("set-rdns [options] <%s> --hostname <hostname>", strings.ToLower(rc.ResourceNameSingular)),
Short: rc.ShortDescription,
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(rc.NameSuggestions(s.Client()))),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/base/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (uc *UpdateCmd) CobraCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: fmt.Sprintf("update [options] <%s>", strings.ToLower(uc.ResourceNameSingular)),
Short: uc.ShortDescription,
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(uc.NameSuggestions(s.Client()))),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/certificate/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "certificate",
Short: "Manage certificates",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/certificate/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var CreateCmd = base.CreateCmd{
cmd := &cobra.Command{
Use: "create [options] --name <name> (--type managed | --type uploaded --cert-file <file> --key-file <file>)",
Short: "Create or upload a Certificate",
Args: util.Validate,
Args: util.ValidateExact,
}

cmd.Flags().String("name", "", "Certificate name (required)")
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/completion/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ and source this file from your PowerShell profile.
PS> hcloud completion powershell > hcloud.ps1
`,
Args: util.Validate,
Args: util.ValidateExact,
ValidArgs: []string{"bash", "fish", "zsh", "powershell"},
DisableFlagsInUseLine: true,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/context/active.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func newActiveCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "active",
Short: "Show active context",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
RunE: state.Wrap(s, runActive),
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "context",
Short: "Manage contexts",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/context/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func newCreateCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "create <name>",
Short: "Create a new context",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
RunE: state.Wrap(s, runCreate),
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/context/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func newDeleteCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "delete <context>",
Short: "Delete a context",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidates(config.ContextNames(s.Config())...)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/context/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func newListCommand(s state.State) *cobra.Command {
"Displays a list of contexts.",
listTableOutput.Columns(),
),
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
RunE: state.Wrap(s, runList),
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/context/use.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func newUseCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "use <context>",
Short: "Use a context",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidates(config.ContextNames(s.Config())...)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/datacenter/datacenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "datacenter",
Short: "Manage datacenters",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/firewall/add_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var AddRuleCmd = base.Cmd{
cmd := &cobra.Command{
Use: "add-rule [options] <firewall> (--direction in --source-ips <ips> | --direction out --destination-ips <ips>) --protocol <icmp|udp|tcp|esp|gre>",
Short: "Add a single rule to a firewall",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.Firewall().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/firewall/apply_to_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var ApplyToResourceCmd = base.Cmd{
cmd := &cobra.Command{
Use: "apply-to-resource <firewall> (--type server --server <server> | --type label_selector --label-selector <label-selector>)",
Short: "Applies a Firewall to a single resource",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.Firewall().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/firewall/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var CreateCmd = base.CreateCmd{
cmd := &cobra.Command{
Use: "create [options] --name <name>",
Short: "Create a Firewall",
Args: util.Validate,
Args: util.ValidateExact,
}
cmd.Flags().String("name", "", "Name")
cmd.MarkFlagRequired("name")
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/firewall/delete_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var DeleteRuleCmd = base.Cmd{
cmd := &cobra.Command{
Use: "delete-rule [options] <firewall> (--direction in --source-ips <ips> | --direction out --destination-ips <ips>) --protocol <icmp|esp|gre|udp|tcp>",
Short: "Delete a single rule to a firewall",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.Firewall().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/firewall/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "firewall",
Short: "Manage Firewalls",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/firewall/remove_from_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var RemoveFromResourceCmd = base.Cmd{
cmd := &cobra.Command{
Use: "remove-from-resource <firewall> (--type server --server <server> | --type label_selector --label-selector <label-selector>)",
Short: "Removes a Firewall from a single resource",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.Firewall().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/firewall/replace_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var ReplaceRulesCmd = base.Cmd{
cmd := &cobra.Command{
Use: "replace-rules <firewall> --rules-file <file>",
Short: "Replaces all rules from a Firewall from a file",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.Firewall().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/floatingip/assign.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var AssignCmd = base.Cmd{
return &cobra.Command{
Use: "assign <floating-ip> <server>",
Short: "Assign a Floating IP to a server",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(
cmpl.SuggestCandidatesF(client.FloatingIP().Names),
cmpl.SuggestCandidatesF(client.Server().Names),
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/floatingip/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var CreateCmd = base.CreateCmd{
cmd := &cobra.Command{
Use: "create [options] --type <ipv4|ipv6> (--home-location <location> | --server <server>)",
Short: "Create a Floating IP",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/floatingip/floatingip.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "floating-ip",
Short: "Manage Floating IPs",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/floatingip/unassign.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var UnassignCmd = base.Cmd{
return &cobra.Command{
Use: "unassign <floating-ip>",
Short: "Unassign a Floating IP",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.FloatingIP().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "image",
Short: "Manage images",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/iso/iso.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "iso",
Short: "Manage ISOs",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/add_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var AddServiceCmd = base.Cmd{
cmd := &cobra.Command{
Use: "add-service [options] <load-balancer> (--protocol http | --protocol tcp --listen-port <1-65535> --destination-port <1-65535> | --protocol https --http-certificates <ids>)",
Short: "Add a service to a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/add_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var AddTargetCmd = base.Cmd{
cmd := &cobra.Command{
Use: "add-target [options] <load-balancer>",
Short: "Add a target to a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/attach_to_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var AttachToNetworkCmd = base.Cmd{
cmd := &cobra.Command{
Use: "attach-to-network [--ip <ip>] <load-balancer> --network <network>",
Short: "Attach a Load Balancer to a Network",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/change_algorithm.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var ChangeAlgorithmCmd = base.Cmd{
cmd := &cobra.Command{
Use: "change-algorithm <load-balancer> --algorithm-type <round_robin|least_connections>",
Short: "Changes the algorithm of a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/change_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var ChangeTypeCmd = base.Cmd{
return &cobra.Command{
Use: "change-type <load-balancer> <load-balancer-type>",
Short: "Change type of a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(
cmpl.SuggestCandidatesF(client.LoadBalancer().Names),
cmpl.SuggestCandidatesF(client.LoadBalancerType().Names),
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var CreateCmd = base.CreateCmd{
cmd := &cobra.Command{
Use: "create [options] --name <name> --type <type>",
Short: "Create a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/detach_from_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var DetachFromNetworkCmd = base.Cmd{
cmd := &cobra.Command{
Use: "detach-from-network <load-balancer> --network <network>",
Short: "Detach a Load Balancer from a Network",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/disable_public_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var DisablePublicInterfaceCmd = base.Cmd{
return &cobra.Command{
Use: "disable-public-interface [options] <load-balancer>",
Short: "Disable the public interface of a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/enable_public_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var EnablePublicInterfaceCmd = base.Cmd{
return &cobra.Command{
Use: "enable-public-interface <load-balancer>",
Short: "Enable the public interface of a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/load_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func NewCommand(s state.State) *cobra.Command {
Use: "load-balancer",
Short: "Manage Load Balancers",
Aliases: []string{"loadbalancer"},
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var MetricsCmd = base.Cmd{
cmd := &cobra.Command{
Use: fmt.Sprintf("metrics [options] <load-balancer> --type <%s>", strings.Join(metricTypeStrings, "|")),
Short: "[ALPHA] Metrics from a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/remove_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var RemoveTargetCmd = base.Cmd{
cmd := &cobra.Command{
Use: "remove-target [options] <load-balancer>",
Short: "Remove a target from a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancer/update_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var UpdateServiceCmd = base.Cmd{
cmd := &cobra.Command{
Use: "update-service [options] <load-balancer> --listen-port <1-65535>",
Short: "Updates a service from a Load Balancer",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.LoadBalancer().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/loadbalancertype/load_balancer_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "load-balancer-type",
Short: "Manage Load Balancer types",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/location/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func NewCommand(s state.State) *cobra.Command {
cmd := &cobra.Command{
Use: "location",
Short: "Manage locations",
Args: util.Validate,
Args: util.ValidateExact,
TraverseChildren: true,
DisableFlagsInUseLine: true,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/network/add_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var AddRouteCmd = base.Cmd{
cmd := &cobra.Command{
Use: "add-route <network> --destination <destination> --gateway <ip>",
Short: "Add a route to a network",
Args: util.Validate,
Args: util.ValidateExact,
ValidArgsFunction: cmpl.SuggestArgs(cmpl.SuggestCandidatesF(client.Network().Names)),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
Loading

0 comments on commit 5378580

Please sign in to comment.