Bug 1644823

Summary: [RFE] allow import/export of composite content views
Product: Red Hat Satellite Reporter: Chris Duryee <cduryee>
Component: Content ViewsAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: ehelms, rjerrido
Target Milestone: 6.5.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:38:26 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 Chris Duryee 2018-10-31 16:33:18 UTC
Description of problem:

If you attempt to import/export a composite CV, it will fail right now. The composite is treated the same way as a "regular" content view and the export will not error, but it will capture the wrong data in the JSON, and the import will fail.

This BZ is to add the ability to handle import/export of composite content views using hammer.

Comment 1 Satellite Program 2018-10-31 18:09:26 UTC
Upstream bug assigned to cduryee

Comment 2 Satellite Program 2018-10-31 18:09:28 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25272 has been resolved.

Comment 3 Brad Buckingham 2018-12-10 21:01:20 UTC
The code changes for this are in Katello 3.10 upstream.

Comment 4 Lai 2019-01-11 20:33:35 UTC
Steps to test:
1. Create and publish a content view with some content
2. Create composite content view
3. Add content view to composite content view and publish
4. ssh into server and export composite content view
5. Delete the published version of the composite content view
6. Import the exported composite content view via cli
7. Refresh UI to see that the composite content view has the same content view that was previously removed.

expected result:
Export: Composite content view export exported a tar file that has a json file with the version of the content-view in the composite view.
Import: No errors shown.  UI displays the composite view with the added content view from the export.

Actual result:
Export: Composite content view export exported a tar file that has a json file with the version of the content-view in the composite view.
Import: No errors shown.  UI displays the composite view with the added content view from the export.

Optional:
1. After step 7, delete the published version of the composite content view
2. remove content view from composite content view if applicable
3. Delete version from content view
4. Import the composite content view

Expected result:
Error stating that system cannot find the CV version on the system

Actual result:
Error stating tat the system cannot find the CV version on the system


Verified that the export and import worked as expected without errors.  Marking as verified.

Tested on 6.5.0 snap 11

Comment 7 errata-xmlrpc 2019-05-14 12:38:26 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-2019:1222