Retour de la configuration des hooks ONE.

La migration entre les version 4 et 5 avait fait des victimes.
Retour de la configuration pour le hook d'ajout et de suppression de
règles de firewall pour l'ouverture des ports VNC.

Retour de l'a possibilité d'ajouter des hooks personnes dans gen_config

ref #17335 @2h
This commit is contained in:
Philippe Caseiro 2016-10-03 11:36:05 +02:00
parent e9754b3064
commit fc2c3ac9c7
1 changed files with 74 additions and 0 deletions

View File

@ -653,6 +653,80 @@ MARKET_MAD = [
# Please note: In a Federation, User and Group hooks can only be defined in
# the master OpenNebula.
#-------------------------------------------------------------------------------
#
VM_HOOK = [
name = "open_ports",
on = "RUNNING",
command = "eole/graphicsfw",
arguments = "open $TEMPLATE",
remote = "YES"
]
VM_HOOK = [
name = "close_ports",
on = "DONE",
command = "eole/graphicsfw",
arguments = "close $TEMPLATE",
remote = "YES"
]
VM_HOOK = [
name = "close_ports",
on = "STOP",
command = "eole/graphicsfw",
arguments = "close $TEMPLATE",
remote = "YES"
]
VM_HOOK = [
name = "close_ports",
on = "SHUTDOWN",
command = "eole/graphicsfw",
arguments = "close $TEMPLATE",
remote = "YES"
]
%if %%getVar('activer_hooks', 'non') == 'oui'
#*******************************************************************************
# Personal Hooks
#*******************************************************************************
# VM
#*******************************************************************************
%if %%hapy_vm_hooks == 'oui'
%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
#*******************************************************************************
# USER
#*******************************************************************************
%if %%hapy_user_hooks == 'oui'
%for %%hook in %%hapy_user_hook
USER_HOOK = [
name = "%%hook",
on = "%%hook.hapy_user_hook_on",
command = "%%hook.hapy_user_hook_command",
arguments = "%%hook.hapy_user_hook_arguments"
]
%end for
%end if
%end if
HM_MAD = [
EXECUTABLE = "one_hm" ]