moving the type definition in the variable's page instead of the tutorial
This commit is contained in:
parent
55213e18db
commit
947ae2a029
2 changed files with 36 additions and 34 deletions
|
|
@ -218,7 +218,6 @@ it's up to the operator to do the job in the `config.yaml` file:
|
|||
|
||||
:tutorial:`Download this file from the rougail-tutorials git repository <src/tag/v1.1_001/config/02/config.yaml>`
|
||||
|
||||
|
||||
With the rougail CLI the operator has to add the `-u file -ff config/config.yaml` options:
|
||||
|
||||
.. code-block:: text
|
||||
|
|
@ -248,39 +247,11 @@ which gives us this output:
|
|||
|
||||
Most of the time, the integrator and the operator are one and the same person, here we are talking about roles and not necessarily about people.
|
||||
|
||||
Variable's type
|
||||
-----------------
|
||||
|
||||
.. type-along:: type inference
|
||||
|
||||
If the `type` attribute is not set, Rougail infers a `string` type for the `proxy_mode` configuration option variable type as defined in the structure file.
|
||||
|
||||
.. type-along:: type setting
|
||||
|
||||
If the operator sets an option value for example with the `integer` type, like this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
---
|
||||
example_var:
|
||||
description: Configure Proxy Access to the Internet
|
||||
type: integer
|
||||
|
||||
Then Rougail will expect a `int` or a `float` as a value for the `example_var` variable.
|
||||
|
||||
.. type-along:: Defining a choice type
|
||||
|
||||
In our firefox use case, the real type of the `proxy_mode` variable will be now set as a `choice` type:
|
||||
|
||||
|
||||
.. glossary::
|
||||
|
||||
choice type
|
||||
|
||||
A choice type variable is a variable where the content is constrained by a list
|
||||
|
||||
When a variable's setting is "choice" (`type: choice`), it means that
|
||||
there is a list of available values that can be selected.
|
||||
.. seealso:: The definition of the :term:`choice type variable <choice type>`
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_004/firefox/00-proxy.yml
|
||||
:linenos:
|
||||
|
|
|
|||
|
|
@ -37,6 +37,37 @@ Variable name
|
|||
|
||||
Have a look at the :ref:`convention on variable naming link <convention on variable names>`.
|
||||
|
||||
Variable's types
|
||||
-----------------
|
||||
|
||||
.. type-along:: type inference
|
||||
|
||||
If the `type` attribute is not set, Rougail infers a `string` type for the `proxy_mode` configuration option variable type as defined in the structure file.
|
||||
|
||||
.. type-along:: integer type
|
||||
|
||||
If the operator sets an option value for example with the `integer` type, like this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
---
|
||||
example_var:
|
||||
description: This is an example variable
|
||||
type: integer
|
||||
|
||||
Then Rougail will expect a `int` as a value for the `example_var` variable.
|
||||
|
||||
.. type-along:: the choice type
|
||||
|
||||
.. glossary::
|
||||
|
||||
choice type
|
||||
|
||||
A choice type variable is a variable where the content is constrained by a list
|
||||
|
||||
When a variable's setting is "choice" (`type: choice`), it means that
|
||||
there is a list of available values that can be selected.
|
||||
|
||||
Shorthand declaration
|
||||
----------------------------
|
||||
|
||||
|
|
@ -189,12 +220,12 @@ Parameters
|
|||
|
||||
Concretely, the content of this attribute is recorded in the `information` attribute of the corresponding `Tiramisu` option object.
|
||||
|
||||
Variables types
|
||||
----------------
|
||||
Variables type list
|
||||
--------------------
|
||||
|
||||
A variable **has a type**.
|
||||
A variable **always has a type**. The system is **strongly** typed.
|
||||
|
||||
This type enables the variable to define the values that are accepted by this variable.
|
||||
Depending on the definition of the variable type, the defined variable will accept values of the associated type.
|
||||
|
||||
.. list-table::
|
||||
:widths: 15 25 20 15
|
||||
|
|
|
|||
Loading…
Reference in a new issue