Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1427456 - Hammer csv content-views fails to export/import Composite Content Views
Summary: Hammer csv content-views fails to export/import Composite Content Views
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Tom McKay
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-28 09:24 UTC by Francisco Garcia
Modified: 2020-02-03 18:03 UTC (History)
5 users (show)

Fixed In Version: hammer-cli-csv-2.3.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-03 18:03:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18344 0 Normal Closed Exporting composite content views results in an errant 1 in the file 2020-02-03 16:39:49 UTC

Description Francisco Garcia 2017-02-28 09:24:53 UTC
Description of problem:

Hi,

I'm exporting/importing Composite content views from a Satellite system to a new Satellite system and the import process of composite content views generates a extraneous column: 

$ cat content_views.csv
Name,Label,Organization,Composite,Repositories or Composites,Lifecycle Environments
...
WAF,1,WAF,MyOrg,Yes,"CV_RHEL72,CV_SECURITY,CV_BASE","Library,Production,QA"


The second column ("1") should not be there, as it shifts the columns and the import process fails with "WAF is not a valid organization".


Version-Release number of selected component (if applicable):

Satellite 6.2.7
tfm-rubygem-hammer_cli-0.5.1.12-1.el7sat.noarch
tfm-rubygem-hammer_cli_csv-2.2.1.1-1.el7sat.noarch


How reproducible:
Always


Steps to Reproduce:
1. hammer csv content-views > cv.csv
2. hammer csv content-views --continue-on-errors --file cv.csv

Comment 1 Francisco Garcia 2017-02-28 09:38:04 UTC
The actual error message when importing an incorrectly-formatted CSV: 

Error: Organization 'WAF' not found
WAF,1,WAF,MyOrg,Yes,"CV_RHEL72,CV_SECURITY,CV_BASE","Library,Production,QA"

Comment 2 Tom McKay 2017-02-28 14:20:42 UTC
Created redmine issue http://projects.theforeman.org/issues/18723 from this bug

Comment 4 Francisco Garcia 2017-03-02 14:12:44 UTC
Apologies, this is a duplicate of upstream bug #18344, which is now resolved. Upstream bug (18723) opened for this BZ can be closed/marked as duplicate of 18344.

Comment 5 Bryan Kearney 2017-03-22 20:31:03 UTC
Removing the dupe upstream issue.

Comment 6 Satellite Program 2017-03-22 22:13:50 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18344 has been resolved.

Comment 8 Tomas Strachota 2017-08-23 11:56:32 UTC
Failed. 
Version Tested: Satellite-6.3 Snap 12


This was fixed only partially. The extra '1' was removed from csv output but content view import/export still doesn't work correctly. The "Repositories or Composites" column is always blank for composite CVs, which prevents from importing it correctly.

Having "CV A" and "CV B" that are components of "CV Composite":

> hammer csv content-views --export > ./content_views.csv
> cat ./content_views.csv
Name,Label,Organization,Composite,Repositories or Composites,Lifecycle Environments
CV A,CV_A,Default Organization,No,"",""
CV B,CV_B,Default Organization,No,"",""
CV Composite,CV_Composite,Default Organization,Yes,"",""

Then I attempted to import the CVs into a fresh satellite installation:

> hammer csv content-views --file ./content_views.csv

The process finishes successfully but "CV Composite" doesn't have the original components assigned.

Comment 11 Bryan Kearney 2020-02-03 18:03:38 UTC
Hammer csv is no longer supported.


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