Can't completely delete a version of content view
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1231765
Description of problem:
Can't completely delete version of content view (with 'Completely remove version?' checkbox checked off) on WebUI, operation fails with error '404 Resource Not Found (RestClient::ResourceNotFound)'.
Version-Release number of selected component (if applicable):
Satellite 6.1.0 GA RC 2 (SNAP8-C2), RC1 (SNAP8)
Steps to Reproduce:
1. Log in to WebUI, create a Content View.
2. Publish new version of the content view.
3. Completely remove previously created version of CV (with 'Completely remove version?' checked off)
Version wasn't deleted, status of operation is 'error'. /var/log/foreman/production.log contains following error:
[E] 404 Resource Not Found (RestClient::ResourceNotFound)
Check full error log in attached cv_remove_version_error.log
Version was successfully deleted with no errors.
Fixes #10822 - Don't clean up env content during CV remove
The problem was that both CVE delete and CVV delete were trying to delete the
same sets of repos. CVV delete was changed to delete env repos since it's used
by org destroy. However, ContentView::Remove removes all CVEs before removing
the CVV so we were getting a 404 from pulp. This adds an option CV::Remove can
use to skip deleting a CVV's env content.