Bug 1084831 - csv output adapter for a Product returns unusable information
Summary: csv output adapter for a Product returns unusable information
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Dustin Tsang
QA Contact: Kedar Bidarkar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-06 23:27 UTC by Og Maciel
Modified: 2019-09-26 14:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:09:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 5111 0 None None None 2016-04-22 15:58:08 UTC

Description Og Maciel 2014-04-06 23:27:25 UTC
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:

Comment 2 Bryan Kearney 2014-04-08 13:54:10 UTC
Created redmine issue http://projects.theforeman.org/issues/5111 from this bug

Comment 3 Dustin Tsang 2014-05-19 02:51:29 UTC
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?

Comment 4 Og Maciel 2014-05-19 21:18:46 UTC
Talked to @dustin and he's going to provide "GPG Key ID" and "GPG Key" (name) in the output.

Comment 5 Bryan Kearney 2014-05-21 17:53:37 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/5111 has been closed

Comment 7 Tazim Kolhar 2014-05-23 08:03:17 UTC
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

Comment 8 Dustin Tsang 2014-06-03 14:41:45 UTC
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.

Comment 9 Bryan Kearney 2014-06-03 14:59:26 UTC
Upstream bug assigned to adprice

Comment 10 Adam Price 2014-06-03 19:43:16 UTC
accidentally assigned to me

giving back to you, dustin

Comment 11 Bryan Kearney 2014-06-03 20:09:50 UTC
Upstream bug assigned to adprice

Comment 12 Bryan Kearney 2014-06-06 12:22:34 UTC
Upstream bug assigned to dtsang

Comment 13 Dustin Tsang 2014-06-06 14:54:53 UTC
fixed in https://github.com/theforeman/hammer-cli/pull/112

Comment 16 Kedar Bidarkar 2014-06-12 12:31:20 UTC
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

Comment 17 Bryan Kearney 2014-07-02 14:09:09 UTC
This was delivered in 6.0.3, the Beta version of Satellite 6.0

Comment 18 Bryan Kearney 2014-07-02 14:09:10 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.


Note You need to log in before you can comment on or make changes to this bug.