Compare commits

..

9 Commits

358 changed files with 1559 additions and 8706 deletions

View File

@ -1,24 +0,0 @@
################################
# Makefile pour creole
################################
SOURCE=creole
EOLE_VERSION=2.7
EOLE_RELEASE=2.7.0
################################
# Début de zone à ne pas éditer
################################
include eole.mk
include apps.mk
################################
# Fin de zone à ne pas éditer
################################
# Makefile rules dedicated to application
# if exists
ifneq (, $(strip $(wildcard $(SOURCE).mk)))
include $(SOURCE).mk
endif

64
apps.mk
View File

@ -1,64 +0,0 @@
#
# NE PAS EDITER CE FICHIER
#
# Voir Makefile
##########################
# Application web envole #
##########################
ifneq (, $(filter oui web, $(PKGAPPS)))
#
# Sanity check
#
ifeq (, $(filter-out X.X, $(strip $(VERSION))))
$(error $$(VERSION) variable has incorrect value '$(VERSION)')
endif
# Where to store web application files
WEB_PATH := $(DESTDIR)/var/www/html
# Envole
sharenvole_PROG_DIR := $(DESTDIR)/usr/share/envole/$(SOURCE)
src_$(SOURCE)-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)
src_plugins-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/plugin
src_lang-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/lang
endif
##########################
# Application EOLE flask #
##########################
ifneq (, $(filter flask, $(PKGAPPS)))
#
# Sanity check
#
ifeq (, $(filter-out XXX, $(strip $(FLASK_MODULE))))
$(error $$(FLASK_MODULE) variable has incorrect value '$(FLASK_MODULE)')
endif
ifeq (, $(strip $(wildcard src/$(FLASK_MODULE).conf)))
$(error missing eoleflask configuration file 'src/$(FLASK_MODULE).conf')
endif
# Everything is related to mount point
APPS_MOUNT_POINT := $(shell sed -ne 's|^"MOUNT_POINT"[[:space:]]*:[[:space:]]*"/\([^"]*\)",|\1|p' \
src/$(FLASK_MODULE).conf)
ifeq (, $(strip $(APPS_MOUNT_POINT)))
$(error no "MOUNT_POINT" in eoleflask configuration file 'src/$(FLASK_MODULE).conf')
endif
# eole-flask configuration
src_DATA_DIR := $(DESTDIR)/etc/eole/flask/available
# Where to store flask application files
FLASK_PATH := $(eole_DIR)/flask/$(APPS_MOUNT_POINT)
# static files
src_$(FLASK_MODULE)_static_REC_DIR := $(FLASK_PATH)/static
src_$(FLASK_MODULE)_templates_REC_DIR := $(FLASK_PATH)/templates
src_$(FLASK_MODULE)_instance_REC_DIR := $(FLASK_PATH)/resources
endif

View File

@ -1,15 +0,0 @@
# creole specific rules
schedule_PROG_DIR := $(eole_DIR)/schedule
upgrade_REC_DIR := $(eole_DIR)/upgrade
bin_PROG_DIR := $(DESTDIR)/usr/bin
sbin_PROG_DIR := $(DESTDIR)/usr/sbin
data_REC_DIR := $(DESTDIR)/usr/share/creole
fr.man8_DATA_DIR := $(DESTDIR)/usr/share/man/fr.UTF-8/man8
en.man8_DATA_DIR := $(DESTDIR)/usr/share/man/man8
motd_PROG_DIR := $(DESTDIR)/etc/update-motd.d
local_DATA_DIR := $(DESTDIR)/usr/share/eole/creole/dicos/local
install-files::
# To inform user about coding changes
$(INSTALL_DATA) deprecated/FonctionsEoleNg $(eole_DIR)

200
eole.mk
View File

@ -1,200 +0,0 @@
#
# NE PAS EDITER CE FICHIER
#
# Utiliser <appli>.mk à inclure à la fin de Makefile
#################
# Sanity checks #
#################
ifeq (, $(DESTDIR))
$(warning $$(DESTDIR) is empty, installation will be done in /)
endif
ifeq (, $(filter-out XXX-XXX, $(strip $(SOURCE))))
$(error $$(SOURCE) variable has incorrect value '$(SOURCE)')
endif
#########################
# Variables definitions #
#########################
INSTALL := install
INSTALL_DATA := install -m 644
INSTALL_PROGRAM := install -m 755
INSTALL_DIRECTORY := install -m 755 -d
INSTALL_RECURSIVE := cp -dr --no-preserve=ownership
# Base
eole_DIR := $(DESTDIR)/usr/share/eole
ifeq ($(strip $(EOLE_VERSION)), 2.3)
diagnose_PROG_DIR := $(eole_DIR)/diagnose/module
else
diagnose_PROG_DIR := $(eole_DIR)/diagnose/
endif
# Creole
creole_DIR := $(eole_DIR)/creole
dicos_DATA_DIR := $(creole_DIR)/dicos
tmpl_DATA_DIR := $(creole_DIR)/distrib
pretemplate_PROG_DIR := $(eole_DIR)/pretemplate
posttemplate_PROG_DIR := $(eole_DIR)/posttemplate
postservice_PROG_DIR := $(eole_DIR)/postservice
firewall_DATA_DIR := $(eole_DIR)/firewall
bareos_restore_DATA_DIR := $(eole_DIR)/bareos/restore
bareos_fichier_DATA_DIR := $(DESTDIR)/etc/bareos/bareosfichiers.d
schedule_scripts_PROG_DIR := $(eole_DIR)/schedule/scripts
extra_REC_DIR := $(creole_DIR)/extra
# Zéphir
zephir_DATA_DIR := $(DESTDIR)/usr/share/zephir
zephir_configs_DATA_DIR := $(zephir_DATA_DIR)/monitor/configs
zephir_srv_DATA_DIR := $(zephir_configs_DATA_DIR)/services
# SSO
sso_DATA_DIR := $(DESTDIR)/usr/share/sso
sso_filtres_DATA_DIR := $(sso_DATA_DIR)/app_filters
sso_user-info_DATA_DIR := $(sso_DATA_DIR)/user_infos
# EAD
ead_DATA_DIR := $(DESTDIR)/usr/share/ead2/backend/config
ead_actions_DATA_DIR := $(ead_DATA_DIR)/actions
ead_perms_DATA_DIR := $(ead_DATA_DIR)/perms
ead_roles_DATA_DIR := $(ead_DATA_DIR)/roles
# Program libraries goes under /usr/lib/<PROGRAM>/
lib_$(SOURCE)_DATA_DIR := $(DESTDIR)/usr/lib/$(SOURCE)
# Scripts Eole
scripts_PROG_DIR := $(eole_DIR)/sbin
lib_eole_DATA_DIR := $(DESTDIR)/usr/lib/eole
# LDAP
ldap_passwords_DATA_DIR := $(eole_DIR)/annuaire/password_files
# LXC
lxc_DATA_DIR := $(eole_DIR)/lxc
lxc_fstab_DATA_DIR := $(lxc_DATA_DIR)/fstab
lxc_hosts_DATA_DIR := $(lxc_DATA_DIR)/hosts
# SQL
sql_DATA_DIR := $(eole_DIR)/mysql/$(SOURCE)
sql_gen_DATA_DIR := $(sql_DATA_DIR)/gen
sql_updates_DATA_DIR := $(sql_DATA_DIR)/updates
sql_conf_gen_DATA_DIR := $(eole_DIR)/applications/gen
sql_conf_passwords_DATA_DIR := $(eole_DIR)/applications/passwords
sql_conf_updates_DATA_DIR := $(eole_DIR)/applications/updates/$(SOURCE)
# Certifs
certs_DATA_DIR := $(eole_DIR)/certs
# Logrotate
logrotate_DATA_DIR := $(DESTDIR)/etc/logrotate.d
# Python modules
ifneq ($(DESTDIR),)
PYTHON_OPTS := --root $(DESTDIR)
endif
# Translation
TRANSLATION_SRC := translation
TRANSLATION_DEST := $(DESTDIR)/usr/share/locale
PO_FILES = $(wildcard $(TRANSLATION_SRC)/*/*.po)
MO_FOLDERS = $(addprefix $(TRANSLATION_DEST), $(addsuffix LC_MESSAGES,$(subst $(TRANSLATION_SRC),,$(dir $(PO_FILES)))))
#############################################
# Common directories and files installation #
#############################################
all:
$(MO_FOLDERS):
$(INSTALL_DIRECTORY) $@
$(PO_FILES): $(MO_FOLDERS)
msgfmt -o $(TRANSLATION_DEST)$(subst $(TRANSLATION_SRC),,$(addsuffix LC_MESSAGES,$(dir $@)))/$(notdir $(@:.po=.mo)) $@
install-lang: $(PO_FILES)
install:: install-dirs install-files install-lang
# $1 = command to run
# $2 = source directory
# $3 = destination directory
define fc_install_file
if [ -d $2 ]; then \
for file in `ls -1 $2/`; do \
$1 $2/$$file $3 || true; \
done; \
fi
endef
##
## Directory creation
##
# use % to catch local name in $*
# data, program and recursive directory require a corresponding
# directory in local sources
%_DATA_DIR %_PROG_DIR %REC_DIR:
test ! -d $(subst _,/,$*) || $(INSTALL_DIRECTORY) $($@)
# Create the directory referenced by the variable without a local one.
%_DIR:
$(INSTALL_DIRECTORY) $($@)
##
## Install files present directly under data, program and recursive directories
##
# $* : name of variable
# $($*): value of variable
%-instdata:
$(call fc_install_file, $(INSTALL_DATA), $(subst _,/,$(subst _DATA_DIR,,$*)), $($*))
%-instprog:
$(call fc_install_file, $(INSTALL_PROGRAM), $(subst _,/,$(subst _PROG_DIR,,$*)), $($*))
%-instrec:
$(call fc_install_file, $(INSTALL_RECURSIVE), $(subst _,/,$(subst _REC_DIR,,$*)), $($*))
# Use second expansion as variables may be created in included
# Makefiles
.SECONDEXPANSION:
# List of all directories
installdirs_LIST = $(foreach V, $(filter %_DIR, $(.VARIABLES)), \
$(if $(filter file, $(origin $(V))), \
$(V)))
# List of data directories
installdata_LIST = $(filter %_DATA_DIR, $(installdirs_LIST))
# List of program directories
installprog_LIST = $(filter %_PROG_DIR, $(installdirs_LIST))
# List of recursive directories
installrec_LIST = $(filter %_REC_DIR, $(installdirs_LIST))
# Expand directories to create as dependency
# Use double-colon to permit user to define additionnal install-dirs
install-dirs:: $$(installdirs_LIST)
# Expand files to install as dependency
# Use double-colon to permit user to define additionnal install-files
install-files:: install-data-files install-prog-files install-rec-dirs
install-data-files: $$(patsubst %,%-instdata,$$(installdata_LIST))
install-prog-files: $$(patsubst %,%-instprog,$$(installprog_LIST))
install-rec-dirs: $$(patsubst %,%-instrec,$$(installrec_LIST))
# Installation of python modules
ifeq ($(shell test -f setup.py && echo 0), 0)
install-files::
python3 setup.py install --no-compile --install-layout=deb $(PYTHON_OPTS)
endif
.PHONY: install install-dirs install-files install-data-files install-prog-files install-rec-dirs

View File

@ -1,44 +0,0 @@
#!/bin/bash
# Création du fichier .pot et mise à jour des fichiers .po à partir des informations du fichier po_list
if [[ -e po_list ]]; then
while read p; do
project=$(echo $p |awk '{print $1}')
files=$(echo $p |cut -f 1 -d " " --complement)
if [[ ! -d translation/fr ]]; then
mkdir -p translation/fr
fi
if [[ ! -d translation/en ]]; then
mkdir -p translation/en
fi
# Création des fichiers po minimum (fr et en) si nécessaire.
xgettext -L Python --keyword=_:1,2 --from-code=UTF-8 --force-po -F --copyright-holder="projet EOLE" --package-name=$project --msgid-bugs-address=eole@ac-dijon.fr --foreign-user -d $project -o translation/$project.pot $files
sed -i -e 's/\("Content-Type: text\/plain; charset=\).*\(\\n"\)/\1UTF-8\2/g' translation/$project.pot
# Mise à jour des fichiers po présents sous ./translation
for po_file in $(find translation -name $project.po); do
msgmerge -U $po_file translation/$project.pot
done
if [[ ! -e translation/fr/${project}.po ]]; then
msginit -i translation/${project}.pot -o translation/fr/${project}.po -l fr_FR
sed -i -e "s/\\(\"PO-Revision-Date: \\).*\\(\\\\n\"\\)/\\1$(date '+%Y-%m-%d %H:%M%z')\\2/g" \
-e 's/\("Language-Team: \).*\(\\n"\)/\1Équipe EOLE <eole@ac-dijon.fr>\2/g' \
-e 's/\("Content-Type: text\/plain; charset=\).*\(\\n"\)/\1UTF-8\2/g' \
translation/fr/${project}.po
fi
# Le fichier po "en" est écrasé.
msgen -o translation/en/$project.po translation/$project.pot
sed -i -e 's/\("Last-Translator: \).*\(\\n"\)/\1Équipe EOLE <eole@ac-dijon.fr>\2/g' \
-e "s/\\(\"PO-Revision-Date: \\).*\\(\\\\n\"\\)/\\1$(date '+%Y-%m-%d %H:%M%z')\\2/g" \
-e 's/\("Language-Team: \).*\(\\n"\)/\1Équipe EOLE <eole@ac-dijon.fr>\2/g' \
-e 's/\("Language: \).*\(\\n"\)/\1en\2/g' \
-e 's/\("Content-Type: text\/plain; charset=\).*\(\\n"\)/\1UTF-8\2/g' \
-e 's/\("Plural-Forms: \).*/\1nplurals=2; plural=(n > 1);\\n"/' \
-e '1,5 d' \
translation/en/${project}.po
done < po_list
fi

View File

@ -1,24 +1,17 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from setuptools import setup from setuptools import setup, find_packages
import os, glob
BASE_DIR = 'share/'
DOC_DIR = os.path.join(BASE_DIR, 'doc/creole')
# documentation
doc = [(DOC_DIR, glob.glob('doc/*.html') + glob.glob('doc/*.txt')),
(os.path.join(DOC_DIR, 'api'), glob.glob('doc/api/*.html') + glob.glob('doc/api/*.css')),
]
setup( setup(
author='Équipe EOLE', author='Cadoles',
author_email='eole@ac-dijon.fr', author_email='contact@cadoles.com',
name='creole', name='rougail',
version='2.7.0', version='0.1',
description='Eole configuration tools', description='Configuration templating engine',
url='http://www.eole.orion.education.fr', url='https://forge.cadoles.com/Infra/rougail',
packages=['creole', 'creole.lint', 'creole.valid'], packages=find_packages('src'),
data_files=doc package_dir={"": "src"},
include_package_data=True,
package_data={"": ["data/*.dtd"]}
) )

View File

@ -112,16 +112,11 @@ class ServiceAnnotator:
del self.space.services del self.space.services
def convert_service_to_family(self, service_name, service_family, service): def convert_service_to_family(self, service_name, service_family, service):
# tranform service object to family object
# add services, service_accesses, ...
for elttype, values in vars(service).items(): for elttype, values in vars(service).items():
if elttype in ['name', 'index']: if elttype in ['name', 'index']:
continue continue
family = self.objectspace.family() family = self.objectspace.family()
if elttype.endswith('s'): family.name = elttype + 's'
family.name = elttype + 'es'
else:
family.name = elttype + 's'
if isinstance(values, dict): if isinstance(values, dict):
values = list(values.values()) values = list(values.values())
family.family = self.convert_subelement_service(elttype, family.family = self.convert_subelement_service(elttype,
@ -173,7 +168,7 @@ class ServiceAnnotator:
else: else:
type_ = 'string' type_ = 'string'
dtd_key_type = true_key + '_type' dtd_key_type = true_key + '_type'
if hasattr(elt, dtd_key_type): if hasattr(elt, dtd_key_type):
type_ = KEY_TYPE[getattr(elt, dtd_key_type)] type_ = KEY_TYPE[getattr(elt, dtd_key_type)]
multi = isinstance(value, list) multi = isinstance(value, list)
@ -204,8 +199,7 @@ class ServiceAnnotator:
var_data['type'] = type_ var_data['type'] = type_
variable = self.objectspace.variable() variable = self.objectspace.variable()
if not HIGH_COMPATIBILITY: variable.mandatory = True
variable.mandatory = True
for key, value in var_data.items(): for key, value in var_data.items():
if key == 'value': if key == 'value':
if value is None: if value is None:
@ -248,19 +242,15 @@ class ServiceAnnotator:
'for {}').format(file_.name)) 'for {}').format(file_.name))
def _reorder_elts(self, name, elts, duplicate_list): def _reorder_elts(self, name, elts, duplicate_list):
"""Reorders by index the elts (the interface, """Reorders by index the elts
the hosts, actions...)
""" """
dict_elts = OrderedDict() dict_elts = OrderedDict()
# reorder elts by index # reorder elts by index
new_elts = {} new_elts = {}
not_indexed = [] not_indexed = []
for elt in elts: for elt in elts:
if not hasattr(elt, 'index'): idx = elt.index
not_indexed.append(elt) new_elts.setdefault(idx, []).append(elt)
else:
idx = elt.index
new_elts.setdefault(idx, []).append(elt)
idxes = list(new_elts.keys()) idxes = list(new_elts.keys())
idxes.sort() idxes.sort()
elts = not_indexed elts = not_indexed
@ -273,10 +263,7 @@ class ServiceAnnotator:
continue continue
value = getattr(elt, key) value = getattr(elt, key)
if not elt_added: if not elt_added:
if hasattr(elt, 'name'): eltname = elt.name
eltname = elt.name
else:
eltname = idx
dict_elts.setdefault(eltname, []).append({'elt_name': name, 'elt': elt}) dict_elts.setdefault(eltname, []).append({'elt_name': name, 'elt': elt})
result_elts = [] result_elts = []
@ -397,7 +384,7 @@ class SpaceAnnotator(object):
self.has_calc = [] self.has_calc = []
self.force_no_value = [] self.force_no_value = []
self.force_not_mandatory = [] self.force_not_mandatory = []
if eosfunc_file is not None: if eosfunc_file:
self.eosfunc = imp.load_source('eosfunc', eosfunc_file) self.eosfunc = imp.load_source('eosfunc', eosfunc_file)
else: else:
self.eosfunc = None self.eosfunc = None
@ -544,10 +531,7 @@ class SpaceAnnotator(object):
variable_mode = variable.mode variable_mode = variable.mode
if variable_mode is not None and modes[mode] > modes[variable_mode]: if variable_mode is not None and modes[mode] > modes[variable_mode]:
mode = variable_mode mode = variable_mode
if family.name == 'Containers': family.mode = mode
family.mode = 'normal'
else:
family.mode = mode
def dynamic_families(self): # pylint: disable=C0111 def dynamic_families(self): # pylint: disable=C0111
if not hasattr(self.space, 'variables'): if not hasattr(self.space, 'variables'):
@ -585,8 +569,6 @@ class SpaceAnnotator(object):
variable.mode = family_mode variable.mode = family_mode
if variable.mode != None and variable.mode != modes_level[0] and modes[variable.mode] < modes[family_mode]: if variable.mode != None and variable.mode != modes_level[0] and modes[variable.mode] < modes[family_mode]:
variable.mode = family_mode variable.mode = family_mode
if variable.name == "available_probes":
variable.force_default_on_freeze = False
def default_variable_options(self): def default_variable_options(self):
if hasattr(self.space, 'variables'): if hasattr(self.space, 'variables'):
@ -727,19 +709,9 @@ class SpaceAnnotator(object):
is_follower = False is_follower = False
path = '{}.{}.{}'.format(family.path, variable.name, follower.name) path = '{}.{}.{}'.format(family.path, variable.name, follower.name)
self._annotate_variable(follower, family_mode, path, is_follower) self._annotate_variable(follower, family_mode, path, is_follower)
if HIGH_COMPATIBILITY: # leader's mode is minimum level
# leader's variable are right if modes[variable.variable[0].mode] > modes[follower.mode]:
if modes[variable.variable[0].mode] > modes[follower.mode]: follower.mode = variable.variable[0].mode
follower.mode = variable.variable[0].mode
else:
# auto_save's variable is set in 'basic' mode if its mode is 'normal'
if follower.auto_save is True and follower.mode != modes_level[-1]:
follower.mode = modes_level[0]
if modes[mode] > modes[follower.mode]:
mode = follower.mode
if not HIGH_COMPATIBILITY:
# the leader's mode is the lowest
variable.variable[0].mode = mode
variable.mode = variable.variable[0].mode variable.mode = variable.variable[0].mode
else: else:
# auto_save's variable is set in 'basic' mode if its mode is 'normal' # auto_save's variable is set in 'basic' mode if its mode is 'normal'
@ -770,13 +742,9 @@ class SpaceAnnotator(object):
# sort fill/auto by index # sort fill/auto by index
if 'fill' in vars(constraints): if 'fill' in vars(constraints):
for idx, fill in enumerate(constraints.fill): for idx, fill in enumerate(constraints.fill):
if fill.index in fills:
raise Exception('hu?')
fills[fill.index] = {'idx': idx, 'fill': fill, 'type': 'fill'} fills[fill.index] = {'idx': idx, 'fill': fill, 'type': 'fill'}
if 'auto' in vars(constraints): if 'auto' in vars(constraints):
for idx, fill in enumerate(constraints.auto): for idx, fill in enumerate(constraints.auto):
if fill.index in fills:
raise Exception('hu?')
fills[fill.index] = {'idx': idx, 'fill': fill, 'type': 'auto'} fills[fill.index] = {'idx': idx, 'fill': fill, 'type': 'auto'}
indexes = list(fills.keys()) indexes = list(fills.keys())
indexes.sort() indexes.sort()
@ -785,10 +753,7 @@ class SpaceAnnotator(object):
remove_fills = [] remove_fills = []
for idx in indexes: for idx in indexes:
fill = fills[idx]['fill'] fill = fills[idx]['fill']
if hasattr(fill, 'redefine'): redefine = bool(fill.redefine)
redefine = bool(fill.redefine)
else:
redefine = False
if fill.target in targets: if fill.target in targets:
if redefine: if redefine:
if targets[fill.target][1] == 'auto': if targets[fill.target][1] == 'auto':
@ -972,8 +937,6 @@ class SpaceAnnotator(object):
'').format(check.target)) '').format(check.target))
param = check.param[0] param = check.param[0]
if proposed_value_type: if proposed_value_type:
if param.type == 'eole':
raise Exception('hu?')
if param.type == 'variable': if param.type == 'variable':
try: try:
values = self.load_params_in_validenum(param) values = self.load_params_in_validenum(param)

View File

@ -1,20 +1,17 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
fichier de configuration pour créole fichier de configuration pour rougail
""" """
from os.path import join, isfile from os.path import join, isfile, abspath, dirname
from pathlib import Path
eoleroot = join('.') rougailroot = '/var/rougail'
patch_dir = join(rougailroot, 'patches')
manifests_dir = join(rougailroot, 'manifests')
templates_dir = join(rougailroot, 'templates')
dtddir = join(dirname(abspath(__file__)), 'data')
dtdfilename = join(dtddir, 'rougail.dtd')
# chemin du répertoire source des fichiers templates # chemin du répertoire source des fichiers templates
patch_dir = join(eoleroot, 'patch') patch_dir = '/srv/rougail/patch'
# repertoire de la dtd
dtddir = '/usr/share/creole'
if isfile('data/creole.dtd'):
dtdfilename = 'data/creole.dtd'
elif isfile('../creole/data/creole.dtd'):
dtdfilename = '../creole/data/creole.dtd'
else:
dtdfilename = join(dtddir, 'creole.dtd')

View File

@ -37,7 +37,7 @@
<!-- root element --> <!-- root element -->
<!-- =============== --> <!-- =============== -->
<!ELEMENT creole (services | family_action | variables | constraints | help)*> <!ELEMENT rougail (services | family_action | variables | constraints | help)*>
<!-- ============== --> <!-- ============== -->
<!-- files element --> <!-- files element -->
@ -66,7 +66,7 @@
<!ELEMENT services (service*)> <!ELEMENT services (service*)>
<!ELEMENT service ((port* | tcpwrapper* | ip* | interface* | package* | file*)*) > <!ELEMENT service ((port* | tcpwrapper* | ip* | interface* | package* | file* | digitalcertificate*)*) >
<!ATTLIST service name CDATA #REQUIRED> <!ATTLIST service name CDATA #REQUIRED>
<!ATTLIST service method (systemd|upstart|apache|network) "systemd"> <!ATTLIST service method (systemd|upstart|apache|network) "systemd">
@ -78,37 +78,23 @@
<!ELEMENT port (#PCDATA)> <!ELEMENT port (#PCDATA)>
<!ATTLIST port port_type (PortOption|SymLinkOption|variable) "PortOption"> <!ATTLIST port port_type (PortOption|SymLinkOption|variable) "PortOption">
<!ATTLIST port service_accesslist CDATA #IMPLIED > <!ATTLIST port portlist CDATA #IMPLIED >
<!ATTLIST port protocol (tcp|udp) "tcp"> <!ATTLIST port protocol (tcp|udp) "tcp">
<!ELEMENT tcpwrapper (#PCDATA)> <!ELEMENT tcpwrapper (#PCDATA)>
<!ATTLIST tcpwrapper tcpwrapper_type (UnicodeOption|SymLinkOption|variable) "UnicodeOption"> <!ATTLIST tcpwrapper tcpwrapper_type (UnicodeOption|SymLinkOption|variable) "UnicodeOption">
<!ATTLIST tcpwrapper service_accesslist CDATA #IMPLIED > <!ATTLIST tcpwrapper tcpwrapperlist CDATA #IMPLIED >
<!ELEMENT ip (#PCDATA)> <!ELEMENT ip (#PCDATA)>
<!ATTLIST ip service_restrictionlist CDATA #IMPLIED > <!ATTLIST ip iplist CDATA #IMPLIED >
<!ATTLIST ip ip_type (NetworkOption|SymLinkOption|variable) "NetworkOption"> <!ATTLIST ip ip_type (NetworkOption|SymLinkOption|variable) "NetworkOption">
<!ATTLIST ip interface_type (UnicodeOption|SymLinkOption|variable) "UnicodeOption"> <!ATTLIST ip interface_type (UnicodeOption|SymLinkOption|variable) "UnicodeOption">
<!ATTLIST ip interface CDATA #REQUIRED> <!ATTLIST ip interface CDATA #REQUIRED>
<!ATTLIST ip netmask_type (NetmaskOption|SymLinkOption|variable) "NetmaskOption"> <!ATTLIST ip netmask_type (NetmaskOption|SymLinkOption|variable) "NetmaskOption">
<!ATTLIST ip netmask CDATA "255.255.255.255"> <!ATTLIST ip netmask CDATA "255.255.255.255">
<!ELEMENT interface (#PCDATA)>
<!ATTLIST interface interfacelist CDATA #IMPLIED >
<!ATTLIST interface linkto CDATA #REQUIRED >
<!ATTLIST interface ip CDATA #REQUIRED>
<!ATTLIST interface ip_type (SymLinkOption|variable) "variable">
<!ATTLIST interface mask CDATA #REQUIRED>
<!ATTLIST interface mask_type (SymLinkOption|variable) "variable">
<!ATTLIST interface bcast CDATA #IMPLIED>
<!ATTLIST interface bcast_type (SymLinkOption|variable) "variable">
<!ATTLIST interface gateway CDATA #IMPLIED>
<!ATTLIST interface gateway_type (variable) "variable">
<!ATTLIST interface method (bridge|macvlan) "macvlan" >
<!ATTLIST interface redefine (True|False) "False">
<!ELEMENT package (#PCDATA)> <!ELEMENT package (#PCDATA)>
<!ATTLIST package packagelist CDATA #IMPLIED> <!ATTLIST package packagelist CDATA #IMPLIED >
<!ELEMENT file EMPTY> <!ELEMENT file EMPTY>
<!ATTLIST file name CDATA #REQUIRED > <!ATTLIST file name CDATA #REQUIRED >
@ -116,15 +102,22 @@
<!ATTLIST file variable CDATA #IMPLIED> <!ATTLIST file variable CDATA #IMPLIED>
<!ATTLIST file variable_type (variable) "variable"> <!ATTLIST file variable_type (variable) "variable">
<!ATTLIST file source CDATA #IMPLIED> <!ATTLIST file source CDATA #IMPLIED>
<!ATTLIST file mode CDATA #IMPLIED > <!ATTLIST file mode CDATA "0644">
<!ATTLIST file owner CDATA #IMPLIED > <!ATTLIST file owner CDATA "root">
<!ATTLIST file group CDATA #IMPLIED > <!ATTLIST file group CDATA "root">
<!ATTLIST file filelist CDATA #IMPLIED > <!ATTLIST file filelist CDATA #IMPLIED >
<!ATTLIST file mkdir (True|False) "False"> <!ATTLIST file mkdir (True|False) "False">
<!ATTLIST file rm (True|False) "False"> <!ATTLIST file rm (True|False) "False">
<!ATTLIST file del_comment CDATA #IMPLIED >
<!ATTLIST file redefine (True|False) "False"> <!ATTLIST file redefine (True|False) "False">
<!ELEMENT digitalcertificate EMPTY>
<!ATTLIST digitalcertificate name CDATA #REQUIRED >
<!ATTLIST digitalcertificate digitalcertificate_type (variable) "variable">
<!ATTLIST digitalcertificate certificate CDATA #REQUIRED >
<!ATTLIST digitalcertificate certificate_type (variable) "variable">
<!ATTLIST digitalcertificate type CDATA #REQUIRED >
<!ATTLIST digitalcertificate ca CDATA #REQUIRED >
<!ELEMENT variables (family*, separators*)> <!ELEMENT variables (family*, separators*)>
<!ELEMENT family (#PCDATA | variable)*> <!ELEMENT family (#PCDATA | variable)*>
<!ATTLIST family name CDATA #REQUIRED> <!ATTLIST family name CDATA #REQUIRED>
@ -150,6 +143,7 @@
<!ATTLIST variable mode (basic|normal|expert) "normal"> <!ATTLIST variable mode (basic|normal|expert) "normal">
<!ATTLIST variable remove_check (True|False) "False"> <!ATTLIST variable remove_check (True|False) "False">
<!ATTLIST variable remove_condition (True|False) "False"> <!ATTLIST variable remove_condition (True|False) "False">
<!ATTLIST variable test CDATA #IMPLIED>
<!ELEMENT separators (separator*)> <!ELEMENT separators (separator*)>
@ -183,13 +177,13 @@
<!ATTLIST group description CDATA #IMPLIED> <!ATTLIST group description CDATA #IMPLIED>
<!ELEMENT param (#PCDATA)> <!ELEMENT param (#PCDATA)>
<!ATTLIST param type (string|eole|variable|number|python) "string"> <!ATTLIST param type (string|variable|number|python) "string">
<!ATTLIST param name CDATA #IMPLIED> <!ATTLIST param name CDATA #IMPLIED>
<!ATTLIST param hidden (True|False) "True"> <!ATTLIST param hidden (True|False) "True">
<!ATTLIST param optional (True|False) "False"> <!ATTLIST param optional (True|False) "False">
<!ELEMENT target (#PCDATA)> <!ELEMENT target (#PCDATA)>
<!ATTLIST target type (family|filelist|servicelist|interfacelist|variable|service_accesslist|service_restrictionlist|hostlist|fstablist|actionlist) "variable"> <!ATTLIST target type (family|variable|filelist|iplist|portlist|tcpwrapperlist|packagelist|actionlist) "variable">
<!ATTLIST target optional (True|False) "False"> <!ATTLIST target optional (True|False) "False">
<!ELEMENT slave (#PCDATA)> <!ELEMENT slave (#PCDATA)>

View File

@ -25,8 +25,13 @@ from .utils import normalize_family
import imp import imp
FUNC_TO_DICT = ['valid_not_equal']
class ConvertDynOptionDescription(DynOptionDescription): class ConvertDynOptionDescription(DynOptionDescription):
def convert_suffix_to_path(self, suffix): def convert_suffix_to_path(self, suffix):
if not isinstance(suffix, str):
suffix = str(suffix)
return normalize_family(suffix, return normalize_family(suffix,
check_name=False) check_name=False)
@ -124,7 +129,10 @@ class PopulateTiramisuObjects(object):
def make_tiramisu_objects(self, xmlroot, creolefunc_file): def make_tiramisu_objects(self, xmlroot, creolefunc_file):
elt = Elt({'name': 'baseoption'}) elt = Elt({'name': 'baseoption'})
self.eosfunc = imp.load_source('eosfunc', creolefunc_file) if creolefunc_file is None:
self.eosfunc = None
else:
self.eosfunc = imp.load_source('eosfunc', creolefunc_file)
family = Family(elt, self.booleans, self.storage, self.eosfunc) family = Family(elt, self.booleans, self.storage, self.eosfunc)
self.storage.add('.', family) self.storage.add('.', family)
@ -308,6 +316,7 @@ class Variable(Common):
self.attrib['validators'] = [] self.attrib['validators'] = []
self.eosfunc = eosfunc self.eosfunc = eosfunc
self.storage = storage self.storage = storage
is_submulti = False
for key, value in elt.attrib.items(): for key, value in elt.attrib.items():
if key in booleans: if key in booleans:
if value == 'True': if value == 'True':
@ -315,10 +324,11 @@ class Variable(Common):
elif value == 'False': elif value == 'False':
value = False value = False
elif key == 'multi' and value == 'submulti': elif key == 'multi' and value == 'submulti':
is_submulti = True
value = submulti value = submulti
else: else:
raise CreoleLoaderError(_('unknown value {} for {}').format(value, key)) raise CreoleLoaderError(_('unknown value {} for {}').format(value, key))
if key == 'help': if key in ['help', 'test']:
self.add_information(key, value) self.add_information(key, value)
elif key == 'type': elif key == 'type':
pass pass
@ -352,7 +362,7 @@ class Variable(Common):
self.attrib['properties'].append(child.text) self.attrib['properties'].append(child.text)
elif child.tag == 'value': elif child.tag == 'value':
if child.attrib.get('type') == 'calculation': if child.attrib.get('type') == 'calculation':
if child.text.strip(): if child.text is not None and child.text.strip():
self.attrib['default'] = (child.text.strip(),) self.attrib['default'] = (child.text.strip(),)
else: else:
params = [] params = []
@ -364,13 +374,22 @@ class Variable(Common):
type_ = CONVERT_OPTION[child.attrib['type']]['opttype'] type_ = CONVERT_OPTION[child.attrib['type']]['opttype']
else: else:
type_ = self.object_type type_ = self.object_type
if self.attrib['multi'] and not is_follower: if self.attrib['multi'] is True and not is_follower:
if 'default' not in self.attrib: if 'default' not in self.attrib:
self.attrib['default'] = [] self.attrib['default'] = []
value = convert_tiramisu_value(child.text, type_) value = convert_tiramisu_value(child.text, type_)
self.attrib['default'].append(value) self.attrib['default'].append(value)
if 'default_multi' not in self.attrib and not is_leader: if 'default_multi' not in self.attrib and not is_leader:
self.attrib['default_multi'] = value self.attrib['default_multi'] = value
elif self.attrib['multi'] == submulti:
if 'default' not in self.attrib:
self.attrib['default'] = []
value = convert_tiramisu_value(child.text, type_)
if not isinstance(value, list) and not is_follower:
value = [value]
self.attrib['default'].append(value)
if 'default_multi' not in self.attrib and not is_leader:
self.attrib['default_multi'] = value
else: else:
if 'default' in self.attrib: if 'default' in self.attrib:
raise CreoleLoaderError(_('default value already set for {}' raise CreoleLoaderError(_('default value already set for {}'
@ -443,7 +462,10 @@ class Variable(Common):
if len(value) == 3: if len(value) == 3:
for param in value[1]: for param in value[1]:
if isinstance(param[1], list): if isinstance(param[1], list):
param_value = ParamOption(self.storage.get(param[1][0]).get(), notraisepropertyerror=param[1][1]) if value[0] in FUNC_TO_DICT:
param_value = ParamOption(self.storage.get(param[1][0]).get(), notraisepropertyerror=param[1][1], todict=True)
else:
param_value = ParamOption(self.storage.get(param[1][0]).get(), notraisepropertyerror=param[1][1])
else: else:
param_value = ParamValue(param[1]) param_value = ParamValue(param[1])
if not param[0]: if not param[0]:

View File

@ -39,7 +39,7 @@ FORCE_REDEFINABLES = ('family', 'slave', 'service', 'disknod', 'variables', 'fam
# CreoleObjSpace's elements that shall be forced to the UnRedefinable type # CreoleObjSpace's elements that shall be forced to the UnRedefinable type
FORCE_UNREDEFINABLES = ('value', 'input', 'profile', 'ewtapp', 'tag', 'saltaction') FORCE_UNREDEFINABLES = ('value', 'input', 'profile', 'ewtapp', 'tag', 'saltaction')
# CreoleObjSpace's elements that shall be set to the UnRedefinable type # CreoleObjSpace's elements that shall be set to the UnRedefinable type
UNREDEFINABLE = ('multi', 'type') UNREDEFINABLE = ('submulti', 'multi', 'type')
PROPERTIES = ('hidden', 'frozen', 'auto_freeze', 'auto_save', 'force_default_on_freeze', PROPERTIES = ('hidden', 'frozen', 'auto_freeze', 'auto_save', 'force_default_on_freeze',
'force_store_value', 'disabled', 'mandatory') 'force_store_value', 'disabled', 'mandatory')
@ -47,6 +47,8 @@ CONVERT_PROPERTIES = {'auto_save': ['force_store_value'], 'auto_freeze': ['force
RENAME_ATTIBUTES = {'description': 'doc'} RENAME_ATTIBUTES = {'description': 'doc'}
INCOMPATIBLE_ATTRIBUTES = [['multi', 'submulti']]
#TYPE_TARGET_CONDITION = ('variable', 'family') #TYPE_TARGET_CONDITION = ('variable', 'family')
# _____________________________________________________________________________ # _____________________________________________________________________________
@ -88,8 +90,6 @@ class CreoleObjSpace(object):
# ['variable', 'separator', 'family'] # ['variable', 'separator', 'family']
self.forced_text_elts = set() self.forced_text_elts = set()
# ['disknod', 'follower', 'target', 'service', 'package', 'ip', 'value', 'tcpwrapper',
# 'interface', 'input', 'port']
self.forced_text_elts_as_name = set(['choice', 'property']) self.forced_text_elts_as_name = set(['choice', 'property'])
self.forced_choice_option = {} self.forced_choice_option = {}
self.paths = Path() self.paths = Path()
@ -357,6 +357,15 @@ class CreoleObjSpace(object):
'not {}').format(attr, val)) 'not {}').format(attr, val))
if not (attr == 'name' and getattr(creoleobj, 'name', None) != None): if not (attr == 'name' and getattr(creoleobj, 'name', None) != None):
setattr(creoleobj, attr, val) setattr(creoleobj, attr, val)
keys = list(vars(creoleobj).keys())
for incompatible in INCOMPATIBLE_ATTRIBUTES:
found = False
for inc in incompatible:
if inc in keys:
if found:
raise CreoleDictConsistencyError(_('those attributes are incompatible {}').format(incompatible))
found = True
def _creoleobj_tree_visitor(self, child, creoleobj, namespace): def _creoleobj_tree_visitor(self, child, creoleobj, namespace):
"""Creole object tree manipulations """Creole object tree manipulations

View File

@ -17,11 +17,13 @@ from os.path import dirname, basename, join, split, isfile, isdir
from tempfile import mktemp from tempfile import mktemp
from Cheetah import Parser from Cheetah import Parser
# l'encoding du template est déterminé par une regexp (encodingDirectiveRE dans Parser.py) # l'encoding du template est déterminé par une regexp (encodingDirectiveRE dans Parser.py)
# il cherche un ligne qui ressemble à '#encoding: utf-8 # il cherche un ligne qui ressemble à '#encoding: utf-8
# cette classe simule le module 're' et retourne toujours l'encoding utf-8 # cette classe simule le module 're' et retourne toujours l'encoding utf-8
# 6224 # 6224
class FakeEncoding(): class FakeEncoding:
def groups(self): def groups(self):
return ('utf-8',) return ('utf-8',)
@ -29,6 +31,7 @@ class FakeEncoding():
return self return self
Parser.encodingDirectiveRE = FakeEncoding() Parser.encodingDirectiveRE = FakeEncoding()
from Cheetah.Template import Template as ChtTemplate from Cheetah.Template import Template as ChtTemplate
from Cheetah.NameMapper import NotFound as CheetahNotFound from Cheetah.NameMapper import NotFound as CheetahNotFound
@ -119,8 +122,6 @@ class CheetahTemplate(ChtTemplate):
"""Initialize Creole CheetahTemplate """Initialize Creole CheetahTemplate
""" """
extra_context = {'is_defined' : IsDefined(context), extra_context = {'is_defined' : IsDefined(context),
# 'creole_client' : CreoleClient(config),
# 'current_container':CreoleGet(current_container),
'normalize_family': normalize_family, 'normalize_family': normalize_family,
'rougail_filename': destfilename 'rougail_filename': destfilename
} }
@ -136,9 +137,9 @@ class CreoleLeader:
""" """
On rend la variable itérable pour pouvoir faire: On rend la variable itérable pour pouvoir faire:
for ip in iplist: for ip in iplist:
print ip.network print(ip.network)
print ip.netmask print(ip.netmask)
print ip print(ip)
index is used for CreoleLint index is used for CreoleLint
""" """
self._value = value self._value = value
@ -266,15 +267,15 @@ class CreoleTemplateEngine:
self.tmp_dir = tmp_dir self.tmp_dir = tmp_dir
self.distrib_dir = distrib_dir self.distrib_dir = distrib_dir
eos = {} eos = {}
eosfunc = imp.load_source('eosfunc', eosfunc_file) if eosfunc_file is not None:
for func in dir(eosfunc): eosfunc = imp.load_source('eosfunc', eosfunc_file)
if not func.startswith('_'): for func in dir(eosfunc):
eos[func] = getattr(eosfunc, func) if not func.startswith('_'):
eos[func] = getattr(eosfunc, func)
self.eosfunc = eos self.eosfunc = eos
self.creole_variables_dict = {} self.creole_variables_dict = {}
async def load_eole_variables_creole(self, async def load_eole_variables_creole(self,
config,
optiondescription): optiondescription):
for option in await optiondescription.list('all'): for option in await optiondescription.list('all'):
if await option.option.isoptiondescription(): if await option.option.isoptiondescription():
@ -284,17 +285,15 @@ class CreoleTemplateEngine:
leader = CreoleLeader(await suboption.value.get()) leader = CreoleLeader(await suboption.value.get())
self.creole_variables_dict[await suboption.option.name()] = leader self.creole_variables_dict[await suboption.option.name()] = leader
else: else:
await leader.add_slave(config, await leader.add_slave(self.config,
await suboption.option.name(), await suboption.option.name(),
await suboption.option.path()) await suboption.option.path())
else: else:
await self.load_eole_variables_creole(config, await self.load_eole_variables_creole(option)
option)
else: else:
self.creole_variables_dict[await option.option.name()] = await option.value.get() self.creole_variables_dict[await option.option.name()] = await option.value.get()
async def load_eole_variables(self, async def load_eole_variables(self,
config,
namespace, namespace,
optiondescription): optiondescription):
families = {} families = {}
@ -307,7 +306,7 @@ class CreoleTemplateEngine:
leader = CreoleLeader(await suboption.value.get()) leader = CreoleLeader(await suboption.value.get())
leader_name = await suboption.option.name() leader_name = await suboption.option.name()
else: else:
await leader.add_slave(config, await leader.add_slave(self.config,
await suboption.option.name(), await suboption.option.name(),
await suboption.option.path()) await suboption.option.path())
variables[leader_name] = leader variables[leader_name] = leader
@ -334,24 +333,6 @@ class CreoleTemplateEngine:
log.error(_(f"Error applying patch: '{patch_file}'\nTo reproduce and fix this error {patch_cmd_err}")) log.error(_(f"Error applying patch: '{patch_file}'\nTo reproduce and fix this error {patch_cmd_err}"))
copy(filename, self.tmp_dir) copy(filename, self.tmp_dir)
def strip_template_comment(self,
filename: str):
"""Strip comment from template
This apply if filevar has a del_comment attribut
"""
# suppression des commentaires si demandé (attribut del_comment)
if 'del_comment' in filevar and filevar['del_comment'] != '':
strip_cmd = ['sed', '-i']
log.info(_("Cleaning file '{0}'").format( filevar['source'] ))
raise Exception('hu')
#ret, out, err = pyeole.process.system_out(strip_cmd
# + ['/^\s*{0}/d ; /^$/d'.format(filevar['del_comment']),
# filevar['source'] ])
#if ret != 0:
# msg = _("Error removing comments '{0}': {1}")
# raise TemplateError(msg.format(filevar['del_comment'], err))
def prepare_template(self, def prepare_template(self,
filename: str): filename: str):
"""Prepare template source file """Prepare template source file
@ -359,12 +340,10 @@ class CreoleTemplateEngine:
log.info(_("Copy template: '{filename}' -> '{self.tmp_dir}'")) log.info(_("Copy template: '{filename}' -> '{self.tmp_dir}'"))
copy(filename, self.tmp_dir) copy(filename, self.tmp_dir)
self.patch_template(filename) self.patch_template(filename)
# self.strip_template_comment(filename)
def process(self, def process(self,
destfilename: str, destfilename: str,
filevar: Dict, filevar: Dict,
container: str,
variable: Any): variable: Any):
"""Process a cheetah template """Process a cheetah template
""" """
@ -387,51 +366,12 @@ class CreoleTemplateEngine:
with open(destfilename, 'w') as file_h: with open(destfilename, 'w') as file_h:
file_h.write(data) file_h.write(data)
def change_properties(self,
destfilename:str,
filevar: Dict):
#chowncmd = ['chown']
#chownarg = ''
chmodcmd = ['chmod']
chmodarg = ''
#if 'owner' in filevar and filevar['owner']:
# chownarg = filevar['owner']
#else:
# chownarg = 'root'
#if 'group' in filevar and filevar['group']:
# chownarg += ":" + filevar['group']
#else:
# chownarg += ':root'
if 'mode' in filevar and filevar['mode']:
chmodarg = filevar['mode']
else:
chmodarg = '0644'
#chowncmd.extend( [chownarg, destfilename] )
chmodcmd.extend([chmodarg, destfilename])
#log.info(_('Changing properties: {0}').format(' '.join(chowncmd)) )
#ret = call(chowncmd)
#if ret:
# log.error(_('Error changing properties {0}: {1}').format(ret, err) )
log.info(_('Changing properties: {0}').format(' '.join(chmodcmd)) )
ret = call(chmodcmd)
if ret:
chmod_cmd = ' '.join(chmodcmd)
log.error(_(f'Error changing properties: {chmodcmd}'))
def instance_file(self, def instance_file(self,
filevar: Dict, filevar: Dict,
container: str): systemd_rights: list) -> None:
"""Run templatisation on one file of one container """Run templatisation on one file
""" """
log.info(_("Instantiating file '{filename}'")) log.info(_("Instantiating file '{filename}'"))
container_dir = join(self.dest_dir,
container)
filenames = filevar['name'] filenames = filevar['name']
if 'variable' in filevar: if 'variable' in filevar:
variable = filevar['variable'] variable = filevar['variable']
@ -442,7 +382,7 @@ class CreoleTemplateEngine:
if variable: if variable:
variable = [variable] variable = [variable]
for idx, filename in enumerate(filenames): for idx, filename in enumerate(filenames):
destfilename = join(container_dir, destfilename = join(self.dest_dir,
filename[1:]) filename[1:])
makedirs(dirname(destfilename), exist_ok=True) makedirs(dirname(destfilename), exist_ok=True)
if variable: if variable:
@ -451,35 +391,26 @@ class CreoleTemplateEngine:
var = None var = None
self.process(destfilename, self.process(destfilename,
filevar, filevar,
container,
var) var)
self.change_properties(destfilename, systemd_rights.append(f'C {filename} {filevar["mode"]} {filevar["owner"]} {filevar["group"]} - -')
filevar) systemd_rights.append(f'z {filename} - - - - -')
async def instance_files(self, async def instance_files(self) -> None:
container=None): """Run templatisation on all files
"""Run templatisation on all files of all containers
@param container: name of a container
@type container: C{str}
""" """
for option in await self.config.option.list(type='all'): for option in await self.config.option.list(type='all'):
namespace = await option.option.name() namespace = await option.option.name()
if namespace in ['services', 'actions']: if namespace in ['services', 'actions']:
continue continue
elif namespace == 'creole': elif namespace == 'creole':
await self.load_eole_variables_creole(self.config, await self.load_eole_variables_creole(option)
option)
else: else:
await self.load_eole_variables(self.config, await self.load_eole_variables(namespace,
namespace,
option) option)
for template in listdir(self.distrib_dir): for template in listdir(self.distrib_dir):
self.prepare_template(join(self.distrib_dir, template)) self.prepare_template(join(self.distrib_dir, template))
systemd_rights = []
for service_obj in await self.config.option('services').list('all'): for service_obj in await self.config.option('services').list('all'):
current_container = await service_obj.option.doc()
if container is not None and container != current_container:
continue
for fills in await service_obj.list('all'): for fills in await service_obj.list('all'):
if await fills.option.name() == 'files': if await fills.option.name() == 'files':
for fill_obj in await fills.list('all'): for fill_obj in await fills.list('all'):
@ -490,20 +421,23 @@ class CreoleTemplateEngine:
raise FileNotFound(_(f"File {distib_file} does not exist.")) raise FileNotFound(_(f"File {distib_file} does not exist."))
if fill.get('activate', False): if fill.get('activate', False):
self.instance_file(fill, self.instance_file(fill,
current_container) systemd_rights)
else: else:
log.debug(_("Instantiation of file '{filename}' disabled")) log.debug(_("Instantiation of file '{filename}' disabled"))
with open(join(self.dest_dir, 'rougail.conf'), 'w') as fh:
fh.write('\n'.join(systemd_rights))
fh.write('\n')
async def generate(config: Config, async def generate(config: Config,
eosfunc_file: str, eosfunc_file: str,
distrib_dir: str, distrib_dir: str,
tmp_dir: str, tmp_dir: str,
dest_dir: str, dest_dir: str) -> None:
container: str=None):
engine = CreoleTemplateEngine(config, engine = CreoleTemplateEngine(config,
eosfunc_file, eosfunc_file,
distrib_dir, distrib_dir,
tmp_dir, tmp_dir,
dest_dir) dest_dir)
await engine.instance_files(container=container) await engine.instance_files()

View File

@ -10,15 +10,14 @@ def normalize_family(family_name: str,
allow_dot: bool=False) -> str: allow_dot: bool=False) -> str:
"""replace space, accent, uppercase, ... by valid character """replace space, accent, uppercase, ... by valid character
""" """
f = family_name family_name = family_name.replace('-', '_')
f = f.replace('-', '_')
if not allow_dot: if not allow_dot:
f = f.replace('.', '_') family_name = family_name.replace('.', '_')
f = f.replace(' ', '_') family_name = family_name.replace(' ', '_')
nfkd_form = unicodedata.normalize('NFKD', f) nfkd_form = unicodedata.normalize('NFKD', family_name)
f = ''.join([c for c in nfkd_form if not unicodedata.combining(c)]) family_name = ''.join([c for c in nfkd_form if not unicodedata.combining(c)])
f = f.lower() family_name = family_name.lower()
if check_name and f == 'containers': if check_name and family_name == 'containers':
raise ValueError(_('"{0}" is a forbidden family name'.format(f))) raise ValueError(_(f'"{family_name}" is a forbidden family name'))
return f return family_name

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services> <services>
<service name="tata"> <service name="tata">
</service> </service>
</services> </services>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -20,6 +20,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -20,6 +20,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,6 +17,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,6 +17,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -18,6 +18,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -20,6 +20,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,6 +17,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,6 +17,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<creole> <rougail>
<services/> <services/>
@ -18,6 +18,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,12 +17,12 @@
<constraints> <constraints>
<auto name="calc_val" target="mode_conteneur_actif"> <auto name="calc_val" target="mode_conteneur_actif">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</auto> </auto>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -22,6 +22,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<services/>
<variables>
<family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="Redefine description" hidden="True" multi="True">
<value>non</value>
</variable>
</family>
<separators/>
</variables>
<constraints>
</constraints>
<help/>
</rougail>
<!-- vim: ts=4 sw=4 expandtab
-->

View File

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
<variable doc="Redefine description" multi="True" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
<separators/>
</family>
</creole>

View File

@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<services/>
<variables>
<family name="general">
<variable name="mode_conteneur_actif" type="oui/non" description="Redefine description" hidden="True" submulti="True">
<value>non</value>
</variable>
</family>
<separators/>
</variables>
<constraints>
</constraints>
<help/>
</rougail>
<!-- vim: ts=4 sw=4 expandtab
-->

View File

@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<creole>
<family doc="" name="creole">
<family doc="general" name="general">
<property>normal</property>
<variable doc="Redefine description" multi="submulti" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
<separators/>
</family>
</creole>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -20,12 +20,12 @@
<constraints> <constraints>
<fill name="calc_val" target="mode_conteneur_actif"> <fill name="calc_val" target="mode_conteneur_actif">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</fill> </fill>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,12 +17,12 @@
<constraints> <constraints>
<fill name="calc_val" target="mode_conteneur_actif"> <fill name="calc_val" target="mode_conteneur_actif">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</fill> </fill>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,12 +17,12 @@
<constraints> <constraints>
<fill name="calc_val" target="mode_conteneur_actif"> <fill name="calc_val" target="mode_conteneur_actif">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</fill> </fill>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,12 +17,12 @@
<constraints> <constraints>
<fill name="calc_val" target="mode_conteneur_actif"> <fill name="calc_val" target="mode_conteneur_actif">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</fill> </fill>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -15,12 +15,12 @@
<constraints> <constraints>
<fill name="calc_val" target="mode_conteneur_actif"> <fill name="calc_val" target="mode_conteneur_actif">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</fill> </fill>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -21,6 +21,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,14 +17,14 @@
<constraints> <constraints>
<fill name="calc_val" target="mode_conteneur_actif"> <fill name="calc_val" target="mode_conteneur_actif">
<param type="eole" optional="True">mode_conteneur_actif4</param> <param type="variable" optional="True">mode_conteneur_actif4</param>
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
<param type="eole" optional="True">mode_conteneur_actif3</param> <param type="variable" optional="True">mode_conteneur_actif3</param>
</fill> </fill>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,6 +19,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,6 +19,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -22,6 +22,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -25,6 +25,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -22,6 +22,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,12 +19,12 @@
<constraints> <constraints>
<check name="valid_entier" target="int"> <check name="valid_entier" target="int">
<param name="mini">0</param> <param name="mini">0</param>
<param name="maxi" type="eole">int2</param> <param name="maxi" type="variable">int2</param>
</check> </check>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -16,16 +16,16 @@
<constraints> <constraints>
<check name="valid_differ" target="int"> <check name="valid_differ" target="int">
<param type="eole" optional="True">int2</param> <param type="variable" optional="True">int2</param>
</check> </check>
<check name="valid_differ" target="int"> <check name="valid_differ" target="int">
<param type="eole" optional="True">int3</param> <param type="variable" optional="True">int3</param>
</check> </check>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,12 +17,12 @@
<constraints> <constraints>
<check name="valid_differ" target="mode_conteneur_actif"> <check name="valid_differ" target="mode_conteneur_actif">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</check> </check>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -23,15 +23,15 @@
<constraints> <constraints>
<check name="valid_differ" target="mode_conteneur_actif3"> <check name="valid_differ" target="mode_conteneur_actif3">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</check> </check>
<check name="valid_differ" target="mode_conteneur_actif3"> <check name="valid_differ" target="mode_conteneur_actif3">
<param type="eole">mode_conteneur_actif2</param> <param type="variable">mode_conteneur_actif2</param>
</check> </check>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -14,15 +14,15 @@
<constraints> <constraints>
<check name="valid_differ" target="mode_conteneur_actif3"> <check name="valid_differ" target="mode_conteneur_actif3">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</check> </check>
<check name="valid_differ" target="mode_conteneur_actif3"> <check name="valid_differ" target="mode_conteneur_actif3">
<param type="eole">mode_conteneur_actif2</param> <param type="variable">mode_conteneur_actif2</param>
</check> </check>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -23,15 +23,15 @@
<constraints> <constraints>
<check name="valid_differ" target="mode_conteneur_actif3"> <check name="valid_differ" target="mode_conteneur_actif3">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</check> </check>
<check name="valid_differ" target="mode_conteneur_actif3"> <check name="valid_differ" target="mode_conteneur_actif3">
<param type="eole">mode_conteneur_actif2</param> <param type="variable">mode_conteneur_actif2</param>
</check> </check>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -14,15 +14,15 @@
<constraints> <constraints>
<check name="valid_differ" target="mode_conteneur_actif3"> <check name="valid_differ" target="mode_conteneur_actif3">
<param type="eole">mode_conteneur_actif1</param> <param type="variable">mode_conteneur_actif1</param>
</check> </check>
<check name="valid_differ" target="mode_conteneur_actif3"> <check name="valid_differ" target="mode_conteneur_actif3">
<param type="eole">mode_conteneur_actif2</param> <param type="variable">mode_conteneur_actif2</param>
</check> </check>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -16,12 +16,12 @@
<constraints> <constraints>
<check name="valid_ipnetmask" target="adresse_netmask_eth0" level="warning"> <check name="valid_ipnetmask" target="adresse_netmask_eth0" level="warning">
<param type="eole">adresse_ip_eth0</param> <param type="variable">adresse_ip_eth0</param>
</check> </check>
</constraints> </constraints>
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -29,6 +29,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -29,6 +29,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -34,6 +34,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -33,6 +33,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -29,6 +29,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -28,6 +28,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -31,6 +31,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -32,6 +32,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<creole> <rougail>
<variables> <variables>
<family name='general'> <family name='general'>
@ -29,6 +29,6 @@
</condition> </condition>
</constraints> </constraints>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -28,6 +28,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -21,7 +21,7 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</fill> </fill>
<fill name="calc_val" target="slave2"> <fill name="calc_val" target="slave2">
<param type="eole">slave1</param> <param type="variable">slave1</param>
</fill> </fill>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -31,4 +31,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -25,4 +25,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -25,4 +25,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<creole> <rougail>
<variables> <variables>
<family name='general'> <family name='general'>
<variable name='mode_conteneur_actif' type='oui/non' description="No change"> <variable name='mode_conteneur_actif' type='oui/non' description="No change">
@ -17,11 +17,11 @@
<param name='valeur'>valfill</param> <param name='valeur'>valfill</param>
</fill> </fill>
<fill name='calc_val' target='slave2'> <fill name='calc_val' target='slave2'>
<param type='eole'>slave1</param> <param type='variable'>slave1</param>
</fill> </fill>
<group master='master' description="other description"> <group master='master' description="other description">
<slave>slave1</slave> <slave>slave1</slave>
<slave>slave2</slave> <slave>slave2</slave>
</group> </group>
</constraints> </constraints>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -25,4 +25,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -14,4 +14,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -18,6 +18,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,7 +19,7 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</fill> </fill>
<fill name="calc_val" target="slave2"> <fill name="calc_val" target="slave2">
<param type="eole">slave1</param> <param type="variable">slave1</param>
</fill> </fill>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -29,4 +29,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,7 +19,7 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</fill> </fill>
<fill name="calc_val" target="slave2"> <fill name="calc_val" target="slave2">
<param type="eole">slave1</param> <param type="variable">slave1</param>
</fill> </fill>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -29,4 +29,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<variables> <variables>
<family name="général"> <family name="général">
@ -20,6 +20,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,7 +19,7 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</fill> </fill>
<fill name="calc_val" target="slave2"> <fill name="calc_val" target="slave2">
<param type="eole">slave1</param> <param type="variable">slave1</param>
</fill> </fill>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -29,4 +29,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -24,7 +24,7 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</fill> </fill>
<fill name="calc_val" target="slave2"> <fill name="calc_val" target="slave2">
<param type="eole">slave1</param> <param type="variable">slave1</param>
</fill> </fill>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -38,4 +38,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -21,7 +21,7 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</fill> </fill>
<fill name="calc_val" target="slave2"> <fill name="calc_val" target="slave2">
<param type="eole">slave1</param> <param type="variable">slave1</param>
</fill> </fill>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -31,4 +31,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -17,4 +17,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -20,10 +20,10 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</auto> </auto>
<auto name="calc_val" target="slave2"> <auto name="calc_val" target="slave2">
<param type="eole">slave1</param> <param type="variable">slave1</param>
</auto> </auto>
<auto name="calc_val" target="slave3"> <auto name="calc_val" target="slave3">
<param type="eole">master</param> <param type="variable">master</param>
</auto> </auto>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -34,4 +34,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,7 +19,7 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</auto> </auto>
<auto name="calc_val" target="slave2"> <auto name="calc_val" target="slave2">
<param type="eole">master</param> <param type="variable">master</param>
</auto> </auto>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -29,4 +29,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -28,4 +28,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,7 +19,7 @@
<param name="valeur">valfill</param> <param name="valeur">valfill</param>
</fill> </fill>
<fill name="calc_val" target="slave2"> <fill name="calc_val" target="slave2">
<param type="eole">slave1</param> <param type="variable">slave1</param>
</fill> </fill>
<group master="master"> <group master="master">
<slave>slave1</slave> <slave>slave1</slave>
@ -29,4 +29,4 @@
<help/> <help/>
</creole> </rougail>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -27,6 +27,6 @@
<variable name="enumvar">bla bla bla</variable> <variable name="enumvar">bla bla bla</variable>
</help> </help>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -27,6 +27,6 @@
<variable name="enumvar">bla bla bla</variable> <variable name="enumvar">bla bla bla</variable>
</help> </help>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -33,6 +33,6 @@
<variable name="enumvar">bla bla bla</variable> <variable name="enumvar">bla bla bla</variable>
</help> </help>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -21,6 +21,6 @@
<help> <help>
</help> </help>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -19,6 +19,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -20,6 +20,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
<variables> <variables>
<family name="general" mode="expert"> <family name="general" mode="expert">
@ -18,6 +18,6 @@
<param>['a','b','c']</param> <param>['a','b','c']</param>
</check> </check>
</constraints> </constraints>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -27,6 +27,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -21,6 +21,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -25,6 +25,6 @@
<variable name="enumvar">bla bla bla</variable> <variable name="enumvar">bla bla bla</variable>
</help> </help>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -27,6 +27,6 @@
<variable name="enumvar">bla bla bla</variable> <variable name="enumvar">bla bla bla</variable>
</help> </help>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -27,6 +27,6 @@
<variable name="enumvar">bla bla bla</variable> <variable name="enumvar">bla bla bla</variable>
</help> </help>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services/> <services/>
@ -20,6 +20,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services> <services>
<service name="test"> <service name="test">
@ -33,6 +33,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1 +1 @@
{"creole.general.condition": "non", "creole.general.mode_conteneur_actif": "non", "creole.general.mode_conteneur_actif2": "non", "services.service0.files.file0.mkdir": false, "services.service0.files.file0.name": "/tmp/file", "services.service0.files.file0.rm": false, "services.service0.files.file0.source": "file", "services.service0.files.file0.activate": true} {"creole.general.condition": "non", "creole.general.mode_conteneur_actif": "non", "creole.general.mode_conteneur_actif2": "non", "services.service0.files.file0.group": "root", "services.service0.files.file0.mkdir": false, "services.service0.files.file0.mode": "0644", "services.service0.files.file0.name": "/tmp/file", "services.service0.files.file0.owner": "root", "services.service0.files.file0.rm": false, "services.service0.files.file0.source": "file", "services.service0.files.file0.activate": true}

View File

@ -4,19 +4,36 @@
<family name="service0" doc="test"> <family name="service0" doc="test">
<family doc="files" name="files"> <family doc="files" name="files">
<family doc="file0" name="file0"> <family doc="file0" name="file0">
<variable doc="" multi="False" name="group" type="string">
<property>mandatory</property>
<value>root</value>
</variable>
<variable doc="" multi="False" name="mkdir" type="boolean"> <variable doc="" multi="False" name="mkdir" type="boolean">
<property>mandatory</property>
<value>False</value> <value>False</value>
</variable> </variable>
<variable doc="" multi="False" name="mode" type="string">
<property>mandatory</property>
<value>0644</value>
</variable>
<variable doc="" multi="False" name="name" type="string"> <variable doc="" multi="False" name="name" type="string">
<property>mandatory</property>
<value>/tmp/file</value> <value>/tmp/file</value>
</variable> </variable>
<variable doc="" multi="False" name="owner" type="string">
<property>mandatory</property>
<value>root</value>
</variable>
<variable doc="" multi="False" name="rm" type="boolean"> <variable doc="" multi="False" name="rm" type="boolean">
<property>mandatory</property>
<value>False</value> <value>False</value>
</variable> </variable>
<variable doc="" multi="False" name="source" type="string"> <variable doc="" multi="False" name="source" type="string">
<property>mandatory</property>
<value>file</value> <value>file</value>
</variable> </variable>
<variable doc="" multi="False" name="activate" type="boolean"> <variable doc="" multi="False" name="activate" type="boolean">
<property>mandatory</property>
<property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property> <property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property>
<value>True</value> <value>True</value>
</variable> </variable>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services> <services>
<service name="test"> <service name="test">
@ -33,6 +33,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1 +1 @@
{"creole.general.condition": "oui", "services.service0.files.file0.mkdir": false, "services.service0.files.file0.name": "/tmp/file", "services.service0.files.file0.rm": false, "services.service0.files.file0.source": "file"} {"creole.general.condition": "oui", "services.service0.files.file0.group": "root", "services.service0.files.file0.mkdir": false, "services.service0.files.file0.mode": "0644", "services.service0.files.file0.name": "/tmp/file", "services.service0.files.file0.owner": "root", "services.service0.files.file0.rm": false, "services.service0.files.file0.source": "file"}

View File

@ -4,19 +4,36 @@
<family name="service0" doc="test"> <family name="service0" doc="test">
<family doc="files" name="files"> <family doc="files" name="files">
<family doc="file0" name="file0"> <family doc="file0" name="file0">
<variable doc="" multi="False" name="group" type="string">
<property>mandatory</property>
<value>root</value>
</variable>
<variable doc="" multi="False" name="mkdir" type="boolean"> <variable doc="" multi="False" name="mkdir" type="boolean">
<property>mandatory</property>
<value>False</value> <value>False</value>
</variable> </variable>
<variable doc="" multi="False" name="mode" type="string">
<property>mandatory</property>
<value>0644</value>
</variable>
<variable doc="" multi="False" name="name" type="string"> <variable doc="" multi="False" name="name" type="string">
<property>mandatory</property>
<value>/tmp/file</value> <value>/tmp/file</value>
</variable> </variable>
<variable doc="" multi="False" name="owner" type="string">
<property>mandatory</property>
<value>root</value>
</variable>
<variable doc="" multi="False" name="rm" type="boolean"> <variable doc="" multi="False" name="rm" type="boolean">
<property>mandatory</property>
<value>False</value> <value>False</value>
</variable> </variable>
<variable doc="" multi="False" name="source" type="string"> <variable doc="" multi="False" name="source" type="string">
<property>mandatory</property>
<value>file</value> <value>file</value>
</variable> </variable>
<variable doc="" multi="False" name="activate" type="boolean"> <variable doc="" multi="False" name="activate" type="boolean">
<property>mandatory</property>
<property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property> <property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property>
<value>True</value> <value>True</value>
</variable> </variable>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services> <services>
<service name="test"> <service name="test">
@ -34,6 +34,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

View File

@ -1 +1 @@
{"creole.general.condition": "non", "creole.general.mode_conteneur_actif": "non", "creole.general.mode_conteneur_actif2": "non", "services.service0.files.file0.mkdir": false, "services.service0.files.file0.name": "/tmp/file1", "services.service0.files.file0.rm": false, "services.service0.files.file0.source": "file1", "services.service0.files.file0.activate": true, "services.service0.files.file1.mkdir": false, "services.service0.files.file1.name": "/tmp/file2", "services.service0.files.file1.rm": false, "services.service0.files.file1.source": "file2", "services.service0.files.file1.activate": true} {"creole.general.condition": "non", "creole.general.mode_conteneur_actif": "non", "creole.general.mode_conteneur_actif2": "non", "services.service0.files.file0.group": "root", "services.service0.files.file0.mkdir": false, "services.service0.files.file0.mode": "0644", "services.service0.files.file0.name": "/tmp/file1", "services.service0.files.file0.owner": "root", "services.service0.files.file0.rm": false, "services.service0.files.file0.source": "file1", "services.service0.files.file0.activate": true, "services.service0.files.file1.group": "root", "services.service0.files.file1.mkdir": false, "services.service0.files.file1.mode": "0644", "services.service0.files.file1.name": "/tmp/file2", "services.service0.files.file1.owner": "root", "services.service0.files.file1.rm": false, "services.service0.files.file1.source": "file2", "services.service0.files.file1.activate": true}

View File

@ -4,37 +4,71 @@
<family name="service0" doc="test"> <family name="service0" doc="test">
<family doc="files" name="files"> <family doc="files" name="files">
<family doc="file0" name="file0"> <family doc="file0" name="file0">
<variable doc="" multi="False" name="group" type="string">
<property>mandatory</property>
<value>root</value>
</variable>
<variable doc="" multi="False" name="mkdir" type="boolean"> <variable doc="" multi="False" name="mkdir" type="boolean">
<property>mandatory</property>
<value>False</value> <value>False</value>
</variable> </variable>
<variable doc="" multi="False" name="mode" type="string">
<property>mandatory</property>
<value>0644</value>
</variable>
<variable doc="" multi="False" name="name" type="string"> <variable doc="" multi="False" name="name" type="string">
<property>mandatory</property>
<value>/tmp/file1</value> <value>/tmp/file1</value>
</variable> </variable>
<variable doc="" multi="False" name="owner" type="string">
<property>mandatory</property>
<value>root</value>
</variable>
<variable doc="" multi="False" name="rm" type="boolean"> <variable doc="" multi="False" name="rm" type="boolean">
<property>mandatory</property>
<value>False</value> <value>False</value>
</variable> </variable>
<variable doc="" multi="False" name="source" type="string"> <variable doc="" multi="False" name="source" type="string">
<property>mandatory</property>
<value>file1</value> <value>file1</value>
</variable> </variable>
<variable doc="" multi="False" name="activate" type="boolean"> <variable doc="" multi="False" name="activate" type="boolean">
<property>mandatory</property>
<property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property> <property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property>
<value>True</value> <value>True</value>
</variable> </variable>
</family> </family>
<family doc="file1" name="file1"> <family doc="file1" name="file1">
<variable doc="" multi="False" name="group" type="string">
<property>mandatory</property>
<value>root</value>
</variable>
<variable doc="" multi="False" name="mkdir" type="boolean"> <variable doc="" multi="False" name="mkdir" type="boolean">
<property>mandatory</property>
<value>False</value> <value>False</value>
</variable> </variable>
<variable doc="" multi="False" name="mode" type="string">
<property>mandatory</property>
<value>0644</value>
</variable>
<variable doc="" multi="False" name="name" type="string"> <variable doc="" multi="False" name="name" type="string">
<property>mandatory</property>
<value>/tmp/file2</value> <value>/tmp/file2</value>
</variable> </variable>
<variable doc="" multi="False" name="owner" type="string">
<property>mandatory</property>
<value>root</value>
</variable>
<variable doc="" multi="False" name="rm" type="boolean"> <variable doc="" multi="False" name="rm" type="boolean">
<property>mandatory</property>
<value>False</value> <value>False</value>
</variable> </variable>
<variable doc="" multi="False" name="source" type="string"> <variable doc="" multi="False" name="source" type="string">
<property>mandatory</property>
<value>file2</value> <value>file2</value>
</variable> </variable>
<variable doc="" multi="False" name="activate" type="boolean"> <variable doc="" multi="False" name="activate" type="boolean">
<property>mandatory</property>
<property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property> <property expected="oui" inverse="False" source="creole.general.condition" type="calculation">disabled</property>
<value>True</value> <value>True</value>
</variable> </variable>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<creole> <rougail>
<services> <services>
<service name="test"> <service name="test">
@ -31,6 +31,6 @@
<help/> <help/>
</creole> </rougail>
<!-- vim: ts=4 sw=4 expandtab <!-- vim: ts=4 sw=4 expandtab
--> -->

Some files were not shown because too many files have changed in this diff Show More