Skip to content

Commit

Permalink
chore: Deprecate old commands in help output (#5595)
Browse files Browse the repository at this point in the history
  • Loading branch information
holmanb committed Aug 12, 2024
1 parent 0787d62 commit 555bc30
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions cloudinit/cmd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,14 +949,17 @@ def main(sysv_args=None):
"--debug",
"-d",
action="store_true",
help="Show additional pre-action logging (default: %(default)s).",
help=(
"DEPRECATED: Show additional pre-action "
"logging (default: %(default)s)."
),
default=False,
)
parser.add_argument(
"--force",
action="store_true",
help=(
"Force running even if no datasource is"
"DEPRECATED: Force running even if no datasource is"
" found (use at your own risk)."
),
dest="force",
Expand All @@ -979,7 +982,10 @@ def main(sysv_args=None):

# Each action and its sub-options (if any)
parser_init = subparsers.add_parser(
"init", help="Initialize cloud-init and perform initial modules."
"init",
help=(
"DEPRECATED: Initialize cloud-init and perform initial modules."
),
)
parser_init.add_argument(
"--local",
Expand All @@ -1002,7 +1008,8 @@ def main(sysv_args=None):

# These settings are used for the 'config' and 'final' stages
parser_mod = subparsers.add_parser(
"modules", help="Activate modules using a given configuration key."
"modules",
help=("DEPRECATED: Activate modules using a given configuration key."),
)
extra_help = lifecycle.deprecate(
deprecated="`init`",
Expand Down Expand Up @@ -1033,7 +1040,11 @@ def main(sysv_args=None):

# This subcommand allows you to run a single module
parser_single = subparsers.add_parser(
"single", help="Run a single module."
"single",
help=(
"Manually run a single module. Useful for "
"testing during development."
),
)
parser_single.add_argument(
"--name",
Expand Down

0 comments on commit 555bc30

Please sign in to comment.