Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove useless CLI options from list command #3456

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
DuckBoss marked this conversation as resolved.
Show resolved Hide resolved
--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. (default)

.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
7 changes: 6 additions & 1 deletion src/subscription_manager/cli_command/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
ERR_NOT_REGISTERED_MSG,
)
from subscription_manager.cli_command.org import OrgCommand
from subscription_manager.cli_command.list import ENVIRONMENT_LIST
from subscription_manager.i18n import ugettext as _
from subscription_manager.i18n import ungettext
from subscription_manager.printing_utils import columnize, echo_columnize_callback
Expand All @@ -36,8 +35,14 @@


log = logging.getLogger(__name__)

MULTI_ENV = "multi_environment"

ENVIRONMENT_LIST = [
_("Name:"),
_("Description:"),
]


class EnvironmentsCommand(OrgCommand):
def __init__(self):
Expand Down
Loading
Loading