Skip to content

Implement per-route options in the CF CLI #3314

@maxmoehl

Description

@maxmoehl

What's the user value of this feature request?

Allow users to manage per-route options via the CLI instead of having to talk to the API directly.

Who is the functionality for?

Users of the per-route features.

How often will this functionality be used by the user?

Unknown.

Who else is affected by the change?

The change is not breaking and optional.

Is your feature request related to a problem? Please describe.

No.

Describe the solution you'd like

Implement the RFC specification.

Specifically I propose that we add a new command update-route which allows updates to the route resource. This should be implemented in a generic way to not require a change in the CLI when adding a new per-route feature. I have something like this in mind:

$ cf update-route -h
NAME:
   update-route - Update an existing route.

USAGE:
   cf update-route DOMAIN [--hostname HOSTNAME] [--path PATH] [--option OPTION=VALUE] [--remove-option OPTION]

EXAMPLES:
   cf update-route example.com -o lb_algo=round-robin
   cf update-route example.com -o lb_algo=least-connections
   cf update-route example.com -r lb_algo

OPTIONS:
   --hostname, -n      Hostname for the HTTP route (required for shared domains)
   --path              Path for the HTTP route
   --option -o         Set the value of a per-route option, key-value pairs, repeat to set multiple options
   --remove-option -r  Unset a previously set option

SEE ALSO:
   create-route, map-route, routes, unmap-route

Plus a link to the documentation describing the currently implemented options, probably we could link directly to the API spec which has to list the available options.

Describe alternatives you've considered

We could implement each field as a separate flag but that would require users to update the CLI to use new per-route options.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions