Bug #30747
closed"capsule content" command not working in hammer shell
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1867742
Description of problem:
Running "hammer capsule content" doesn't work properly.
Version-Release number of selected component (if applicable):
Satellite 6.8 Snap 10
tfm-rubygem-hammer_cli-2.1.1-1.el7sat.noarch
How reproducible:
always
Steps to Reproduce:
1. Start "hammer shell"
2. Run "capsule content"
Actual results:
Running "capsule --help" gives following output:
hammer> capsule --help
Usage:
capsule [OPTIONS] SUBCOMMAND [ARG] ...
Parameters:
SUBCOMMAND Subcommand
[ARG] ... Subcommand arguments
Subcommands:
content Manage the capsule content
create Create a capsule
delete Delete a capsule
import-classes Import puppet classes from puppet Capsule
info Show a capsule
list List all capsules
refresh-features Refresh capsule features
update Update a capsule
Options:
-h, --help
If you try "capsule content" or "capsule content --help" you will get following:
hammer> capsule content
Error: Found more than one command.
Did you mean one of these?
content-credentials
content-view
The "capsule content" command cannot be run from hammer shell. Replacing "capsule" with "proxy" causes the same error.
Expected results:
The "capsule content" command can be run from hammer shell
Additional info:
The workaround is simple - run the command directly from the command shell like bash. Running "hammer capsule content --help" returns correct data.
$ hammer capsule content --help
Usage:
hammer capsule content [OPTIONS] SUBCOMMAND [ARG] ...
Parameters:
SUBCOMMAND Subcommand
[ARG] ... Subcommand arguments
Subcommands:
add-lifecycle-environment Add lifecycle environments to the capsule
available-lifecycle-environments List the lifecycle environments not attached to the capsule
cancel-synchronization Cancel running capsule synchronization
info Get current capsule synchronization status
lifecycle-environments List the lifecycle environments attached to the capsule
remove-lifecycle-environment Remove lifecycle environments from the capsule
synchronization-status Get current capsule synchronization status
synchronize Synchronize the content to the capsule
Options:
-h, --help Print help