diff --git a/command/v7/map_route_command.go b/command/v7/map_route_command.go index 5036a2caaa..d4e3d62889 100644 --- a/command/v7/map_route_command.go +++ b/command/v7/map_route_command.go @@ -2,10 +2,10 @@ package v7 import ( "code.cloudfoundry.org/cli/v9/actor/actionerror" - "code.cloudfoundry.org/cli/v9/api/cloudcontroller/ccversion" - "code.cloudfoundry.org/cli/v9/command" + "code.cloudfoundry.org/cli/v9/api/cloudcontroller/ccversion" + "code.cloudfoundry.org/cli/v9/command" "code.cloudfoundry.org/cli/v9/command/flag" - "code.cloudfoundry.org/cli/v9/resources" + "code.cloudfoundry.org/cli/v9/resources" ) type MapRouteCommand struct { @@ -34,10 +34,11 @@ func (cmd MapRouteCommand) Examples() string { return ` CF_NAME map-route my-app example.com # example.com CF_NAME map-route my-app example.com --hostname myhost # myhost.example.com -CF_NAME map-route my-app example.com --hostname myhost -o loadbalancing=least-connection # myhost.example.com with a per-route option CF_NAME map-route my-app example.com --hostname myhost --path foo # myhost.example.com/foo CF_NAME map-route my-app example.com --hostname myhost --app-protocol http2 # myhost.example.com CF_NAME map-route my-app example.com --hostname myhost --app-port 8090 # myhost.example.com +CF_NAME map-route my-app example.com --hostname myhost -o loadbalancing=least-connection # myhost.example.com with a per-route option +CF_NAME map-route my-app example.com -o loadbalancing=hash -o hash_header=My-Hash-Header # use hash-based routing for example.com CF_NAME map-route my-app example.com --port 5000 # example.com:5000` } diff --git a/command/v7/update_route_command.go b/command/v7/update_route_command.go index 210627b567..af20a2322c 100644 --- a/command/v7/update_route_command.go +++ b/command/v7/update_route_command.go @@ -29,10 +29,13 @@ Update an existing HTTP route: func (cmd UpdateRouteCommand) Examples() string { return ` -CF_NAME update-route example.com -o loadbalancing=round-robin, -CF_NAME update-route example.com -o loadbalancing=least-connection, -CF_NAME update-route example.com -r loadbalancing, -CF_NAME update-route example.com --hostname myhost --path foo -o loadbalancing=round-robin` +CF_NAME update-route example.com -o loadbalancing=round-robin # use round-robin load balancing for route +CF_NAME update-route example.com -o loadbalancing=least-connection # use least-connection load balancing for route +CF_NAME update-route example.com -o loadbalancing=hash -o hash_header=My-Hash-Header # use hash-based load balancing for route +CF_NAME update-route example.com -o loadbalancing=hash -o hash_header=My-Hash-Header -o hash_balance=1.3 # use hash-based load balancing with balance factor +CF_NAME update-route example.com -r loadbalancing # remove load balancing option +CF_NAME update-route example.com --hostname myhost --path foo -o loadbalancing=round-robin # update route myhost.example.com/foo +` } func (cmd UpdateRouteCommand) Execute(args []string) error { err := cmd.SharedActor.CheckTarget(true, true)