Skip to content

Commit

Permalink
feat: Remove useless CLI options from list command
Browse files Browse the repository at this point in the history
* Card ID: CCT-734
* Removed --available and --consumed CLI options and other options
  related to listing available and consumed subscriptions
* Only --installed (default) and --matches remains
* Modified man page
* Modified bash completion scripts
* Removed many unit tests and modified existing unit tests
  related to installed products. Unit tests consider only
  SCA mode
  • Loading branch information
jirihnidek committed Sep 17, 2024
1 parent 6006ec6 commit 843fcef
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 829 deletions.
5 changes: 1 addition & 4 deletions etc-conf/subscription-manager.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,8 @@ _subscription_manager_identity()

_subscription_manager_list()
{
local opts="--afterdate --all --available --consumed --installed
--ondate --servicelevel
--match-installed --no-overlap
local opts="--installed
--matches
--pool-only
${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
}
Expand Down
48 changes: 3 additions & 45 deletions man/subscription-manager.8
Original file line number Diff line number Diff line change
Expand Up @@ -443,61 +443,19 @@ Removes any previously set usage preference.
.SS LIST OPTIONS
The
.B list
command lists all of the subscriptions that are compatible with a system. The options allow the list to be filtered by subscriptions that are used by the system or unused subscriptions that are available to the system.

.TP
.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.

.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.

.TP
.B --available
Lists available subscriptions which are not yet attached to the system.

.TP
.B --consumed
Lists all of the subscriptions currently attached to the system.
command lists all of the installed products on the system. The options allow the list to be filtered.

.TP
.B --installed
Lists products which are currently installed on the system which may (or may not) have subscriptions associated with them, as well as products with attached subscriptions which may (or may not) be installed. (default)

.TP
.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.

.TP
.B --no-overlap
Shows pools which provide products that are not already covered; only used with
.B --available
option.

.TP
.B --match-installed
Shows only subscriptions matching products that are currently installed; only used with
.B --available
option.
Lists products which are currently installed on the system.

.TP
.B --matches=SEARCH
Limits the output of --installed, --available and --consumed to only subscriptions or products which contain SEARCH in the subscription or product information, varying with the list requested and the server version.
Limits the output of installed products which contain SEARCH in product information.
.br
SEARCH may contain the wildcards ? or * to match a single character or zero or more characters, respectively. The wildcard characters may be escaped with a backslash to represent a literal
question mark or asterisk. Likewise, to represent a backslash, it must be escaped with another backslash.

.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.

.SS REFRESH OPTIONS
The
.B refresh
Expand Down
Loading

0 comments on commit 843fcef

Please sign in to comment.