first commit
This commit is contained in:
commit
4a1b9ef5a5
318 changed files with 3871 additions and 0 deletions
0
__init__.py
Normal file
0
__init__.py
Normal file
BIN
funcs/__pycache__/test.cpython-310.pyc
Normal file
BIN
funcs/__pycache__/test.cpython-310.pyc
Normal file
Binary file not shown.
BIN
funcs/__pycache__/test.cpython-311.pyc
Normal file
BIN
funcs/__pycache__/test.cpython-311.pyc
Normal file
Binary file not shown.
BIN
funcs/__pycache__/test.cpython-312.pyc
Normal file
BIN
funcs/__pycache__/test.cpython-312.pyc
Normal file
Binary file not shown.
BIN
funcs/__pycache__/test.cpython-313.pyc
Normal file
BIN
funcs/__pycache__/test.cpython-313.pyc
Normal file
Binary file not shown.
BIN
funcs/__pycache__/test.cpython-39.pyc
Normal file
BIN
funcs/__pycache__/test.cpython-39.pyc
Normal file
Binary file not shown.
76
funcs/test.py
Normal file
76
funcs/test.py
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
def trange(start, stop):
|
||||
return list(range(start, stop))
|
||||
|
||||
|
||||
def calc_val(*args, **kwargs):
|
||||
if len(args) > 0:
|
||||
return args[0]
|
||||
|
||||
|
||||
def concat(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def calc_multi_condition(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def get_zone_name_bridge(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def get_devices(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def get_mount_point_device(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def valid_differ(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def valid_ipnetmask(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def valid_enum(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def valid_lower(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def list_files(*args, **kwargs):
|
||||
# FIXME ?
|
||||
return kwargs['default']
|
||||
|
||||
|
||||
def calc_multi_val(*args, **kwargs):
|
||||
return args[0]
|
||||
|
||||
|
||||
def cdrom_minormajor(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def device_type(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def calc_list(*args, **kwargs):
|
||||
return list(args)
|
||||
|
||||
|
||||
def test_index(index):
|
||||
return index
|
||||
|
||||
|
||||
def return_no():
|
||||
return 'no'
|
||||
|
||||
|
||||
def return_yes():
|
||||
return 'yes'
|
||||
BIN
src/rougail_tests/__pycache__/custom.cpython-313.pyc
Normal file
BIN
src/rougail_tests/__pycache__/custom.cpython-313.pyc
Normal file
Binary file not shown.
BIN
src/rougail_tests/__pycache__/utils.cpython-313.pyc
Normal file
BIN
src/rougail_tests/__pycache__/utils.cpython-313.pyc
Normal file
Binary file not shown.
7
src/rougail_tests/custom.py
Normal file
7
src/rougail_tests/custom.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
from os import environ
|
||||
environ['TIRAMISU_LOCALE'] = 'en'
|
||||
from tiramisu import StrOption
|
||||
|
||||
|
||||
class CustomOption(StrOption):
|
||||
pass
|
||||
196
src/rougail_tests/utils.py
Normal file
196
src/rougail_tests/utils.py
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
from pathlib import Path
|
||||
from rougail import RougailConfig
|
||||
|
||||
from .custom import CustomOption
|
||||
|
||||
|
||||
def get_structures_list(excludes):
|
||||
return [test for test in sorted((Path(__file__).parent.parent.parent / 'structures').iterdir()) if test.name not in excludes]
|
||||
|
||||
|
||||
def get_funcs():
|
||||
return [str(test) for test in sorted((Path(__file__).parent.parent.parent / 'funcs').iterdir()) if test.name.endswith('.py')]
|
||||
|
||||
|
||||
def get_rougail_config(test_dir, namespace=False):
|
||||
rougailconfig = RougailConfig
|
||||
rougailconfig['functions_files'] = get_funcs()
|
||||
dirs = [str(test_dir / 'rougail')]
|
||||
subfolder = test_dir / 'rougail2'
|
||||
if subfolder.is_dir():
|
||||
dirs.append(str(subfolder))
|
||||
rougailconfig['main_dictionaries'] = dirs
|
||||
if namespace:
|
||||
rougailconfig['main_namespace'] = 'Rougail'
|
||||
if (test_dir / 'force_no_namespace').is_file():
|
||||
return None
|
||||
else:
|
||||
rougailconfig['main_namespace'] = None
|
||||
if (test_dir / 'force_namespace').is_file():
|
||||
return None
|
||||
extra_dictionaries = {}
|
||||
extras = list(test_dir.iterdir())
|
||||
extras.sort()
|
||||
for extra in extras:
|
||||
if extra.name in ['rougail', 'rougail2']:
|
||||
continue
|
||||
if extra.is_dir():
|
||||
extra_dictionaries[extra.name] = [str(extra)]
|
||||
if extra_dictionaries:
|
||||
if not namespace:
|
||||
return None
|
||||
rougailconfig['extra_dictionaries'] = extra_dictionaries
|
||||
else:
|
||||
rougailconfig['extra_dictionaries'] = {}
|
||||
rougailconfig['custom_types']['custom'] = CustomOption
|
||||
# rougailconfig['tiramisu_cache'] = "cache.py"
|
||||
return rougailconfig
|
||||
|
||||
|
||||
def get_values_for_config(config, specify_dynamic_id=True, level="all"):
|
||||
# level is "all" or "mandatories"
|
||||
|
||||
excludes = []
|
||||
get_excludes(config.unrestraint, excludes)
|
||||
config.property.read_only()
|
||||
root_config = config.unrestraint
|
||||
if level == 'all':
|
||||
only = False
|
||||
else:
|
||||
only = True
|
||||
values = {}
|
||||
get_variables(root_config, root_config, values, only, excludes, specify_dynamic_id)
|
||||
if not specify_dynamic_id:
|
||||
for exclude in excludes:
|
||||
_values = values
|
||||
*s_exclude, name = exclude.split('.')
|
||||
for _name in s_exclude:
|
||||
if _name not in _values:
|
||||
break
|
||||
_values = _values[_name]
|
||||
else:
|
||||
if name in _values:
|
||||
del _values[name]
|
||||
return values
|
||||
|
||||
|
||||
def get_excludes(config, excludes):
|
||||
for option in config.list(uncalculated=True):
|
||||
if option.isoptiondescription():
|
||||
exclude = option.information.get('dynamic_variable',
|
||||
None,
|
||||
)
|
||||
if exclude:
|
||||
excludes.append(exclude)
|
||||
get_excludes(option, excludes)
|
||||
|
||||
|
||||
def get_value(variable, index, excludes):
|
||||
if 'force_store_value' in variable.property.get():
|
||||
return variable.value.get()
|
||||
tests = variable.information.get('test', None)
|
||||
if variable.path(uncalculated=True) in excludes and variable.value.get(uncalculated=True):
|
||||
tests = variable.value.get()
|
||||
elif tests:
|
||||
tests = list(tests)
|
||||
else:
|
||||
if variable.type() == 'integer':
|
||||
tests = [1, 2, 3]
|
||||
elif variable.type() == 'float':
|
||||
tests = [1.1, 2.2, 3.3]
|
||||
elif variable.type() == 'port':
|
||||
tests = ['80', '443']
|
||||
elif variable.type() == 'boolean':
|
||||
tests = [True]
|
||||
elif variable.type() == 'domain name':
|
||||
tests = ['domain1.lan', 'domain2.lan']
|
||||
elif variable.type() == 'choice':
|
||||
tests = variable.value.list()
|
||||
elif variable.type() == 'network address':
|
||||
if variable.extra('_cidr'):
|
||||
tests = ['192.168.1.0/24', '10.0.0.0/24']
|
||||
else:
|
||||
tests = ['192.168.1.0', '10.0.0.0']
|
||||
elif variable.type() == 'netmask address':
|
||||
tests = ['255.255.255.0', '255.255.0.0']
|
||||
elif variable.type() == 'IP':
|
||||
if variable.extra('_cidr'):
|
||||
tests = ['192.168.1.6/32', '10.0.10.0/24']
|
||||
else:
|
||||
tests = ['192.168.1.6', '10.0.10.10']
|
||||
else:
|
||||
tests = ['string1', 'string2', 'string3']
|
||||
if not variable.ismulti():
|
||||
tests = tests[0]
|
||||
elif index is not None and variable.isfollower() and variable.issubmulti() is False:
|
||||
tests = tests[index]
|
||||
variable.value.set(tests)
|
||||
# if tests == None:
|
||||
# tests = ""
|
||||
if index is not None and variable.isleader():
|
||||
tests = tests[index]
|
||||
return tests
|
||||
|
||||
|
||||
def get_variables(root_config, config, values, only, excludes, specify_dynamic_id, *, index=None, leader_is_mandatory=False):
|
||||
for idx, key in enumerate(config):
|
||||
if key.isoptiondescription():
|
||||
if key.isleadership():
|
||||
value = []
|
||||
leader = key.leader()
|
||||
if only and not leader.value.mandatory():
|
||||
leader_value = leader.value.get()
|
||||
leader_is_mandatory = False
|
||||
else:
|
||||
leader_value = get_value(leader, None, excludes)
|
||||
leader_is_mandatory = True
|
||||
for idx_, val in enumerate(leader_value):
|
||||
value.append({})
|
||||
get_variables(root_config, key, value[-1], only, excludes, specify_dynamic_id, index=idx_, leader_is_mandatory=leader_is_mandatory)
|
||||
if value:
|
||||
values[key.name()] = value
|
||||
else:
|
||||
value = {}
|
||||
get_variables(root_config, key, value, only, excludes, specify_dynamic_id)
|
||||
if value:
|
||||
values[key.name()] = value
|
||||
else:
|
||||
if only:
|
||||
if key.isleader():
|
||||
mandatory = leader_is_mandatory
|
||||
else:
|
||||
try:
|
||||
mandatory = key.value.mandatory()
|
||||
except:
|
||||
mandatory = False
|
||||
if not only or mandatory:
|
||||
if key.index() is not None and index is not None and index != key.index():
|
||||
continue
|
||||
value = get_value(key, index, excludes)
|
||||
if specify_dynamic_id or key.path(uncalculated=True) not in excludes:
|
||||
values[key.name()] = value
|
||||
|
||||
|
||||
def config_to_dict(parent, key_is_option=False):
|
||||
for option, value in parent.items():
|
||||
if option.isoptiondescription():
|
||||
if not key_is_option and option.isleadership():
|
||||
ret = []
|
||||
for idx, datas in enumerate(config_to_dict(value, key_is_option=True)):
|
||||
sub_option, sub_value = datas
|
||||
if not idx:
|
||||
sub_option = sub_option.path()
|
||||
key = sub_option
|
||||
for val in sub_value:
|
||||
ret.append({sub_option: val})
|
||||
else:
|
||||
index = sub_option.index()
|
||||
sub_option = sub_option.path()
|
||||
ret[index][sub_option] = sub_value
|
||||
yield key, ret
|
||||
else:
|
||||
yield from config_to_dict(value, key_is_option)
|
||||
elif key_is_option:
|
||||
yield option, value
|
||||
else:
|
||||
yield option.path(), value
|
||||
0
structures/00_0empty/rougail/.gitkeep
Normal file
0
structures/00_0empty/rougail/.gitkeep
Normal file
3
structures/00_0version_underscore/rougail/00-base.yml
Normal file
3
structures/00_0version_underscore/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
_version: '1.1'
|
||||
version: # a variable
|
||||
3
structures/00_1empty_variable/rougail/00-base.yml
Normal file
3
structures/00_1empty_variable/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
version: '1.0'
|
||||
empty:
|
||||
10
structures/00_2default_calculated/rougail/00-base.yml
Normal file
10
structures/00_2default_calculated/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
version: 1.1
|
||||
var1: "no" # a first variable
|
||||
var2:
|
||||
description: a second variable
|
||||
multi: true
|
||||
default:
|
||||
jinja: |
|
||||
{{ _.var1 }}
|
||||
description: the value of var1
|
||||
15
structures/00_2default_calculated_multi/rougail/00-base.yml
Normal file
15
structures/00_2default_calculated_multi/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
version: 1.1
|
||||
var1: # a first variable
|
||||
- 'no'
|
||||
- 'yes'
|
||||
- maybe
|
||||
var2:
|
||||
description: a second variable
|
||||
multi: true
|
||||
default:
|
||||
jinja: |
|
||||
{% for val in _.var1 %}
|
||||
{{ val }}
|
||||
{% endfor %}
|
||||
description: the value of _.var1
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
version: 1.1
|
||||
|
||||
var1:
|
||||
description: a first variable
|
||||
multi: true
|
||||
type: domainname
|
||||
params:
|
||||
allow_ip: true
|
||||
|
||||
var2:
|
||||
description: a second variable
|
||||
default:
|
||||
type: variable
|
||||
variable: _.var1
|
||||
4
structures/00_4load_subfolder/rougail/99-base.yml
Normal file
4
structures/00_4load_subfolder/rougail/99-base.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
version: '1.0'
|
||||
var1:
|
||||
description: a variable
|
||||
4
structures/00_4load_subfolder/rougail2/00-base.yml
Normal file
4
structures/00_4load_subfolder/rougail2/00-base.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
version: "1.0"
|
||||
var2:
|
||||
description: a variable
|
||||
5
structures/00_5load_notype/rougail/00-base.yml
Normal file
5
structures/00_5load_notype/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
version: '1.0'
|
||||
without_type:
|
||||
description: a variable
|
||||
default: non
|
||||
18
structures/00_6boolean/rougail/00-base.yml
Normal file
18
structures/00_6boolean/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: true # the first variable
|
||||
var2:
|
||||
description: the second variable
|
||||
default: true
|
||||
var3:
|
||||
description: the third variable
|
||||
type: boolean
|
||||
default: true
|
||||
var4: false # the forth variable
|
||||
var5:
|
||||
description: the fifth variable
|
||||
default: false
|
||||
var6:
|
||||
description: the sixth variable
|
||||
type: boolean
|
||||
default: false
|
||||
6
structures/00_6boolean_no_mandatory/rougail/00-base.yml
Normal file
6
structures/00_6boolean_no_mandatory/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
type: boolean
|
||||
mandatory: false
|
||||
42
structures/00_6choice/rougail/00-base.yml
Normal file
42
structures/00_6choice/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1:
|
||||
description: the first variable
|
||||
choices:
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
var2:
|
||||
description: the second variable
|
||||
choices:
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
var3:
|
||||
description: the third variable
|
||||
choices:
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
mandatory: false
|
||||
var4:
|
||||
description: the forth variable
|
||||
choices:
|
||||
- null
|
||||
- b
|
||||
- c
|
||||
mandatory: false
|
||||
var5:
|
||||
description: the fifth variable
|
||||
choices:
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
default: a
|
||||
var6:
|
||||
description: the sixth variable
|
||||
choices:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
default: 1
|
||||
12
structures/00_6choice_calculation/rougail/00-base.yml
Normal file
12
structures/00_6choice_calculation/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
version: 1.1
|
||||
var:
|
||||
description: a variable
|
||||
default: 9
|
||||
choices:
|
||||
jinja: |
|
||||
{% for n in trange(0, 10) %}
|
||||
{{ n }}
|
||||
{% endfor %}
|
||||
return_type: 'number'
|
||||
description: choices is 0 to 9
|
||||
11
structures/00_6choice_variable/rougail/00-base.yml
Normal file
11
structures/00_6choice_variable/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: # a second variable
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
var2:
|
||||
description: a first variable
|
||||
default: a
|
||||
choices:
|
||||
variable: _.var1
|
||||
9
structures/00_6custom/rougail/00-base.yml
Normal file
9
structures/00_6custom/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
version: '1.1'
|
||||
custom1:
|
||||
description: the first variable
|
||||
type: custom
|
||||
custom2:
|
||||
description: the seconf variable
|
||||
type: custom
|
||||
default: value
|
||||
6
structures/00_6domainname/rougail/00-base.yml
Normal file
6
structures/00_6domainname/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a domain name variable
|
||||
type: domainname
|
||||
default: my.domain.name
|
||||
8
structures/00_6domainname_params/rougail/00-base.yml
Normal file
8
structures/00_6domainname_params/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a domain name variable
|
||||
type: domainname
|
||||
default: my.domain.name
|
||||
params:
|
||||
allow_ip: true
|
||||
18
structures/00_6float/rougail/00-base.yml
Normal file
18
structures/00_6float/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: 0.0 # the first variable
|
||||
var2:
|
||||
description: the second variable
|
||||
default: 0.0
|
||||
var3:
|
||||
description: the third variable
|
||||
type: float
|
||||
default: 0.0
|
||||
var4: 10.1 # the forth variable
|
||||
var5:
|
||||
description: the fifth variable
|
||||
default: 10.1
|
||||
var6:
|
||||
description: the sixth variable
|
||||
type: float
|
||||
default: 10.1
|
||||
18
structures/00_6number/rougail/00-base.yml
Normal file
18
structures/00_6number/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: 0 # the first variable
|
||||
var2:
|
||||
description: the second variable
|
||||
default: 0
|
||||
var3:
|
||||
description: the third variable
|
||||
type: number
|
||||
default: 0
|
||||
var4: 10 # this forth variable
|
||||
var5:
|
||||
description: the fifth variable
|
||||
default: 10
|
||||
var6:
|
||||
description: the sixth variable
|
||||
type: number
|
||||
default: 10
|
||||
13
structures/00_6port/rougail/00-base.yml
Normal file
13
structures/00_6port/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable1:
|
||||
description: a port variable
|
||||
type: port
|
||||
variable2:
|
||||
description: a port variable with default value
|
||||
type: port
|
||||
default: '8080'
|
||||
variable3:
|
||||
description: a port variable with integer default value
|
||||
type: port
|
||||
default: 8080
|
||||
9
structures/00_6regexp/rougail/00-base.yml
Normal file
9
structures/00_6regexp/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var:
|
||||
description: a first variable
|
||||
regexp: "^#(?:[0-9a-f]{3}){1,2}$"
|
||||
default: "#a1a1a1"
|
||||
test:
|
||||
- "#b1b1b1"
|
||||
- "#b2b2b2"
|
||||
9
structures/00_6secret/rougail/00-base.yml
Normal file
9
structures/00_6secret/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
version: '1.1'
|
||||
secret1:
|
||||
description: the first variable
|
||||
type: secret
|
||||
secret2:
|
||||
description: the second variable
|
||||
type: secret
|
||||
default: value
|
||||
17
structures/00_6string/rougail/00-base.yml
Normal file
17
structures/00_6string/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: # the first variable
|
||||
var2:
|
||||
description: the second variable
|
||||
default:
|
||||
var3:
|
||||
description: the third variable
|
||||
type: string
|
||||
var4: value # the forth variable
|
||||
var5:
|
||||
description: the fifth variable
|
||||
default: value
|
||||
var6:
|
||||
description: the sixth variable
|
||||
type: string
|
||||
default: value
|
||||
10
structures/00_7choice_quote/rougail/00-base.yml
Normal file
10
structures/00_7choice_quote/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
version: '1.0'
|
||||
var:
|
||||
type: choice
|
||||
description: A choice
|
||||
default: quote'
|
||||
choices:
|
||||
- quote'
|
||||
- quote"
|
||||
- quote"'
|
||||
8
structures/00_7help_quote/rougail/00-base.yml
Normal file
8
structures/00_7help_quote/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: '1.0'
|
||||
var1:
|
||||
description: the first variable
|
||||
help: message with '
|
||||
var2:
|
||||
description: the second variable
|
||||
help: message with "
|
||||
5
structures/00_7value_doublequote/rougail/00-base.yml
Normal file
5
structures/00_7value_doublequote/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default: quote"
|
||||
5
structures/00_7value_doublequote2/rougail/00-base.yml
Normal file
5
structures/00_7value_doublequote2/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default: quote'"
|
||||
6
structures/00_7value_doublequote3/rougail/00-base.yml
Normal file
6
structures/00_7value_doublequote3/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
version: '1.1'
|
||||
|
||||
variable:
|
||||
description: a variable
|
||||
default: quote\"\'
|
||||
5
structures/00_7value_quote/rougail/00-base.yml
Normal file
5
structures/00_7value_quote/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
version: '1.0'
|
||||
variable:
|
||||
description: a variable
|
||||
default: quote'
|
||||
12
structures/00_8calculation_information/rougail/00-base.yml
Normal file
12
structures/00_8calculation_information/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default:
|
||||
jinja: |
|
||||
{{test_information }}
|
||||
params:
|
||||
test_information:
|
||||
type: information
|
||||
information: test_information
|
||||
description: get information test_information
|
||||
40
structures/00_8test/rougail/00-base.yml
Normal file
40
structures/00_8test/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
version: '1.1'
|
||||
|
||||
var1:
|
||||
description: the first variable
|
||||
test:
|
||||
- test
|
||||
|
||||
var2:
|
||||
description: the second variable
|
||||
test:
|
||||
- test
|
||||
default: value
|
||||
|
||||
var3:
|
||||
description: the third variable
|
||||
test:
|
||||
- test1
|
||||
- test2
|
||||
|
||||
var4:
|
||||
description: the forth variable
|
||||
test:
|
||||
- null
|
||||
- test1
|
||||
- test2
|
||||
mandatory: false
|
||||
|
||||
var5:
|
||||
description: the fifth variable
|
||||
type: boolean
|
||||
test:
|
||||
- false
|
||||
|
||||
var6:
|
||||
description: the sixth variable
|
||||
multi: true
|
||||
test:
|
||||
- test1
|
||||
- test2
|
||||
17
structures/00_9choice_variable_multi/rougail/00-base.yml
Normal file
17
structures/00_9choice_variable_multi/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable1:
|
||||
description: a first variable
|
||||
type: choice
|
||||
multi: true
|
||||
choices:
|
||||
- val1
|
||||
- val2
|
||||
variable2:
|
||||
description: a second variable
|
||||
type: choice
|
||||
multi: true
|
||||
mandatory: false
|
||||
choices:
|
||||
- val1
|
||||
- val2
|
||||
11
structures/00_9choice_variables/rougail/00-base.yml
Normal file
11
structures/00_9choice_variables/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
version: '1.1'
|
||||
source_variable_1: val1 # the first source variable
|
||||
source_variable_2: val2 # the second source variable
|
||||
my_variable:
|
||||
description: a variable
|
||||
type: choice
|
||||
choices:
|
||||
- variable: _.source_variable_1
|
||||
- variable: _.source_variable_2
|
||||
default: val1
|
||||
14
structures/00_9default_calculation/rougail/00-base.yml
Normal file
14
structures/00_9default_calculation/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
version: '1.1'
|
||||
|
||||
variable:
|
||||
description: a variable
|
||||
default:
|
||||
jinja: |
|
||||
{{ param1 }}_{{ param2 }}_{{ param3 }}_{{ param4 }}
|
||||
params:
|
||||
param1: string
|
||||
param2: 1
|
||||
param3: true
|
||||
param4: null
|
||||
description: concat all parameters
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var:
|
||||
description: a variable
|
||||
default:
|
||||
jinja: '{{ information }}'
|
||||
params:
|
||||
information:
|
||||
type: information
|
||||
information: test_information
|
||||
variable: _.var
|
||||
description: returns the information
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: # a first variable
|
||||
var2:
|
||||
description: a second variable
|
||||
default:
|
||||
jinja: |
|
||||
{{ information }}
|
||||
params:
|
||||
information:
|
||||
type: information
|
||||
information: test_information
|
||||
variable: _.var1
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
version: 1.1
|
||||
my_variable:
|
||||
default: val1
|
||||
my_calculated_variable:
|
||||
multi: true
|
||||
default:
|
||||
- variable: _.my_variable
|
||||
optional: true
|
||||
- variable: _.my_variable_unexists
|
||||
optional: true
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
version: 1.1
|
||||
my_variable:
|
||||
default: val1
|
||||
my_calculated_variable:
|
||||
multi: true
|
||||
default:
|
||||
- variable: _.my_variable_unexists
|
||||
optional: true
|
||||
- variable: _.my_variable
|
||||
optional: true
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
version: 1.1
|
||||
my_calculated_variable:
|
||||
multi: true
|
||||
default:
|
||||
variable: _.my_variable
|
||||
optional: true
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
version: 1.1
|
||||
my_variable:
|
||||
multi: true
|
||||
default:
|
||||
- val1
|
||||
- val2
|
||||
my_calculated_variable:
|
||||
multi: true
|
||||
default:
|
||||
variable: _.my_variable
|
||||
optional: true
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1:
|
||||
description: a first variable
|
||||
default:
|
||||
jinja: '{% if var2 is defined %}
|
||||
{{ var2 }}
|
||||
{% elif var3 is defined %}
|
||||
{{ var3 }}
|
||||
{% elif var4 is defined %}
|
||||
{{ var4 }}
|
||||
{% else %}
|
||||
{{ _.var2 }}
|
||||
{% endif %}
|
||||
'
|
||||
params:
|
||||
var2:
|
||||
variable: _.var2
|
||||
optional: true
|
||||
var3:
|
||||
variable: _.var3
|
||||
optional: true
|
||||
var4:
|
||||
variable: _.unknown_family.var
|
||||
optional: true
|
||||
description: returns a value
|
||||
mandatory: false
|
||||
var2: "no" # a second variable
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: # a first variable
|
||||
var2:
|
||||
description: a second variable
|
||||
default:
|
||||
type: information
|
||||
information: test_information
|
||||
variable: _.var1
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: # a first variable
|
||||
var2:
|
||||
description: a second variable
|
||||
default:
|
||||
# type: information
|
||||
information: test_information
|
||||
variable: _.var1
|
||||
12
structures/00_9default_integer/rougail/00-base.yml
Normal file
12
structures/00_9default_integer/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var:
|
||||
description: a variable
|
||||
default: 9
|
||||
choices:
|
||||
jinja: |+
|
||||
{% for item in trange(0, 10) %}
|
||||
{{ item }}
|
||||
{%- endfor %}
|
||||
return_type: number
|
||||
description: choice for 0 to 9
|
||||
7
structures/00_9extra/extra/00-base.yml
Normal file
7
structures/00_9extra/extra/00-base.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default:
|
||||
jinja: 'no'
|
||||
description: return no
|
||||
0
structures/00_9extra/force_namespace
Normal file
0
structures/00_9extra/force_namespace
Normal file
3
structures/00_9extra/rougail/00-base.yml
Normal file
3
structures/00_9extra/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable: rougail # a variable
|
||||
21
structures/00_9extra_calculation/extra/00-base.yml
Normal file
21
structures/00_9extra_calculation/extra/00-base.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable1:
|
||||
description: a first variable
|
||||
default:
|
||||
variable: rougail.variable
|
||||
variable2:
|
||||
description: a second variable
|
||||
default:
|
||||
jinja: |
|
||||
{{ rougail.variable }}
|
||||
description: copy the value of rougail.variable
|
||||
variable3:
|
||||
description: a third variable
|
||||
default:
|
||||
jinja: |
|
||||
{{ variable }}
|
||||
params:
|
||||
variable:
|
||||
variable: rougail.variable
|
||||
description: copy the value of rougail.variable
|
||||
0
structures/00_9extra_calculation/force_namespace
Normal file
0
structures/00_9extra_calculation/force_namespace
Normal file
3
structures/00_9extra_calculation/rougail/00-base.yml
Normal file
3
structures/00_9extra_calculation/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable: value # a variable
|
||||
5
structures/00_9extra_ouside/extra/00-base.yml
Normal file
5
structures/00_9extra_ouside/extra/00-base.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default: value in extra
|
||||
0
structures/00_9extra_ouside/force_namespace
Normal file
0
structures/00_9extra_ouside/force_namespace
Normal file
6
structures/00_9extra_ouside/rougail/00-base.yml
Normal file
6
structures/00_9extra_ouside/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default:
|
||||
variable: extra.variable
|
||||
36
structures/01_6boolean_multi/rougail/00-base.yml
Normal file
36
structures/01_6boolean_multi/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: # the first variable
|
||||
- true
|
||||
var2:
|
||||
description: the second variable
|
||||
default:
|
||||
- true
|
||||
var3:
|
||||
description: the third variable
|
||||
type: boolean
|
||||
default:
|
||||
- true
|
||||
var4: # the forth variable
|
||||
- false
|
||||
var5:
|
||||
description: the fifth variable
|
||||
default:
|
||||
- false
|
||||
var6:
|
||||
description: the sixth variable
|
||||
type: boolean
|
||||
default:
|
||||
- false
|
||||
|
||||
var7:
|
||||
description: the seventh variable
|
||||
multi: true
|
||||
default:
|
||||
- true
|
||||
var8:
|
||||
description: the eighth variable
|
||||
type: boolean
|
||||
multi: true
|
||||
default:
|
||||
- true
|
||||
11
structures/01_6custom_multi/rougail/00-base.yml
Normal file
11
structures/01_6custom_multi/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
version: '1.1'
|
||||
custom1:
|
||||
description: a first custom variable
|
||||
type: custom
|
||||
multi: true
|
||||
custom2:
|
||||
description: a second custom variable
|
||||
type: custom
|
||||
default:
|
||||
- value
|
||||
36
structures/01_6float_multi/rougail/00-base.yml
Normal file
36
structures/01_6float_multi/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: # the first variable
|
||||
- 0.0
|
||||
var2:
|
||||
description: the second variable
|
||||
default:
|
||||
- 0.0
|
||||
var3:
|
||||
description: the third variable
|
||||
type: float
|
||||
default:
|
||||
- 0.0
|
||||
var4: # the forth variable
|
||||
- 10.1
|
||||
var5:
|
||||
description: the fifth variable
|
||||
default:
|
||||
- 10.1
|
||||
var6:
|
||||
description: the sixth variable
|
||||
type: float
|
||||
default:
|
||||
- 10.1
|
||||
|
||||
var7:
|
||||
description: the seventh variable
|
||||
multi: true
|
||||
default:
|
||||
- 0.0
|
||||
var8:
|
||||
description: the eighth variable
|
||||
type: float
|
||||
multi: true
|
||||
default:
|
||||
- 0.0
|
||||
36
structures/01_6number_multi/rougail/00-base.yml
Normal file
36
structures/01_6number_multi/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: # the first variable
|
||||
- 0
|
||||
var2:
|
||||
description: the second variable
|
||||
default:
|
||||
- 0
|
||||
var3:
|
||||
description: the third variable
|
||||
type: number
|
||||
default:
|
||||
- 0
|
||||
var4: # the forth variable
|
||||
- 10
|
||||
var5:
|
||||
description: the fifth variable
|
||||
default:
|
||||
- 10
|
||||
var6:
|
||||
description: the sixth variable
|
||||
type: number
|
||||
default:
|
||||
- 10
|
||||
|
||||
var7:
|
||||
description: the seventh variable
|
||||
multi: true
|
||||
default:
|
||||
- 0
|
||||
var8:
|
||||
description: the eighth variable
|
||||
type: number
|
||||
multi: true
|
||||
default:
|
||||
- 0
|
||||
8
structures/01_6string_empty/rougail/00-base.yml
Normal file
8
structures/01_6string_empty/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1:
|
||||
description: the second variable
|
||||
empty: false
|
||||
default:
|
||||
- 'value'
|
||||
- null
|
||||
33
structures/01_6string_multi/rougail/00-base.yml
Normal file
33
structures/01_6string_multi/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: [] # the first variable
|
||||
var2:
|
||||
description: the second variable
|
||||
default: []
|
||||
var3:
|
||||
description: the third variable
|
||||
type: string
|
||||
multi: true
|
||||
var4: # the forth variable
|
||||
- value
|
||||
var5:
|
||||
description: the fifth variable
|
||||
default:
|
||||
- value
|
||||
var6:
|
||||
description: the sixth variable
|
||||
type: string
|
||||
default:
|
||||
- value
|
||||
|
||||
var7:
|
||||
description: the seventh variable
|
||||
multi: true
|
||||
default:
|
||||
- value
|
||||
var8:
|
||||
description: the eighth variable
|
||||
type: string
|
||||
multi: true
|
||||
default:
|
||||
- value
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default:
|
||||
- quote"
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default:
|
||||
- quote'"
|
||||
6
structures/01_7value_multi_quote/rougail/00-base.yml
Normal file
6
structures/01_7value_multi_quote/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
default:
|
||||
- quote'
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable:
|
||||
description: a variable
|
||||
multi: true
|
||||
default:
|
||||
jinja: |
|
||||
{% for info in test_information %}
|
||||
{{ info }}
|
||||
{% endfor %}
|
||||
params:
|
||||
test_information:
|
||||
type: information
|
||||
information: test_information_list
|
||||
description: get information test_information
|
||||
10
structures/01_9choice_variable_multi/rougail/00-base.yml
Normal file
10
structures/01_9choice_variable_multi/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
version: '1.1'
|
||||
variable1: # a first variable
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
variable2:
|
||||
description: a second variable
|
||||
choices:
|
||||
variable: _.variable1
|
||||
8
structures/04_0type_param/rougail/00-base.yml
Normal file
8
structures/04_0type_param/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: '1.1'
|
||||
int:
|
||||
description: A limited number
|
||||
default: 10
|
||||
params:
|
||||
min_number: 0
|
||||
max_number: 100
|
||||
6
structures/04_1auto_save/rougail/00-base.yml
Normal file
6
structures/04_1auto_save/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
version: 1.1
|
||||
variable:
|
||||
description: an auto save variable
|
||||
auto_save: true
|
||||
default: "no"
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: 1.1
|
||||
var1: "no" # a first variable
|
||||
var2:
|
||||
description: a second variable
|
||||
auto_save: true
|
||||
default:
|
||||
variable: _.var1
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var1: "no" # a first variable
|
||||
var2:
|
||||
description: a second variable
|
||||
auto_save: true
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if _.var1 == "yes" %}
|
||||
_.var1 is yes
|
||||
{% endif %}
|
||||
description: only if the variable var1 has value "yes"
|
||||
default:
|
||||
jinja: 'yes'
|
||||
description: the value is always yes
|
||||
8
structures/04_1auto_save_and_hidden/rougail/00-base.yml
Normal file
8
structures/04_1auto_save_and_hidden/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: '1.1'
|
||||
var:
|
||||
description: autosave variable
|
||||
auto_save: true
|
||||
hidden: true
|
||||
default: 'yes'
|
||||
mandatory: false
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
version: 1.1
|
||||
|
||||
var1:
|
||||
description: a first variable
|
||||
default: value
|
||||
|
||||
var2:
|
||||
description: a second variable
|
||||
disabled:
|
||||
variable: _.var1
|
||||
when: value
|
||||
|
||||
var3:
|
||||
description: a third variable
|
||||
default:
|
||||
jinja: |
|
||||
{% if _.var1 == 'value' or _.var2 == 'blah' %}
|
||||
value
|
||||
{% endif %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
version: 1.1
|
||||
|
||||
var1:
|
||||
description: a first variable
|
||||
default: value
|
||||
|
||||
var2:
|
||||
description: a second variable
|
||||
disabled:
|
||||
variable: _.var1
|
||||
when: value
|
||||
|
||||
var3:
|
||||
description: a third variable
|
||||
default:
|
||||
jinja: |
|
||||
{% if _.var2 is propertyerror %}
|
||||
value
|
||||
{% endif %}
|
||||
0
structures/04_5disabled_calculation/force_namespace
Normal file
0
structures/04_5disabled_calculation/force_namespace
Normal file
19
structures/04_5disabled_calculation/rougail/00-base.yml
Normal file
19
structures/04_5disabled_calculation/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: "no" # a conditional variable
|
||||
variable1:
|
||||
description: a first variable
|
||||
disabled:
|
||||
jinja: |
|
||||
{% if _.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is egal to "yes"
|
||||
variable2:
|
||||
description: a second variable
|
||||
disabled:
|
||||
jinja: |
|
||||
{% if _.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is egal to "yes"
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
version: '1.1'
|
||||
|
||||
condition: "no" # a condition
|
||||
|
||||
var1:
|
||||
description: a first variable
|
||||
disabled:
|
||||
jinja: |
|
||||
{% if _.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is yes
|
||||
default:
|
||||
jinja: |
|
||||
{{ _.condition }}
|
||||
description: the value of condition
|
||||
|
||||
var2:
|
||||
description: a second variable
|
||||
disabled:
|
||||
jinja: |
|
||||
{% if rougail.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is yes
|
||||
default:
|
||||
jinja: |
|
||||
{{ rougail.condition }}
|
||||
description: the value of condition
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: "no" # a conditional variable
|
||||
variable1:
|
||||
description: a first variable
|
||||
multi: true
|
||||
disabled:
|
||||
jinja: |
|
||||
{% if _.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is egal to "yes"
|
||||
variable2:
|
||||
description: a second variable
|
||||
multi: true
|
||||
disabled:
|
||||
jinja: |
|
||||
{% if _.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is egal to "yes"
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: "no" # a condition
|
||||
var1:
|
||||
description: a first variable
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if unknown is not defined %}
|
||||
unknown is undefined
|
||||
{% elif unknown == "no" %}
|
||||
unknown is no
|
||||
{% endif %}
|
||||
params:
|
||||
unknown:
|
||||
variable: _.unknown
|
||||
optional: true
|
||||
description: calculation from an unknown variable
|
||||
mandatory: false
|
||||
var2:
|
||||
description: a second variable
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if condition is not defined %}
|
||||
condition is undefined
|
||||
{% elif condition == "no" %}
|
||||
condition is no
|
||||
{% endif %}
|
||||
params:
|
||||
condition:
|
||||
variable: _.condition
|
||||
optional: true
|
||||
description: calculation from an condition variable
|
||||
mandatory: false
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: false # a condition
|
||||
variable:
|
||||
description: a variable
|
||||
disabled:
|
||||
variable: _.condition
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: true # a condition
|
||||
variable:
|
||||
description: a variable
|
||||
disabled:
|
||||
variable: _.condition
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: "yes" # a condition
|
||||
variable:
|
||||
description: a variable
|
||||
disabled:
|
||||
variable: _.condition
|
||||
when: "yes"
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: "yes" # a condition
|
||||
variable:
|
||||
description: a variable
|
||||
disabled:
|
||||
variable: _.condition
|
||||
when_not: "yes"
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: false # a condition
|
||||
variable:
|
||||
description: a variable
|
||||
multi: true
|
||||
disabled:
|
||||
variable: _.condition
|
||||
0
structures/04_5hidden_calculation/force_namespace
Normal file
0
structures/04_5hidden_calculation/force_namespace
Normal file
21
structures/04_5hidden_calculation/rougail/00-base.yml
Normal file
21
structures/04_5hidden_calculation/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: 'no' # the condition
|
||||
var1:
|
||||
description: a first variable
|
||||
default: "no"
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if _.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is yes
|
||||
var2:
|
||||
description: a second variable
|
||||
default: "no"
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if rougail.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is yes
|
||||
0
structures/04_5hidden_calculation2/force_namespace
Normal file
0
structures/04_5hidden_calculation2/force_namespace
Normal file
27
structures/04_5hidden_calculation2/rougail/00-base.yml
Normal file
27
structures/04_5hidden_calculation2/rougail/00-base.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: "no" # a condition
|
||||
var1:
|
||||
description: a first variable
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if _.condition != "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is yes
|
||||
default:
|
||||
jinja: |
|
||||
{{ _.condition }}
|
||||
description: the value of condition
|
||||
var2:
|
||||
description: a second variable
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if rougail.condition != "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is yes
|
||||
default:
|
||||
jinja: |
|
||||
{{ rougail.condition }}
|
||||
description: the value of condition
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
version: '1.1'
|
||||
condition: "no" # a condition
|
||||
var1:
|
||||
description: a first variable
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if _.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is yes
|
||||
default:
|
||||
jinja: |
|
||||
{{ _.condition }}
|
||||
description: returns the condition value
|
||||
var2:
|
||||
description: a second variable
|
||||
hidden:
|
||||
jinja: |
|
||||
{% if rougail.condition == "yes" %}
|
||||
condition is yes
|
||||
{% endif %}
|
||||
description: if condition is yes
|
||||
default:
|
||||
jinja: |
|
||||
{{ rougail.condition }}
|
||||
description: returns the condition value
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue