- LVM is an important information about a Linux machine.
Usually Linux servers have most or all their disk
filesystems using a logical volume as mountpoint.
- This initial support implements a grain called "lvm"
which returns a dictionary with the volume groups, each
one with a list of their logical volumes inside:
VolumeGroup00:
- LogicalVolume00
- LogicalVolume01
- ...
- LogicalVolumeNN
VolumeGroup01:
...
VolumeGroupNN:
- LogicalVolume00
- LogicalVolume01
- ...
- LogicalVolumeNN
Fix mediatype_create and mediatype_get usage since new API 4.4.
- Added a apiinfo_version call to check the API version when
dealing with mediatype_create and get.
- Changed the attribute called from "description" to "name",
when API version is greater or equal to 4.4. changed both
mediatype_create and mediatype_get.
- Added tests for pvresize and lvextend
- Added support to shrink a LVM logical volume in state lvm.lv_present
- Added support to resize filesystem in state lvm.lv_present
- Fixed linux_lvm.py modules to have some output even with '-qq'
- Adjusted tests in test_linux_lvm and test_lvm to complies with the
modifications in linux_lvm module and lvm state. Most of them to
handle the change from cmd.run to cmd.run_all
- Added new functions to linux_lvm.py module
- lvextend to increase the size of a logical volume and
- pvresize to resize a physical volume to the current physical
device size.
- Fixed the tests for pvcreate and pvremove from linux_lvm so
they didn't expect a trackback as return anymore.
- The exception trackback cleaning is done.
- pvcreate and pvremove from linux_lvm execution module raises a
trackback when they should fail graciously.
- Initial work to remove the trackbacks and substitute then with
clean failures.
- The LVM commands does a lot of tests before any destructive operation.
Usually these tests prompts questions and waits for the user answers.
But the user is not there to answer any of them.
- Some functions in the module have a "force" parameter which defaults
the answers to "yes". Others have the "yes" hardcoded. And others yet
have the "force" parameter in examples e documentation but no code to
handle it.
- Added the "force" parameter on all destructive operations.
- Those functions which previously have the "yes" hardcoded, had the
"force" parameter defaulted to "True"
- Functions which didn't have the "force" parameter have it defaulted to
"False" and now the "False" forces all answers to be "no".
- Also, added the parameter "resizefs" to lvm.lvresize
This, at the very minimum, slows down test collection under PyTest.
We should never do computation intensive tasks at the global module scope.
On top of that, using a mutable objects opens up for strange behaviour across
tests since it's not guaranteed that each test will get the exact same,
untouched, object.