dicos/99_one-master.xml: Création des variables pour les Hook de type USER
On permet de configurer des HOOK de type USER qui lancent des actions lors de la CREATION des utilisateurs. ref #12522 @20m
This commit is contained in:
parent
62b0408cbe
commit
ffec623695
@ -65,7 +65,7 @@
|
||||
</variable>
|
||||
<variable name='one_nodes' type='string' description='Noeud voisin du Cluster' multi='True'/>
|
||||
<variable name='node_ip' type='ip' description='Adresse IP du noeud' multi='True'/>
|
||||
<variable name='activer_vm_hooks' type='oui/non' description="Utiliser des hook de vm personnalisés" mode='expert'>
|
||||
<variable name='activer_hooks' type='oui/non' description="Utiliser des hook personnalisés" mode='expert'>
|
||||
<value>non</value>
|
||||
</variable>
|
||||
</family>
|
||||
@ -77,9 +77,13 @@
|
||||
<variable name='hapy_vm_hook_remote' type='oui/non' description="Exécuter sur les noeuds (remote)" mode='expert'>
|
||||
<value>non</value>
|
||||
</variable>
|
||||
<variable name='hapy_vm_hook_on' type='string' description="Déclancheur (ON)" mode='expert'/>
|
||||
<variable name='hapy_vm_hook_state' type='string' description="Etat attendus en déclancheur 'custom' (STATE)" mode='expert'/>
|
||||
<variable name='hapy_vm_hook_lcm_state' type='string' description="Etat 'lcm' attendus en déclancheur 'custom' (LCM_STATE)" mode='expert'/>
|
||||
|
||||
<variable name='hapy_user_hook' type='string' description="Nom du hook d' utilisateur" multi='True' mode='expert'/>
|
||||
<variable name='hapy_user_hook_on' type='string' description="Déclancheur (on)" mode='expert'/>
|
||||
<variable name='hapy_user_hook_command' type='string' description="Script a déclancher (command)" mode='expert'/>
|
||||
<variable name='hapy_user_hook_arguments' type='string' description="Arguments a passer au script (arguments)" mode='expert'/>
|
||||
</family>
|
||||
</variables>
|
||||
|
||||
@ -174,7 +178,7 @@
|
||||
<target type='variable'>arp_cache_poisoning</target>
|
||||
</condition>
|
||||
|
||||
<condition name='disabled_if_in' source='activer_vm_hooks'>
|
||||
<condition name='disabled_if_in' source='activer_hooks'>
|
||||
<param>non</param>
|
||||
<target type='family'>Hooks</target>
|
||||
</condition>
|
||||
@ -191,12 +195,22 @@
|
||||
<slave>hapy_vm_hook_state</slave>
|
||||
<slave>hapy_vm_hook_lcm_state</slave>
|
||||
</group>
|
||||
|
||||
<check name="valid_enum" target="hapy_user_hook_on">
|
||||
<param>['CREATE','REMOVE']</param>
|
||||
</check>
|
||||
|
||||
<group master='hapy_user_hook'>
|
||||
<slave>hapy_user_hook_on</slave>
|
||||
<slave>hapy_user_hook_command</slave>
|
||||
<slave>hapy_user_hook_arguments</slave>
|
||||
</group>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
<variable name='activer_onesinglenode'>Interface d'administration du Cluster OpenNebula.</variable>
|
||||
<variable name='arp_cache_poisoning'>Active la protection contre les attaques par empoisonnement ARP. Non compatible avec les réseaux de Niveau 2</variable>
|
||||
<variable name='activer_vm_hooks'>Activer la création de hook personnalisée sur le serveur Hâpy (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='activer_hooks'>Activer la création de hook personnalisée sur le serveur Hâpy (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_vm_hook'>Nom du Hook de machine virtuelle (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_vm_hook_on'>Déclancheur du Hook (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_vm_hook_command'>Script lancé par le Hook (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
@ -204,5 +218,9 @@
|
||||
<variable name='hapy_vm_hook_remote'>Exécuter le script sur le noeud plutôt que sur le maitre (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_vm_hook_state'>État attendus par le hook lorsque le déclancheur est "CUSTOM" (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_vm_hook_lcm_state'>État LCM attendus par le hook lorsque le déclancheur est "CUSTOM" (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_user_hook'>Nom du Hook d'utilisateur (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_user_hook_on'>Déclancheur du Hook (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_user_hook_command'>Script lancé par le Hook (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
<variable name='hapy_user_hook_arguments'>Arguments passés au script lancé par le Hook d'utilisateur (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html)</variable>
|
||||
</help>
|
||||
</creole>
|
||||
|
@ -596,9 +596,11 @@ VM_HOOK = [
|
||||
remote = "YES"
|
||||
]
|
||||
|
||||
%if %%getVar('activer_vm_hooks', 'non') == 'oui'
|
||||
%if %%getVar('activer_hooks', 'non') == 'oui'
|
||||
#*******************************************************************************
|
||||
# Personal Hooks
|
||||
#*******************************************************************************
|
||||
# VM
|
||||
#*******************************************************************************
|
||||
%for %%hook in %%hapy_vm_hook
|
||||
VM_HOOK = [
|
||||
@ -617,6 +619,17 @@ VM_HOOK = [
|
||||
%end if
|
||||
]
|
||||
%end for
|
||||
#*******************************************************************************
|
||||
# USER
|
||||
#*******************************************************************************
|
||||
%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
|
||||
|
||||
HM_MAD = [
|
||||
|
Loading…
Reference in New Issue
Block a user