Ajout des variables Creole pour la gestion des hooks de VM

Création d'une famille "Hook" pour contenir tous les types de hook

Ajout des variables hapy_vm_hook* pour la gestion des hook de VM perso

Utilisation des variables dans le template oned.conf

fixes #12522 @2h
This commit is contained in:
2015-08-12 10:39:15 +02:00
parent b4f5544a25
commit 85492585ae
2 changed files with 65 additions and 1 deletions

View File

@ -596,6 +596,29 @@ VM_HOOK = [
remote = "YES"
]
%if %%getVar('activer_vm_hooks', 'non') == 'oui'
#*******************************************************************************
# Personal Hooks
#*******************************************************************************
%for %%hook in %%hapy_vm_hook
VM_HOOK = [
name = "%%hook"
on = "%%hook.hapy_vm_hook_on"
%if %%hook.hapy_vm_hook_on == "CUSTOM"
state = %%hook.hapy_vm_hook_state
lcm_state = %%hook.hapy_vm_hook_lcm_state
%end if
command = "%%hook.hapy_vm_hook_command"
arguments = "%%hook.hapy_vm_hook_arguments"
%if %%hook.hapy_vm_hook_remote == 'oui'
remote = "YES"
%else
remote = "NO"
%end if
]
%end for
%end if
HM_MAD = [
executable = "one_hm" ]