diff --git a/src/rougail/convert/convert.py b/src/rougail/convert/convert.py index efa3cb016..c6833f4d0 100644 --- a/src/rougail/convert/convert.py +++ b/src/rougail/convert/convert.py @@ -420,7 +420,7 @@ class ParserVariable: redefine = True custom = self.custom_family_types[c_obj_type].copy() self.family_or_variable( - custom.pop("xmlfiles"), + custom.pop("xmlfiles") + sources, name, subpath, custom, @@ -457,7 +457,9 @@ class ParserVariable: parent_dynamic, force=True, ) - self.paths[path].xmlfiles.extend(sources) + for source in sources: + if source not in self.paths[path].xmlfiles: + self.paths[path].xmlfiles.append(source) force_not_first = True if self.paths[path].type == "dynamic": family_is_dynamic = True @@ -726,7 +728,7 @@ class ParserVariable: if obj_type in self.custom_variable_types: redefine = True custom = self.custom_variable_types[obj_type].copy() - self.add_variable(name, path, custom, custom['xmlfiles'].copy(), family_is_dynamic, parent_dynamic, family_is_leadership, first_variable, custom_type=True) + self.add_variable(name, path, custom, custom.get('xmlfiles'), family_is_dynamic, parent_dynamic, family_is_leadership, first_variable, custom_type=True) del obj["type"] if path in self.paths: if not self.load_unexist_redefine: @@ -744,7 +746,9 @@ class ParserVariable: parent_dynamic, force=True, ) - self.paths[path].xmlfiles.extend(sources) + for source in sources: + if source not in self.paths[path].xmlfiles: + self.paths[path].xmlfiles.append(source) else: if not self.load_unexist_redefine and exists is True: # this variable must exist diff --git a/tests/result_tutorial/080/tiramisu.py b/tests/result_tutorial/080/tiramisu.py index f1c6a0600..36bde620b 100644 --- a/tests/result_tutorial/080/tiramisu.py +++ b/tests/result_tutorial/080/tiramisu.py @@ -14,9 +14,9 @@ dict_env['frozen_manual.{{ identifier }}_proxy.port'] = "{{ my_identifier == 'HT 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_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'}) diff --git a/tests/result_tutorial/081/tiramisu.py b/tests/result_tutorial/081/tiramisu.py index 3bb0fc5cb..7898e4df6 100644 --- a/tests/result_tutorial/081/tiramisu.py +++ b/tests/result_tutorial/081/tiramisu.py @@ -10,16 +10,16 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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]) diff --git a/tests/result_tutorial/090/tiramisu.py b/tests/result_tutorial/090/tiramisu.py index 57849b2fa..60dc98b85 100644 --- a/tests/result_tutorial/090/tiramisu.py +++ b/tests/result_tutorial/090/tiramisu.py @@ -10,17 +10,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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]) diff --git a/tests/result_tutorial/100/tiramisu.py b/tests/result_tutorial/100/tiramisu.py index 9bcc0d948..1dea95167 100644 --- a/tests/result_tutorial/100/tiramisu.py +++ b/tests/result_tutorial/100/tiramisu.py @@ -10,17 +10,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/101/tiramisu.py b/tests/result_tutorial/101/tiramisu.py index 9f10e8f2b..e0db566e3 100644 --- a/tests/result_tutorial/101/tiramisu.py +++ b/tests/result_tutorial/101/tiramisu.py @@ -10,17 +10,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/102/tiramisu.py b/tests/result_tutorial/102/tiramisu.py index fa545818f..c5b8b24db 100644 --- a/tests/result_tutorial/102/tiramisu.py +++ b/tests/result_tutorial/102/tiramisu.py @@ -10,17 +10,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/103/tiramisu.py b/tests/result_tutorial/103/tiramisu.py index 284f3b995..2b1725e71 100644 --- a/tests/result_tutorial/103/tiramisu.py +++ b/tests/result_tutorial/103/tiramisu.py @@ -10,17 +10,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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')}) diff --git a/tests/result_tutorial/104/tiramisu.py b/tests/result_tutorial/104/tiramisu.py index de3eff54c..cb19cf343 100644 --- a/tests/result_tutorial/104/tiramisu.py +++ b/tests/result_tutorial/104/tiramisu.py @@ -10,17 +10,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/110/tiramisu.py b/tests/result_tutorial/110/tiramisu.py index e25ee9cc7..88d85fa48 100644 --- a/tests/result_tutorial/110/tiramisu.py +++ b/tests/result_tutorial/110/tiramisu.py @@ -10,17 +10,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/111/tiramisu.py b/tests/result_tutorial/111/tiramisu.py index 86dd3981f..ca28e3454 100644 --- a/tests/result_tutorial/111/tiramisu.py +++ b/tests/result_tutorial/111/tiramisu.py @@ -10,17 +10,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/112/tiramisu.py b/tests/result_tutorial/112/tiramisu.py index 1f0e36ba1..89bddddd2 100644 --- a/tests/result_tutorial/112/tiramisu.py +++ b/tests/result_tutorial/112/tiramisu.py @@ -11,17 +11,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/120/tiramisu.py b/tests/result_tutorial/120/tiramisu.py index 024bdfc5d..e90418676 100644 --- a/tests/result_tutorial/120/tiramisu.py +++ b/tests/result_tutorial/120/tiramisu.py @@ -11,17 +11,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/130/tiramisu.py b/tests/result_tutorial/130/tiramisu.py index 78b189275..226829a43 100644 --- a/tests/result_tutorial/130/tiramisu.py +++ b/tests/result_tutorial/130/tiramisu.py @@ -11,17 +11,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/140/tiramisu.py b/tests/result_tutorial/140/tiramisu.py index 9033aa148..055254147 100644 --- a/tests/result_tutorial/140/tiramisu.py +++ b/tests/result_tutorial/140/tiramisu.py @@ -11,17 +11,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/141/tiramisu.py b/tests/result_tutorial/141/tiramisu.py index af21bf8a3..806531063 100644 --- a/tests/result_tutorial/141/tiramisu.py +++ b/tests/result_tutorial/141/tiramisu.py @@ -11,17 +11,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/142/tiramisu.py b/tests/result_tutorial/142/tiramisu.py index da08e87bf..515b24962 100644 --- a/tests/result_tutorial/142/tiramisu.py +++ b/tests/result_tutorial/142/tiramisu.py @@ -12,17 +12,17 @@ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/150/tiramisu.py b/tests/result_tutorial/150/tiramisu.py index 6c6f697cc..78111a499 100644 --- a/tests/result_tutorial/150/tiramisu.py +++ b/tests/result_tutorial/150/tiramisu.py @@ -13,17 +13,17 @@ dict_env['disabled_proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version is prop 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', '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/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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/160/tiramisu.py b/tests/result_tutorial/160/tiramisu.py index a6c55abab..a0f44f4f1 100644 --- a/tests/result_tutorial/160/tiramisu.py +++ b/tests/result_tutorial/160/tiramisu.py @@ -13,17 +13,17 @@ dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/161/tiramisu.py b/tests/result_tutorial/161/tiramisu.py index b94fa1626..01308a605 100644 --- a/tests/result_tutorial/161/tiramisu.py +++ b/tests/result_tutorial/161/tiramisu.py @@ -13,17 +13,17 @@ dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/170/tiramisu.py b/tests/result_tutorial/170/tiramisu.py index 40de83774..3075d30ec 100644 --- a/tests/result_tutorial/170/tiramisu.py +++ b/tests/result_tutorial/170/tiramisu.py @@ -13,17 +13,17 @@ dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/180/tiramisu.py b/tests/result_tutorial/180/tiramisu.py index fe8b2ef25..fb677279b 100644 --- a/tests/result_tutorial/180/tiramisu.py +++ b/tests/result_tutorial/180/tiramisu.py @@ -18,17 +18,17 @@ dict_env['disabled_firefox.proxy_dns_socks5'] = "{{ _.manual.socks_proxy.version 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/181/tiramisu.py b/tests/result_tutorial/181/tiramisu.py index 9dc3ab255..f1fce266a 100644 --- a/tests/result_tutorial/181/tiramisu.py +++ b/tests/result_tutorial/181/tiramisu.py @@ -19,17 +19,17 @@ dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/182/tiramisu.py b/tests/result_tutorial/182/tiramisu.py index 8242dd82f..f9b8f4938 100644 --- a/tests/result_tutorial/182/tiramisu.py +++ b/tests/result_tutorial/182/tiramisu.py @@ -19,17 +19,17 @@ dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/190/tiramisu.py b/tests/result_tutorial/190/tiramisu.py index f4f550876..3ca6643f6 100644 --- a/tests/result_tutorial/190/tiramisu.py +++ b/tests/result_tutorial/190/tiramisu.py @@ -19,17 +19,17 @@ dict_env['validators_firefox.dns_over_https.custom_dns_url'] = "{{ _.custom_dns_ 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/200/tiramisu.py b/tests/result_tutorial/200/tiramisu.py index 01526d382..cc49d1815 100644 --- a/tests/result_tutorial/200/tiramisu.py +++ b/tests/result_tutorial/200/tiramisu.py @@ -22,17 +22,17 @@ dict_env['disabled_foxyproxy.proxies.address'] = "{{ _.type not in ['HTTP', 'HTT 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/210/tiramisu.py b/tests/result_tutorial/210/tiramisu.py index c3d35b20d..51bcdf39d 100644 --- a/tests/result_tutorial/210/tiramisu.py +++ b/tests/result_tutorial/210/tiramisu.py @@ -25,17 +25,17 @@ dict_env['mandatory_foxyproxy.proxies.username'] = "{% if _.password is not prop 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/result_tutorial/211/tiramisu.py b/tests/result_tutorial/211/tiramisu.py index a67f48780..51e6ab881 100644 --- a/tests/result_tutorial/211/tiramisu.py +++ b/tests/result_tutorial/211/tiramisu.py @@ -26,17 +26,17 @@ dict_env['disabled_foxyproxy.proxies.password'] = "{{ _.type not in ['HTTP', 'HT 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_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_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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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', 'tutorial_tmp/structural/firefox/20-manual.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_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'}) diff --git a/tests/types/result/family/namespace_tiramisu.py b/tests/types/result/family/namespace_tiramisu.py index ffe2efab6..1596cf908 100644 --- a/tests/types/result/family/namespace_tiramisu.py +++ b/tests/types/result/family/namespace_tiramisu.py @@ -9,6 +9,6 @@ except: ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_2 = StrOption(name="my_type", doc="My type", default="a value", properties=frozenset({"mandatory", "one_tag", "standard"}), informations={'ymlfiles': ['tests/types/types/family/00_type.yml'], 'type': 'string', 'tags': ('one_tag',)}) +option_2 = StrOption(name="my_type", doc="My type", default="a value", properties=frozenset({"mandatory", "one_tag", "standard"}), informations={'ymlfiles': ['tests/types/types/family/00_type.yml', 'tests/types/structures/family/00_structure.yml'], 'type': 'string', 'tags': ('one_tag',)}) optiondescription_1 = OptionDescription(name="my_family", doc="My family type", children=[option_2], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family/00_type.yml', 'tests/types/structures/family/00_structure.yml']}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) diff --git a/tests/types/result/family/tiramisu.py b/tests/types/result/family/tiramisu.py index 7d22f1ea0..acc39eda4 100644 --- a/tests/types/result/family/tiramisu.py +++ b/tests/types/result/family/tiramisu.py @@ -9,7 +9,7 @@ except: ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") -option_3 = StrOption(name="my_type", doc="My type", default="a value", properties=frozenset({"mandatory", "one_tag", "standard"}), informations={'ymlfiles': ['tests/types/types/family/00_type.yml'], 'type': 'string', 'tags': ('one_tag',)}) +option_3 = StrOption(name="my_type", doc="My type", default="a value", properties=frozenset({"mandatory", "one_tag", "standard"}), informations={'ymlfiles': ['tests/types/types/family/00_type.yml', 'tests/types/structures/family/00_structure.yml'], 'type': 'string', 'tags': ('one_tag',)}) optiondescription_2 = OptionDescription(name="my_family", doc="My family type", children=[option_3], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family/00_type.yml', 'tests/types/structures/family/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]) diff --git a/tests/types/result/family_dynfamily/namespace_tiramisu.py b/tests/types/result/family_dynfamily/namespace_tiramisu.py index ddce18304..a2c2c6eaa 100644 --- a/tests/types/result/family_dynfamily/namespace_tiramisu.py +++ b/tests/types/result/family_dynfamily/namespace_tiramisu.py @@ -10,17 +10,17 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="a_first_variable", doc="a first variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) -option_4 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_4 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) option_5 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) optiondescription_3 = OptionDescription(name="a_sub_{{ identifier }}", doc="My sub{{ identifier }}", children=[option_4, option_5], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) optiondescription_1 = OptionDescription(name="my_family_1", doc="My family type", children=[option_2, optiondescription_3], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) -option_7 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) -option_9 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) -option_10 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) -optiondescription_8 = OptionDescription(name="a_sub_{{ identifier }}", doc="My sub{{ identifier }}", children=[option_9, option_10], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml']}) +option_7 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_9 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_10 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) +optiondescription_8 = OptionDescription(name="a_sub_{{ identifier }}", doc="My sub{{ identifier }}", children=[option_9, option_10], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) optiondescription_6 = OptionDescription(name="my_family_2", doc="My family type", children=[option_7, optiondescription_8], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) -option_12 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) -option_14 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_12 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_14 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) option_15 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) optiondescription_13 = OptionDescription(name="a_sub_{{ identifier }}", doc="My sub{{ identifier }}", children=[option_14, option_15], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) optiondescription_11 = OptionDescription(name="my_family_3", doc="My family type", children=[option_12, optiondescription_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) diff --git a/tests/types/result/family_dynfamily/tiramisu.py b/tests/types/result/family_dynfamily/tiramisu.py index db7eec257..af179b46d 100644 --- a/tests/types/result/family_dynfamily/tiramisu.py +++ b/tests/types/result/family_dynfamily/tiramisu.py @@ -10,17 +10,17 @@ ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="a_first_variable", doc="a first variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) -option_5 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_5 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) option_6 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) optiondescription_4 = OptionDescription(name="a_sub_{{ identifier }}", doc="My sub{{ identifier }}", children=[option_5, option_6], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) optiondescription_2 = OptionDescription(name="my_family_1", doc="My family type", children=[option_3, optiondescription_4], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) -option_8 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) -option_10 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) -option_11 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) -optiondescription_9 = OptionDescription(name="a_sub_{{ identifier }}", doc="My sub{{ identifier }}", children=[option_10, option_11], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml']}) +option_8 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_10 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_11 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) +optiondescription_9 = OptionDescription(name="a_sub_{{ identifier }}", doc="My sub{{ identifier }}", children=[option_10, option_11], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) optiondescription_7 = OptionDescription(name="my_family_2", doc="My family type", children=[option_8, optiondescription_9], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) -option_13 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) -option_15 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_13 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) +option_15 = StrOption(name="identifier", doc="identifier", multi=True, default=["family"], default_multi="family", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) option_16 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml'], 'type': 'string'}) optiondescription_14 = OptionDescription(name="a_sub_{{ identifier }}", doc="My sub{{ identifier }}", children=[option_15, option_16], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) optiondescription_12 = OptionDescription(name="my_family_3", doc="My family type", children=[option_13, optiondescription_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_dynfamily/00_structure.yml', 'tests/types/structures/family_dynfamily/00_structure.yml']}) diff --git a/tests/types/result/family_redefine/namespace_tiramisu.py b/tests/types/result/family_redefine/namespace_tiramisu.py index b1c21b565..975e2dfaf 100644 --- a/tests/types/result/family_redefine/namespace_tiramisu.py +++ b/tests/types/result/family_redefine/namespace_tiramisu.py @@ -12,10 +12,10 @@ ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="a_first_variable", doc="a first variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) option_3 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) optiondescription_1 = OptionDescription(name="my_family_1", doc="My family type", children=[option_2, option_3], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml']}) -option_5 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml'], 'type': 'string'}) -option_6 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml'], 'type': 'string'}) +option_5 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) +option_6 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) optiondescription_4 = OptionDescription(name="my_family_2", doc="My family type", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml']}) -option_8 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml'], 'type': 'string'}) +option_8 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) option_9 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) optiondescription_7 = OptionDescription(name="my_family_3", doc="My family type", children=[option_8, option_9], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml']}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4, optiondescription_7]) diff --git a/tests/types/result/family_redefine/tiramisu.py b/tests/types/result/family_redefine/tiramisu.py index aaa4fb224..2e35af0b7 100644 --- a/tests/types/result/family_redefine/tiramisu.py +++ b/tests/types/result/family_redefine/tiramisu.py @@ -12,10 +12,10 @@ ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="a_first_variable", doc="a first variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) option_4 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) optiondescription_2 = OptionDescription(name="my_family_1", doc="My family type", children=[option_3, option_4], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml']}) -option_6 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml'], 'type': 'string'}) -option_7 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml'], 'type': 'string'}) +option_6 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) +option_7 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) optiondescription_5 = OptionDescription(name="my_family_2", doc="My family type", children=[option_6, option_7], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml']}) -option_9 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml'], 'type': 'string'}) +option_9 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) option_10 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml'], 'type': 'string'}) optiondescription_8 = OptionDescription(name="my_family_3", doc="My family type", children=[option_9, option_10], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine/00_structure.yml', 'tests/types/structures/family_redefine/00_structure.yml']}) optiondescription_1 = OptionDescription(name="ns2", doc="NS2", group_type=groups.namespace, children=[optiondescription_2, optiondescription_5, optiondescription_8], properties=frozenset({"basic"})) diff --git a/tests/types/result/family_subfamily/namespace_tiramisu.py b/tests/types/result/family_subfamily/namespace_tiramisu.py index 80d3bdcba..e0aa2c522 100644 --- a/tests/types/result/family_subfamily/namespace_tiramisu.py +++ b/tests/types/result/family_subfamily/namespace_tiramisu.py @@ -13,11 +13,11 @@ option_2 = StrOption(name="a_first_variable", doc="a first variable", default="a option_4 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) optiondescription_3 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_4], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) optiondescription_1 = OptionDescription(name="my_family_1", doc="My family type", children=[option_2, optiondescription_3], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) -option_6 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'}) -option_8 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'}) -optiondescription_7 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_8], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml']}) +option_6 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) +option_8 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) +optiondescription_7 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_8], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) optiondescription_5 = OptionDescription(name="my_family_2", doc="My family type", children=[option_6, optiondescription_7], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) -option_10 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'}) +option_10 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) option_12 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) optiondescription_11 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_12], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) optiondescription_9 = OptionDescription(name="my_family_3", doc="My family type", children=[option_10, optiondescription_11], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) diff --git a/tests/types/result/family_subfamily/tiramisu.py b/tests/types/result/family_subfamily/tiramisu.py index 3be3284dc..9f1c98795 100644 --- a/tests/types/result/family_subfamily/tiramisu.py +++ b/tests/types/result/family_subfamily/tiramisu.py @@ -13,11 +13,11 @@ option_3 = StrOption(name="a_first_variable", doc="a first variable", default="a option_5 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) optiondescription_4 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_5], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) optiondescription_2 = OptionDescription(name="my_family_1", doc="My family type", children=[option_3, optiondescription_4], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) -option_7 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'}) -option_9 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'}) -optiondescription_8 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_9], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml']}) +option_7 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) +option_9 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) +optiondescription_8 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_9], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) optiondescription_6 = OptionDescription(name="my_family_2", doc="My family type", children=[option_7, optiondescription_8], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) -option_11 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'}) +option_11 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) option_13 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'}) optiondescription_12 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) optiondescription_10 = OptionDescription(name="my_family_3", doc="My family type", children=[option_11, optiondescription_12], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']}) diff --git a/tests/types/result/family_subfamily_add/namespace_tiramisu.py b/tests/types/result/family_subfamily_add/namespace_tiramisu.py index eaab9e04e..ec0de4665 100644 --- a/tests/types/result/family_subfamily_add/namespace_tiramisu.py +++ b/tests/types/result/family_subfamily_add/namespace_tiramisu.py @@ -15,11 +15,11 @@ optiondescription_3 = OptionDescription(name="a_sub_family", doc="My subfamily", option_6 = StrOption(name="a_second_variable", doc="a_second_variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) optiondescription_5 = OptionDescription(name="a_new_subfamily", doc="a_new_subfamily", children=[option_6], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/structures/family_subfamily_add/00_structure.yml']}) optiondescription_1 = OptionDescription(name="my_family_1", doc="My family type", children=[option_2, optiondescription_3, optiondescription_5], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml']}) -option_8 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml'], 'type': 'string'}) -option_10 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml'], 'type': 'string'}) -optiondescription_9 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_10], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml']}) +option_8 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) +option_10 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) +optiondescription_9 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_10], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml']}) optiondescription_7 = OptionDescription(name="my_family_2", doc="My family type", children=[option_8, optiondescription_9], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml']}) -option_12 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml'], 'type': 'string'}) +option_12 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) option_14 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) optiondescription_13 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_14], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml']}) option_15 = StrOption(name="a_new_variable", doc="a_new_variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) diff --git a/tests/types/result/family_subfamily_add/tiramisu.py b/tests/types/result/family_subfamily_add/tiramisu.py index 2f7201efa..6ce3cf339 100644 --- a/tests/types/result/family_subfamily_add/tiramisu.py +++ b/tests/types/result/family_subfamily_add/tiramisu.py @@ -15,11 +15,11 @@ optiondescription_4 = OptionDescription(name="a_sub_family", doc="My subfamily", option_7 = StrOption(name="a_second_variable", doc="a_second_variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) optiondescription_6 = OptionDescription(name="a_new_subfamily", doc="a_new_subfamily", children=[option_7], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/structures/family_subfamily_add/00_structure.yml']}) optiondescription_2 = OptionDescription(name="my_family_1", doc="My family type", children=[option_3, optiondescription_4, optiondescription_6], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml']}) -option_9 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml'], 'type': 'string'}) -option_11 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml'], 'type': 'string'}) -optiondescription_10 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_11], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml']}) +option_9 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) +option_11 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) +optiondescription_10 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_11], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml']}) optiondescription_8 = OptionDescription(name="my_family_2", doc="My family type", children=[option_9, optiondescription_10], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml']}) -option_13 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml'], 'type': 'string'}) +option_13 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) option_15 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) optiondescription_14 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_15], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily_add/00_structure.yml', 'tests/types/structures/family_subfamily_add/00_structure.yml']}) option_16 = StrOption(name="a_new_variable", doc="a_new_variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/structures/family_subfamily_add/00_structure.yml'], 'type': 'string'}) diff --git a/tests/types/result/leadership/namespace_tiramisu.py b/tests/types/result/leadership/namespace_tiramisu.py index 72430909e..18058e149 100644 --- a/tests/types/result/leadership/namespace_tiramisu.py +++ b/tests/types/result/leadership/namespace_tiramisu.py @@ -9,25 +9,25 @@ except: 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']}) +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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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_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', 'tests/types/structures/leadership/00_structure.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'}) +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', 'tests/types/structures/leadership/00_structure.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_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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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'}) +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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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]) diff --git a/tests/types/result/leadership/tiramisu.py b/tests/types/result/leadership/tiramisu.py index 3468af947..b176609ff 100644 --- a/tests/types/result/leadership/tiramisu.py +++ b/tests/types/result/leadership/tiramisu.py @@ -9,25 +9,25 @@ except: 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']}) +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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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_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', 'tests/types/structures/leadership/00_structure.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'}) +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', 'tests/types/structures/leadership/00_structure.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_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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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'}) +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', 'tests/types/structures/leadership/00_structure.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', 'tests/types/structures/leadership/00_structure.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"})) diff --git a/tests/types/result/variable_hidden/namespace_tiramisu.py b/tests/types/result/variable_hidden/namespace_tiramisu.py index ba23b39b9..b10f63d02 100644 --- a/tests/types/result/variable_hidden/namespace_tiramisu.py +++ b/tests/types/result/variable_hidden/namespace_tiramisu.py @@ -12,10 +12,10 @@ ALLOWED_LEADER_PROPERTIES.add("advanced") option_2 = StrOption(name="a_first_variable", doc="a first variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) option_3 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("hidden"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_2), 'prop': ParamValue("frozen"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) optiondescription_1 = OptionDescription(name="my_family_1", doc="My family type", children=[option_2, option_3], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml']}) -option_5 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml'], 'type': 'string'}) -option_6 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_5), 'prop': ParamValue("hidden"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_5), 'prop': ParamValue("frozen"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml'], 'type': 'string'}) +option_5 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) +option_6 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_5), 'prop': ParamValue("hidden"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_5), 'prop': ParamValue("frozen"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) optiondescription_4 = OptionDescription(name="my_family_2", doc="My family type", children=[option_5, option_6], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml']}) -option_8 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml'], 'type': 'string'}) +option_8 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) option_9 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_8), 'prop': ParamValue("hidden"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_8), 'prop': ParamValue("frozen"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) optiondescription_7 = OptionDescription(name="my_family_3", doc="My family type", children=[option_8, option_9], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml']}) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4, optiondescription_7]) diff --git a/tests/types/result/variable_hidden/tiramisu.py b/tests/types/result/variable_hidden/tiramisu.py index 8480b47b5..0f1b98d3c 100644 --- a/tests/types/result/variable_hidden/tiramisu.py +++ b/tests/types/result/variable_hidden/tiramisu.py @@ -12,10 +12,10 @@ ALLOWED_LEADER_PROPERTIES.add("advanced") option_3 = StrOption(name="a_first_variable", doc="a first variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) option_4 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_3), 'prop': ParamValue("hidden"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_3), 'prop': ParamValue("frozen"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) optiondescription_2 = OptionDescription(name="my_family_1", doc="My family type", children=[option_3, option_4], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml']}) -option_6 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml'], 'type': 'string'}) -option_7 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml'], 'type': 'string'}) +option_6 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) +option_7 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "force_default_on_freeze", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("hidden"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_6), 'prop': ParamValue("frozen"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) optiondescription_5 = OptionDescription(name="my_family_2", doc="My family type", children=[option_6, option_7], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml']}) -option_9 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml'], 'type': 'string'}) +option_9 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) option_10 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"force_default_on_freeze", "mandatory", "standard", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_9), 'prop': ParamValue("hidden"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property']), Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamOption(option_9), 'prop': ParamValue("frozen"), 'when': ParamValue("a value"), 'inverse': ParamValue(True)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml'], 'type': 'string'}) optiondescription_8 = OptionDescription(name="my_family_3", doc="My family type", children=[option_9, option_10], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/variable_hidden/00_structure.yml', 'tests/types/structures/variable_hidden/00_structure.yml']}) optiondescription_1 = OptionDescription(name="ns2", doc="NS2", group_type=groups.namespace, children=[optiondescription_2, optiondescription_5, optiondescription_8], properties=frozenset({"basic"}))