By default, the Jinja calculation is generic in documentation. We can add a useful description.
We add a new variable "version" only accessible in "Socks" family.
HTTPS and socks proxy are very similar. It could be interesting to do on dynamic family instead of duplicate family and variable description.
First of all, we add a dynamic attribute to the family. Dynamic is here a static list of suffix. It could be a variable or jinja informations too.
The dynamic family is only hidden in the HTTPs case.
Hidden is now a Jinja calculation with a parameter named "suffix".
The suffix is use in:
- family name
- family description
- variables name
- variables description
HTTPS and socks proxy are very similar. It could be interesting to do on dynamic family instead of duplicate family and variable description.
First of all, we add a dynamic attribute to the family. Dynamic is here a static list of suffix. It could be a variable or jinja informations too.
The dynamic family is only hidden in the HTTPs case.
Hidden is now a Jinja calculation with a parameter named "suffix".
The suffix is use in:
- family name
- family description
- variables name
- variables description
Add a sub family "https_proxy" which will be hidden if "use_for_https" is True.
Hidden means that we cannot change value, but we can access to it in read only mode. Inside, we add two variable with calculated default value (with variable type).
So, if user set "use_for_https" to True, the default values of HTTPS configuration will be a copy of HTTP values. The use can change HTTPS values if needed.
If user set "use_for_https" to False, the default values of HTTPS configuration will only be a copy of HTTP values.
Add a sub family "https_proxy" which will be hidden if "use_for_https" is True.
Hidden means that we cannot change value, but we can access to it in read only mode. Inside, we add two variable with calculated default value (with variable type).
So, if user set "use_for_https" to True, the default values of HTTPS configuration will be a copy of HTTP values. The use can change HTTPS values if needed.
If user set "use_for_https" to False, the default values of HTTPS configuration will only be a copy of HTTP values.
Add a sub family "https_proxy" which will be hidden if "use_for_https" is True.
Hidden means that we cannot change value, but we can access to it in read only mode. Inside, we add two variable with calculated default value (with variable type).
So, if user set "use_for_https" to True, the default values of HTTPS configuration will be a copy of HTTP values. The use can change HTTPS values if needed.
If user set "use_for_https" to False, the default values of HTTPS configuration will only be a copy of HTTP values.
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.
Inside the sub family we add two variables (with domainname and port types).
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.
Inside the sub family we add two variables (with domainname and port types).
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.
Inside the sub family we add two variables (with domainname and port types).
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.
Inside the sub family we add two variables (with domainname and port types).
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.
Inside the sub family we add two variables (with domainname and port types).
Inside a family, we can have variables or families.
The "type" for family "manual" became unecessary because container an other family, so it's not a variable.
In disabled attribute, it's better tu use relative path (we will see the reason in an other slide).
This family will be desactived if "proxy_mode" is not "manual proxy configuration".
Desactived a variable or a family means that this variable will never be accessible.
This family will be desactived if "proxy_mode" is not "manual proxy configuration".
Desactived a variable or a family means that this variable will never be accessible.
The "manual" mode structural descriptions are write in a new files to separate things. But Rougail will concatenate variables and families.
We create a family, which will contain other variables.
This family has:
- a description
- a type
As there is no variable inside this family, the type is mandatory. Without it, Rougail will create a variable.
In fact, this family will be deleted by Rougail too because it is empty.
"Foo" should not be an option to the "proxy_mode" variable.
Now the "proxy_mode" type is "choice", that means that there is a list of available values that can be selected.
We say that the "proxy_mode" variable is constrained (by choices): this variable accept, in fact, only a list of choices.
Now we can define the default value of this variable.
If the user doesn't touch this variable's value, the value is "No proxy"
As user intervention is no more required, so the variable change it's default mode too (from "basic" to "standard").
We can add a description to this first variable.
This information is useful for:
- documentation
- error message
- help user to known which value to set to this variable (for example with [the user data plugin Questionary](https://forge.cloud.silique.fr/gnunux/rougail-user-data-questionary)).
In the Firefox configuration, it is possible to define several configuration modes,
from no proxy at all ("No proxy") to a kind of automatic configuration mode from a file
("Automatic proxy configuration URL").
We’re gonna create a first variable called "proxy_mode":
- accepts only a string as value
- requires a value (that is, None is not an option)
In the Firefox configuration, it is possible to define several configuration modes,
from no proxy at all ("No proxy") to a kind of automatic configuration mode from a file
("Automatic proxy configuration URL").
We’re gonna create a first variable called "proxy_mode":
- accepts only a string as value
- requires a value (that is, None is not an option)