2023-10-12 08:17:30 +02:00
from tiramisu import *
from tiramisu . setting import ALLOWED_LEADER_PROPERTIES
2024-06-19 17:36:18 +02:00
from rougail . tiramisu import func , dict_env , load_functions , ConvertDynOptionDescription
load_functions ( ' tests/dictionaries/../eosfunc/test.py ' )
2023-10-12 08:17:30 +02:00
ALLOWED_LEADER_PROPERTIES . add ( " basic " )
ALLOWED_LEADER_PROPERTIES . add ( " standard " )
ALLOWED_LEADER_PROPERTIES . add ( " advanced " )
dict_env [ ' disabled_1.rougail.my_var2 ' ] = " { % i f my_var1 is not defined % } \n my_var1 is undefined! \n { % e lif my_var1 == \" no \" % } \n my_var1 is no \n { % e ndif % } \n "
dict_env [ ' disabled_1.rougail.my_var3 ' ] = " { % i f my_var2 is not defined % } \n my_var2 is undefined! \n { % e lif my_var2 == \" no \" % } \n my_var2 is no \n { % e ndif % } \n "
dict_env [ ' disabled_2.rougail.my_var2 ' ] = " { % i f my_var1 is not defined % } \n my_var1 is undefined! \n { % e lif my_var1 == \" no \" % } \n my_var1 is no \n { % e ndif % } \n "
dict_env [ ' disabled_2.rougail.my_var3 ' ] = " { % i f my_var2 is not defined % } \n my_var2 is undefined! \n { % e lif my_var2 == \" no \" % } \n my_var2 is no \n { % e ndif % } \n "
option_3 = StrOption ( name = " my_var1 " , doc = " my_var1 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " } ) )
option_4 = StrOption ( name = " my_var2 " , doc = " my_var2 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " , Calculation ( func [ ' jinja_to_property ' ] , Params ( ( ParamValue ( " disabled " ) ) , kwargs = { ' __internal_jinja ' : ParamValue ( " disabled_1.rougail.my_var2 " ) , ' __internal_type ' : ParamValue ( " string " ) , ' __internal_multi ' : ParamValue ( False ) , ' my_var1 ' : ParamOption ( option_3 , notraisepropertyerror = True ) } ) , help_function = func [ ' jinja_to_property_help ' ] ) } ) )
option_5 = StrOption ( name = " my_var3 " , doc = " my_var3 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " , Calculation ( func [ ' jinja_to_property ' ] , Params ( ( ParamValue ( " disabled " ) ) , kwargs = { ' __internal_jinja ' : ParamValue ( " disabled_1.rougail.my_var3 " ) , ' __internal_type ' : ParamValue ( " string " ) , ' __internal_multi ' : ParamValue ( False ) , ' my_var2 ' : ParamOption ( option_4 , notraisepropertyerror = True ) } ) , help_function = func [ ' jinja_to_property_help ' ] ) } ) )
optiondescription_2 = OptionDescription ( name = " rougail " , doc = " rougail " , children = [ option_3 , option_4 , option_5 ] , properties = frozenset ( { " standard " } ) )
optiondescription_1 = OptionDescription ( name = " 1 " , doc = " 1 " , children = [ optiondescription_2 ] , properties = frozenset ( { " standard " } ) )
option_8 = StrOption ( name = " my_var1 " , doc = " my_var1 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " } ) )
option_9 = StrOption ( name = " my_var2 " , doc = " my_var2 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " , Calculation ( func [ ' jinja_to_property ' ] , Params ( ( ParamValue ( " disabled " ) ) , kwargs = { ' __internal_jinja ' : ParamValue ( " disabled_2.rougail.my_var2 " ) , ' __internal_type ' : ParamValue ( " string " ) , ' __internal_multi ' : ParamValue ( False ) , ' my_var1 ' : ParamOption ( option_8 , notraisepropertyerror = True ) } ) , help_function = func [ ' jinja_to_property_help ' ] ) } ) )
option_10 = StrOption ( name = " my_var3 " , doc = " my_var3 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " , Calculation ( func [ ' jinja_to_property ' ] , Params ( ( ParamValue ( " disabled " ) ) , kwargs = { ' __internal_jinja ' : ParamValue ( " disabled_2.rougail.my_var3 " ) , ' __internal_type ' : ParamValue ( " string " ) , ' __internal_multi ' : ParamValue ( False ) , ' my_var2 ' : ParamOption ( option_9 , notraisepropertyerror = True ) } ) , help_function = func [ ' jinja_to_property_help ' ] ) } ) )
optiondescription_7 = OptionDescription ( name = " rougail " , doc = " rougail " , children = [ option_8 , option_9 , option_10 ] , properties = frozenset ( { " standard " } ) )
optiondescription_6 = OptionDescription ( name = " 2 " , doc = " 2 " , children = [ optiondescription_7 ] , properties = frozenset ( { " standard " } ) )
option_0 = OptionDescription ( name = " baseoption " , doc = " baseoption " , children = [ optiondescription_1 , optiondescription_6 ] )