ScaleComputing / HyperCoreAnsibleCollection

Official Ansible collection for Scale Computing SC//HyperCore (HC3) v1 API
GNU General Public License v3.0
12 stars 8 forks source link

deprecation for vm and snapshot_schedule return value #199

Closed justinc1 closed 1 year ago

justinc1 commented 1 year ago

Running ansible-playbook examples/vm.yml shows

TASK [Create VM demo-vm] ******************************************************************************
[DEPRECATION WARNING]: The 'record' return value will be changed from list (containing a single item) to dict. There will be no release where both old and 
new variant work at the same time. To ease migration, the only change between last 1.x or 2.x release and 3.0.0 release will be changing the 'record' 
return value. Affected modules are vm and snapshot_schedule. This feature will be removed from scale_computing.hypercore in version 3.0.0. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost]

Examples for vm and snapshot_schedule modules were added. Examples for vm, snapshot_schedule, iso and vm_nic contain example task for old and new syntax.

The same example tasks are show in deprecation.rst, a document that is support to help users migrate their playbooks.

Space for existing deprecation messages are fixed.

Relative links are used in deprecation.rst, so we can render documentation locally, and link will guide to locally rendered modules. Relative links were added to quickstart.rst too.

After merge to milestone-1-done branch (e.g. will be in release 1.2.0), I will cherry-pick this for main branch too.