Skip to content

feat: Improve help command of create commands#148

Merged
amstuta merged 1 commit intomainfrom
dev/aamstutz/improve-help-cmd
Feb 19, 2026
Merged

feat: Improve help command of create commands#148
amstuta merged 1 commit intomainfrom
dev/aamstutz/improve-help-cmd

Conversation

@amstuta
Copy link
Collaborator

@amstuta amstuta commented Feb 19, 2026

Description

This PR improves the help of create and edit commands by grouping flags of the command itself and the common creation / edition flags (--from-file, --init-file, --editor, --replace).

Example:

Usage:
  ovhcloud cloud network gateway create <region> [flags]

Flags:
  -h, --help                                     help for create
      --model string                             Gateway model (s, m, l, xl, 2xl, 3xl)
      --name string                              Name of the gateway
      --network-id string                        ID of the existing private network to create the gateway in
      --network-name string                      Name of the private network
      --network-vlan-id int                      VLAN ID for the private network
      --subnet-allocation-pools strings          Allocation pools for the subnet in format start:end
      --subnet-cidr string                       CIDR of the subnet
      --subnet-dns-name-servers strings          DNS name servers for the subnet
      --subnet-enable-dhcp                       Enable DHCP for the subnet
      --subnet-gateway-ip string                 Gateway IP address for the subnet
      --subnet-host-routes strings               Host routes for the subnet in format destination:nextHop
      --subnet-id string                         ID of the existing subnet to create the gateway in
      --subnet-ip-version int                    IP version (4 or 6)
      --subnet-name string                       Name of the subnet
      --subnet-use-default-public-dns-resolver   Use default DNS resolver for the subnet
      --wait                                     Wait for gateway creation to be done before exiting

Input Flags:
      --editor             Use a text editor to define parameters
      --from-file string   File containing parameters
      --init-file string   Create a file with example parameters
      --replace            Replace parameters file if it already exists

Global Flags:
      --cloud-project string   Cloud project ID
  -d, --debug                  Activate debug mode (will log all HTTP requests details)
  -f, --format string          Output value according to given format (expression using https://github.com/PaesslerAG/gval syntax)
                               Examples:
                                 --format 'id' (to extract a single field)
                                 --format 'nested.field.subfield' (to extract a nested field)
                                 --format '[id, 'name']' (to extract multiple fields as an array)
                                 --format '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
                                 --format 'name+","+type' (to extract and concatenate fields in a string)
                                 --format '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
  -e, --ignore-errors          Ignore errors in API calls when it is not fatal to the execution
  -i, --interactive            Interactive output
  -j, --json                   Output in JSON
  -y, --yaml                   Output in YAML

Type of change

  • Improvement (improvement of existing commands)

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code
  • I updated the documentation by running make doc
  • I ran go mod tidy
  • I have added tests that prove my fix is effective or that my feature works

Signed-off-by: Arthur Amstutz <arthur.amstutz@corp.ovh.com>
@amstuta amstuta requested a review from a team as a code owner February 19, 2026 07:42
@amstuta amstuta merged commit 25cc0f9 into main Feb 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants