Katello/katello — pull request #2335 by parthaa (2013-05-20 04:39:28+00:00)
Title: Migration script for legacy  promotion code

This PR implements the following Migration
1) Create a "Default CVD" which has all the content in the library
2) Publish a "Previous Environments View" <- do you need to do this?
the existing default view is a published view (and there will be a
version of that view in potentially each env) I think the goal is to
re-use the default view for the 'library sync bucket' that synced
content goes, thus we need a new one to contain all the old content view
versions (line 22)
3) For each Non Library env -> change the env's default CVV to point to
the "Previous Environments View"
4) Update every system whose cv is null and make em point to "Previous
Environments"
5) Update every Activation Key whose cv is null and point em to
"Previous Environments View"
6) Change the Org default view's CVE to point to Default Publish View
(Org default view's will not point to a CVE after this)
7) Update repo create and clone methods to get the default env path
from CVE as opposed calculating based on env default view or not ....
8) Auto publish on for Library default views
9) Generate metadata for library views