2013-05-15 17:35:49 +02:00
|
|
|
.. default-role:: literal
|
|
|
|
|
2013-08-23 11:42:22 +02:00
|
|
|
The options types
|
|
|
|
===================
|
2013-05-15 17:35:49 +02:00
|
|
|
|
|
|
|
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``.
|
|
|
|
|
|
|
|
|
|
|
|
.. _optdescr:
|
|
|
|
|
|
|
|
The `OptionDescription` class
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
.. module:: tiramisu.option
|
|
|
|
|
2013-05-21 11:37:39 +02:00
|
|
|
.. autoclass:: OptionDescription
|
|
|
|
:special-members:
|
|
|
|
:members:
|
2013-05-15 17:35:49 +02:00
|
|
|
|
|
|
|
|
2013-08-28 09:22:44 +02:00
|
|
|
If you need to access 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.
|
2013-05-15 17:35:49 +02:00
|
|
|
|
|
|
|
The `Option` base class
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
It's the abstract base class for almost all options (except the symblink).
|
|
|
|
|
|
|
|
.. _optioninit:
|
|
|
|
|
|
|
|
.. autoclass:: Option
|
|
|
|
:special-members:
|
|
|
|
:members:
|
|
|
|
|
2013-05-21 11:37:39 +02:00
|
|
|
All option types
|
2013-05-15 17:35:49 +02:00
|
|
|
------------------
|
|
|
|
|
|
|
|
.. autoclass:: BoolOption
|
|
|
|
:private-members:
|
|
|
|
|
|
|
|
.. autoclass:: IntOption
|
|
|
|
:private-members:
|
|
|
|
|
|
|
|
.. autoclass:: FloatOption
|
|
|
|
:private-members:
|
|
|
|
|
|
|
|
.. autoclass:: StrOption
|
|
|
|
:private-members:
|
|
|
|
|
|
|
|
|
|
|
|
.. autoclass:: SymLinkOption
|
|
|
|
|
|
|
|
.. automethod:: __init__
|
|
|
|
|
|
|
|
|
2013-05-21 11:37:39 +02:00
|
|
|
``SymLinkOption`` redirects to another configuration option in the
|
2013-05-15 17:35:49 +02:00
|
|
|
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__
|
2013-05-21 18:42:56 +02:00
|
|
|
|
|
|
|
|