https://github.com/johnramsden/pyzfscmds
ZFS CLI wrapper library
https://github.com/johnramsden/pyzfscmds
freebsd linux python zfs zfsonlinux
Last synced: 10 months ago
JSON representation
ZFS CLI wrapper library
- Host: GitHub
- URL: https://github.com/johnramsden/pyzfscmds
- Owner: johnramsden
- License: bsd-3-clause
- Created: 2018-01-16T03:54:58.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-21T05:55:25.000Z (over 6 years ago)
- Last Synced: 2025-04-02T06:37:23.993Z (10 months ago)
- Topics: freebsd, linux, python, zfs, zfsonlinux
- Language: Python
- Homepage:
- Size: 188 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
pyzfscmds
==========
.. image:: https://travis-ci.com/johnramsden/pyzfscmds.svg?token=4X1vWwTyHTHCUwBTudyN&branch=release/v0.1.0
:target: https://travis-ci.com/johnramsden/pyzfscmds
ZFS CLI Function Wrapper
Requirements
------------
``pyzfscmds`` requires python 3.6+, and ZFS.
Installing
----------
``pyzfscmds`` can be installed by cloning the repo, and running the ``setup.py`` script.
.. code:: shell
$ git clone https://github.com/johnramsden/pyzfscmds
$ cd pyzfscmds
$ python setup.py install
Testing
-------
To 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:
.. code:: shell
$ 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"