Also added an index.rst file for executors, renamed the
azurearm.rst file (Was misspelled with "azureare"), and
removed the xbps-pkg.rst file since that is an invalid
reference.
If all the devices submitted to pvcreate() are already initialized as
LVM physical volumes and override is True (which is default), pvcreate()
should return True and no futher actions should be made. The
'not cmd[1:]' check which is suited for this scenario is incorrect, as
we previously filled the 'cmd' list with two elements and thus the
condition would be always False. This would cause pvcreate() to call the
pvcreate executable with no arguments if all the submitted devices are
already initialized as LVM PVs.
Fixes#39070
If all the devices submitted to pvcreate() are already initialized as
LVM physical volumes, pvcreate() should return True and no futher
actions should be made.
pvdisplay() would be called by pvcreate() twice: firstly to check
whether a device is already initialized for use by LVM and then to
ensure that the pvcreate executable did its job correctly. The test
replaces pvdisplay() with a mock that always returns True and thus
pvcreate() would think that a specified device is already initialized
and exit. In the other words, instead of testing physical volume
initialization the test simulates a case with all the submitted
devices already initialized.
Fix it by replacing pvdisplay with a mock that returns False on the
first call (thus pvcreate thinks that a device is not a PV yet) and True
on the second call (after the pvcreate executable is called).
'lvm version' produces multiline output whereas test_version and
test_fullversion use mocks with single-line output. Use real-life
'lvm version' output in those mocks instead.
Once this happens, we need to re-enable the test. The move over
should also allow us to upgrade the version of salt-testing that
is applied to the test VMs. Once this is complete, we can apply
the `@flaky` decorator to this test. (salt-testing must be a
version newer than the September release.)
The documentation was incorrectly suggesting that this function supports
pillar override data on the CLI.
Also, this commit changes the default target delimiter from a hard-coded
value to salt.defaults.DEFAULT_TARGET_DELIM. This change is functionally
neutral but will help to future-proof this code in the unlikely event
that we ever change the default target delimiter.