From 920780384d195275bc62a0fd76a3ea44e419ddfe Mon Sep 17 00:00:00 2001 From: gwen Date: Mon, 1 Dec 2025 21:35:27 +0100 Subject: [PATCH] family OK --- docs/tutorial/choice.rst | 2 +- docs/tutorial/domainname.rst | 74 +++++++++++++++++++++++++++++ docs/tutorial/family.rst | 92 +++++++----------------------------- docs/tutorial/index.rst | 1 + 4 files changed, 94 insertions(+), 75 deletions(-) create mode 100644 docs/tutorial/domainname.rst diff --git a/docs/tutorial/choice.rst b/docs/tutorial/choice.rst index 8ae06c399..3fae85948 100644 --- a/docs/tutorial/choice.rst +++ b/docs/tutorial/choice.rst @@ -15,7 +15,7 @@ A variable with possible values Of course, you can also decide to copy/paste or download the tutorial files contents while following the tutorial steps. If you want to follow this tutorial with the help of the corresponding :tutorial:`Rougail-tutorials git repository `, - this workshop page corresponds to the tags :tutorial:`v1.1_010 ` in the repository: + this workshop page corresponds to the tag :tutorial:`v1.1_010 ` in the repository: :: diff --git a/docs/tutorial/domainname.rst b/docs/tutorial/domainname.rst new file mode 100644 index 000000000..3b0a47287 --- /dev/null +++ b/docs/tutorial/domainname.rst @@ -0,0 +1,74 @@ +Variable types and parameters +================================== + +.. objectives:: Objectives + + FIXME + + + +.. type-along:: Variables can have parameters + +.. questions:: Question + + **question**: Does our `address` domain name variable accepts IP addresses ? + + **answer**: Well it depends. + +We need to specify whether our variable accepts to be filled using an IP or a domain name only. +This is where the ability to parameterize our variable comes in. + +.. type-along:: let's create a variable parameter named `allow_ip` + +.. + --- + manual: + description: Manual proxy configuration + + http_proxy: + description: HTTP Proxy + + address: + description: HTTP address + type: domainname + params: + allow_ip: true + +.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_034/firefox/10-manual.yml + :language: yaml + :caption: The `address` has a parameter set in the :file:`firefox/10-manual.yml` structure file + :name: RougailAddressParameter + :linenos: +.. + --- + manual: + description: Manual proxy configuration + + http_proxy: + description: HTTP Proxy + + address: + description: HTTP address + type: domainname + params: + allow_ip: true + +We can see line 11 and 12 that the params allow the domain name `address` variable to be set +with IPs. + +.. glossary:: + + parameter + + A parameter is a property of a variable that can refine its behavior + + +.. keypoints:: let's review the key points + + **Keywords** + + - we can add :term:`parameter`\ s to variables to refine their behavior + + **Progress** + + FIXME diff --git a/docs/tutorial/family.rst b/docs/tutorial/family.rst index 921e6c00b..355984f4a 100644 --- a/docs/tutorial/family.rst +++ b/docs/tutorial/family.rst @@ -19,7 +19,8 @@ Group variables inside families Of course, you can also decide to copy/paste or download the tutorial files contents while following the tutorial steps. If you want to follow this tutorial with the help of the corresponding :tutorial:`Rougail-tutorials git repository `, - this workshop page corresponds to the tags :tutorial:`v1.1_020 ` in the repository: FIXME: END TAG + this workshop page corresponds to the tags :tutorial:`v1.1_020 ` to :tutorial:`v1.1_022 ` + in the repository. :: @@ -246,84 +247,18 @@ Everything is OK: ┗━━ 📓 HTTP address: example.net ◀ loaded from the YAML file "config/02/config.yml" - Let's recap about the user datas. We can see in this rougail CLI output that: - the `proxy_mode` value is set by default by the :term:`integrator` - the `address` value is has been set by an :term:`operator` -Variables can have parameters ---------------------------------- +.. type-along:: A second variable in the `http_proxy` family -.. questions:: Question +Now let's add a `port` variable in the `http_proxy` family: - **question**: Does our `address` domain name variable accepts IP addresses ? - - **answer**: Well it depends. - -We need to specify whether our variable accepts to be filled using an IP or a domain name only. -This is where the ability to parameterize our variable comes in. - -.. type-along:: let's create a variable parameter named `allow_ip` - -.. - --- - manual: - description: Manual proxy configuration - - http_proxy: - description: HTTP Proxy - - address: - description: HTTP address - type: domainname - params: - allow_ip: true - -.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_034/firefox/10-manual.yml +.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_022/config/03/config.yml :language: yaml - :caption: The `address` has a parameter set in the :file:`firefox/10-manual.yml` structure file - :name: RougailAddressParameter - :linenos: -.. - --- - manual: - description: Manual proxy configuration - - http_proxy: - description: HTTP Proxy - - address: - description: HTTP address - type: domainname - params: - allow_ip: true - -We can see line 11 and 12 that the params allow the domain name `address` variable to be set -with IPs. - -.. glossary:: - - parameter - - A parameter is a property of a variable that can refine its behavior - -.. type-along:: a second variable in the `http_proxy` family - -Let's create a `port` variable in the `http_proxy` family: - -.. confval:: port - :type: `port` - :default: 8080 - - The HTTP Port - -Here is the new :file:`firefox/10-manual.yml` structure file: - -.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_022/firefox/10-manual.yml - :language: yaml - :caption: A rougail structure description file with a hierarchy. - :name: RogailPortVariable + :caption: The :file:`config/03/config.yml` user data file with the `port` number added :linenos: .. @@ -345,15 +280,24 @@ Here is the new :file:`firefox/10-manual.yml` structure file: type: port default: 8080 +:tutorial:`Download this file from the rougail-tutorials git repository ` + +In short: + +.. confval:: port + :type: `port` + :default: 8080 + + The HTTP Port + .. keypoints:: let's review the key points **Keywords** - we know how to define :term:`variable`\ s inside of a family - - we now know what a :term:`mandatory` variable is - - we kwow how to set a variable's user value (in a :term:`user data file`) + - we now know what a :term:`mandatory` variable is and why it is necessary to assign values to the variables + - we kwow how to set a variable's :term:`user value ` - we have the big picture : the :term:`configuration`, which is (the structure files + the user data files) - - we can add :term:`parameter`\ s to variables to refine their behavior **Progress** diff --git a/docs/tutorial/index.rst b/docs/tutorial/index.rst index 685511bd2..34b39e0a1 100644 --- a/docs/tutorial/index.rst +++ b/docs/tutorial/index.rst @@ -59,6 +59,7 @@ We'll learn in this tutorial how to set the values of the configuration options preliminary choice family + domainname disabled boolean dynfam