use only boolean with yaml
This commit is contained in:
parent
1633492ef4
commit
61cbde95d0
353 changed files with 947 additions and 1538 deletions
|
@ -47,7 +47,7 @@ En YAML :
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
constraints:
|
constraints:
|
||||||
- check:
|
- check:
|
||||||
- name: isspace
|
- name: isspace
|
||||||
|
@ -103,6 +103,6 @@ En YAML :
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
remove_check: 'True'
|
remove_check: true
|
||||||
```
|
```
|
||||||
|
|
|
@ -36,7 +36,7 @@ constraints:
|
||||||
- name: hidden_if_in
|
- name: hidden_if_in
|
||||||
source: condition
|
source: condition
|
||||||
param:
|
param:
|
||||||
- text: 'True'
|
- text: true
|
||||||
target:
|
target:
|
||||||
- text: my_variable
|
- text: my_variable
|
||||||
```
|
```
|
||||||
|
@ -119,8 +119,8 @@ En YAML :
|
||||||
- condition:
|
- condition:
|
||||||
- name: hidden_if_in
|
- name: hidden_if_in
|
||||||
source: condition
|
source: condition
|
||||||
optional: 'True'
|
optional: true
|
||||||
apply_on_fallback: 'False'
|
apply_on_fallback: false
|
||||||
param:
|
param:
|
||||||
- text: 'yes'
|
- text: 'yes'
|
||||||
- text: 'maybe'
|
- text: 'maybe'
|
||||||
|
|
|
@ -34,7 +34,7 @@ constraints:
|
||||||
- name: hidden_if_in
|
- name: hidden_if_in
|
||||||
source: condition
|
source: condition
|
||||||
param:
|
param:
|
||||||
- text: 'True'
|
- text: true
|
||||||
target:
|
target:
|
||||||
- text: my_variable
|
- text: my_variable
|
||||||
```
|
```
|
||||||
|
@ -53,6 +53,6 @@ En YAML :
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: condition
|
name: condition
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
remove_condition: 'True'
|
remove_condition: true
|
||||||
```
|
```
|
||||||
|
|
|
@ -21,7 +21,7 @@ En YAML :
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: variable
|
name: variable
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: 'val1'
|
- text: 'val1'
|
||||||
- text: 'val2'
|
- text: 'val2'
|
||||||
|
|
|
@ -49,16 +49,16 @@ En YAML :
|
||||||
variables:
|
variables:
|
||||||
- family:
|
- family:
|
||||||
name: family
|
name: family
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
- variable:
|
- variable:
|
||||||
name: follower2
|
name: follower2
|
||||||
multi: 'True'
|
multi: true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Ajout d'une nouvelle variable suiveuse
|
## Ajout d'une nouvelle variable suiveuse
|
||||||
|
|
|
@ -124,5 +124,5 @@ En YAML :
|
||||||
```
|
```
|
||||||
- family:
|
- family:
|
||||||
name: my_family
|
name: my_family
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
```
|
```
|
||||||
|
|
|
@ -22,7 +22,7 @@ variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: zones_list
|
name: zones_list
|
||||||
type: string
|
type: string
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: 'zone1'
|
- text: 'zone1'
|
||||||
- text: 'zone2'
|
- text: 'zone2'
|
||||||
|
@ -30,8 +30,8 @@ variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: netwokd_configurations
|
name: netwokd_configurations
|
||||||
type: filename
|
type: filename
|
||||||
multi: 'True'
|
multi: true
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Calculons la valeur de la seconde variable à partir de la première :
|
Calculons la valeur de la seconde variable à partir de la première :
|
||||||
|
@ -63,7 +63,7 @@ constraints:
|
||||||
- name: join
|
- name: join
|
||||||
- name: multi
|
- name: multi
|
||||||
type: boolean
|
type: boolean
|
||||||
text: 'True'
|
text: true
|
||||||
target:
|
target:
|
||||||
- text: netwokd_configurations
|
- text: netwokd_configurations
|
||||||
```
|
```
|
||||||
|
|
|
@ -47,7 +47,7 @@ En YAML :
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_calculated_variable
|
name: my_calculated_variable
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: return_yes
|
- name: return_yes
|
||||||
|
@ -103,6 +103,6 @@ En YAML :
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_calculated_variable
|
name: my_calculated_variable
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
remove_fill: 'True'
|
remove_fill: true
|
||||||
```
|
```
|
||||||
|
|
|
@ -75,7 +75,7 @@ En YAML :
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_calculated_variable
|
name: my_calculated_variable
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Si une condition "hidden_if_in" est spécifié à la variable, la valeur sera modifiable par l'utilisateur si elle n'est pas cachée mais elle sera systèmatiquement calculée (même si elle a déjà était modifiée) si la variable est cachée.
|
Si une condition "hidden_if_in" est spécifié à la variable, la valeur sera modifiable par l'utilisateur si elle n'est pas cachée mais elle sera systèmatiquement calculée (même si elle a déjà était modifiée) si la variable est cachée.
|
||||||
|
@ -121,7 +121,7 @@ variables:
|
||||||
name: suffixes
|
name: suffixes
|
||||||
type: string
|
type: string
|
||||||
description: Suffixes of dynamic family
|
description: Suffixes of dynamic family
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: val1
|
- text: val1
|
||||||
- text: val2
|
- text: val2
|
||||||
|
|
|
@ -56,7 +56,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
param:
|
param:
|
||||||
- type: boolean
|
- type: boolean
|
||||||
text: 'True'
|
text: true
|
||||||
```
|
```
|
||||||
|
|
||||||
# Paramètre de type "nil"
|
# Paramètre de type "nil"
|
||||||
|
|
|
@ -31,7 +31,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
param:
|
param:
|
||||||
- type: variable
|
- type: variable
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: unknow_variable
|
text: unknow_variable
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
param:
|
param:
|
||||||
- type: variable
|
- type: variable
|
||||||
propertyerror: 'False'
|
propertyerror: false
|
||||||
text: variable1
|
text: variable1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- service:
|
- service:
|
||||||
- name: ldap_client
|
- name: ldap_client
|
||||||
manage: 'False'
|
manage: false
|
||||||
```
|
```
|
||||||
|
|
||||||
Un service factice est généralement une service qui n'existe pas réellement (par exemple si on configure un client). Il n'est là que pour contenir des fichiers.
|
Un service factice est généralement une service qui n'existe pas réellement (par exemple si on configure un client). Il n'est là que pour contenir des fichiers.
|
||||||
|
@ -119,7 +119,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- service:
|
- service:
|
||||||
- name: test
|
- name: test
|
||||||
disabled: 'True'
|
disabled: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Dans ce cas, le service et les éléments qu'il compose ([fichier](file.md), [IP](ip.md) et [réécriture](override.md) seront désactivés.
|
Dans ce cas, le service et les éléments qu'il compose ([fichier](file.md), [IP](ip.md) et [réécriture](override.md) seront désactivés.
|
||||||
|
@ -158,7 +158,7 @@ constraints:
|
||||||
name: disabled_if_in
|
name: disabled_if_in
|
||||||
source: condition
|
source: condition
|
||||||
param:
|
param:
|
||||||
- text: 'False'
|
- text: false
|
||||||
target:
|
target:
|
||||||
- type: servicelist
|
- type: servicelist
|
||||||
text: test
|
text: test
|
||||||
|
@ -181,6 +181,6 @@ En YAML :
|
||||||
```
|
```
|
||||||
- service:
|
- service:
|
||||||
- name: test
|
- name: test
|
||||||
disabled: 'True'
|
disabled: true
|
||||||
undisable: 'True'
|
undisable: true
|
||||||
```
|
```
|
||||||
|
|
|
@ -109,7 +109,7 @@ services:
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: /etc/squid1/squid.conf
|
- text: /etc/squid1/squid.conf
|
||||||
- text: /etc/squid2/squid.conf
|
- text: /etc/squid2/squid.conf
|
||||||
|
@ -157,13 +157,13 @@ services:
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable1
|
name: my_variable1
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: /etc/squid1/squid.conf
|
- text: /etc/squid1/squid.conf
|
||||||
- text: /etc/squid2/squid.conf
|
- text: /etc/squid2/squid.conf
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable2
|
name: my_variable2
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: squid1
|
- text: squid1
|
||||||
- text: squid2
|
- text: squid2
|
||||||
|
@ -207,7 +207,7 @@ En YAML :
|
||||||
|
|
||||||
```
|
```
|
||||||
file:
|
file:
|
||||||
- disabled: 'True'
|
- disabled: true
|
||||||
text: /etc/squid/squid.conf
|
text: /etc/squid/squid.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ constraints:
|
||||||
- name: disabled_if_in
|
- name: disabled_if_in
|
||||||
source: condition
|
source: condition
|
||||||
param:
|
param:
|
||||||
- text: 'False'
|
- text: false
|
||||||
target:
|
target:
|
||||||
- type: filelist
|
- type: filelist
|
||||||
text: squid
|
text: squid
|
||||||
|
|
|
@ -81,7 +81,7 @@ constraints:
|
||||||
- name: disabled_if_in
|
- name: disabled_if_in
|
||||||
source: condition
|
source: condition
|
||||||
param:
|
param:
|
||||||
- text: 'False'
|
- text: false
|
||||||
target:
|
target:
|
||||||
- type: iplist
|
- type: iplist
|
||||||
text: test_ip
|
text: test_ip
|
||||||
|
|
|
@ -25,6 +25,6 @@ En YAML :
|
||||||
```
|
```
|
||||||
target:
|
target:
|
||||||
- type: family
|
- type: family
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: my_family
|
text: my_family
|
||||||
```
|
```
|
||||||
|
|
|
@ -63,6 +63,6 @@ En YAML :
|
||||||
```
|
```
|
||||||
target:
|
target:
|
||||||
- type: filelist
|
- type: filelist
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: unknown
|
text: unknown
|
||||||
```
|
```
|
||||||
|
|
|
@ -23,6 +23,6 @@ En YAML :
|
||||||
|
|
||||||
```
|
```
|
||||||
target:
|
target:
|
||||||
- optional: 'True'
|
- optional: true
|
||||||
text: my_variable
|
text: my_variable
|
||||||
```
|
```
|
||||||
|
|
|
@ -120,7 +120,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
multi: 'True'
|
multi: true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Variable invisible
|
## Variable invisible
|
||||||
|
@ -141,7 +141,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Variable désactive
|
## Variable désactive
|
||||||
|
@ -161,7 +161,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
disabled: 'True'
|
disabled: true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Variable obligatoire
|
## Variable obligatoire
|
||||||
|
@ -177,7 +177,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Les variables booléans sont par défaut obligatoire. Pour qu'une variable booléan ne soit pas obligatoire il faut le préciser explicitement :
|
Les variables booléans sont par défaut obligatoire. Pour qu'une variable booléan ne soit pas obligatoire il faut le préciser explicitement :
|
||||||
|
@ -192,7 +192,7 @@ En YAML :
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
type: boolean
|
type: boolean
|
||||||
mandatory: 'False'
|
mandatory: false
|
||||||
```
|
```
|
||||||
|
|
||||||
Les variables avec une valeur par défaut (non calculée) sont également automatiquement obligatoire.
|
Les variables avec une valeur par défaut (non calculée) sont également automatiquement obligatoire.
|
||||||
|
@ -230,7 +230,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: value 1
|
- text: value 1
|
||||||
- text: value 2
|
- text: value 2
|
||||||
|
@ -274,7 +274,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
description: New description
|
description: New description
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
exists: 'False'
|
exists: false
|
||||||
```
|
```
|
||||||
|
|
||||||
Si cette variable existe dans un autre dictionnaire, elle ne sera pas modifié ni recréé
|
Si cette variable existe dans un autre dictionnaire, elle ne sera pas modifié ni recréé
|
||||||
|
@ -309,8 +309,8 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
exists: 'True'
|
exists: true
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Variable à valeur automatiquement modifiée
|
## Variable à valeur automatiquement modifiée
|
||||||
|
@ -330,7 +330,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
auto_save: 'True'
|
auto_save: true
|
||||||
value:
|
value:
|
||||||
- text: my_value
|
- text: my_value
|
||||||
```
|
```
|
||||||
|
@ -365,7 +365,7 @@ En YAML :
|
||||||
- text: 'False
|
- text: 'False
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
auto_freeze: 'True'
|
auto_freeze: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Dans ce cas la valeur est fixée à la valeur actuelle et elle ne sera plus modifiable par l'utilisateur.
|
Dans ce cas la valeur est fixée à la valeur actuelle et elle ne sera plus modifiable par l'utilisateur.
|
||||||
|
|
|
@ -79,7 +79,7 @@ En YAML :
|
||||||
- type: number
|
- type: number
|
||||||
text: '3'
|
text: '3'
|
||||||
- type: boolean
|
- type: boolean
|
||||||
text: 'True'
|
text: true
|
||||||
- type: 'nil'
|
- type: 'nil'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
choice:
|
choice:
|
||||||
- text: val4
|
- text: val4
|
||||||
```
|
```
|
||||||
|
@ -121,8 +121,8 @@ En YAML :
|
||||||
```
|
```
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
remove_choice: 'True'
|
remove_choice: true
|
||||||
choice:
|
choice:
|
||||||
- text: val1
|
- text: val1
|
||||||
- text: val2
|
- text: val2
|
||||||
|
|
|
@ -84,7 +84,7 @@ class Annotator(Walk):
|
||||||
variable.properties.append(prop)
|
variable.properties.append(prop)
|
||||||
setattr(variable, prop, None)
|
setattr(variable, prop, None)
|
||||||
if hasattr(variable, 'unique') and variable.unique != 'nil':
|
if hasattr(variable, 'unique') and variable.unique != 'nil':
|
||||||
if variable.unique == 'False':
|
if variable.unique == 'False' or variable.unique is False:
|
||||||
variable.properties.append('notunique')
|
variable.properties.append('notunique')
|
||||||
else:
|
else:
|
||||||
variable.properties.append('unique')
|
variable.properties.append('unique')
|
||||||
|
|
|
@ -168,7 +168,11 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
else:
|
else:
|
||||||
if not hasattr(value, 'type'):
|
if not hasattr(value, 'type'):
|
||||||
value.type = variable.type
|
value.type = variable.type
|
||||||
value.name = CONVERT_OPTION.get(value.type, {}).get('func', str)(value.name)
|
try:
|
||||||
|
value.name = CONVERT_OPTION.get(value.type, {}).get('func', str)(value.name)
|
||||||
|
except Exception as err:
|
||||||
|
msg = _(f'the variable "{variable.name}" has an incorrect value "{value.name}" with "{variable.type}" type')
|
||||||
|
raise DictConsistencyError(msg, 88, variable.xmlfiles)
|
||||||
value_to_del.sort(reverse=True)
|
value_to_del.sort(reverse=True)
|
||||||
for idx in value_to_del:
|
for idx in value_to_del:
|
||||||
del variable.value[idx]
|
del variable.value[idx]
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -62,7 +62,7 @@ class RootRougailObject: # pylint: disable=R0903
|
||||||
if not isinstance(xmlfiles, list):
|
if not isinstance(xmlfiles, list):
|
||||||
xmlfiles = [xmlfiles]
|
xmlfiles = [xmlfiles]
|
||||||
self.xmlfiles = xmlfiles
|
self.xmlfiles = xmlfiles
|
||||||
if name:
|
if name is not None:
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,7 +94,9 @@ def convert_boolean(value: str) -> bool:
|
||||||
return value
|
return value
|
||||||
if value == 'True':
|
if value == 'True':
|
||||||
return True
|
return True
|
||||||
return False
|
elif value == 'False':
|
||||||
|
return False
|
||||||
|
raise Exception(f'unknown boolean value {value}')
|
||||||
|
|
||||||
|
|
||||||
class RougailObjSpace:
|
class RougailObjSpace:
|
||||||
|
@ -319,8 +321,11 @@ class RougailObjSpace:
|
||||||
return child.attrib['name'] + '.' + child.attrib.get('type', 'service')
|
return child.attrib['name'] + '.' + child.attrib.get('type', 'service')
|
||||||
if 'name' in child.attrib:
|
if 'name' in child.attrib:
|
||||||
return child.attrib['name']
|
return child.attrib['name']
|
||||||
if child.text and child.tag in self.forced_text_elts_as_name:
|
if child.text is not None and child.tag in self.forced_text_elts_as_name:
|
||||||
return child.text.strip()
|
text = child.text
|
||||||
|
if isinstance(text, str):
|
||||||
|
text = text.strip()
|
||||||
|
return text
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def create_or_update_redefinable_object(self,
|
def create_or_update_redefinable_object(self,
|
||||||
|
@ -411,8 +416,10 @@ class RougailObjSpace:
|
||||||
"""
|
"""
|
||||||
if child.text is None or child.tag in self.forced_text_elts_as_name:
|
if child.text is None or child.tag in self.forced_text_elts_as_name:
|
||||||
return
|
return
|
||||||
text = child.text.strip()
|
text = child.text
|
||||||
if text:
|
if isinstance(text, str):
|
||||||
|
text = text.strip()
|
||||||
|
if text != '':
|
||||||
variableobj.text = text
|
variableobj.text = text
|
||||||
|
|
||||||
def set_attributes(self,
|
def set_attributes(self,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
"""load XML file from directory
|
"""load XML and YAML file from directory
|
||||||
|
|
||||||
Created by:
|
Created by:
|
||||||
EOLE (http://eole.orion.education.fr)
|
EOLE (http://eole.orion.education.fr)
|
||||||
|
@ -32,6 +32,7 @@ from os.path import join, isfile
|
||||||
from os import listdir
|
from os import listdir
|
||||||
|
|
||||||
from lxml.etree import DTD, parse, XMLSyntaxError # pylint: disable=E0611
|
from lxml.etree import DTD, parse, XMLSyntaxError # pylint: disable=E0611
|
||||||
|
from pykwalify.compat import yml
|
||||||
from pykwalify.core import Core
|
from pykwalify.core import Core
|
||||||
from pykwalify.errors import SchemaError
|
from pykwalify.errors import SchemaError
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@ from .error import DictConsistencyError
|
||||||
|
|
||||||
|
|
||||||
FORCE_SUBYAML = ['override']
|
FORCE_SUBYAML = ['override']
|
||||||
|
SCHEMA_DATA = {}
|
||||||
|
|
||||||
|
|
||||||
class Reflector:
|
class Reflector:
|
||||||
|
@ -65,6 +67,7 @@ class Reflector:
|
||||||
if not isfile(yamlschema_filename):
|
if not isfile(yamlschema_filename):
|
||||||
raise IOError(_(f"no such YAML Schema file: {yamlschema_filename}"))
|
raise IOError(_(f"no such YAML Schema file: {yamlschema_filename}"))
|
||||||
self.yamlschema_filename = yamlschema_filename
|
self.yamlschema_filename = yamlschema_filename
|
||||||
|
self.schema_data = None
|
||||||
|
|
||||||
def load_dictionaries_from_folders(self,
|
def load_dictionaries_from_folders(self,
|
||||||
folders: List[str],
|
folders: List[str],
|
||||||
|
@ -114,8 +117,14 @@ class Reflector:
|
||||||
def load_yml_file(self,
|
def load_yml_file(self,
|
||||||
filename: str,
|
filename: str,
|
||||||
):
|
):
|
||||||
|
global SCHEMA_DATA
|
||||||
|
if self.yamlschema_filename not in SCHEMA_DATA:
|
||||||
|
with open(self.yamlschema_filename, 'r') as fh:
|
||||||
|
SCHEMA_DATA[self.yamlschema_filename] = yml.load(fh)
|
||||||
try:
|
try:
|
||||||
document = Core(source_file=filename, schema_files=[self.yamlschema_filename])
|
document = Core(source_file=filename,
|
||||||
|
schema_data=SCHEMA_DATA[self.yamlschema_filename],
|
||||||
|
)
|
||||||
except XMLSyntaxError as err:
|
except XMLSyntaxError as err:
|
||||||
raise DictConsistencyError(_(f'not a XML file: {err}'), 52, [filename]) from err
|
raise DictConsistencyError(_(f'not a XML file: {err}'), 52, [filename]) from err
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -2,11 +2,11 @@ version: '0.10'
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: myvar
|
name: myvar
|
||||||
auto_freeze: 'True'
|
auto_freeze: true
|
||||||
value:
|
value:
|
||||||
- text: 'no'
|
- text: 'no'
|
||||||
- variable:
|
- variable:
|
||||||
name: server_deployed
|
name: server_deployed
|
||||||
type: boolean
|
type: boolean
|
||||||
value:
|
value:
|
||||||
- text: 'False'
|
- text: false
|
||||||
|
|
|
@ -2,7 +2,7 @@ version: '0.10'
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_var
|
name: my_var
|
||||||
auto_freeze: 'True'
|
auto_freeze: true
|
||||||
mode: expert
|
mode: expert
|
||||||
value:
|
value:
|
||||||
- text: 'no'
|
- text: 'no'
|
||||||
|
@ -10,4 +10,4 @@ variables:
|
||||||
name: server_deployed
|
name: server_deployed
|
||||||
type: boolean
|
type: boolean
|
||||||
value:
|
value:
|
||||||
- text: 'False'
|
- text: false
|
||||||
|
|
|
@ -11,6 +11,6 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
auto_save: 'True'
|
auto_save: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -11,7 +11,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
auto_save: 'True'
|
auto_save: true
|
||||||
mode: expert
|
mode: expert
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -8,6 +8,6 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -8,7 +8,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
|
|
|
@ -8,6 +8,6 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -8,6 +8,6 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -8,6 +8,6 @@ variables:
|
||||||
name: mode_conteneur_actif1
|
name: mode_conteneur_actif1
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<rougail version="0.10">
|
<rougail version="0.10">
|
||||||
<variables>
|
<variables>
|
||||||
<variable name="server_deployed" type="boolean">
|
<variable name="server_deployed" type="boolean">
|
||||||
<value>no</value>
|
<value>False</value>
|
||||||
</variable>
|
</variable>
|
||||||
<variable name="my_variable" auto_freeze="True" hidden="True">
|
<variable name="my_variable" auto_freeze="True" hidden="True">
|
||||||
<value>no</value>
|
<value>no</value>
|
||||||
|
|
|
@ -4,11 +4,11 @@ variables:
|
||||||
name: server_deployed
|
name: server_deployed
|
||||||
type: boolean
|
type: boolean
|
||||||
value:
|
value:
|
||||||
- text: 'no'
|
- text: false
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
auto_freeze: 'True'
|
auto_freeze: true
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: 'no'
|
- text: 'no'
|
||||||
constraints:
|
constraints:
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
|
|
|
@ -6,7 +6,7 @@ services:
|
||||||
- text: /etc/file
|
- text: /etc/file
|
||||||
- engine: jinja2
|
- engine: jinja2
|
||||||
text: /etc/file2
|
text: /etc/file2
|
||||||
- disabled: 'True'
|
- disabled: true
|
||||||
text: /etc/file3
|
text: /etc/file3
|
||||||
variables:
|
variables:
|
||||||
- family:
|
- family:
|
||||||
|
|
|
@ -13,6 +13,6 @@ variables:
|
||||||
name: float_multi
|
name: float_multi
|
||||||
type: float
|
type: float
|
||||||
description: Description
|
description: Description
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: '0.527'
|
- text: '0.527'
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -7,8 +7,8 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
multi: 'True'
|
multi: true
|
||||||
unique: 'False'
|
unique: false
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -7,8 +7,8 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
multi: 'True'
|
multi: true
|
||||||
unique: 'True'
|
unique: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
|
|
|
@ -14,6 +14,6 @@ variables:
|
||||||
name: float_multi
|
name: float_multi
|
||||||
type: float
|
type: float
|
||||||
description: Description
|
description: Description
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: '0.527'
|
- text: '0.527'
|
||||||
|
|
|
@ -8,13 +8,13 @@ variables:
|
||||||
type: float
|
type: float
|
||||||
description: Description
|
description: Description
|
||||||
provider: float
|
provider: float
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: '0.527'
|
- text: '0.527'
|
||||||
- variable:
|
- variable:
|
||||||
name: float_multi
|
name: float_multi
|
||||||
type: float
|
type: float
|
||||||
description: Description
|
description: Description
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: '0.527'
|
- text: '0.527'
|
||||||
|
|
|
@ -7,6 +7,6 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: quote"
|
- text: quote"
|
||||||
|
|
|
@ -7,6 +7,6 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: quote'"
|
- text: quote'"
|
||||||
|
|
|
@ -7,6 +7,6 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: quote\"\'
|
- text: quote\"\'
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: quote"
|
- text: quote"
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: quote'"
|
- text: quote'"
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: quote'
|
- text: quote'
|
||||||
|
|
|
@ -7,6 +7,6 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: Redefine description
|
description: Redefine description
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: quote'
|
- text: quote'
|
||||||
|
|
|
@ -3,4 +3,4 @@ variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
type: boolean
|
type: boolean
|
||||||
mandatory: 'False'
|
mandatory: false
|
||||||
|
|
|
@ -2,7 +2,7 @@ version: '0.10'
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_var1
|
name: my_var1
|
||||||
auto_freeze: 'True'
|
auto_freeze: true
|
||||||
value:
|
value:
|
||||||
- text: 'no'
|
- text: 'no'
|
||||||
- variable:
|
- variable:
|
||||||
|
@ -13,7 +13,7 @@ variables:
|
||||||
name: server_deployed
|
name: server_deployed
|
||||||
type: boolean
|
type: boolean
|
||||||
value:
|
value:
|
||||||
- text: 'False'
|
- text: false
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
|
|
|
@ -10,7 +10,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
auto_save: 'True'
|
auto_save: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
|
|
|
@ -8,7 +8,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
mode: expert
|
mode: expert
|
||||||
- variable:
|
- variable:
|
||||||
name: mode_conteneur_actif1
|
name: mode_conteneur_actif1
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: number
|
type: number
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
- variable:
|
- variable:
|
||||||
name: mode_conteneur_actif1
|
name: mode_conteneur_actif1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
|
@ -21,7 +21,7 @@ constraints:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
param:
|
param:
|
||||||
- type: variable
|
- type: variable
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: mode_conteneur_actif4
|
text: mode_conteneur_actif4
|
||||||
target:
|
target:
|
||||||
- text: mode_conteneur_actif
|
- text: mode_conteneur_actif
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
|
@ -21,12 +21,12 @@ constraints:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
param:
|
param:
|
||||||
- type: variable
|
- type: variable
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: mode_conteneur_actif4
|
text: mode_conteneur_actif4
|
||||||
- type: variable
|
- type: variable
|
||||||
text: mode_conteneur_actif1
|
text: mode_conteneur_actif1
|
||||||
- type: variable
|
- type: variable
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: mode_conteneur_actif3
|
text: mode_conteneur_actif3
|
||||||
target:
|
target:
|
||||||
- text: mode_conteneur_actif
|
- text: mode_conteneur_actif
|
||||||
|
|
|
@ -16,5 +16,5 @@ constraints:
|
||||||
- type: variable
|
- type: variable
|
||||||
text: mode_conteneur_actif1
|
text: mode_conteneur_actif1
|
||||||
target:
|
target:
|
||||||
- optional: 'True'
|
- optional: true
|
||||||
text: mode_conteneur_actif
|
text: mode_conteneur_actif
|
||||||
|
|
|
@ -4,11 +4,11 @@ variables:
|
||||||
name: server_deployed
|
name: server_deployed
|
||||||
type: boolean
|
type: boolean
|
||||||
value:
|
value:
|
||||||
- text: 'False'
|
- text: false
|
||||||
- variable:
|
- variable:
|
||||||
name: my_var
|
name: my_var
|
||||||
type: string
|
type: string
|
||||||
auto_freeze: 'True'
|
auto_freeze: true
|
||||||
value:
|
value:
|
||||||
- text: 'no'
|
- text: 'no'
|
||||||
constraints:
|
constraints:
|
||||||
|
@ -22,7 +22,7 @@ constraints:
|
||||||
- name: hidden_if_in
|
- name: hidden_if_in
|
||||||
source: server_deployed
|
source: server_deployed
|
||||||
param:
|
param:
|
||||||
- text: 'True'
|
- text: true
|
||||||
target:
|
target:
|
||||||
- type: variable
|
- type: variable
|
||||||
text: my_var
|
text: my_var
|
||||||
|
|
|
@ -5,5 +5,5 @@ variables:
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
test: test1
|
test: test1
|
||||||
|
|
|
@ -2,5 +2,5 @@ version: '0.10'
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: my_variable
|
name: my_variable
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
test: test1
|
test: test1
|
||||||
|
|
|
@ -5,5 +5,5 @@ variables:
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
test: ''
|
test: ''
|
||||||
|
|
|
@ -11,14 +11,14 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
name: autosavevar
|
name: autosavevar
|
||||||
type: string
|
type: string
|
||||||
description: autosave variable
|
description: autosave variable
|
||||||
auto_save: 'True'
|
auto_save: true
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
|
|
|
@ -6,7 +6,7 @@ variables:
|
||||||
- text: 'no'
|
- text: 'no'
|
||||||
- variable:
|
- variable:
|
||||||
name: var2
|
name: var2
|
||||||
multi: 'True'
|
multi: true
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: calc_value
|
- name: calc_value
|
||||||
|
@ -15,6 +15,6 @@ constraints:
|
||||||
text: var1
|
text: var1
|
||||||
- type: boolean
|
- type: boolean
|
||||||
name: multi
|
name: multi
|
||||||
text: 'True'
|
text: true
|
||||||
target:
|
target:
|
||||||
- text: var2
|
- text: var2
|
||||||
|
|
|
@ -2,14 +2,14 @@ version: '0.10'
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: var1
|
name: var1
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: 'no'
|
- text: 'no'
|
||||||
- text: 'yes'
|
- text: 'yes'
|
||||||
- text: maybe
|
- text: maybe
|
||||||
- variable:
|
- variable:
|
||||||
name: var2
|
name: var2
|
||||||
multi: 'True'
|
multi: true
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: calc_value
|
- name: calc_value
|
||||||
|
|
|
@ -11,15 +11,15 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
name: autosavevar
|
name: autosavevar
|
||||||
type: string
|
type: string
|
||||||
description: autosave variable
|
description: autosave variable
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
auto_save: 'True'
|
auto_save: true
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
|
|
|
@ -13,5 +13,5 @@ constraints:
|
||||||
type: number
|
type: number
|
||||||
text: '100'
|
text: '100'
|
||||||
target:
|
target:
|
||||||
- optional: 'True'
|
- optional: true
|
||||||
text: int
|
text: int
|
||||||
|
|
|
@ -22,14 +22,14 @@ constraints:
|
||||||
- name: valid_differ
|
- name: valid_differ
|
||||||
param:
|
param:
|
||||||
- type: variable
|
- type: variable
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: int2
|
text: int2
|
||||||
target:
|
target:
|
||||||
- text: int
|
- text: int
|
||||||
- name: valid_differ
|
- name: valid_differ
|
||||||
param:
|
param:
|
||||||
- type: variable
|
- type: variable
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: int3
|
text: int3
|
||||||
target:
|
target:
|
||||||
- text: int
|
- text: int
|
||||||
|
|
|
@ -5,7 +5,7 @@ variables:
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: mode_conteneur_actif3
|
name: mode_conteneur_actif3
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
constraints:
|
constraints:
|
||||||
- check:
|
- check:
|
||||||
- name: valid_differ
|
- name: valid_differ
|
||||||
|
|
|
@ -5,8 +5,8 @@ variables:
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: mode_conteneur_actif3
|
name: mode_conteneur_actif3
|
||||||
redefine: 'True'
|
redefine: true
|
||||||
remove_check: 'True'
|
remove_check: true
|
||||||
value:
|
value:
|
||||||
- text: oui
|
- text: oui
|
||||||
constraints:
|
constraints:
|
||||||
|
|
|
@ -13,19 +13,19 @@ variables:
|
||||||
name: adresse_ip_eth0
|
name: adresse_ip_eth0
|
||||||
type: local_ip
|
type: local_ip
|
||||||
description: Adresse IP de la carte
|
description: Adresse IP de la carte
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
mode: basic
|
mode: basic
|
||||||
- variable:
|
- variable:
|
||||||
name: adresse_netmask_eth0
|
name: adresse_netmask_eth0
|
||||||
type: netmask
|
type: netmask
|
||||||
description: "Masque de sous r\xE9seau de la carte"
|
description: "Masque de sous r\xE9seau de la carte"
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
mode: basic
|
mode: basic
|
||||||
- variable:
|
- variable:
|
||||||
name: adresse_ip
|
name: adresse_ip
|
||||||
type: local_ip
|
type: local_ip
|
||||||
description: IP
|
description: IP
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
mode: basic
|
mode: basic
|
||||||
constraints:
|
constraints:
|
||||||
- check:
|
- check:
|
||||||
|
|
|
@ -13,13 +13,13 @@ variables:
|
||||||
name: adresse_ip_eth0
|
name: adresse_ip_eth0
|
||||||
type: cidr
|
type: cidr
|
||||||
description: Adresse IP de la carte
|
description: Adresse IP de la carte
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
mode: basic
|
mode: basic
|
||||||
- variable:
|
- variable:
|
||||||
name: adresse_ip
|
name: adresse_ip
|
||||||
type: local_ip
|
type: local_ip
|
||||||
description: IP
|
description: IP
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
mode: basic
|
mode: basic
|
||||||
constraints:
|
constraints:
|
||||||
- check:
|
- check:
|
||||||
|
|
|
@ -13,13 +13,13 @@ variables:
|
||||||
name: adresse_ip_eth0
|
name: adresse_ip_eth0
|
||||||
type: local_ip
|
type: local_ip
|
||||||
description: Adresse IP de la carte
|
description: Adresse IP de la carte
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
mode: basic
|
mode: basic
|
||||||
- variable:
|
- variable:
|
||||||
name: adresse_netmask_eth0
|
name: adresse_netmask_eth0
|
||||||
type: netmask
|
type: netmask
|
||||||
description: "Masque de sous r\xE9seau de la carte"
|
description: "Masque de sous r\xE9seau de la carte"
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
mode: basic
|
mode: basic
|
||||||
constraints:
|
constraints:
|
||||||
- check:
|
- check:
|
||||||
|
|
|
@ -7,7 +7,7 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
multi: 'True'
|
multi: true
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
|
|
|
@ -15,13 +15,13 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -5,7 +5,7 @@ variables:
|
||||||
variables:
|
variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: follower3
|
name: follower3
|
||||||
|
|
|
@ -15,14 +15,14 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -5,7 +5,7 @@ variables:
|
||||||
variables:
|
variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: follower3
|
name: follower3
|
||||||
|
|
|
@ -15,13 +15,13 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leadership
|
name: leadership
|
||||||
description: leadership
|
description: leadership
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -5,7 +5,7 @@ variables:
|
||||||
variables:
|
variables:
|
||||||
- family:
|
- family:
|
||||||
name: leadership
|
name: leadership
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: follower3
|
name: follower3
|
||||||
|
|
|
@ -12,28 +12,28 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
description: follower1
|
description: follower1
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower2
|
name: follower2
|
||||||
type: string
|
type: string
|
||||||
description: follower2
|
description: follower2
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower3
|
name: follower3
|
||||||
type: string
|
type: string
|
||||||
description: follower3
|
description: follower3
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
|
|
|
@ -3,11 +3,11 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
value:
|
value:
|
||||||
- text: a
|
- text: a
|
||||||
- text: b
|
- text: b
|
||||||
|
|
|
@ -12,23 +12,23 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
description: follower1
|
description: follower1
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower2
|
name: follower2
|
||||||
type: string
|
type: string
|
||||||
description: follower2
|
description: follower2
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
constraints:
|
constraints:
|
||||||
- fill:
|
- fill:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
|
|
|
@ -16,13 +16,13 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
mode: expert
|
mode: expert
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
|
|
|
@ -12,13 +12,13 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -5,4 +5,4 @@ services:
|
||||||
variables:
|
variables:
|
||||||
- family:
|
- family:
|
||||||
name: empty_leader
|
name: empty_leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
|
|
|
@ -16,14 +16,14 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -16,13 +16,13 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -16,13 +16,13 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: other
|
name: other
|
||||||
description: other
|
description: other
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -12,14 +12,14 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -12,18 +12,18 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
description: follower1
|
description: follower1
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower2
|
name: follower2
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -8,21 +8,21 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: oui
|
- text: oui
|
||||||
- family:
|
- family:
|
||||||
name: nut_monitor_netmask
|
name: nut_monitor_netmask
|
||||||
description: "Masque de l'IP du r\xE9seau de l'esclave"
|
description: "Masque de l'IP du r\xE9seau de l'esclave"
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: nut_monitor_netmask
|
name: nut_monitor_netmask
|
||||||
type: netmask
|
type: netmask
|
||||||
description: "Masque de l'IP du r\xE9seau de l'esclave"
|
description: "Masque de l'IP du r\xE9seau de l'esclave"
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: nut_monitor_host
|
name: nut_monitor_host
|
||||||
type: network
|
type: network
|
||||||
description: "Adresse IP du r\xE9seau de l'esclave"
|
description: "Adresse IP du r\xE9seau de l'esclave"
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
|
|
|
@ -8,23 +8,23 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: oui
|
- text: oui
|
||||||
- family:
|
- family:
|
||||||
name: nut_monitor_netmask
|
name: nut_monitor_netmask
|
||||||
description: "Masque de l'IP du r\xE9seau de l'esclave"
|
description: "Masque de l'IP du r\xE9seau de l'esclave"
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: nut_monitor_netmask
|
name: nut_monitor_netmask
|
||||||
type: netmask
|
type: netmask
|
||||||
description: "Masque de l'IP du r\xE9seau de l'esclave"
|
description: "Masque de l'IP du r\xE9seau de l'esclave"
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: nut_monitor_host
|
name: nut_monitor_host
|
||||||
type: network
|
type: network
|
||||||
description: "Adresse IP du r\xE9seau de l'esclave"
|
description: "Adresse IP du r\xE9seau de l'esclave"
|
||||||
mandatory: 'True'
|
mandatory: true
|
||||||
value:
|
value:
|
||||||
- text: 192.168.0.0
|
- text: 192.168.0.0
|
||||||
|
|
|
@ -15,13 +15,13 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader
|
name: leader
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader
|
name: leader
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower1
|
name: follower1
|
||||||
type: string
|
type: string
|
||||||
|
@ -33,13 +33,13 @@ variables:
|
||||||
- family:
|
- family:
|
||||||
name: leader1
|
name: leader1
|
||||||
description: leader
|
description: leader
|
||||||
leadership: 'True'
|
leadership: true
|
||||||
variables:
|
variables:
|
||||||
- variable:
|
- variable:
|
||||||
name: leader1
|
name: leader1
|
||||||
type: string
|
type: string
|
||||||
description: leader
|
description: leader
|
||||||
multi: 'True'
|
multi: true
|
||||||
- variable:
|
- variable:
|
||||||
name: follower11
|
name: follower11
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -13,14 +13,14 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
name: mode_conteneur_actif2
|
name: mode_conteneur_actif2
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
constraints:
|
constraints:
|
||||||
|
|
|
@ -27,7 +27,7 @@ constraints:
|
||||||
- name: calc_val
|
- name: calc_val
|
||||||
param:
|
param:
|
||||||
- type: variable
|
- type: variable
|
||||||
propertyerror: 'False'
|
propertyerror: false
|
||||||
text: variable1
|
text: variable1
|
||||||
target:
|
target:
|
||||||
- text: variable2
|
- text: variable2
|
||||||
|
|
|
@ -8,8 +8,8 @@ constraints:
|
||||||
- name: disabled_if_in
|
- name: disabled_if_in
|
||||||
source: condition
|
source: condition
|
||||||
param:
|
param:
|
||||||
- text: 'True'
|
- text: true
|
||||||
target:
|
target:
|
||||||
- type: filelist
|
- type: filelist
|
||||||
optional: 'True'
|
optional: true
|
||||||
text: unknown
|
text: unknown
|
||||||
|
|
|
@ -19,14 +19,14 @@ variables:
|
||||||
name: mode_conteneur_actif
|
name: mode_conteneur_actif
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
- variable:
|
- variable:
|
||||||
name: mode_conteneur_actif2
|
name: mode_conteneur_actif2
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: non
|
- text: non
|
||||||
constraints:
|
constraints:
|
||||||
|
|
|
@ -25,7 +25,7 @@ variables:
|
||||||
name: test_variable
|
name: test_variable
|
||||||
type: string
|
type: string
|
||||||
description: No change
|
description: No change
|
||||||
hidden: 'True'
|
hidden: true
|
||||||
value:
|
value:
|
||||||
- text: 'no'
|
- text: 'no'
|
||||||
constraints:
|
constraints:
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue