Bug 1212069
Summary: | --csv option cause hammer to interactively ask for user and password | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Jan Hutař <jhutar> |
Component: | Hammer | Assignee: | Martin Bacovsky <mbacovsk> |
Status: | CLOSED ERRATA | QA Contact: | Corey Welton <cwelton> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.1.0 | CC: | bbuckingham, bkearney, cwelton, mbacovsk |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/10902 | ||
Whiteboard: | Verified in Upstream | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 11:42:56 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jan Hutař
2015-04-15 13:41:13 UTC
I can not recreate on SNAP8. Can you please re-verify [root@satellite61 lab_exercises]# rpm -qa | grep hammer rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch rubygem-hammer_cli-0.1.4.11-1.el7sat.noarch rubygem-hammer_cli_foreman-0.1.4.14-1.el7sat.noarch rubygem-hammer_cli_gutterball-0.0.1.2-1.el7sat.noarch rubygem-hammer_cli_foreman_docker-0.0.3.7-1.el7sat.noarch rubygem-hammer_cli_katello-0.0.7.15-1.el7sat.noarch rubygem-hammer_cli_import-0.10.17-1.el7sat.noarch rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el7sat.noarch [root@satellite61 lab_exercises]# FAILEDQA: # rpm -qa | grep foreman foreman-compute-1.7.2.27-1.el6_6sat.noarch ruby193-rubygem-foreman-redhat_access-0.2.0-8.el6_6sat.noarch foreman-vmware-1.7.2.27-1.el6_6sat.noarch ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el6_6sat.noarch foreman-ovirt-1.7.2.27-1.el6_6sat.noarch ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el6_6sat.noarch rubygem-hammer_cli_foreman-0.1.4.14-1.el6_6sat.noarch foreman-selinux-1.7.2.13-1.el6_6sat.noarch foreman-libvirt-1.7.2.27-1.el6_6sat.noarch foreman-gce-1.7.2.27-1.el6_6sat.noarch ruby193-rubygem-foreman_discovery-2.0.0.15-1.el6_6sat.noarch foreman-proxy-1.7.2.5-1.el6_6sat.noarch tyan-gt24-08.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el6_6sat.noarch rubygem-hammer_cli_foreman_docker-0.0.3.7-1.el6_6sat.noarch tyan-gt24-08.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch ruby193-rubygem-foreman_docker-1.2.0.14-1.el6_6sat.noarch foreman-postgresql-1.7.2.27-1.el6_6sat.noarch rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el6_6sat.noarch tyan-gt24-08.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch foreman-1.7.2.27-1.el6_6sat.noarch ruby193-rubygem-foreman-tasks-0.6.12.8-1.el6_6sat.noarch foreman-debug-1.7.2.27-1.el6_6sat.noarch steps # hammer --csv --username admin --password changeme product list --organization-id '1' --per-page 1000 [Foreman] Username: admin [Foreman] Password for admin: ID,Name,Description,Organization,Repositories,Sync State 129,RHEL6,,Default Organization,1,finished 130,RHEL7,,Default Organization,1,finished 128,Sat6Capsule,,Default Organization,1,finished 132,Sat6Capsule_rhel7,,Default Organization,1,finished 127,Sat6Tools,,Default Organization,1,finished 131,Sat6Tools7,,Default Organization,1,finished It is still asking for username and password, even though the details are provided in command line # hammer --username admin --password changeme product list --organization-id '1' --per-page 1000 ----|-------------------|-------------|----------------------|--------------|----------- ID | NAME | DESCRIPTION | ORGANIZATION | REPOSITORIES | SYNC STATE ----|-------------------|-------------|----------------------|--------------|----------- 129 | RHEL6 | | Default Organization | 1 | finished 130 | RHEL7 | | Default Organization | 1 | finished 128 | Sat6Capsule | | Default Organization | 1 | finished 132 | Sat6Capsule_rhel7 | | Default Organization | 1 | finished 127 | Sat6Tools | | Default Organization | 1 | finished 131 | Sat6Tools7 | | Default Organization | 1 | finished ----|-------------------|-------------|----------------------|--------------|----------- --csv switch is breaking the command line persing. I'm working on the fix. Workaround: use --csv after the credentials: hammer --username admin --password changeme --csv product list --organization-id '1' --per-page 1000 Created redmine issue http://projects.theforeman.org/issues/10902 from this bug Upstream bug was merged, moving to POST *** This bug is verified in upstream. This fix should eventually land in future downstream builds *** Version Tested: # rpm -qa | grep foreman nec-em17.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch foreman-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch nec-em17.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510071112git33fd59b.el7.noarch foreman-debug-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-release-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-postgresql-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-vmware-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch foreman-release-scl-1-1.el7.x86_64 foreman-libvirt-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch foreman-ovirt-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch nec-em17.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch tfm-rubygem-foreman_discovery-4.1.0-1.fm1_10.el7.noarch tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch foreman-proxy-1.11.0-0.develop.201510120849git5f36f2e.el7.noarch foreman-compute-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch foreman-gce-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch steps: # hammer --csv --username admin --password changeme product list --organization-id 1 --per-page 100 ID,Name,Description,Organization,Repositories,Sync State 1,test_prod,,Default Organization,1, Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501 |