Bug #10902
closed--csv option cause hammer to interactively ask for user and password
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1212069
Description of problem:
"--csv" option cause hammer to interactively ask for user and password (at least for "product list")
Version-Release number of selected component (if applicable):
rubygem-hammer_cli-0.1.4.8-1.el6_6sat.noarch
Satellite-6.1.0-RHEL-6-20150409.0-Satellite-x86_64
How reproducible:
always
- hammer --username 'admin' --password '<pass>' product list --organization-id '3' --per-page 1000
---|------------------------------------------------------------|-------------|--------------|--------------|-----------
ID | NAME | DESCRIPTION | ORGANIZATION | REPOSITORIES | SYNC STATE
---|------------------------------------------------------------|-------------|--------------|--------------|-----------
1 | Red Hat Beta | | satellite-qa | 0 | not_synced
8 | Red Hat Enterprise Linux High Availability for RHEL Server | | satellite-qa | 0 | not_synced
12 | Red Hat Enterprise Linux Load Balancer for RHEL Server | | satellite-qa | 0 | not_synced
9 | Red Hat Enterprise Linux Server | | satellite-qa | 1 | finished
10 | Red Hat Satellite | | satellite-qa | 0 | not_synced
7 | Red Hat Satellite 6 Beta | | satellite-qa | 0 | not_synced
6 | Red Hat Satellite Beta | | satellite-qa | 0 | not_synced
4 | Red Hat Satellite Capsule | | satellite-qa | 0 | not_synced
2 | Red Hat Satellite Capsule Beta | | satellite-qa | 0 | not_synced
5 | Red Hat Satellite with Embedded Oracle | | satellite-qa | 0 | not_synced
11 | Red Hat Software Collections Beta for RHEL Server | | satellite-qa | 0 | not_synced
3 | Red Hat Software Collections for RHEL Server | | satellite-qa | 0 | not_synced
---|------------------------------------------------------------|-------------|--------------|--------------|----------- - hammer --csv --username 'admin' --password '<pass>' product list --organization-id '3' --per-page 1000
[Foreman] Username: admin
[Foreman] Password for admin:
ID,Name,Description,Organization,Repositories,Sync State
1,Red Hat Beta,,satellite-qa,0,not_synced
8,Red Hat Enterprise Linux High Availability for RHEL Server,,satellite-qa,0,not_synced
12,Red Hat Enterprise Linux Load Balancer for RHEL Server,,satellite-qa,0,not_synced
9,Red Hat Enterprise Linux Server,,satellite-qa,1,finished
10,Red Hat Satellite,,satellite-qa,0,not_synced
7,Red Hat Satellite 6 Beta,,satellite-qa,0,not_synced
6,Red Hat Satellite Beta,,satellite-qa,0,not_synced
4,Red Hat Satellite Capsule,,satellite-qa,0,not_synced
2,Red Hat Satellite Capsule Beta,,satellite-qa,0,not_synced
5,Red Hat Satellite with Embedded Oracle,,satellite-qa,0,not_synced
11,Red Hat Software Collections Beta for RHEL Server,,satellite-qa,0,not_synced
3,Red Hat Software Collections for RHEL Server,,satellite-qa,0,not_synced
Actual results:
When you use "--csv" option when listing products, you have to enter username/password even when defined on command-line - see examples above.
Expected results:
When you have "--username" and "--password" on command-line, you should not be asked to enter these again even with "--csv" option present.
Updated by Martin Bacovsky over 9 years ago
Workaround: use --csv after the credentials
Updated by Martin Bacovsky over 9 years ago
- Category set to Hammer core
- Status changed from New to Assigned
Updated by The Foreman Bot over 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/172 added
- Pull request deleted (
)
Updated by Martin Bacovsky over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset cdb537c3b0d65dbe1a98ab33a450fff099b48fbb.