name of file is a filename

This commit is contained in:
Emmanuel Garette 2021-02-17 09:52:17 +01:00
parent c7ea03b411
commit 0c4deb1016
49 changed files with 140 additions and 126 deletions

View file

@ -41,6 +41,8 @@ Il est possible également de définir le nom du fichier dans une variable :
</variables>
```
Attention, la variable doit être de type "filename".
Dans le cas des fichiers dynamique, la source est obligatoire.
Il est même possible de définir une variable de type multiple, ce qui génèrera plusiers fichiers :

View file

@ -18,6 +18,8 @@ L'IP peut être un variable :
<ip interface="ens3" ip_type="variable">variable_ip</ip>
```
Attention, la variable doit être de type "network".
## La gestion d'un réseau
L'adresse IP peut être un réseau :
@ -32,6 +34,8 @@ Le masque de réseau peut être un variable :
<ip interface="ens3" netmask_type="variable" netmask="variable_netmask" ip_type="variable">variable_ip</ip>
```
Attention, la variable doit être de type "netmask".
## L'interface
Il est possible de spécifier le nom de l'interface si on la connait :
@ -48,6 +52,14 @@ Mais il est possible de calculer automatiquement cette valeur :
Dans ce cas l'interface est déduite à partir de la table de routage.
L'interface peut être un variable :
```
<ip interface="my_variable" interface_type="variable">192.168.0.1</ip>
```
Attention, la variable doit être de type "string".
## Désactiver la génération d'une IP
Il est possible de définir une [condition](../condition/README.md) de type "disabled_if_in" ou "disabled_if_not_in" sur une balise IP :

View file

@ -37,6 +37,8 @@ Il est possible également de définir le port dans une variable :
</variables>
```
Attention, la variable doit être de type "port".
## Désactiver le port
Il est possible de définir une [condition](../condition/README.md) de type "disabled_if_in" ou "disabled_if_not_in" sur une balise port :

View file

@ -238,7 +238,7 @@ class ServiceAnnotator:
file_,
service_name,
):
if not hasattr(file_, 'file_type') or file_.file_type == "string":
if not hasattr(file_, 'file_type') or file_.file_type == "filename":
if not hasattr(file_, 'source'):
file_.source = basename(file_.name)
elif not hasattr(file_, 'source'):

View file

@ -63,7 +63,7 @@
<!ELEMENT file EMPTY>
<!ATTLIST file name CDATA #REQUIRED>
<!ATTLIST file file_type (string|variable) "string">
<!ATTLIST file file_type (filename|variable) "filename">
<!ATTLIST file variable CDATA #IMPLIED>
<!ATTLIST file variable_type (variable) "variable">
<!ATTLIST file source CDATA #IMPLIED>

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3],
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="file")
option_13 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3],
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="file")
option_13 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3],
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="file")
option_13 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3],
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel")
option_10 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="systemd-makefs@dev-disk-by\\x2dpartlabel")
option_13 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -17,7 +17,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_9 = StrOption(name="group", doc="group", default="root")
option_10 = StrOption(name="mode", doc="mode", default="0644")
option_11 = StrOption(name="name", doc="name", default="/tmp/file1")
option_11 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_12 = StrOption(name="owner", doc="owner", default="root")
option_13 = StrOption(name="source", doc="source", default="file1")
option_14 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/etc/file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3],
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/tmp/file1")
option_10 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="file1")
option_13 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3],
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/tmp/file1")
option_10 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="file1")
option_13 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/etc/file")
option_12 = FilenameOption(name="name", doc="name", default="/etc/file")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file1")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file1")
option_15 = StrOption(name="templating", doc="templating", default="creole")
@ -26,7 +26,7 @@ option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func
option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_18 = StrOption(name="group", doc="group", default="root")
option_19 = StrOption(name="mode", doc="mode", default="0644")
option_20 = StrOption(name="name", doc="name", default="/tmp/file2")
option_20 = FilenameOption(name="name", doc="name", default="/tmp/file2")
option_21 = StrOption(name="owner", doc="owner", default="root")
option_22 = StrOption(name="source", doc="source", default="file2")
option_23 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -18,7 +18,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = StrOption(name="name", doc="name", default="/tmp/file")
option_12 = FilenameOption(name="name", doc="name", default="/tmp/file")
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="file")
option_15 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -17,7 +17,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_9 = StrOption(name="group", doc="group", default="root")
option_10 = StrOption(name="mode", doc="mode", default="0644")
option_11 = StrOption(name="name", doc="name", default="/tmp/file1")
option_11 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_12 = StrOption(name="owner", doc="owner", default="root")
option_13 = StrOption(name="source", doc="source", default="file1")
option_14 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3],
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/file")
option_10 = FilenameOption(name="name", doc="name", default="/etc/file")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="file")
option_13 = StrOption(name="templating", doc="templating", default="none")

View file

@ -21,7 +21,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_13 = StrOption(name="group", doc="group", default="root")
option_14 = StrOption(name="mode", doc="mode", default="0644")
option_15 = StrOption(name="name", doc="name", default="/etc/mailname")
option_15 = FilenameOption(name="name", doc="name", default="/etc/mailname")
option_16 = StrOption(name="owner", doc="owner", default="root")
option_17 = StrOption(name="source", doc="source", default="mailname")
option_18 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -21,7 +21,7 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_13 = StrOption(name="group", doc="group", default="root")
option_14 = StrOption(name="mode", doc="mode", default="0644")
option_15 = StrOption(name="name", doc="name", default="/etc/mailname")
option_15 = FilenameOption(name="name", doc="name", default="/etc/mailname")
option_16 = StrOption(name="owner", doc="owner", default="root")
option_17 = StrOption(name="source", doc="source", default="mailname")
option_18 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -17,7 +17,7 @@ option_4 = StrOption(name="my_var", doc="my_var", default=Calculation(func.calc_
option_3 = OptionDescription(name="extra", doc="extra", children=[option_4])
option_9 = StrOption(name="group", doc="group", default="root")
option_10 = StrOption(name="mode", doc="mode", default="0644")
option_11 = StrOption(name="name", doc="name", default="/etc/file")
option_11 = FilenameOption(name="name", doc="name", default="/etc/file")
option_12 = StrOption(name="owner", doc="owner", default="root")
option_13 = StrOption(name="source", doc="source", default="file")
option_14 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -22,7 +22,7 @@ option_6 = OptionDescription(name="ejabberd", doc="ejabberd", children=[option_7
option_5 = OptionDescription(name="extra", doc="extra", children=[option_6])
option_14 = StrOption(name="group", doc="group", default="root")
option_15 = StrOption(name="mode", doc="mode", default="0644")
option_16 = StrOption(name="name", doc="name", default="/etc/mailname")
option_16 = FilenameOption(name="name", doc="name", default="/etc/mailname")
option_17 = StrOption(name="owner", doc="owner", default="root")
option_18 = StrOption(name="source", doc="source", default="mailname")
option_19 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -23,7 +23,7 @@ option_6 = OptionDescription(name="ejabberd", doc="ejabberd", children=[option_7
option_5 = OptionDescription(name="extra", doc="extra", children=[option_6])
option_14 = StrOption(name="group", doc="group", default="root")
option_15 = StrOption(name="mode", doc="mode", default="0644")
option_16 = StrOption(name="name", doc="name", default="/etc/mailname")
option_16 = FilenameOption(name="name", doc="name", default="/etc/mailname")
option_17 = StrOption(name="owner", doc="owner", default="root")
option_18 = StrOption(name="source", doc="source", default="mailname")
option_19 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="général", children=[option_3
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/mailname")
option_10 = FilenameOption(name="name", doc="name", default="/etc/mailname")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="mailname")
option_13 = StrOption(name="templating", doc="templating", default="creole")
@ -24,7 +24,7 @@ option_14 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14])
option_16 = StrOption(name="group", doc="group", default="root")
option_17 = StrOption(name="mode", doc="mode", default="0644")
option_18 = StrOption(name="name", doc="name", default="/rougail.conf")
option_18 = FilenameOption(name="name", doc="name", default="/rougail.conf")
option_19 = StrOption(name="owner", doc="owner", default="root")
option_20 = StrOption(name="source", doc="source", default="rougail.conf")
option_21 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -6,14 +6,9 @@
</service>
</services>
<variables>
<family name='général'>
<variable name='mode_conteneur_actif' type='string' description="No change" hidden="True">
<value>oui</value>
</variable>
<variable name='file_name' type='string' multi='True'>
<variable name='file_name' type='filename' multi='True'>
<value>/etc/mailname</value>
<value>/etc/mailname2</value>
</variable>
</family>
</variables>
</rougail>

View file

@ -1 +1 @@
{"rougail.general.mode_conteneur_actif": "oui", "rougail.general.file_name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.templating": "creole", "services.test.files.mailname.activate": true}
{"rougail.file_name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.templating": "creole", "services.test.files.mailname.activate": true}

View file

@ -11,19 +11,17 @@ try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="file_name", doc="file_name", multi=True, default=['/etc/mailname', '/etc/mailname2'], default_multi="/etc/mailname", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"normal"}))
option_2 = FilenameOption(name="file_name", doc="file_name", multi=True, default=['/etc/mailname', '/etc/mailname2'], default_multi="/etc/mailname", properties=frozenset({"mandatory", "normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_9 = StrOption(name="group", doc="group", default="root")
option_10 = StrOption(name="mode", doc="mode", default="0644")
option_11 = SymLinkOption(name="name", opt=option_4)
option_12 = StrOption(name="owner", doc="owner", default="root")
option_13 = StrOption(name="source", doc="source", default="mailname")
option_14 = StrOption(name="templating", doc="templating", default="creole")
option_15 = BoolOption(name="activate", doc="activate", default=True)
option_8 = OptionDescription(name="mailname", doc="mailname", children=[option_9, option_10, option_11, option_12, option_13, option_14, option_15])
option_7 = OptionDescription(name="files", doc="files", children=[option_8])
option_6 = OptionDescription(name="test", doc="test", children=[option_7])
option_5 = OptionDescription(name="services", doc="services", children=[option_6], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_5])
option_7 = StrOption(name="group", doc="group", default="root")
option_8 = StrOption(name="mode", doc="mode", default="0644")
option_9 = SymLinkOption(name="name", opt=option_2)
option_10 = StrOption(name="owner", doc="owner", default="root")
option_11 = StrOption(name="source", doc="source", default="mailname")
option_12 = StrOption(name="templating", doc="templating", default="creole")
option_13 = BoolOption(name="activate", doc="activate", default=True)
option_6 = OptionDescription(name="mailname", doc="mailname", children=[option_7, option_8, option_9, option_10, option_11, option_12, option_13])
option_5 = OptionDescription(name="files", doc="files", children=[option_6])
option_4 = OptionDescription(name="test", doc="test", children=[option_5])
option_3 = OptionDescription(name="services", doc="services", children=[option_4], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_3])

View file

@ -6,11 +6,7 @@
</service>
</services>
<variables>
<family name='général'>
<variable name='mode_conteneur_actif' type='string' description="No change" hidden="True">
<value>oui</value>
</variable>
<variable name='file_name' type='string' multi='True'>
<variable name='file_name' type='filename' multi='True'>
<value>/etc/mailname</value>
<value>/etc/mailname2</value>
</variable>
@ -18,6 +14,5 @@
<value>mailname</value>
<value>mailname2</value>
</variable>
</family>
</variables>
</rougail>

View file

@ -1 +1 @@
{"rougail.general.mode_conteneur_actif": "oui", "rougail.general.file_name": ["/etc/mailname", "/etc/mailname2"], "rougail.general.var": ["mailname", "mailname2"], "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.templating": "creole", "services.test.files.mailname.variable": ["mailname", "mailname2"], "services.test.files.mailname.activate": true}
{"rougail.file_name": ["/etc/mailname", "/etc/mailname2"], "rougail.var": ["mailname", "mailname2"], "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": ["/etc/mailname", "/etc/mailname2"], "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.templating": "creole", "services.test.files.mailname.variable": ["mailname", "mailname2"], "services.test.files.mailname.activate": true}

View file

@ -11,21 +11,19 @@ try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="file_name", doc="file_name", multi=True, default=['/etc/mailname', '/etc/mailname2'], default_multi="/etc/mailname", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="var", doc="var", multi=True, default=['mailname', 'mailname2'], default_multi="mailname", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4, option_5], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = SymLinkOption(name="name", opt=option_4)
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="mailname")
option_15 = StrOption(name="templating", doc="templating", default="creole")
option_16 = SymLinkOption(name="variable", opt=option_5)
option_17 = BoolOption(name="activate", doc="activate", default=True)
option_9 = OptionDescription(name="mailname", doc="mailname", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17])
option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8])
option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_6])
option_2 = FilenameOption(name="file_name", doc="file_name", multi=True, default=['/etc/mailname', '/etc/mailname2'], default_multi="/etc/mailname", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="var", doc="var", multi=True, default=['mailname', 'mailname2'], default_multi="mailname", properties=frozenset({"mandatory", "normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = SymLinkOption(name="name", opt=option_2)
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="mailname")
option_13 = StrOption(name="templating", doc="templating", default="creole")
option_14 = SymLinkOption(name="variable", opt=option_3)
option_15 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15])
option_6 = OptionDescription(name="files", doc="files", children=[option_7])
option_5 = OptionDescription(name="test", doc="test", children=[option_6])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])

View file

@ -6,16 +6,11 @@
</service>
</services>
<variables>
<family name='général'>
<variable name='mode_conteneur_actif' type='string' description="No change" hidden="True">
<value>oui</value>
</variable>
<variable name='file_name' type='string'>
<variable name='file_name' type='filename'>
<value>/etc/mailname</value>
</variable>
<variable name='var' type='string'>
<value>mailname</value>
</variable>
</family>
</variables>
</rougail>

View file

@ -1 +1 @@
{"rougail.general.mode_conteneur_actif": "oui", "rougail.general.file_name": "/etc/mailname", "rougail.general.var": "mailname", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.templating": "creole", "services.test.files.mailname.variable": "mailname", "services.test.files.mailname.activate": true}
{"rougail.file_name": "/etc/mailname", "rougail.var": "mailname", "services.test.files.mailname.group": "root", "services.test.files.mailname.mode": "0644", "services.test.files.mailname.name": "/etc/mailname", "services.test.files.mailname.owner": "root", "services.test.files.mailname.source": "mailname", "services.test.files.mailname.templating": "creole", "services.test.files.mailname.variable": "mailname", "services.test.files.mailname.activate": true}

View file

@ -11,21 +11,19 @@ try:
from tiramisu3 import *
except:
from tiramisu import *
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="oui", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
option_4 = StrOption(name="file_name", doc="file_name", default="/etc/mailname", properties=frozenset({"mandatory", "normal"}))
option_5 = StrOption(name="var", doc="var", default="mailname", properties=frozenset({"mandatory", "normal"}))
option_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4, option_5], properties=frozenset({"normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="group", doc="group", default="root")
option_11 = StrOption(name="mode", doc="mode", default="0644")
option_12 = SymLinkOption(name="name", opt=option_4)
option_13 = StrOption(name="owner", doc="owner", default="root")
option_14 = StrOption(name="source", doc="source", default="mailname")
option_15 = StrOption(name="templating", doc="templating", default="creole")
option_16 = SymLinkOption(name="variable", opt=option_5)
option_17 = BoolOption(name="activate", doc="activate", default=True)
option_9 = OptionDescription(name="mailname", doc="mailname", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17])
option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8])
option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_6])
option_2 = FilenameOption(name="file_name", doc="file_name", default="/etc/mailname", properties=frozenset({"mandatory", "normal"}))
option_3 = StrOption(name="var", doc="var", default="mailname", properties=frozenset({"mandatory", "normal"}))
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = SymLinkOption(name="name", opt=option_2)
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="mailname")
option_13 = StrOption(name="templating", doc="templating", default="creole")
option_14 = SymLinkOption(name="variable", opt=option_3)
option_15 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14, option_15])
option_6 = OptionDescription(name="files", doc="files", children=[option_7])
option_5 = OptionDescription(name="test", doc="test", children=[option_6])
option_4 = OptionDescription(name="services", doc="services", children=[option_5], properties=frozenset({"hidden"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, option_4])

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="général", children=[option_3
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/mailname")
option_10 = FilenameOption(name="name", doc="name", default="/etc/mailname")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="mailname")
option_13 = StrOption(name="templating", doc="templating", default="creole")
@ -24,7 +24,7 @@ option_14 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14])
option_16 = StrOption(name="group", doc="group", default="root")
option_17 = StrOption(name="mode", doc="mode", default="0644")
option_18 = StrOption(name="name", doc="name", default="/etc/eole/mailname")
option_18 = FilenameOption(name="name", doc="name", default="/etc/eole/mailname")
option_19 = StrOption(name="owner", doc="owner", default="root")
option_20 = StrOption(name="source", doc="source", default="mailname")
option_21 = StrOption(name="templating", doc="templating", default="creole")
@ -32,7 +32,7 @@ option_22 = BoolOption(name="activate", doc="activate", default=True)
option_15 = OptionDescription(name="mailname_1", doc="mailname_1", children=[option_16, option_17, option_18, option_19, option_20, option_21, option_22])
option_24 = StrOption(name="group", doc="group", default="root")
option_25 = StrOption(name="mode", doc="mode", default="0644")
option_26 = StrOption(name="name", doc="name", default="/rougail.conf")
option_26 = FilenameOption(name="name", doc="name", default="/rougail.conf")
option_27 = StrOption(name="owner", doc="owner", default="root")
option_28 = StrOption(name="source", doc="source", default="rougail.conf")
option_29 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="général", children=[option_3
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/mailname")
option_10 = FilenameOption(name="name", doc="name", default="/etc/mailname")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="mailname")
option_13 = StrOption(name="templating", doc="templating", default="creole")
@ -24,7 +24,7 @@ option_14 = BoolOption(name="activate", doc="activate", default=True)
option_7 = OptionDescription(name="mailname", doc="mailname", children=[option_8, option_9, option_10, option_11, option_12, option_13, option_14])
option_16 = StrOption(name="group", doc="group", default="root")
option_17 = StrOption(name="mode", doc="mode", default="0644")
option_18 = StrOption(name="name", doc="name", default="/etc/mailname2")
option_18 = FilenameOption(name="name", doc="name", default="/etc/mailname2")
option_19 = StrOption(name="owner", doc="owner", default="root")
option_20 = StrOption(name="source", doc="source", default="mailname2")
option_21 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -16,7 +16,7 @@ option_2 = OptionDescription(name="general", doc="général", children=[option_3
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_8 = StrOption(name="group", doc="group", default="root")
option_9 = StrOption(name="mode", doc="mode", default="0644")
option_10 = StrOption(name="name", doc="name", default="/etc/mailname")
option_10 = FilenameOption(name="name", doc="name", default="/etc/mailname")
option_11 = StrOption(name="owner", doc="owner", default="root")
option_12 = StrOption(name="source", doc="source", default="mailname.new")
option_13 = StrOption(name="templating", doc="templating", default="creole")

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<rougail>
<services>
<service name='ntp'>
<port protocol='udp' port_type="variable">my_variable</port>
<port protocol='tcp' port_type="variable">my_variable</port>
</service>
</services>
<variables>
<variable name='my_variable' type='string'>
<value>123</value>
</variable>
</variables>
</rougail>
<!-- vim: ts=4 sw=4 expandtab
-->