From 044a316f8df944d3b2ddaaaa95803b528650f1b2 Mon Sep 17 00:00:00 2001 From: svalouch Date: Fri, 27 Sep 2019 08:17:56 +0200 Subject: [PATCH] Enhance documentation [ci skip] + Feature list in README + configuration (logging and executable) overview --- README.rst | 48 ++++++++++++++++++++++++++++++++++++++++++ docs/configuration.rst | 32 ++++++++++++++++++++++++++++ docs/index.rst | 1 + 3 files changed, 81 insertions(+) create mode 100644 docs/configuration.rst diff --git a/README.rst b/README.rst index 0c3fc23..53b5905 100644 --- a/README.rst +++ b/README.rst @@ -15,6 +15,54 @@ Two interface classes make up the API, ``ZFS`` and ``ZPool``, which are wrappers In this early stage, the native implementation has not been written. +Status +****** +The table gives a rough overview over features and their implementation state: + ++-------+------------+-----------------+-----+--------+ +| API | Topic | Feature | CLI | Native | ++=======+============+=================+=====+========+ +| ZFS | Properties | Read native | Yes | No | +| | +-----------------+-----+--------+ +| | | Write native | Yes | No | +| | +-----------------+-----+--------+ +| | | Read metadata | Yes | No | +| | +-----------------+-----+--------+ +| | | Write metadata | Yes | No | +| +------------+-----------------+-----+--------+ +| | Datasets | List datasets | Yes | No | +| | +-----------------+-----+--------+ +| | | Check existance | Yes | No | +| | +-----------------+-----+--------+ +| | | Create Filset | No | No | +| | +-----------------+-----+--------+ +| | | Create Volume | No | No | +| | +-----------------+-----+--------+ +| | | Create Snapshot | No | No | +| | +-----------------+-----+--------+ +| | | Create Bookmark | No | No | +| | +-----------------+-----+--------+ +| | | Destroy | No | No | ++-------+------------+-----------------+-----+--------+ +| ZPool | Storage | List pools | No | No | +| | +-----------------+-----+--------+ +| | | Read structure | Yes | No | +| | +-----------------+-----+--------+ +| | | Replace disk | No | No | +| | +-----------------+-----+--------+ +| | | Destroy | No | No | +| | +-----------------+-----+--------+ +| | | Create | No | No | +| +------------+-----------------+-----+--------+ +| | Properties | Read native | No | No | +| | +-----------------+-----+--------+ +| | | Write native | No | No | +| | +-----------------+-----+--------+ +| | | Read metadata | No | No | +| | +-----------------+-----+--------+ +| | | Write metadata | No | No | ++-------+------------+-----------------+-----+--------+ + Usage ***** diff --git a/docs/configuration.rst b/docs/configuration.rst new file mode 100644 index 0000000..b1b3cbf --- /dev/null +++ b/docs/configuration.rst @@ -0,0 +1,32 @@ + +############# +Configuration +############# +As the word ``simple`` in the package name implies, there is not much configuration neccessary or possible. + +Binaries +******** +For the CLI implementation, the binaries ``zfs(8)`` and ``zpool(8)`` are being searched in ``$PATH``, but they may be +specified when creating an instance, in which case the library trusts you and does not perform further checks. To +overwrite, you can: + +* specify the ``zfs_exe`` or ``zpool_exe`` `kwarg` when using :func:`~simplezfs.zfs.get_zfs` or + :func:`~simplezfs.zpool.get_zpool`. +* specify the same `kwarg` when creating :class:`simplezfs.zfs_cli.ZFSCli` or + :func:`~simplezfs.zpool_cli.ZPoolCli` directly. + +Logging +******* +The library makes use of Pythons own `logging` functions. It defines a tree starting with ``simplezfs``: + +* ``simplezfs`` (used as a common root only) + + * ``simplezfs.zfs`` used by the :class:`~simplezfs.ZFS` parent class + + * ``simplezfs.zfs.cli`` used by :class:`~simplezfs.zfs_cli.ZFSCli` + * ``simplezfs.zfs.native`` used by :class:`~simplezfs.zfs_native.ZFSNative` + + * ``simplezfs.zpool`` used by the :class:`~simplezfs.ZPool` parent class + + * ``simplezfs.zpool.cli`` used by :class:`~simplezfs.zpool_cli.ZPoolCli` + * ``simplezfs.zpool.native`` used by :class:`~simplezfs.zpool_native.ZPoolNative` diff --git a/docs/index.rst b/docs/index.rst index 0eaa2c1..dfc4bdd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,6 +18,7 @@ At the time of writing, the ``native``-API has not been implemented. quickstart security guide + configuration properties_metadata testing api