Bug 1084831
| Summary: | csv output adapter for a Product returns unusable information | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Og Maciel <omaciel> |
| Component: | Hammer | Assignee: | Dustin Tsang <dtsang> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Kedar Bidarkar <kbidarka> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.3 | CC: | bbuckingham, bkearney, jmontleo, kbidarka, mmccune, omaciel, tkolhar |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/5111 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-07-02 14:09:10 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: | |||
Created redmine issue http://projects.theforeman.org/issues/5111 from this bug I can see that the two fields that are causing the extra, unusable data: GPG and Content. Both of these fields are outputting extra because the csv adapter currently isn't set to display nested data. Right now the table adapter( hammer --output table ) omits these 2 fields. would that be fine for the csv output too? Talked to @dustin and he's going to provide "GPG Key ID" and "GPG Key" (name) in the output. Moving to POST since upstream bug http://projects.theforeman.org/issues/5111 has been closed It seems that hammer product info does not contain proper help page
# hammer product info --help
Usage:
hammer product info [OPTIONS]
Options:
-h, --help print help
didn't mean to close redmine issue. It must have auto-closed because I must had 1 of the 2 pull-requests referencing #5111 merged. https://github.com/theforeman/hammer-cli/pull/112 still looking for ACK. Upstream bug assigned to adprice accidentally assigned to me giving back to you, dustin Upstream bug assigned to adprice Upstream bug assigned to dtsang verified with sat6-snap9
[root@xxxx ~]# hammer --output csv product info --id=8
ID,Name,Label,Description,Sync State,Sync Plan ID,GPG::GPG Key ID,GPG::GPG Key,Organization,Readonly,Deletable,Content::Repo Name::1,Content::URL::1
8,Sat6Tools,Sat6Tools,"",finished,"","","",ACME_Corporation,false,true,rhcommon,/custom/Sat6Tools/rhcommon
Installed Packages
candlepin-0.9.7-1.el6_5.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.9.7-1.el6_5.noarch
candlepin-tomcat6-0.9.7-1.el6_5.noarch
createrepo-0.9.9-21.2.pulp.el6sat.noarch
dhcp207-55.lab.eng.pnq.redhat.com-qpid-broker-1.0-1.noarch
dhcp207-55.lab.eng.pnq.redhat.com-qpid-client-cert-1.0-1.noarch
elasticsearch-0.90.10-4.el6sat.noarch
katello-1.5.0-25.el6sat.noarch
katello-ca-1.0-1.noarch
katello-certs-tools-1.5.5-1.el6sat.noarch
katello-installer-0.0.48-1.el6sat.noarch
m2crypto-0.21.1.pulp-10.el6sat.x86_64
mod_wsgi-3.4-1.pulp.el6sat.x86_64
pulp-katello-0.3-3.el6sat.noarch
pulp-nodes-common-2.4.0-0.20.beta.el6sat.noarch
pulp-nodes-parent-2.4.0-0.20.beta.el6sat.noarch
pulp-puppet-plugins-2.4.0-0.20.beta.el6sat.noarch
pulp-puppet-tools-2.4.0-0.20.beta.el6sat.noarch
pulp-rpm-plugins-2.4.0-0.20.beta.el6sat.noarch
pulp-selinux-2.4.0-0.20.beta.el6sat.noarch
pulp-server-2.4.0-0.20.beta.el6sat.noarch
python-gofer-qpid-1.2.1-1.el6sat.noarch
python-isodate-0.5.0-1.pulp.el6sat.noarch
python-kombu-3.0.15-10.pulp.el6sat.noarch
python-pulp-bindings-2.4.0-0.20.beta.el6sat.noarch
python-pulp-common-2.4.0-0.20.beta.el6sat.noarch
python-pulp-puppet-common-2.4.0-0.20.beta.el6sat.noarch
python-pulp-rpm-common-2.4.0-0.20.beta.el6sat.noarch
python-qpid-0.22-14.el6sat.noarch
python-qpid-qmf-0.22-31.el6sat.x86_64
qpid-cpp-client-0.22-40.el6.x86_64
qpid-cpp-server-0.22-40.el6.x86_64
qpid-cpp-server-linearstore-0.22-40.el6.x86_64
qpid-proton-c-0.7-1.el6.x86_64
qpid-qmf-0.22-31.el6sat.x86_64
qpid-tools-0.22-12.el6.noarch
ruby193-rubygem-katello-1.5.0-57.el6sat.noarch
rubygem-hammer_cli_katello-0.0.4-6.el6sat.noarch
This was delivered in 6.0.3, the Beta version of Satellite 6.0 This was delivered with 6.0.3, which is the Satellite 6 Beta. |
Description of problem: Note that when one uses the CSV output adapter to obtain information for an existing Product, hammer is returning extra, unusable information [root@qetello01 ~]# hammer --output base product info --id=27 ID: 27 Name: 阄軍萫兏瑆泳厾馃槠硾拻灦孤筂雸諶應榦糱甶 Label: c6bbbe8f-4d9d-42d4-8e87-ddc34764c0b4 Description: <pre>diwTISpSdfYulZdHHiRC</pre> Sync Plan ID: Sync State: not_synced Sync Plan ID: GPG: GPG Key ID: 39 GPG Key: foobar Organization: dTVfLkUhHIDiwPIQHqRn Readonly: false Deletable: true Content: [root@qetello01 ~]# hammer --output csv product info --id=27 ID,Name,Label,Description,Sync Plan ID,Sync State,Sync Plan ID,GPG,Organization,Readonly,Deletable,Content 27,阄軍萫兏瑆泳厾馃槠硾拻灦孤筂雸諶應榦糱甶,c6bbbe8f-4d9d-42d4-8e87-ddc34764c0b4,<pre>diwTISpSdfYulZdHHiRC</pre>,"",not_synced,"",productContentprovidernamed143b68a-bddb-4463-afcb-70b8132d236elibrary_repositoriesrepository_count0sync_statusuuidparametersfinish_timeuser_id0updated_attask_typeprogresssize_left0total_size0total_count0items_left0organization_ididtask_owner_typetask_owner_idstatenot_syncedcreated_atpending?falseresultstart_timepermissionsdeletabletruesync_plan_idlabelc6bbbe8f-4d9d-42d4-8e87-ddc34764c0b4name阄軍萫兏瑆泳厾馃槠硾拻灦孤筂雸諶應榦糱甶id27updated_at2014-04-06T21:47:53ZorganizationlabelBsEVvO0bxipI0ivJI64vnamedTVfLkUhHIDiwPIQHqRnreadonlyfalsecreated_at2014-04-06T05:39:48Zcp_id1396762787854gpg_keynamefoobarid39gpg_key_id39provider_id169description<pre>diwTISpSdfYulZdHHiRC</pre>,dTVfLkUhHIDiwPIQHqRn,"",true,"" In case it isn't obvious, the extra information is: productContentprovidernamed143b68a-bddb-4463-afcb-70b8132d236elibrary_repositoriesrepository_count0sync_statusuuidparametersfinish_timeuser_id0updated_attask_typeprogresssize_left0total_size0total_count0items_left0organization_ididtask_owner_typetask_owner_idstatenot_syncedcreated_atpending?falseresultstart_timepermissionsdeletabletruesync_plan_idlabelc6bbbe8f-4d9d-42d4-8e87-ddc34764c0b4name阄軍萫兏瑆泳厾馃槠硾拻灦孤筂雸諶應榦糱甶id27updated_at2014-04-06T21:47:53ZorganizationlabelBsEVvO0bxipI0ivJI64vnamedTVfLkUhHIDiwPIQHqRnreadonlyfalsecreated_at2014-04-06T05:39:48Zcp_id1396762787854gpg_keynamefoobarid39gpg_key_id39provider_id169description<pre>diwTISpSdfYulZdHHiRC</pre> Version-Release number of selected component (if applicable): * apr-util-ldap-1.3.9-3.el6_0.1.x86_64 * candlepin-0.8.33-1.el6.noarch * candlepin-selinux-0.8.33-1.el6.noarch * candlepin-tomcat6-0.8.33-1.el6.noarch * elasticsearch-0.90.10-4.el6.noarch * foreman-1.5.0-0.develop.201404041450git869bbff.el6.noarch * foreman-compute-1.5.0-0.develop.201404041450git869bbff.el6.noarch * foreman-libvirt-1.5.0-0.develop.201404041450git869bbff.el6.noarch * foreman-postgresql-1.5.0-0.develop.201404041450git869bbff.el6.noarch * foreman-proxy-1.5.0-0.develop.201404021018git3824d18.el6.noarch * foreman-release-1.5.0-0.develop.201404041450git869bbff.el6.noarch * foreman-selinux-1.5.0-0.develop.201402261344git2f43f94.el6.noarch * katello-1.5.0-14.201404042107git7cc5bd6.el6.noarch * katello-apache-1.0-1.noarch * katello-ca-1.0-1.noarch * katello-certs-tools-1.5.2-1.git.1.edab2c4.el6.noarch * katello-installer-0.0.19-1.201404021805git6ac0e9a.el6.noarch * katello-repos-1.5.1-1.git.14.0868bd1.el6.noarch * openldap-2.4.23-31.el6.x86_64 * pulp-katello-plugins-0.2-1.el6.noarch * pulp-nodes-common-2.3.1-1.el6.noarch * pulp-nodes-parent-2.3.1-1.el6.noarch * pulp-puppet-plugins-2.3.1-1.el6.noarch * pulp-rpm-plugins-2.3.1-1.el6.noarch * pulp-selinux-2.3.1-1.el6.noarch * pulp-server-2.3.1-1.el6.noarch * python-ldap-2.3.10-1.el6.x86_64 * ruby193-rubygem-ldap_fluff-0.2.2-2.el6.noarch * ruby193-rubygem-net-ldap-0.3.1-1.el6.noarch * ruby193-rubygem-runcible-1.0.8-1.el6.noarch * rubygem-hammer_cli-0.1.0-1.201404021454git4336787.git.0.070e774.el6.noarch * rubygem-hammer_cli_foreman-0.1.0-1.201404011518git2abbfd3.git.0.37211af.el6.noarch * rubygem-hammer_cli_foreman_tasks-0.0.2-1.201403312028gitdf60592.git.0.b4ebd5a.el6.noarch * rubygem-hammer_cli_katello-0.0.3-1.201404042126gitd171b9b.git.0.b51f61a.el6.noarch How reproducible: Steps to Reproduce: 1. Use hammer --csv product info to obtain the information for an existing custom product 2. 3. Actual results: Unusable information is returned Expected results: Additional info: