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 1458575 - hammer csv content-views import fails when content view has not yet been published
Summary: hammer csv content-views import fails when content view has not yet been publ...
Keywords:
Status: CLOSED ERRATA
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: satellite6-bugs
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-04 14:21 UTC by David Davis
Modified: 2019-08-12 16:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 19718 0 None None None 2017-06-04 14:29:52 UTC

Description David Davis 2017-06-04 14:21:29 UTC
hammer_cli_csv-2.2.1.1

1. Create a content view (no repos necessary; do not publish)
2. Export content views (`hammer csv content-views --export --file /tmp/content_views.csv`)
3. Import the content views (`hammer csv content-views --file /tmp/content_views.csv)

Results:
NoMethodError (undefined method `each' for nil:NilClass):
/home/vagrant/hammer-cli-csv/lib/hammer_cli_csv/content_views.rb:155:in `promote_content_view'

Comment 4 Satellite Program 2017-06-06 18:17:53 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19718 has been resolved.

Comment 5 jcallaha 2018-02-14 15:37:09 UTC
Verified in Satellite 6.3 Snap 35.

The import of an unpublished content view no longer fails.

Create a new content view.
Don't add anything to it, and do not publish.
Perform steps below.

-bash-4.2# hammer csv content-views --export --file /tmp/content_views.csv
-bash-4.2#

-bash-4.2# cat /tmp/content_views.csv 
Name,Label,Organization,Composite,Repositories or Composites,Lifecycle Environments
7capsule,7capsule,Default Organization,No,7 capsule,Library
rhel7,rhel7,Default Organization,No,"Red Hat Enterprise Linux 7 Server - RH Common RPMs x86_64 7Server,Red Hat Enterprise Linux 7 Server - Supplementary RPMs x86_64 7Server,Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64,Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.4,Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server,Red Hat Enterprise Linux 7 Server - Optional RPMs x86_64 7Server,Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server",Library
rhel7partial,rhel7partial,Default Organization,No,"Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server x86_64 7Server,Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server",Library
unpublished,unpublished,Default Organization,No,"",""
7 capsule,7_capsule,Default Organization,Yes,"7capsule,rhel7partial",Library

 
-bash-4.2# hammer csv content-views -v --file /tmp/content_views.csv
Updating content view '7capsule'...done
Updating content view 'rhel7'...done
Updating content view 'rhel7partial'...done
Updating content view 'unpublished'...done
Updating content view '7 capsule'...done
-bash-4.2#

Comment 7 Satellite Program 2018-02-21 16:54:17 UTC
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/RHSA-2018:0336


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