From 91d325fae46baad84307e6bb32e81fcba3d10554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=BCnwald?= Date: Fri, 25 Oct 2024 14:13:24 +0200 Subject: [PATCH] [1.29] feat/cct-868: Subset of list command options marked as deprecated * Options --available, --all, --ondate, --servicelevel --no-overlap --match-install, --pool-only, --afterdate were marked as deprecated in ListCommand definition of their help string. * The options were marked as deprecated in list command manuald page. * Autocompletion for bash was updated according to previous changes (options marked as deprecated). Format of the hint was changed to make it more readable when marks 'deprecated' are added. CARD ID: cct-868 --- etc-conf/subscription-manager.completion.sh | 14 ++++++++++---- man/subscription-manager.8 | 14 +++++++------- src/subscription_manager/cli_command/list.py | 16 ++++++++-------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/etc-conf/subscription-manager.completion.sh b/etc-conf/subscription-manager.completion.sh index 592e47b3c5..bc7aaa7478 100644 --- a/etc-conf/subscription-manager.completion.sh +++ b/etc-conf/subscription-manager.completion.sh @@ -155,11 +155,17 @@ _subscription_manager_import() _subscription_manager_list() { - local opts="--afterdate --all --available --consumed --installed - --ondate --servicelevel - --match-installed --no-overlap + local opts="--afterdate (deprecated) + --all (deprecated) + --available (deprecated) + --consumed + --installed + --ondate (deprecated) + --servicelevel (deprecated) + --match-installed (deprecated) + --no-overlap (deprecated) --matches - --pool-only + --pool-only (deprecated) ${_subscription_manager_common_opts}" COMPREPLY=($(compgen -W "${opts}" -- ${1})) } diff --git a/man/subscription-manager.8 b/man/subscription-manager.8 index 9bb4ca635e..777cf59246 100644 --- a/man/subscription-manager.8 +++ b/man/subscription-manager.8 @@ -614,17 +614,17 @@ command lists all of the subscriptions that are compatible with a system. The op .B --afterdate=YYYY-MM-DD Shows pools that are active on or after the given date. This is only used with the .B --available -option. +option. (deprecated) .TP .B --all Lists all possible subscriptions that have been purchased, even if they don't match the architecture of the system. This is used with the .B --available -option. +option. (deprecated) .TP .B --available -Lists available subscriptions which are not yet attached to the system. +Lists available subscriptions which are not yet attached to the system. (deprecated) .TP .B --consumed @@ -638,19 +638,19 @@ Lists products which are currently installed on the system which may (or may not .B --ondate=YYYY-MM-DD Sets the date to use to search for active and available subscriptions. The default (if not explicitly passed) is today's date; using a later date looks for subscriptions which will be active then. This is only used with the .B --available -option. +option. (deprecated) .TP .B --no-overlap Shows pools which provide products that are not already covered; only used with .B --available -option. +option. (deprecated) .TP .B --match-installed Shows only subscriptions matching products that are currently installed; only used with .B --available -option. +option. (deprecated) .TP .B --matches=SEARCH @@ -661,7 +661,7 @@ question mark or asterisk. Likewise, to represent a backslash, it must be escape .TP .B --pool-only -Limits the output of --available and --consumed such that only the pool IDs are displayed. No labels or errors will be printed if this option is specified. +Limits the output of --available and --consumed such that only the pool IDs are displayed. No labels or errors will be printed if this option is specified. (deprecated) .SS REFRESH OPTIONS The diff --git a/src/subscription_manager/cli_command/list.py b/src/subscription_manager/cli_command/list.py index 3c0915fa90..2217c12671 100644 --- a/src/subscription_manager/cli_command/list.py +++ b/src/subscription_manager/cli_command/list.py @@ -217,18 +217,18 @@ def __init__(self): self.parser.add_argument( "--available", action="store_true", - help=_("show those subscriptions which are available"), + help=_("show those subscriptions which are available (deprecated)"), ) self.parser.add_argument( "--all", action="store_true", - help=_("used with --available to ensure all subscriptions are returned"), + help=_("used with --available to ensure all subscriptions are returned (deprecated)"), ) self.parser.add_argument( "--ondate", dest="on_date", help=_( - "date to search on, defaults to today's date, only used with --available (example: {example})" + "date to search on, defaults to today's date, only used with --available (example: {example}) (deprecated)" ).format(example=strftime("%Y-%m-%d", localtime())), ) self.parser.add_argument( @@ -241,7 +241,7 @@ def __init__(self): dest="service_level", help=_( "shows only subscriptions matching the specified service level; " - "only used with --available and --consumed" + "only used with --available and --consumed (deprecated)" ), ) self.parser.add_argument( @@ -249,7 +249,7 @@ def __init__(self): action="store_true", help=_( "shows pools which provide products that are not already covered; " - "only used with --available" + "only used with --available (deprecated)" ), ) self.parser.add_argument( @@ -257,7 +257,7 @@ def __init__(self): action="store_true", help=_( "shows only subscriptions matching products that are currently installed; " - "only used with --available" + "only used with --available (deprecated)" ), ) self.parser.add_argument( @@ -275,7 +275,7 @@ def __init__(self): action="store_true", help=_( "lists only the pool IDs for applicable available or consumed subscriptions; " - "only used with --available and --consumed" + "only used with --available and --consumed (deprecated)" ), ) self.parser.add_argument( @@ -283,7 +283,7 @@ def __init__(self): dest="after_date", help=_( "show pools that are active on or after the given date; " - "only used with --available (example: {example})" + "only used with --available (example: {example}) (deprecated)" ).format(example=strftime("%Y-%m-%d", localtime())), )