theforeman/staypuft — pull request #124 by sseago (2014-05-15 03:41:18+00:00)
Title: Added import/export functionality for deployments

This commit makes it much easier to reproduce deployments based on prior ones.

Deployment export is based on the deployment summary page, but output format
is yml, and internal IDs are removed, in favor of puppetclass names and Staypuft::Role
names, in order to ensure that the format is portable across deployments and
across foreman instances (assuming Role/puppetclass names are the same).

Import pulls a previously exported deployment param set into an existing deployment object.

This may not be ready to merge yet. Two remaining categories of work:
1) styling -- the 'import' form on the show page may need extra styling
2) validation -- this has not yet been tested for various edge cases
(i.e. invalid yml input, missing and/or extra params, roles, etc.)

In any case, feel free to comment/test/etc. I'll start testing/fixing for possible edge cases tomorrow.