ZFS CLI Function Wrapper
pyzfscmds requires python 3.6+, and ZFS.
pyzfscmds can be installed by cloning the repo, and running the setup.py script.
$ git clone https://github.com/johnramsden/pyzfscmds
$ cd pyzfscmds
$ python setup.py installTo test, run pytest on the tests directory.
The following settings should be set:
--unsafe- If used, more dangerous commands such as destroy will be run, otherwise they will be skipped.--zpool="${TEST_POOL}"--test-dataset="${PYTEST_DATASET}"--root-dataset="${TEST_POOL}/${TEST_ROOT}"--zpool-root-mountpoint="${ZPOOL_MOUNTPOINT}/root"
To test coverage, run pytest with the pytest-cov plugin.
To test pep8, run pytest with the pytest-pep8 plugin.
Testing all at once:
$ pytest --pep8 --cov=pyzfscmds tests \
--unsafe \
--zpool="${TEST_POOL}" \
--test-dataset="${PYTEST_DATASET}" \
--root-dataset="${TEST_POOL}/ROOT/default" \
--zpool-root-mountpoint="${ZPOOL_MOUNTPOINT}/root"