Compare commits
No commits in common. "0a97dc877ec973ef21e098bb07a141c3cfe32c23" and "0ba63e1e128fb1fd4ad66d26a06eea4e2d6d104b" have entirely different histories.
0a97dc877e
...
0ba63e1e12
73 changed files with 23 additions and 1842 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,13 +1,3 @@
|
||||||
## 1.2.0a70 (2026-03-18)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- support leadership inside types
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- better support for description and type variable inside types
|
|
||||||
|
|
||||||
## 1.2.0a69 (2026-03-13)
|
## 1.2.0a69 (2026-03-13)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.2.0a70"
|
version = "1.2.0a69"
|
||||||
|
|
||||||
[tool.commitizen]
|
[tool.commitizen]
|
||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail-base"
|
name = "rougail-base"
|
||||||
version = "1.2.0a70"
|
version = "1.2.0a69"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "A consistency handling system that was initially designed in the configuration management"
|
description = "A consistency handling system that was initially designed in the configuration management"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.2.0a70"
|
version = "1.2.0a69"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "A consistency handling system that was initially designed in the configuration management"
|
description = "A consistency handling system that was initially designed in the configuration management"
|
||||||
|
|
@ -27,7 +27,7 @@ classifiers = [
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ruamel.yaml ~= 0.18.6",
|
"ruamel.yaml ~= 0.18.6",
|
||||||
"pydantic ~= 2.9.2",
|
"pydantic ~= 2.9.2",
|
||||||
"rougail-base == 1.2.0a70",
|
"rougail-base == 1.2.0a69",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.flit.sdist]
|
[tool.flit.sdist]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "1.2.0a70"
|
__version__ = "1.2.0a69"
|
||||||
|
|
|
||||||
|
|
@ -405,16 +405,25 @@ class ParserVariable:
|
||||||
"""Parse a family"""
|
"""Parse a family"""
|
||||||
if obj is None:
|
if obj is None:
|
||||||
obj = {}
|
obj = {}
|
||||||
|
family_obj = {}
|
||||||
|
subfamily_obj = {}
|
||||||
if self.version != "1.0":
|
if self.version != "1.0":
|
||||||
exists = obj.pop("exists", None)
|
exists = obj.pop("exists", None)
|
||||||
else:
|
else:
|
||||||
exists = None
|
exists = None
|
||||||
redefine = obj.pop("redefine", False) or (force_redefine is True and path in self.paths)
|
redefine = obj.pop("redefine", False) or (force_redefine is True and path in self.paths)
|
||||||
obj_type = self.get_family_or_variable_type(obj)
|
obj_type = self.get_family_or_variable_type(obj)
|
||||||
family_obj, children_obj = self.split_param_family_children(path, sources, obj_type, obj)
|
force_to_attrs = list(self.list_attributes(obj, sources, obj_type))
|
||||||
|
for key, value in obj.items():
|
||||||
|
if key in force_to_attrs:
|
||||||
|
if key.startswith("_"):
|
||||||
|
key = key[1:]
|
||||||
|
family_obj[key] = value
|
||||||
|
else:
|
||||||
|
subfamily_obj[key] = value
|
||||||
if self.version != "1.0" and not family_obj and comment:
|
if self.version != "1.0" and not family_obj and comment:
|
||||||
family_obj["description"] = comment
|
family_obj["description"] = comment
|
||||||
if "type" in family_obj and not redefine and not exists:
|
if not redefine and not exists:
|
||||||
c_obj_type = family_obj.get("type")
|
c_obj_type = family_obj.get("type")
|
||||||
if c_obj_type in self.custom_family_types:
|
if c_obj_type in self.custom_family_types:
|
||||||
redefine = True
|
redefine = True
|
||||||
|
|
@ -431,7 +440,6 @@ class ParserVariable:
|
||||||
custom_type=True,
|
custom_type=True,
|
||||||
)
|
)
|
||||||
force_redefine=True
|
force_redefine=True
|
||||||
family_obj, children_obj = self.split_param_family_children(path, sources, obj_type, obj)
|
|
||||||
family_obj["type"] = self.paths[path].type
|
family_obj["type"] = self.paths[path].type
|
||||||
if path in self.paths:
|
if path in self.paths:
|
||||||
# it's just for modify subfamily or subvariable, do not redefine
|
# it's just for modify subfamily or subvariable, do not redefine
|
||||||
|
|
@ -498,11 +506,11 @@ class ParserVariable:
|
||||||
force_not_first = False
|
force_not_first = False
|
||||||
if self.paths[path].type == "leadership":
|
if self.paths[path].type == "leadership":
|
||||||
family_is_leadership = True
|
family_is_leadership = True
|
||||||
for idx, key in enumerate(children_obj):
|
for idx, key in enumerate(subfamily_obj):
|
||||||
if copy_before_set:
|
if copy_before_set:
|
||||||
value = children_obj[key].copy()
|
value = subfamily_obj[key].copy()
|
||||||
else:
|
else:
|
||||||
value = children_obj[key]
|
value = subfamily_obj[key]
|
||||||
first_variable = not force_not_first and idx == 0
|
first_variable = not force_not_first and idx == 0
|
||||||
if isinstance(obj, CommentedMap):
|
if isinstance(obj, CommentedMap):
|
||||||
comment = self.get_comment(key, obj)
|
comment = self.get_comment(key, obj)
|
||||||
|
|
@ -522,20 +530,6 @@ class ParserVariable:
|
||||||
copy_before_set=copy_before_set,
|
copy_before_set=copy_before_set,
|
||||||
custom_type=custom_type,
|
custom_type=custom_type,
|
||||||
)
|
)
|
||||||
def split_param_family_children(self, path, sources, obj_type, obj):
|
|
||||||
family_obj = {}
|
|
||||||
children_obj = {}
|
|
||||||
force_to_attrs = set(self.list_attributes(obj, sources, obj_type))
|
|
||||||
if path in self.paths:
|
|
||||||
force_to_attrs -= {p.rsplit('.', 1)[-1] for p in self.parents[path]}
|
|
||||||
for key, value in obj.items():
|
|
||||||
if key in force_to_attrs :
|
|
||||||
if key.startswith("_"):
|
|
||||||
key = key[1:]
|
|
||||||
family_obj[key] = value
|
|
||||||
else:
|
|
||||||
children_obj[key] = value
|
|
||||||
return family_obj, children_obj
|
|
||||||
|
|
||||||
def list_attributes(
|
def list_attributes(
|
||||||
self,
|
self,
|
||||||
|
|
@ -943,14 +937,14 @@ class ParserVariable:
|
||||||
def change_namespaces(self, variable):
|
def change_namespaces(self, variable):
|
||||||
for key, value in variable.items():
|
for key, value in variable.items():
|
||||||
if isinstance(value, Calculation) and value.namespace != self.namespace:
|
if isinstance(value, Calculation) and value.namespace != self.namespace:
|
||||||
copy = value.model_copy()
|
copy = value.copy()
|
||||||
variable[key] = copy
|
variable[key] = copy
|
||||||
copy.namespace = self.namespace
|
copy.namespace = self.namespace
|
||||||
if not isinstance(value, list):
|
if not isinstance(value, list):
|
||||||
continue
|
continue
|
||||||
for idx, val in enumerate(value):
|
for idx, val in enumerate(value):
|
||||||
if isinstance(val, Calculation) and val.namespace != self.namespace:
|
if isinstance(val, Calculation) and val.namespace != self.namespace:
|
||||||
copy = val.model_copy()
|
copy = val.copy()
|
||||||
value[idx] = copy
|
value[idx] = copy
|
||||||
copy.namespace = self.namespace
|
copy.namespace = self.namespace
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@ def to_dict_family(family_name, paths, parents, families, root=True):
|
||||||
variable = paths[variable_path]
|
variable = paths[variable_path]
|
||||||
variable_name = variable.name
|
variable_name = variable.name
|
||||||
if variable_path in families:
|
if variable_path in families:
|
||||||
|
if variable.type == "leadership":
|
||||||
|
raise DictConsistencyError(_("type is not compatible with leadership family"), 86, variable.xmlfiles)
|
||||||
if variable_name in ret:
|
if variable_name in ret:
|
||||||
ret["_" + variable_name] = ret.pop(variable_name)
|
ret["_" + variable_name] = ret.pop(variable_name)
|
||||||
ret[variable_name] = to_dict_family(variable.path, paths, parents, families, False)
|
ret[variable_name] = to_dict_family(variable.path, paths, parents, families, False)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[])
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = StrOption(name="proxy_mode", doc="proxy_mode", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'string'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = StrOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'string'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = StrOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'string'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = StrOption(name="address", doc="HTTP address", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'string'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=False, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="HTTPS address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="HTTPS Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="HTTPS address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="HTTPS Port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="HTTPS address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="HTTPS Port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", "disabled"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="HTTPS address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="HTTPS Port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="HTTPS address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "frozen", "mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="HTTPS Port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "frozen", "mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"hidden", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="HTTPS address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="HTTPS Port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="{{ identifier }} address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="{{ identifier }} port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = ConvertDynOptionDescription(name="{{ identifier }}_proxy", doc="{{ identifier }} Proxy", identifiers=["HTTPS", "SOCKS"], children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="{{ identifier }} address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="{{ identifier }} port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
option_10 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'prop': ParamValue("disabled"), 'value': ParamIdentifier(), 'when': ParamValue("HTTPS"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_7 = ConvertDynOptionDescription(name="{{ identifier }}_proxy", doc="{{ identifier }} Proxy", identifiers=["HTTPS", "SOCKS"], children=[option_8, option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.address'] = "{% if _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.port'] = "{% if _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.version'] = "{% if _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['hidden_manual.{{ identifier }}_proxy'] = "{% if _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="{{ identifier }} address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue(None)), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.address"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.address"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="{{ identifier }} port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue(None)), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.port"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.port"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
option_10 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'prop': ParamValue("disabled"), 'value': ParamIdentifier(), 'when': ParamValue("HTTPS"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue(None)), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.version"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.version"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_7 = ConvertDynOptionDescription(name="{{ identifier }}_proxy", doc="{{ identifier }} Proxy", identifiers=["HTTPS", "SOCKS"], children=[option_8, option_9, option_10], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden"), ParamValue(None)), kwargs={'__internal_jinja': ParamValue("hidden_manual.{{ identifier }}_proxy"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.address'] = "{% if _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.port'] = "{% if _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.version'] = "{% if _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['hidden_manual.{{ identifier }}_proxy'] = "{% if _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="{{ identifier }} address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.address"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.address"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="{{ identifier }} port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.port"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.port"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
option_10 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'prop': ParamValue("disabled"), 'value': ParamIdentifier(), 'when': ParamValue("HTTPS"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.version"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.version"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_7 = ConvertDynOptionDescription(name="{{ identifier }}_proxy", doc="{{ identifier }} Proxy", identifiers=["HTTPS", "SOCKS"], children=[option_8, option_9, option_10], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("hidden_manual.{{ identifier }}_proxy"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.address'] = "{% if my_identifier == 'HTTPS' and _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.port'] = "{% if my_identifier == 'HTTPS' and _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.version'] = "{% if my_identifier == 'HTTPS' and _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
dict_env['hidden_manual.{{ identifier }}_proxy'] = "{% if my_identifier == 'HTTPS' and _.use_for_https %}\n HTTPS is same has HTTP\n{% endif %}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="{{ identifier }} address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.address"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.address"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="{{ identifier }} port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.port"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.port"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
option_10 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'prop': ParamValue("disabled"), 'value': ParamIdentifier(), 'when': ParamValue("HTTPS"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.version"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.version"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_7 = ConvertDynOptionDescription(name="{{ identifier }}_proxy", doc="{{ identifier }} Proxy", identifiers=["HTTPS", "SOCKS"], children=[option_8, option_9, option_10], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("hidden_manual.{{ identifier }}_proxy"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.address'] = "{{ my_identifier == 'HTTPS' and _.use_for_https }}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.port'] = "{{ my_identifier == 'HTTPS' and _.use_for_https }}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.version'] = "{{ my_identifier == 'HTTPS' and _.use_for_https }}"
|
|
||||||
dict_env['hidden_manual.{{ identifier }}_proxy'] = "{{ my_identifier == 'HTTPS' and _.use_for_https }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="HTTP address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="HTTP Port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="{{ identifier }} address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.address"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.address"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="{{ identifier }} port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.port"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.port"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
option_10 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'prop': ParamValue("disabled"), 'value': ParamIdentifier(), 'when': ParamValue("HTTPS"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.version"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.version"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_7 = ConvertDynOptionDescription(name="{{ identifier }}_proxy", doc="{{ identifier }} Proxy", identifiers=["HTTPS", "SOCKS"], children=[option_8, option_9, option_10], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("hidden_manual.{{ identifier }}_proxy"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.address'] = "{{ my_identifier == 'HTTPS' and _.use_for_https }}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.port'] = "{{ my_identifier == 'HTTPS' and _.use_for_https }}"
|
|
||||||
dict_env['frozen_manual.{{ identifier }}_proxy.version'] = "{{ my_identifier == 'HTTPS' and _.use_for_https }}"
|
|
||||||
dict_env['hidden_manual.{{ identifier }}_proxy'] = "{{ my_identifier == 'HTTPS' and _.use_for_https }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="{{ identifier }} address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.address"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.address"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="{{ identifier }} port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.port"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.port"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'port'})
|
|
||||||
option_10 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'prop': ParamValue("disabled"), 'value': ParamIdentifier(), 'when': ParamValue("HTTPS"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("frozen_manual.{{ identifier }}_proxy.version"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy.version"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_7 = ConvertDynOptionDescription(name="{{ identifier }}_proxy", doc="{{ identifier }} Proxy", identifiers=["HTTPS", "SOCKS"], children=[option_8, option_9, option_10], properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden"), ParamValue("in HTTPS case if \"_.use_for_https\" is set to \"true\"")), kwargs={'__internal_jinja': ParamValue("hidden_manual.{{ identifier }}_proxy"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/20-manual.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("manual.{{ identifier }}_proxy"), 'my_identifier': ParamIdentifier(), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.use_for_https': ParamOption(option_6, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14])
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15])
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15])
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15])
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24')})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15])
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15])
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16])
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_17 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16, option_17])
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_proxy_dns_socks5'] = "{{ _.proxy_mode != \"Manual proxy configuration\" or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_17 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.proxy_mode': ParamOption(option_1, notraisepropertyerror=True), '_.manual.socks_proxy.version': ParamOption(option_13, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16, option_17])
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_17 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_13, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16, option_17])
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_17 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_13, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16, option_17])
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_17 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_13, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_19 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
optiondescription_18 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_19], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16, option_17, optiondescription_18])
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_17 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_13, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_19 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_19), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_18 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_19, option_20], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16, option_17, optiondescription_18])
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['disabled_dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_17 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_13, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_19 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_19), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_21 = URLOption(name="custom_dns_url", doc="Custom DNS URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_20, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_18 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_19, option_20, option_21], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16, option_17, optiondescription_18])
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
option_1 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_4 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_5 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_3 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_4, option_5], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_6 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_8 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_9 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_7 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_8, option_9], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_11 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_12 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_13 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_10 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_11, option_12, option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_3, option_6, optiondescription_7, optiondescription_10], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_14 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_15 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_16 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_1), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_17 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_13, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_19 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_19), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_21 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_20, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_18 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_19, option_20, option_21], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2, option_14, option_15, option_16, option_17, optiondescription_18])
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[], properties=frozenset({"advanced"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_25 = StrOption(name="title", doc="Title or Description", multi=True, properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
option_26 = StrOption(name="color", doc="Color", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
optiondescription_24 = Leadership(name="proxies", doc="Proxy configuration", children=[option_25, option_26], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']})
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[optiondescription_24], properties=frozenset({"basic"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
class Regexp_option_26(RegexpOption):
|
|
||||||
__slots__ = tuple()
|
|
||||||
_type = 'value'
|
|
||||||
Regexp_option_26._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$")
|
|
||||||
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_25 = StrOption(name="title", doc="Title or Description", multi=True, properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
option_26 = Regexp_option_26(name="color", doc="Color", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'regexp'})
|
|
||||||
optiondescription_24 = Leadership(name="proxies", doc="Proxy configuration", children=[option_25, option_26], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']})
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[optiondescription_24], properties=frozenset({"basic"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
class Regexp_option_26(RegexpOption):
|
|
||||||
__slots__ = tuple()
|
|
||||||
_type = 'value'
|
|
||||||
Regexp_option_26._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$")
|
|
||||||
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
dict_env['default_foxyproxy.proxies.color'] = "#{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_25 = StrOption(name="title", doc="Title or Description", multi=True, properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
option_26 = Regexp_option_26(name="color", doc="Color", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_foxyproxy.proxies.color"), '__internal_type': ParamValue("regexp"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("foxyproxy.proxies.color")})), properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'regexp'})
|
|
||||||
optiondescription_24 = Leadership(name="proxies", doc="Proxy configuration", children=[option_25, option_26], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']})
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[optiondescription_24], properties=frozenset({"standard"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
class Regexp_option_26(RegexpOption):
|
|
||||||
__slots__ = tuple()
|
|
||||||
_type = 'value'
|
|
||||||
Regexp_option_26._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$")
|
|
||||||
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
dict_env['default_foxyproxy.proxies.color'] = "#{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_25 = StrOption(name="title", doc="Title or Description", multi=True, properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
option_26 = Regexp_option_26(name="color", doc="Color", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_foxyproxy.proxies.color"), '__internal_type': ParamValue("regexp"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("foxyproxy.proxies.color")})), properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'regexp'})
|
|
||||||
optiondescription_24 = Leadership(name="proxies", doc="Proxy configuration", children=[option_25, option_26], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']})
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[optiondescription_24], properties=frozenset({"basic"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
class Regexp_option_27(RegexpOption):
|
|
||||||
__slots__ = tuple()
|
|
||||||
_type = 'value'
|
|
||||||
Regexp_option_27._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$")
|
|
||||||
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
dict_env['default_foxyproxy.proxies.color'] = "#{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_25 = StrOption(name="title", doc="Title or Description", multi=True, properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
option_26 = ChoiceOption(name="type", doc="Proxy Type", values=("HTTP", "HTTPS/SSL", "SOCKS4", "SOCKS5", "PAC URL", "WPAD", "System (use system settings)", "Direct (no proxy)"), multi=True, default_multi="Direct (no proxy)", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'choice'})
|
|
||||||
option_27 = Regexp_option_27(name="color", doc="Color", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_foxyproxy.proxies.color"), '__internal_type': ParamValue("regexp"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("foxyproxy.proxies.color")})), properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'regexp'})
|
|
||||||
optiondescription_24 = Leadership(name="proxies", doc="Proxy configuration", children=[option_25, option_26, option_27], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']})
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[optiondescription_24], properties=frozenset({"basic"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
class Regexp_option_27(RegexpOption):
|
|
||||||
__slots__ = tuple()
|
|
||||||
_type = 'value'
|
|
||||||
Regexp_option_27._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$")
|
|
||||||
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
dict_env['default_foxyproxy.proxies.color'] = "#{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.address'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.port'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.url'] = "{{ _.type not in ['PAC URL', 'WPAD'] }}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_25 = StrOption(name="title", doc="Title or Description", multi=True, properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
option_26 = ChoiceOption(name="type", doc="Proxy Type", values=("HTTP", "HTTPS/SSL", "SOCKS4", "SOCKS5", "PAC URL", "WPAD", "System (use system settings)", "Direct (no proxy)"), multi=True, default_multi="Direct (no proxy)", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'choice'})
|
|
||||||
option_27 = Regexp_option_27(name="color", doc="Color", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_foxyproxy.proxies.color"), '__internal_type': ParamValue("regexp"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("foxyproxy.proxies.color")})), properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'regexp'})
|
|
||||||
option_28 = DomainnameOption(name="address", doc="IP address, DNS name, server name", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_5, notraisepropertyerror=True)))), type="domainname", allow_ip=True, allow_without_dot=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.address"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.address"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'domainname'})
|
|
||||||
option_29 = PortOption(name="port", doc="Port", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_6, notraisepropertyerror=True)))), allow_private=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.port"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.port"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'port'})
|
|
||||||
option_30 = URLOption(name="url", doc="URL", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_15, notraisepropertyerror=True)))), allow_ip=False, allow_without_dot=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type is not in:\n- PAC URL\n- WPAD")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_24 = Leadership(name="proxies", doc="Proxy configuration", children=[option_25, option_26, option_27, option_28, option_29, option_30], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']})
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[optiondescription_24], properties=frozenset({"basic"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
class Regexp_option_27(RegexpOption):
|
|
||||||
__slots__ = tuple()
|
|
||||||
_type = 'value'
|
|
||||||
Regexp_option_27._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$")
|
|
||||||
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
dict_env['default_foxyproxy.proxies.color'] = "#{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.address'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.port'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.username'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['mandatory_foxyproxy.proxies.username'] = "{% if _.password is not propertyerror and _.password %}\n true\n{% else %}\n false\n{% endif %}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.password'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.url'] = "{{ _.type not in ['PAC URL', 'WPAD'] }}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_25 = StrOption(name="title", doc="Title or Description", multi=True, properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
option_26 = ChoiceOption(name="type", doc="Proxy Type", values=("HTTP", "HTTPS/SSL", "SOCKS4", "SOCKS5", "PAC URL", "WPAD", "System (use system settings)", "Direct (no proxy)"), multi=True, default_multi="Direct (no proxy)", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'choice'})
|
|
||||||
option_27 = Regexp_option_27(name="color", doc="Color", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_foxyproxy.proxies.color"), '__internal_type': ParamValue("regexp"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("foxyproxy.proxies.color")})), properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'regexp'})
|
|
||||||
option_28 = DomainnameOption(name="address", doc="IP address, DNS name, server name", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_5, notraisepropertyerror=True)))), type="domainname", allow_ip=True, allow_without_dot=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.address"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.address"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'domainname'})
|
|
||||||
option_29 = PortOption(name="port", doc="Port", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_6, notraisepropertyerror=True)))), allow_private=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.port"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.port"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'port'})
|
|
||||||
option_31 = PasswordOption(name="password", doc="Password", multi=True, properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.password"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.password"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'secret'})
|
|
||||||
option_30 = UsernameOption(name="username", doc="Username", multi=True, properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.username"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.username"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("mandatory"), ParamValue("if a password is set")), kwargs={'__internal_jinja': ParamValue("mandatory_foxyproxy.proxies.username"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("mandatory"), '__internal_variable': ParamValue("foxyproxy.proxies.username"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.password': ParamOption(option_31, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'unix_user'})
|
|
||||||
option_32 = URLOption(name="url", doc="URL", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_15, notraisepropertyerror=True)))), allow_ip=False, allow_without_dot=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type is not in:\n- PAC URL\n- WPAD")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_24 = Leadership(name="proxies", doc="Proxy configuration", children=[option_25, option_26, option_27, option_28, option_29, option_30, option_31, option_32], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']})
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[optiondescription_24], properties=frozenset({"basic"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
class Regexp_option_27(RegexpOption):
|
|
||||||
__slots__ = tuple()
|
|
||||||
_type = 'value'
|
|
||||||
Regexp_option_27._regexp = re_compile(r"^#(?:[0-9a-f]{3}){1,2}$")
|
|
||||||
|
|
||||||
dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}"
|
|
||||||
dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_url.startswith(\"http://\") }}"
|
|
||||||
dict_env['disabled_firefox.dns_over_https.custom_dns_url'] = "{{ _.provider is propertyerror or _.provider != 'Custom' }}"
|
|
||||||
dict_env['default_foxyproxy.proxies.color'] = "#{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.address'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.port'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.username'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['hidden_foxyproxy.proxies.password'] = "{{ not _.username }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.password'] = "{{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}"
|
|
||||||
dict_env['frozen_foxyproxy.proxies.password'] = "{{ not _.username }}"
|
|
||||||
dict_env['disabled_foxyproxy.proxies.url'] = "{{ _.type not in ['PAC URL', 'WPAD'] }}"
|
|
||||||
option_2 = ChoiceOption(name="proxy_mode", doc="Configure Proxy Access to the Internet", values=("No proxy", "Auto-detect proxy settings for this network", "Use system proxy settings", "Manual proxy configuration", "Automatic proxy configuration URL"), default="No proxy", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/00-proxy.yml'], 'type': 'choice'})
|
|
||||||
option_5 = DomainnameOption(name="address", doc="Proxy address", type="domainname", allow_ip=True, properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'domainname'})
|
|
||||||
option_6 = PortOption(name="port", doc="Proxy port", default="8080", allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml'], 'type': 'port'})
|
|
||||||
optiondescription_4 = OptionDescription(name="http_proxy", doc="HTTP Proxy", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/10-manual.yml']})
|
|
||||||
option_7 = BoolOption(name="use_for_https", doc="Also use this proxy for HTTPS", default=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'boolean'})
|
|
||||||
option_9 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_10 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("frozen"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
optiondescription_8 = OptionDescription(name="https_proxy", doc="HTTPS Proxy", children=[option_9, option_10], properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_7), 'prop': ParamValue("hidden"), 'when': ParamValue(True), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_12 = DomainnameOption(name="address", doc="Proxy address", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'domainname'})
|
|
||||||
option_13 = PortOption(name="port", doc="Proxy port", default=Calculation(func['calc_value'], Params((ParamOption(option_6)))), allow_private=True, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml'], 'type': 'port'})
|
|
||||||
option_14 = ChoiceOption(name="version", doc="SOCKS host version used by proxy", values=("v4", "v5"), default="v5", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/20-manual.yml'], 'type': 'choice'})
|
|
||||||
optiondescription_11 = OptionDescription(name="socks_proxy", doc="SOCKS Proxy", children=[option_12, option_13, option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/types/00_type.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
optiondescription_3 = OptionDescription(name="manual", doc="Manual proxy configuration", children=[optiondescription_4, option_7, optiondescription_8, optiondescription_11], properties=frozenset({"basic", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Manual proxy configuration"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/10-manual.yml', 'tutorial_tmp/structural/firefox/20-manual.yml']})
|
|
||||||
option_15 = URLOption(name="auto", doc="Automatic proxy configuration URL", allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("Automatic proxy configuration URL"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/30-auto.yml'], 'type': 'web_address'})
|
|
||||||
option_16 = DomainnameOption(name="no_proxy", doc="Address for which proxy will be desactivated", multi=True, type="domainname", allow_ip=True, allow_cidr_network=True, allow_without_dot=True, allow_startswith_dot=True, properties=frozenset({"standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), '__internal_multi': ParamValue(True), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/40-no_proxy.yml'], 'type': 'domainname', 'examples': ('.mozilla.org', '.net.nz', '192.168.1.0/24'), 'help': 'Connections to localhost, 127.0.0.1/8 and ::1 are never proxied'})
|
|
||||||
option_17 = BoolOption(name="prompt_authentication", doc="Prompt for authentication if password is saved", default=True, properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("disabled"), 'when': ParamValue("No proxy"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/50-prompt_authentication.yml'], 'type': 'boolean'})
|
|
||||||
option_18 = BoolOption(name="proxy_dns_socks5", doc="Use proxy DNS when using SOCKS v5", default=False, properties=frozenset({"advanced", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.proxy_mode\" is not \"Manual proxy configuration\"\nor \"_.manual.socks_proxy.version\" is \"v4\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.proxy_dns_socks5"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.proxy_dns_socks5"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.manual.socks_proxy.version': ParamOption(option_14, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/55-proxy_dns_socks5.yml'], 'type': 'boolean'})
|
|
||||||
option_20 = BoolOption(name="enable_dns_over_https", doc="Enable DNS over HTTPS", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'boolean'})
|
|
||||||
option_21 = ChoiceOption(name="provider", doc="Use Provider", values=("Cloudflare", "NextDNS", "Custom"), default="Cloudflare", properties=frozenset({"mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_20), 'prop': ParamValue("disabled"), 'when': ParamValue(False), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'choice'})
|
|
||||||
option_22 = URLOption(name="custom_dns_url", doc="Custom DNS URL", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("validators"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'description': ParamValue("must starts with 'https://' only"), '_.custom_dns_url': ParamSelfOption(whole=False)}))], allow_ip=False, allow_without_dot=True, properties=frozenset({"basic", "mandatory", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if \"_.provider\" is not \"Custom\"")), kwargs={'__internal_jinja': ParamValue("disabled_firefox.dns_over_https.custom_dns_url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/firefox/60-dns_over_https.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("firefox.dns_over_https.custom_dns_url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.provider': ParamOption(option_21, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_19 = OptionDescription(name="dns_over_https", doc="DNS over HTTPS", children=[option_20, option_21, option_22], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/firefox/60-dns_over_https.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="firefox", doc="firefox", group_type=groups.namespace, children=[option_2, optiondescription_3, option_15, option_16, option_17, option_18, optiondescription_19], properties=frozenset({"basic"}))
|
|
||||||
option_25 = StrOption(name="title", doc="Title or Description", multi=True, properties=frozenset({"standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'string'})
|
|
||||||
option_26 = ChoiceOption(name="type", doc="Proxy Type", values=("HTTP", "HTTPS/SSL", "SOCKS4", "SOCKS5", "PAC URL", "WPAD", "System (use system settings)", "Direct (no proxy)"), multi=True, default_multi="Direct (no proxy)", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'choice'})
|
|
||||||
option_27 = Regexp_option_27(name="color", doc="Color", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_foxyproxy.proxies.color"), '__internal_type': ParamValue("regexp"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("default"), '__internal_variable': ParamValue("foxyproxy.proxies.color")})), properties=frozenset({"basic", "force_store_value", "mandatory"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'regexp'})
|
|
||||||
option_28 = DomainnameOption(name="address", doc="IP address, DNS name, server name", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_5, notraisepropertyerror=True)))), type="domainname", allow_ip=True, allow_without_dot=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.address"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.address"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'domainname'})
|
|
||||||
option_29 = PortOption(name="port", doc="Port", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_6, notraisepropertyerror=True)))), allow_private=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.port"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.port"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'port'})
|
|
||||||
option_30 = UsernameOption(name="username", doc="Username", multi=True, properties=frozenset({"standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.username"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.username"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml', 'tutorial_tmp/structural/foxyproxy/10-redefine.yml'], 'type': 'unix_user'})
|
|
||||||
option_31 = PasswordOption(name="password", doc="Password", multi=True, properties=frozenset({"force_default_on_freeze", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("hidden"), ParamValue("if username is empty")), kwargs={'__internal_jinja': ParamValue("hidden_foxyproxy.proxies.password"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/10-redefine.yml']), '__internal_attribute': ParamValue("hidden"), '__internal_variable': ParamValue("foxyproxy.proxies.password"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.username': ParamOption(option_30, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type not in:\n- HTTP\n- HTTPS/SSL\n- SOCKS4\n- SOCKS5")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.password"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.password"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help']), Calculation(func['jinja_to_property'], Params((ParamValue("frozen"), ParamValue("if username is empty")), kwargs={'__internal_jinja': ParamValue("frozen_foxyproxy.proxies.password"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/10-redefine.yml']), '__internal_attribute': ParamValue("frozen"), '__internal_variable': ParamValue("foxyproxy.proxies.password"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.username': ParamOption(option_30, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml', 'tutorial_tmp/structural/foxyproxy/10-redefine.yml'], 'type': 'secret'})
|
|
||||||
option_32 = URLOption(name="url", doc="URL", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_15, notraisepropertyerror=True)))), allow_ip=False, allow_without_dot=True, properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled"), ParamValue("if type is not in:\n- PAC URL\n- WPAD")), kwargs={'__internal_jinja': ParamValue("disabled_foxyproxy.proxies.url"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(False), '__internal_files': ParamValue(['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml']), '__internal_attribute': ParamValue("disabled"), '__internal_variable': ParamValue("foxyproxy.proxies.url"), 'when': ParamValue(True), 'inverse': ParamValue(False), '_.type': ParamOption(option_26, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml'], 'type': 'web_address'})
|
|
||||||
optiondescription_24 = Leadership(name="proxies", doc="Proxy configuration", children=[option_25, option_26, option_27, option_28, option_29, option_30, option_31, option_32], properties=frozenset({"basic"}), informations={'ymlfiles': ['tutorial_tmp/structural/foxyproxy/00-foxyproxy.yml', 'tutorial_tmp/structural/foxyproxy/10-redefine.yml']})
|
|
||||||
optiondescription_23 = OptionDescription(name="foxyproxy", doc="foxyproxy", group_type=groups.namespace, children=[optiondescription_24], properties=frozenset({"basic"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_23])
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
from pathlib import Path
|
|
||||||
from rougail import Rougail, RougailConfig
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
|
||||||
TUTORIAL_ROUGAIL = "../rougail-tutorials_builder/examples/"
|
|
||||||
TMP = Path("tutorial_tmp")
|
|
||||||
RESULT = Path("tests") / "result_tutorial"
|
|
||||||
|
|
||||||
def test_tutorial():
|
|
||||||
structural_files = TMP / "structural"
|
|
||||||
types_files = TMP / "types"
|
|
||||||
if TMP.is_dir():
|
|
||||||
shutil.rmtree(TMP)
|
|
||||||
structural_files.mkdir(parents=True)
|
|
||||||
types_files.mkdir()
|
|
||||||
namespace_support = False
|
|
||||||
RESULT.mkdir(exist_ok=True)
|
|
||||||
for exercice in sorted(Path(TUTORIAL_ROUGAIL).iterdir()):
|
|
||||||
result_files = RESULT / exercice.name
|
|
||||||
result_files.mkdir(exist_ok=True)
|
|
||||||
tiramisu_file = result_files / "tiramisu.py"
|
|
||||||
if (exercice / "namespace").is_file():
|
|
||||||
namespace_support = True
|
|
||||||
types_src_dir = exercice / "types"
|
|
||||||
if types_src_dir.is_dir():
|
|
||||||
for types in types_src_dir.iterdir():
|
|
||||||
for t in types.iterdir():
|
|
||||||
shutil.copy(t, types_files / t.name)
|
|
||||||
for namespace in (exercice / "structural_files").iterdir():
|
|
||||||
if not namespace.is_dir():
|
|
||||||
continue
|
|
||||||
structure_directory = structural_files / namespace.name
|
|
||||||
structure_directory.mkdir(exist_ok=True)
|
|
||||||
for filename in namespace.iterdir():
|
|
||||||
if not filename.name.endswith('.yml'):
|
|
||||||
continue
|
|
||||||
shutil.copyfile(filename, structure_directory / filename.name)
|
|
||||||
rougailconfig = RougailConfig.copy()
|
|
||||||
if namespace_support:
|
|
||||||
rougailconfig['main_namespace'] = 'firefox'
|
|
||||||
rougailconfig['main_structural_directories'] = [str(structural_files / "firefox")]
|
|
||||||
if (structural_files / 'foxyproxy').is_dir():
|
|
||||||
rougailconfig['extra_namespaces'] = {"foxyproxy": [str(structural_files / "foxyproxy")]} # extra_namespaces
|
|
||||||
else:
|
|
||||||
rougailconfig['main_namespace'] = None
|
|
||||||
rougailconfig['main_structural_directories'] = [str(structure_directory)]
|
|
||||||
types = [str(t) for t in types_files.iterdir()]
|
|
||||||
if types:
|
|
||||||
rougailconfig['types'] = types
|
|
||||||
tiramisu_tmp = TMP / "tiramisu.py"
|
|
||||||
try:
|
|
||||||
rougailconfig['tiramisu_cache'] = str(tiramisu_tmp)
|
|
||||||
except:
|
|
||||||
rougailconfig['cli.tiramisu_cache'] = str(tiramisu_tmp)
|
|
||||||
#
|
|
||||||
rougail = Rougail(rougailconfig)
|
|
||||||
rougail.run()
|
|
||||||
#
|
|
||||||
if not tiramisu_file.is_file():
|
|
||||||
shutil.copyfile(tiramisu_tmp, tiramisu_file)
|
|
||||||
with open(tiramisu_tmp, 'r') as fh:
|
|
||||||
tiramisu_objects = fh.read()
|
|
||||||
with open(tiramisu_file, 'r') as fh:
|
|
||||||
tiramisu_objects_ori = fh.read()
|
|
||||||
assert tiramisu_objects == tiramisu_objects_ori, f'{exercice.name} -> {tiramisu_file}'
|
|
||||||
tiramisu_tmp.unlink()
|
|
||||||
shutil.rmtree(TMP)
|
|
||||||
|
|
@ -139,11 +139,3 @@ def test_type_error_version():
|
||||||
|
|
||||||
def test_type_family_name_description():
|
def test_type_family_name_description():
|
||||||
type_variable("family_name_description")
|
type_variable("family_name_description")
|
||||||
|
|
||||||
|
|
||||||
def test_type_leadership():
|
|
||||||
type_variable("leadership")
|
|
||||||
|
|
||||||
|
|
||||||
def test_type_leadership_namespace():
|
|
||||||
type_variable("leadership", namespace=True)
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_3 = StrOption(name="description", doc="My second variable", default="an other new value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_name_description/00_structure.yml', 'tests/types/structures/family_name_description/00_structure.yml'], 'type': 'string'})
|
|
||||||
option_4 = StrOption(name="type", doc="My third variable", default="again an other new value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_name_description/00_structure.yml', 'tests/types/structures/family_name_description/00_structure.yml'], 'type': 'string'})
|
|
||||||
option_5 = StrOption(name="name", doc="My first variable", default="a new value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_name_description/00_structure.yml', 'tests/types/structures/family_name_description/00_structure.yml'], 'type': 'string'})
|
|
||||||
optiondescription_2 = OptionDescription(name="my_family", doc="my_family", children=[option_3, option_4, option_5], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_name_description/00_structure.yml', 'tests/types/structures/family_name_description/00_structure.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="ns2", doc="NS2", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"ns2.my_family.description": "an other new value",
|
|
||||||
"ns2.my_family.type": "again an other new value",
|
|
||||||
"ns2.my_family.name": "a new value"
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"ns2.my_family.description": "an other new value",
|
|
||||||
"ns2.my_family.type": "again an other new value",
|
|
||||||
"ns2.my_family.name": "a new value"
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_3 = StrOption(name="a_leader", doc="My first variable", multi=True, default=["a value"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_4 = StrOption(name="a_first_follower", doc="My second variable", multi=True, default_multi="an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_5 = StrOption(name="a_second_follower", doc="My third variable", multi=True, default_multi="again an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
optiondescription_2 = Leadership(name="my_leadership", doc="my_leadership", children=[option_3, option_4, option_5], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="my_leadership_1", doc="My family type", children=[optiondescription_2], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
option_8 = StrOption(name="a_leader", doc="My first variable", multi=True, default=["a value"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_9 = StrOption(name="a_first_follower", doc="My second variable", multi=True, default_multi="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml'], 'type': 'string'})
|
|
||||||
option_10 = StrOption(name="a_second_follower", doc="My third variable", multi=True, default_multi="again an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
optiondescription_7 = Leadership(name="my_leadership", doc="my_leadership", children=[option_8, option_9, option_10], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
optiondescription_6 = OptionDescription(name="my_leadership_2", doc="My family type", children=[optiondescription_7], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
option_13 = StrOption(name="a_leader", doc="My first variable", multi=True, default=["a value"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_14 = StrOption(name="a_first_follower", doc="My second variable", multi=True, default_multi="an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_15 = StrOption(name="a_second_follower", doc="My third variable", multi=True, default_multi="again an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_16 = StrOption(name="a_new_follower", doc="a description", multi=True, default_multi="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/structures/leadership/00_structure.yml'], 'type': 'string'})
|
|
||||||
optiondescription_12 = Leadership(name="my_leadership", doc="my_leadership", children=[option_13, option_14, option_15, option_16], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
optiondescription_11 = OptionDescription(name="my_leadership_3", doc="My family type", children=[optiondescription_12], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
option_19 = StrOption(name="a_leader", doc="a description", multi=True, default=["a value leader", "a second leader"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml'], 'type': 'string'})
|
|
||||||
option_20 = StrOption(name="a_first_follower", doc="My second variable", multi=True, default_multi="an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_21 = StrOption(name="a_second_follower", doc="My third variable", multi=True, default_multi="again an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
optiondescription_18 = Leadership(name="my_leadership", doc="my_leadership", children=[option_19, option_20, option_21], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
optiondescription_17 = OptionDescription(name="my_leadership_4", doc="My family type", children=[optiondescription_18], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_6, optiondescription_11, optiondescription_17])
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
"my_leadership_1.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"my_leadership_1.my_leadership.a_leader": "a value",
|
|
||||||
"my_leadership_1.my_leadership.a_first_follower": "an other value",
|
|
||||||
"my_leadership_1.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"my_leadership_2.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"my_leadership_2.my_leadership.a_leader": "a value",
|
|
||||||
"my_leadership_2.my_leadership.a_first_follower": "a modified value",
|
|
||||||
"my_leadership_2.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"my_leadership_3.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"my_leadership_3.my_leadership.a_leader": "a value",
|
|
||||||
"my_leadership_3.my_leadership.a_first_follower": "an other value",
|
|
||||||
"my_leadership_3.my_leadership.a_second_follower": "again an other value",
|
|
||||||
"my_leadership_3.my_leadership.a_new_follower": "a value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"my_leadership_4.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"my_leadership_4.my_leadership.a_leader": "a value leader",
|
|
||||||
"my_leadership_4.my_leadership.a_first_follower": "an other value",
|
|
||||||
"my_leadership_4.my_leadership.a_second_follower": "again an other value"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"my_leadership_4.my_leadership.a_leader": "a second leader",
|
|
||||||
"my_leadership_4.my_leadership.a_first_follower": "an other value",
|
|
||||||
"my_leadership_4.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
"my_leadership_1.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"my_leadership_1.my_leadership.a_leader": "a value",
|
|
||||||
"my_leadership_1.my_leadership.a_first_follower": "an other value",
|
|
||||||
"my_leadership_1.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"my_leadership_2.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"my_leadership_2.my_leadership.a_leader": "a value",
|
|
||||||
"my_leadership_2.my_leadership.a_first_follower": "a modified value",
|
|
||||||
"my_leadership_2.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"my_leadership_3.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"my_leadership_3.my_leadership.a_leader": "a value",
|
|
||||||
"my_leadership_3.my_leadership.a_first_follower": "an other value",
|
|
||||||
"my_leadership_3.my_leadership.a_second_follower": "again an other value",
|
|
||||||
"my_leadership_3.my_leadership.a_new_follower": "a value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"my_leadership_4.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"my_leadership_4.my_leadership.a_leader": "a value leader",
|
|
||||||
"my_leadership_4.my_leadership.a_first_follower": "an other value",
|
|
||||||
"my_leadership_4.my_leadership.a_second_follower": "again an other value"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"my_leadership_4.my_leadership.a_leader": "a second leader",
|
|
||||||
"my_leadership_4.my_leadership.a_first_follower": "an other value",
|
|
||||||
"my_leadership_4.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_4 = StrOption(name="a_leader", doc="My first variable", multi=True, default=["a value"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_5 = StrOption(name="a_first_follower", doc="My second variable", multi=True, default_multi="an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_6 = StrOption(name="a_second_follower", doc="My third variable", multi=True, default_multi="again an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
optiondescription_3 = Leadership(name="my_leadership", doc="my_leadership", children=[option_4, option_5, option_6], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="my_leadership_1", doc="My family type", children=[optiondescription_3], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
option_9 = StrOption(name="a_leader", doc="My first variable", multi=True, default=["a value"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_10 = StrOption(name="a_first_follower", doc="My second variable", multi=True, default_multi="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml'], 'type': 'string'})
|
|
||||||
option_11 = StrOption(name="a_second_follower", doc="My third variable", multi=True, default_multi="again an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
optiondescription_8 = Leadership(name="my_leadership", doc="my_leadership", children=[option_9, option_10, option_11], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
optiondescription_7 = OptionDescription(name="my_leadership_2", doc="My family type", children=[optiondescription_8], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
option_14 = StrOption(name="a_leader", doc="My first variable", multi=True, default=["a value"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_15 = StrOption(name="a_first_follower", doc="My second variable", multi=True, default_multi="an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_16 = StrOption(name="a_second_follower", doc="My third variable", multi=True, default_multi="again an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_17 = StrOption(name="a_new_follower", doc="a description", multi=True, default_multi="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/structures/leadership/00_structure.yml'], 'type': 'string'})
|
|
||||||
optiondescription_13 = Leadership(name="my_leadership", doc="my_leadership", children=[option_14, option_15, option_16, option_17], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
optiondescription_12 = OptionDescription(name="my_leadership_3", doc="My family type", children=[optiondescription_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
option_20 = StrOption(name="a_leader", doc="a description", multi=True, default=["a value leader", "a second leader"], properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml'], 'type': 'string'})
|
|
||||||
option_21 = StrOption(name="a_first_follower", doc="My second variable", multi=True, default_multi="an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
option_22 = StrOption(name="a_second_follower", doc="My third variable", multi=True, default_multi="again an other value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml'], 'type': 'string'})
|
|
||||||
optiondescription_19 = Leadership(name="my_leadership", doc="my_leadership", children=[option_20, option_21, option_22], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
optiondescription_18 = OptionDescription(name="my_leadership_4", doc="My family type", children=[optiondescription_19], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/leadership/00_type.yml', 'tests/types/structures/leadership/00_structure.yml']})
|
|
||||||
optiondescription_1 = OptionDescription(name="ns2", doc="NS2", group_type=groups.namespace, children=[optiondescription_2, optiondescription_7, optiondescription_12, optiondescription_18], properties=frozenset({"standard"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
"ns2.my_leadership_1.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_1.my_leadership.a_leader": "a value",
|
|
||||||
"ns2.my_leadership_1.my_leadership.a_first_follower": "an other value",
|
|
||||||
"ns2.my_leadership_1.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ns2.my_leadership_2.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_2.my_leadership.a_leader": "a value",
|
|
||||||
"ns2.my_leadership_2.my_leadership.a_first_follower": "a modified value",
|
|
||||||
"ns2.my_leadership_2.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_leader": "a value",
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_first_follower": "an other value",
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_second_follower": "again an other value",
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_new_follower": "a value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_leader": "a value leader",
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_first_follower": "an other value",
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_second_follower": "again an other value"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_leader": "a second leader",
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_first_follower": "an other value",
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
"ns2.my_leadership_1.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_1.my_leadership.a_leader": "a value",
|
|
||||||
"ns2.my_leadership_1.my_leadership.a_first_follower": "an other value",
|
|
||||||
"ns2.my_leadership_1.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ns2.my_leadership_2.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_2.my_leadership.a_leader": "a value",
|
|
||||||
"ns2.my_leadership_2.my_leadership.a_first_follower": "a modified value",
|
|
||||||
"ns2.my_leadership_2.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_leader": "a value",
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_first_follower": "an other value",
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_second_follower": "again an other value",
|
|
||||||
"ns2.my_leadership_3.my_leadership.a_new_follower": "a value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_leader": [
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_leader": "a value leader",
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_first_follower": "an other value",
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_second_follower": "again an other value"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_leader": "a second leader",
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_first_follower": "an other value",
|
|
||||||
"ns2.my_leadership_4.my_leadership.a_second_follower": "again an other value"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
%YAML 1.2
|
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
my_family:
|
|
||||||
_type: my_family_type
|
|
||||||
|
|
||||||
name: a new value
|
|
||||||
|
|
||||||
description: an other new value
|
|
||||||
|
|
||||||
type: again an other new value
|
|
||||||
...
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
%YAML 1.2
|
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
my_leadership_1:
|
|
||||||
type: my_family_type_with_leadership
|
|
||||||
|
|
||||||
my_leadership_2:
|
|
||||||
type: my_family_type_with_leadership
|
|
||||||
|
|
||||||
my_leadership:
|
|
||||||
|
|
||||||
a_first_follower: a modified value
|
|
||||||
|
|
||||||
my_leadership_3:
|
|
||||||
type: my_family_type_with_leadership
|
|
||||||
|
|
||||||
my_leadership:
|
|
||||||
|
|
||||||
a_new_follower: a value # a description
|
|
||||||
|
|
||||||
my_leadership_4:
|
|
||||||
type: my_family_type_with_leadership
|
|
||||||
|
|
||||||
my_leadership:
|
|
||||||
|
|
||||||
a_leader: # a description
|
|
||||||
- a value leader
|
|
||||||
- a second leader
|
|
||||||
...
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
%YAML 1.2
|
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
my_family_type:
|
|
||||||
_type: family
|
|
||||||
_description: My family type
|
|
||||||
|
|
||||||
name: a value # My first variable
|
|
||||||
|
|
||||||
description: an other value # My second variable
|
|
||||||
|
|
||||||
type: again an other value # My third variable
|
|
||||||
...
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
%YAML 1.2
|
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
my_family_type_with_leadership: # My family type
|
|
||||||
|
|
||||||
my_leadership:
|
|
||||||
type: leadership
|
|
||||||
|
|
||||||
a_leader: # My first variable
|
|
||||||
- a value
|
|
||||||
|
|
||||||
a_first_follower: an other value # My second variable
|
|
||||||
|
|
||||||
a_second_follower: again an other value # My third variable
|
|
||||||
...
|
|
||||||
Loading…
Reference in a new issue