doc(practice2)
This commit is contained in:
parent
a621c1ed23
commit
3a32dd15af
8 changed files with 28 additions and 16 deletions
|
|
@ -46,7 +46,7 @@ the :file:`10-manual.yml` and the :file:`20-manual.yml` structure file:
|
|||
|
||||
We will continue to complete the :file:`20-manual.yml` structure file,
|
||||
with variables entirely equivalent to those found in the `http_proxy` family from the :file:`10-manual.yml` structure file.
|
||||
Until now, we only had the `use_for_https` :ref:`boolean variable in this structure file <boolean_variable>`.
|
||||
Until now, we only had the `use_for_https` :ref:`boolean variable in this structure file <tutorial_boolean_variable>`.
|
||||
Now we are going to define an address and a port in the `https_proxy` family:
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_040/firefox/20-manual.yml
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
.. _tutorial_choice:
|
||||
|
||||
A variable with possible values
|
||||
==================================
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.. _dynamic:
|
||||
.. _tutorial_dynamic:
|
||||
|
||||
A dynamically built family
|
||||
==========================
|
||||
|
|
@ -140,7 +140,7 @@ that allow us to define dynamically family names.
|
|||
|
||||
identifier
|
||||
|
||||
In the :ref:`dynamically built family creation field <dynamic>` we call an identifier
|
||||
In the :ref:`dynamically built family creation field <tutorial_dynamic>` we call an identifier
|
||||
an item that defines a family name. An item is a variable on which an iteration
|
||||
on keywords will be carried out.
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ Let's dive into this **configuration options validation** use case.
|
|||
multiple
|
||||
document
|
||||
practice1
|
||||
practice2
|
||||
validators
|
||||
namespace
|
||||
sequence
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ Practice
|
|||
|
||||
The best for you is to do this job on your own and compare your work to our propositions.
|
||||
|
||||
Here are the two variables in the firefox configuration's widget:
|
||||
Here are the two variables in the Firefox configuration's widget:
|
||||
|
||||
.. image:: images/practice_twovars.png
|
||||
|
||||
These two variables are highlighted here in the lower part of the firefox configuration's widget:
|
||||
These two variables are highlighted here in the lower part of the Firefox configuration's widget:
|
||||
|
||||
.. image:: images/firefox130.png
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ What do we want to be implemented
|
|||
- define an appropriate variable name, have a look at our :ref:`variable naming convention <namingconvention>`
|
||||
- the Firefox description is in negative mode, which is not a good practice for us, we rewrite it in positive mode
|
||||
- the variable is a boolean with the default value `true` (the opposite of unchecked option)
|
||||
- the variable is available for all proxy mode choice by user, so disable it only when the `proxy mode` is "No proxy".
|
||||
- the variable is available for all proxy mode choice by user, so disable it only when the `proxy mode` is "No proxy"
|
||||
|
||||
Our solution
|
||||
'''''''''''''''''''''''''''''''
|
||||
|
|
@ -71,9 +71,9 @@ Please unroll the "Solution" widget to see our solution:
|
|||
:caption: The :file:`firefox/50-prompt_authentication.yml` a conditional disabled boolean variable
|
||||
|
||||
- Here we choosed to name the new structure file `firefox/50-prompt_authentication.yml`,
|
||||
the file containing the `prompt_authentication` variable definition,
|
||||
- this variable is true by default,
|
||||
- this variable shall be :term:`disabled` if the `proxy_mode` variable is set to `"No proxy"`.
|
||||
the file containing the `prompt_authentication` variable definition
|
||||
- this variable is `true` by default
|
||||
- this variable shall be :term:`disabled` if the `proxy_mode` variable is set to `"No proxy"`
|
||||
|
||||
..
|
||||
%YAML 1.2
|
||||
|
|
@ -100,9 +100,9 @@ What do we want to be implemented
|
|||
|
||||
- the choice of a file name that respect the :ref:`file naming and organizing convention <filenamingconvention>`
|
||||
- define an appropriate variable name, have a look at our :ref:`variable naming convention <namingconvention>`
|
||||
- the `description` parameter will be the Firefox description,
|
||||
- the variable is a boolean with the default value `false` (unchecked option),
|
||||
- the variable is only available with the `"Manual proxy configuration"` proxy mode and when the proxy socks version is not v4.
|
||||
- the `description` parameter will be the Firefox description
|
||||
- the variable is a boolean with the default value `false` (unchecked option)
|
||||
- the variable is only available with the `"Manual proxy configuration"` proxy mode and when the proxy socks version is not v4
|
||||
|
||||
|
||||
Our solution
|
||||
|
|
@ -110,18 +110,23 @@ Our solution
|
|||
|
||||
.. type-along:: For those who follow the tutorial with the help of the git repository
|
||||
|
||||
Now you need to checkout the :tutorial:`v1.1_132 <src/tag/v1.1_132/README.md>` version::
|
||||
Now you need to checkout the :tutorial:`v1.1_131 <src/tag/v1.1_131/README.md>` version::
|
||||
|
||||
git switch --detach v1.1_132
|
||||
git switch --detach v1.1_131
|
||||
|
||||
Please unroll the "Solution" widget to see our solution:
|
||||
|
||||
.. solution:: Solution
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_132/firefox/55-proxy_dns_socks5.yml
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_131/firefox/55-proxy_dns_socks5.yml
|
||||
:language: yaml
|
||||
:caption: The :file:`firefox/55-proxy_dns_socks5.yml` a Jinja conditional disabled boolean variable
|
||||
|
||||
- Here we choosed to name the new structure file `firefox/55-proxy_dns_socks5.yml`,
|
||||
the file containing the `proxy_dns_socks5` variable definition
|
||||
- this variable is `false` by default
|
||||
- this variable shall be :term:`disabled` if the `proxy_mode` variable is not set to `"Manual proxy configuration"` and Socks version is `v4`.
|
||||
|
||||
..
|
||||
%YAML 1.2
|
||||
---
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ 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.
|
||||
|
||||
.. _tutorial_disabled:
|
||||
|
||||
A disabled family
|
||||
------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ And we have this output:
|
|||
We observe that, as with the `domainname` type, a number of validations are performed
|
||||
to ensure that the value assigned to this variable conforms to the `port` type.
|
||||
|
||||
.. _boolean_variable:
|
||||
.. _tutorial_boolean_variable:
|
||||
|
||||
A variable with type `boolean`
|
||||
-----------------------------------
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
.. _tutorial_web_address:
|
||||
|
||||
A `web_address` variable
|
||||
================================
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue