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.