1 .. _ceph-volume-plugins:
5 ``ceph-volume`` started initially to provide support for using ``lvm`` as
6 the underlying system for an OSD. It is included as part of the tool but it is
9 This modularity, allows for other device or device-like technologies to be able
10 to consume and re-use the utilities and workflows provided.
14 As a Python tool, plugins ``setuptools`` entry points. For a new plugin to be
15 available, it should have an entry similar to this in its ``setup.py`` file:
17 .. code-block:: python
22 ceph_volume_handlers = [
23 'my_command = my_package.my_module:MyClass',
27 The ``MyClass`` should be a class that accepts ``sys.argv`` as its argument,
28 ``ceph-volume`` will pass that in at instantiation and call them ``main``
31 This is how a plugin for ``ZFS`` could look like for example:
33 .. code-block:: python
37 help_menu = 'Deploy OSDs with ZFS'
39 Use ZFS as the underlying technology for OSDs
41 --verbose Increase the verbosity level
44 def __init__(self, argv):
48 parser = argparse.ArgumentParser()
49 args = parser.parse_args(self.argv)
52 And its entry point (via ``setuptools``) in ``setup.py`` would looke like:
54 .. code-block:: python
57 'ceph_volume_handlers': [
58 'zfs = ceph_volume_zfs.zfs:ZFS',
62 After installation, the ``zfs`` subcommand would be listed and could be used