Skip to content

Conversation

@brbzull0
Copy link
Contributor

@brbzull0 brbzull0 commented Oct 29, 2025

Make sure we express the intentions properly, using mutex groups from ArgParse.
#12621 needs to go in first, I'll leave this as draft till we get the first pr sorted. DONE

traffic_ctl:

Usage: traffic_ctl [OPTIONS] CMD [ARGS ...]

Commands ---------------------- Description -----------------------
drain                           Drain the requests

Options ======================= Default ===== Description =============

Group (drain_mode)
  -N, --no-new-connection                     Wait for new connections down to threshold before starting draining
  -U, --undo                                  Recover server from the drain mode

traffic_layout:

Usage: traffic_layout CMD [OPTIONS]

Commands ---------------------- Description -----------------------
info                            Show the layout as default

Options ======================= Default ===== Description =============
-j, --json                                    Produce output in JSON format (when supported)

Group (display_mode)
  --features                                  Show the compiled features
  --versions                                  Show various library and other versioning information

relates to #12605

@brbzull0 brbzull0 self-assigned this Oct 29, 2025
@brbzull0 brbzull0 added Tools traffic_ctl traffic_ctl related work. traffic_layout traffic_layout related work labels Oct 29, 2025
@brbzull0 brbzull0 added this to the 10.2.0 milestone Oct 29, 2025
@brbzull0
Copy link
Contributor Author

[approve ci]

@brbzull0 brbzull0 marked this pull request as ready for review November 11, 2025 09:47
@brbzull0
Copy link
Contributor Author

[approve ci autest 2]

mutually exclusive options.

traffic_ctl:

Usage: traffic_ctl [OPTIONS] CMD [ARGS ...]

Commands ---------------------- Description -----------------------
drain                           Drain the requests

Options ======================= Default ===== Description =============

Group (drain_mode)
  -N, --no-new-connection                     Wait for new connections down to threshold before starting draining
  -U, --undo                                  Recover server from the drain mode

traffic_layout:

Usage: traffic_layout CMD [OPTIONS]

Commands ---------------------- Description -----------------------
info                            Show the layout as default

Options ======================= Default ===== Description =============
-j, --json                                    Produce output in JSON format (when supported)

Group (display_mode)
  --features                                  Show the compiled features
  --versions                                  Show various library and other versioning information
@brbzull0 brbzull0 force-pushed the argparser_groups_opts branch from 8f31ef8 to 826c4ae Compare November 18, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools traffic_ctl traffic_ctl related work. traffic_layout traffic_layout related work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant