84 lines
1.7 KiB
Text
84 lines
1.7 KiB
Text
.. default-role:: literal
|
|
|
|
.. module:: tiramisu.option
|
|
|
|
The options types
|
|
===================
|
|
|
|
Description of Options
|
|
----------------------
|
|
|
|
All the constructors take a ``name`` and a ``doc`` argument as first
|
|
arguments to give the option or option group a name and to document it.
|
|
Most constructors take a ``default`` argument that specifies the default
|
|
value of the option. If this argument is not supplied the default value
|
|
is assumed to be ``None``.
|
|
|
|
The `Option` base class
|
|
-------------------------
|
|
|
|
It's the abstract base class for almost all options (except the symblink).
|
|
|
|
.. _optioninit:
|
|
|
|
.. autoclass:: Option
|
|
:special-members:
|
|
:members:
|
|
|
|
All option types
|
|
------------------
|
|
|
|
.. autoclass:: BoolOption
|
|
:private-members:
|
|
|
|
.. autoclass:: IntOption
|
|
:private-members:
|
|
|
|
.. autoclass:: FloatOption
|
|
:private-members:
|
|
|
|
.. autoclass:: StrOption
|
|
:private-members:
|
|
|
|
|
|
.. autoclass:: SymLinkOption
|
|
|
|
.. automethod:: __init__
|
|
|
|
|
|
``SymLinkOption`` redirects to another configuration option in the
|
|
configuration, that is :
|
|
|
|
- retrieves the value of the target,
|
|
- can set the value of the target too
|
|
|
|
|
|
.. autoclass:: IPOption
|
|
|
|
.. autoclass:: NetmaskOption
|
|
|
|
.. autoclass:: NetworkOption
|
|
|
|
.. autoclass:: DomainnameOption
|
|
|
|
|
|
.. autoclass:: ChoiceOption
|
|
|
|
.. automethod:: __init__
|
|
|
|
|
|
.. _optdescr:
|
|
|
|
The `OptionDescription` class
|
|
-------------------------------
|
|
|
|
.. autoclass:: OptionDescription
|
|
:special-members:
|
|
:members:
|
|
|
|
|
|
If you need to access to an option object, you can do it with the
|
|
OptionDescription object. Not only the value of the option by attribute access,
|
|
but the option object itself that lives behind the scene. It can always be
|
|
accessed internally. The option objects are in the `_children`
|
|
`OptionDescription`'s attribute.
|