Skip to content

Commit

Permalink
fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4c6565 committed Jul 15, 2021
1 parent d959b8f commit 9511737
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/loadbalancer/loadbalancer_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func loadbalancerACLShow(service loadbalancer.LoadBalancerService, cmd *cobra.Co

func loadbalancerACLCreateCmd(f factory.ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "create <acl: id>...",
Use: "create <acl: id>",
Short: "Creates an ACL",
Long: "This command creates a ACLs with a single condition/action. Additional conditions/actions can be added with subcommands",
Example: "ukfast loadbalancer acl create --name \"test ACL\" --host-group 1 --condition \"header_matches:host=ukfast.co.uk,accept=application/json\" --action \"redirect:location=developers.ukfast.io,status=302\"",
Expand Down
2 changes: 1 addition & 1 deletion cmd/loadbalancer/loadbalancer_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func loadbalancerListenerShow(service loadbalancer.LoadBalancerService, cmd *cob

func loadbalancerListenerCreateCmd(f factory.ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "create <listener: id>...",
Use: "create <listener: id>",
Short: "Creates a listener",
Long: "This command creates a listener",
Example: "ukfast loadbalancer listener create --cluster 123 --default-target-group 456 --name \"test-listener\" --mode http",
Expand Down
2 changes: 1 addition & 1 deletion cmd/loadbalancer/loadbalancer_listener_accessip.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func loadbalancerListenerAccessIPList(service loadbalancer.LoadBalancerService,

func loadbalancerListenerAccessIPCreateCmd(f factory.ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "create <listener: id> <accessip: id>...",
Use: "create <listener: id>",
Short: "Creates an access IP",
Long: "This command creates an access IP",
Example: "ukfast loadbalancer listener accessip create 123 --ip 1.2.3.4",
Expand Down
6 changes: 3 additions & 3 deletions cmd/loadbalancer/loadbalancer_listener_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ func loadbalancerListenerCertificateShow(service loadbalancer.LoadBalancerServic

func loadbalancerListenerCertificateCreateCmd(f factory.ClientFactory, fs afero.Fs) *cobra.Command {
cmd := &cobra.Command{
Use: "create <listener: id> <certificate: id>...",
Use: "create <listener: id>",
Short: "Creates a certificate",
Long: "This command creates a certificate",
Example: "ukfast loadbalancer listener certificate create 123 --cluster 123 --default-target-group 456 --name \"test-targetgroup\" --mode http",
Example: "ukfast loadbalancer listener certificate create 123 --key-file /tmp/cert.key --certificate-file /tmp/cert.crt --ca-bundle-file /tmp/ca.crt",
Args: func(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
return errors.New("Missing listener")
Expand Down Expand Up @@ -185,7 +185,7 @@ func loadbalancerListenerCertificateUpdateCmd(f factory.ClientFactory, fs afero.
Use: "update <listener: id> <certificate: id>...",
Short: "Updates a certificate",
Long: "This command updates one or more certificates",
Example: "ukfast loadbalancer listener certificate update 123 456 --name mytargetgroup",
Example: "ukfast loadbalancer listener certificate update 123 456 --name mycertificate",
Args: func(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
return errors.New("Missing listener")
Expand Down
4 changes: 2 additions & 2 deletions cmd/loadbalancer/loadbalancer_targetgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func loadbalancerTargetGroupShow(service loadbalancer.LoadBalancerService, cmd *

func loadbalancerTargetGroupCreateCmd(f factory.ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "create <targetgroup: id>...",
Use: "create <targetgroup: id>",
Short: "Creates a target group",
Long: "This command creates a target group",
Example: "ukfast loadbalancer targetgroup create --cluster 123 --default-target-group 456 --name \"test-targetgroup\" --mode http",
Example: "ukfast loadbalancer targetgroup create --cluster 123 --name \"test-targetgroup\" --balance roundrobin --mode http",
RunE: loadbalancerCobraRunEFunc(f, loadbalancerTargetGroupCreate),
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/loadbalancer/loadbalancer_targetgroup_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func loadbalancerTargetGroupTargetShow(service loadbalancer.LoadBalancerService,

func loadbalancerTargetGroupTargetCreateCmd(f factory.ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "create <targetgroup: id> <target: id>...",
Use: "create <targetgroup: id>",
Short: "Creates a target",
Long: "This command creates a target",
Example: "ukfast loadbalancer targetgroup target create 123 --ip 1.2.3.4 --port 443",
Expand Down

0 comments on commit 9511737

Please sign in to comment.