from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from re import compile as re_compile
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
dict_env['validators_1.rougail.netmask_address_eth0'] = "{% if not _.netmask_address_eth0 | valid_in_network(_.network_address_eth0) %}\n{{ _.netmask_address_eth0 }} is not a netmask for network {{ _.network_address_eth0 }}\n{% endif %}\n"
dict_env['validators_2.rougail.netmask_address_eth0'] = "{% if not _.netmask_address_eth0 | valid_in_network(_.network_address_eth0) %}\n{{ _.netmask_address_eth0 }} is not a netmask for network {{ _.network_address_eth0 }}\n{% endif %}\n"
option_3 = NetworkOption(name="network_address_eth0", doc="Network address", properties=frozenset({"basic", "mandatory"}), informations={'type': 'network'})
option_4 = NetmaskOption(name="netmask_address_eth0", doc="Netmask address", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_1.rougail.netmask_address_eth0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '_.netmask_address_eth0': ParamSelfOption(whole=False), '_.network_address_eth0': ParamOption(option_3)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'netmask'})
optiondescription_2 = OptionDescription(name="rougail", doc="Rougail", children=[option_3, option_4], properties=frozenset({"basic"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"}))
option_7 = NetworkOption(name="network_address_eth0", doc="Network address", properties=frozenset({"basic", "mandatory"}), informations={'type': 'network'})
option_8 = NetmaskOption(name="netmask_address_eth0", doc="Netmask address", validators=[Calculation(func['valid_with_jinja'], Params((), kwargs={'__internal_jinja': ParamValue("validators_2.rougail.netmask_address_eth0"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '_.netmask_address_eth0': ParamSelfOption(whole=False), '_.network_address_eth0': ParamOption(option_7)}))], properties=frozenset({"basic", "mandatory"}), informations={'type': 'netmask'})
optiondescription_6 = OptionDescription(name="rougail", doc="Rougail", children=[option_7, option_8], properties=frozenset({"basic"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5])
