Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VCDA-789] Refactor CSE Installation - template creation (#148)
Created general use functions in utils.py. Functions in config.py are specific to either CSE installation or config file processing. Split up template creation phase into independent functions. create_template() handles '--update' option, and decides when to create vapp, customize vapp, capture vapp, and delete vapp. create_temp_vapp() handles the temp vapp creation and customization phase of CSE installation. This function calls create_vapp_from_config() and customize_vm(). create_vapp_from_config() initializes the vapp specifically for CSE installation, using the initialization script. customize_vm() customizes the vapp's vm using the customization script. capture_vapp_to_template() captures the vapp as a vapp template to vcd catalog. Simplified control flow and exception handling. Fixed --update option to now properly delete previous CSE entities (template, ova files, vapps) Moved hard-coded values to constant module-level values. Added descriptive console output in appropriate areas, and created docstrings for each function. Tested CSE install extensively. '--update' works properly, resulting vapps and VMs can be ssh'd into, and all customization finishes as expected.
- Loading branch information