From ffec623695def332caa0e432a941e9bcca756394 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Wed, 12 Aug 2015 12:09:03 +0200 Subject: [PATCH] =?UTF-8?q?dicos/99=5Fone-master.xml:=20Cr=C3=A9ation=20de?= =?UTF-8?q?s=20variables=20pour=20les=20Hook=20de=20type=20USER?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On permet de configurer des HOOK de type USER qui lancent des actions lors de la CREATION des utilisateurs. ref #12522 @20m --- dicos/99_one-master.xml | 26 ++++++++++++++++++++++---- tmpl/oned.conf | 15 ++++++++++++++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/dicos/99_one-master.xml b/dicos/99_one-master.xml index 8a98e09..94c9cfc 100644 --- a/dicos/99_one-master.xml +++ b/dicos/99_one-master.xml @@ -65,7 +65,7 @@ - + non @@ -77,9 +77,13 @@ non - + + + + + @@ -174,7 +178,7 @@ arp_cache_poisoning - + non Hooks @@ -191,12 +195,22 @@ hapy_vm_hook_state hapy_vm_hook_lcm_state + + + ['CREATE','REMOVE'] + + + + hapy_user_hook_on + hapy_user_hook_command + hapy_user_hook_arguments + Interface d'administration du Cluster OpenNebula. Active la protection contre les attaques par empoisonnement ARP. Non compatible avec les réseaux de Niveau 2 - 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) + 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) Nom du Hook de machine virtuelle (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) Déclancheur du Hook (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) Script lancé par le Hook (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) @@ -204,5 +218,9 @@ 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) État attendus par le hook lorsque le déclancheur est "CUSTOM" (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) État LCM attendus par le hook lorsque le déclancheur est "CUSTOM" (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) + Nom du Hook d'utilisateur (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) + Déclancheur du Hook (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) + Script lancé par le Hook (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) + Arguments passés au script lancé par le Hook d'utilisateur (cf: http://docs.opennebula.org/4.8/integration/infrastructure_integration/hooks.html) diff --git a/tmpl/oned.conf b/tmpl/oned.conf index 2442392..d12cbf0 100644 --- a/tmpl/oned.conf +++ b/tmpl/oned.conf @@ -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 = [