From 1e6331f4774b038f6cb852b2c69c01e40ba9dd90 Mon Sep 17 00:00:00 2001 From: gwen Date: Mon, 19 Jan 2026 22:05:27 +0100 Subject: [PATCH] commentaires jusqu'au 15 --- docs/tutorial/disabled.rst | 106 ++++++++++++++++++++++++++++++------- 1 file changed, 88 insertions(+), 18 deletions(-) diff --git a/docs/tutorial/disabled.rst b/docs/tutorial/disabled.rst index b239ef4dc..fc5ff0b4d 100644 --- a/docs/tutorial/disabled.rst +++ b/docs/tutorial/disabled.rst @@ -45,6 +45,9 @@ Let's begin with defining what a property is: of a family, a subfamily or a variable. These properties change the usual behavior of a variable or family. +A disabled family +------------------ + Here we are going to assign the `disabled` property to the `manual` family: .. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_050/firefox/10-manual.yml @@ -152,7 +155,8 @@ Otherwise, **we need to disable them when they are not used**. In a practical point of view, if we fill them in, Rougail CLI will output a warning and the :term:`operator` will see it. He will wonder : "oh, what am I doing?", I shall fill and use in these variables only in the `Manual proxy configuration` context. -.. type-along:: The `disabling` property is usefull in our use case +A conditional disabled family +------------------------------ Let's look again at our use case. We have a choice between five options in order to set the proxy mode: @@ -174,9 +178,6 @@ four out of our five use cases. .. important:: We need to **disable** variables or families that are not used in a given usage context. -A disabled family ------------------- - Disabling variables one by one can be replaced by disabling a whole family. If we don't choose the manual mode, we need to **disable** the whole `manual` family, it will disable all the subfamilies and the variables in it. @@ -213,9 +214,6 @@ Notice the `disabled: true` parameter set in the `manual` family: type: port default: 8080 -A conditional disabled family ------------------------------- - .. type-along:: For those who follow the tutorial with the help of the git repository Now you need to checkout the `v1.1_051` version:: @@ -395,15 +393,6 @@ Let's introduce a new property here: - with the `disabled` property, the variables are *deactivated* - with the `hidden` property, the variables are just not seen when loading the user data. -.. questions:: Question: shall we use the `disabled` property here? - - Is it relevant to use the :term:`disabled property ` here? - - **answer**: No! Because we *need* to use these variables at any :term:`context` of the proxy's manual configuration use case, - we simply have to point their values โ€‹โ€‹in one direction or another depending on this or that context, - that's why it is absolutely not a question of disabling them. The `manual.https_proxy.address` - and the `manual.http_proxy.port` variables shall not be disabled in the manual mode. - Now we can set a `hidden` property to the `https_proxy` family: Here is our new :file:`20-manual.yml` structure file: @@ -437,8 +426,6 @@ Here is our new :file:`20-manual.yml` structure file: variable: __.http_proxy.port ... -We have added two other variables for the HTTPS use only: - .. confval:: https_proxy.address :type: `domainname` @@ -452,6 +439,89 @@ We have added two other variables for the HTTPS use only: We have now a `hidden` property assigned to the `https_proxy` family, which is hiding these two variables. +If we launch the Rougail CLI on the this user data + +.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_052/config/01/config.yml + :linenos: + :language: yaml + :caption: The :file:`config/01/config.yml` user data file with the `hidden` property on the `https_proxy` family. + +.. + --- + proxy_mode: Manual proxy configuration + manual: + http_proxy: + address: http.proxy.net + port: 3128 + use_for_https: false + https_proxy: + address: https.proxy.net + +Let's launch the Rougail in read only (`RO`) mode first: + +.. raw:: html + :url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_052/config/01/cmd_ro.txt + :class: terminal + +.. + rougail -m firefox/ -u yaml -yf config/01/config.yml + +We have this output: + +.. raw:: html + :url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_052/config/01/output_ro.html + :class: output + +.. +
๐Ÿ”” Warning
+    โ”—โ”โ” manual (Manual proxy configuration)
+        โ”—โ”โ” https_proxy (HTTPS Proxy)
+            โ”—โ”โ” address (HTTPS address): ๐Ÿ”” family "https_proxy" (HTTPS Proxy) has 
+                property hidden, so cannot access to "address" (HTTPS address), it 
+                will be ignored when loading from the YAML file 
+                "config/01/config.yml"
+
+    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Caption โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+    โ”‚ Variable Modified value              โ”‚
+    โ”‚          (โณ Original default value) โ”‚
+    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+    Variables:
+    โ”ฃโ”โ” ๐Ÿ““ proxy_mode (Configure Proxy Access to the Internet): Manual proxy 
+    โ”ƒ   configuration โ—€ loaded from the YAML file "config/01/config.yml" (โณ No 
+    โ”ƒ   proxy)
+    โ”—โ”โ” ๐Ÿ“‚ manual (Manual proxy configuration)
+        โ”ฃโ”โ” ๐Ÿ“‚ http_proxy (HTTP Proxy)
+        โ”ƒ   โ”ฃโ”โ” ๐Ÿ““ address (HTTP address): http.proxy.net โ—€ loaded from the YAML 
+        โ”ƒ   โ”ƒ   file "config/01/config.yml"
+        โ”ƒ   โ”—โ”โ” ๐Ÿ““ port (HTTP Port): 3128 โ—€ loaded from the YAML file 
+        โ”ƒ       "config/01/config.yml" (โณ 8080)
+        โ”—โ”โ” ๐Ÿ““ use_for_https (Also use this proxy for HTTPS): false โ—€ loaded from 
+            the YAML file "config/01/config.yml" (โณ true)
+    
+ +Now let's launch the Rougail CLI in read write mode (`RW`) on the same user data: + +.. raw:: html + :url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_052/config/01/cmd_rw.txt + :class: terminal + +We have this output: + +.. raw:: html + :url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_052/config/01/output_rw.html + :class: output + +FIXME + +.. questions:: Question: shall we use the `disabled` property here? + + Is it relevant to use the :term:`disabled property ` here? + + **answer**: No! Because we *need* to use these variables at any :term:`context` of the proxy's manual configuration use case, + we simply have to point their values โ€‹โ€‹in one direction or another depending on this or that context, + that's why it is absolutely not a question of disabling them. The `manual.https_proxy.address` + and the `manual.http_proxy.port` variables shall not be disabled in the manual mode. + A conditional hidden family ----------------------------