Skip to content

Commit ac7eac3

Browse files
authored
Refactor virt_volume (ansible-collections#200)
* Add new modules/virt_volume.py to manipulate storage volumes (as distinct from _virt_pool.py that manipulates storage pools) + Ability to create a new volume + Ability to clone an existing volume + Ability to delete an existing volume + Ability to get the volume XML descriptor + Ability to create and upload a cloud-init cdrom volume * Fix EXAMPLES and remove custom syntax * Do not put network config under 'network:' key Fix line lengths to be <160, per ansible contrib guidelines * Don't default to allowing volume shrink. * Fix user-data file to begin with "#cloud-config" * Use yaml.safe_load and yaml.safe_dump * Test failure ansible-doc fixes. Update create_from to be part of create * Fix more CI PEP failures * More editorial fixes for CI * Return more than just name from list_volumes * fix PEP error * Retain previous authors and copyright * Fix for arbitrary capacity unit as documented (not just 'bytes') when clone_source is present. * fix pep8 warning --------- Co-authored-by: Dougal Seeley <git@dougalseeley.com>
1 parent a352f26 commit ac7eac3

File tree

11 files changed

+536
-594
lines changed

11 files changed

+536
-594
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
major_changes:
2+
- virt_volume appears to have been derived from virt_pool, but not cleaned up to remove much non-functional code. It has been refactored to remove the pool-specific code, and to make it more flexible.
3+
- The mechanism of passing variables to the member functions was not flexible enough to cope with differing parameter requirements. All parameters are now passed as kwargs, which allows the member functions to select the parameters they need.
4+
- A new command 'create_cidata_cdrom' enables the creation of a cloud-init CDROM, which can be attached to a cloud-init enabled base image, for bootstrapping networking, users etc.
5+
- The commands create_from, delete, download, info, resize, upload, wipe, facts did not work and were not tested. They have either been refactored to work, and tested, or removed.
6+
bugfixes:
7+
- info, facts, download, upload commands have been removed as they were not functional (and not tested).
8+
- create_from was non-functional, and is now folded into create (added clone_source parameter). Fixes #148
9+
- wipe command now works (and is also a boolean option for 'state/absent' and 'command/delete').
10+
removed_features:
11+
- The 'deleted' state has been removed as its definition was not entirely accurate, and the 'wipe' boolean option is added to 'state/absent' and 'command/delete'.
12+
- Undocumented but unused/non-functional functions (get_status, get_status2, get_state, get_uuid, build) have been removed.
13+
- Undocumented but unused FLAGS have been removed.
14+
- PoolConnection class has been removed
15+
known_issues:
16+
- check_mode is disabled. It was not fully supported in the previous code either ('state/present', 'command/create' did not support it).

0 commit comments

Comments
 (0)