[one-users] Fwd: Template parameters arguments to hook script?

reeuwijk reeuwijk at few.vu.nl
Thu Aug 16 07:12:54 PDT 2012


Hi,

I want to pass some parameters from OpenNebula templates to a hook script.

In OpenNebula 2.2 I could use something like 

CONTEXT = [ 
:
   SERVER = "bla"
:
]

and then in oned.conf I could use a hook script with something like:

VM_HOOK = [
   arguments = " … $CONTEXT[SERVER] …"
]

and the hook script would be invoked with the value I defined in CONTEXT.

Unfortunately, it seems that OpenNebula 3.6 does not support this any longer. Instead of the value defined in CONTEXT, the expression '$CONTEXT' is replaced with the empty string, so the hook script of the example always gets the string [SERVER].

From the documentation it is not entirely clear to me whether the mechanism I used for 2.2 is supported at all. The webpage at http://opennebula.org/documentation:rel3.6:oned_conf only mentions access to $VMID and $TEMPLATE and nothing else, so I may have been using an undocumented feature of OpenNebula 2.2.

However, limiting access to only those two variables seems overly restrictive to me, so for now I am assuming more is possible. But exactly what is allowed, and what is not?

-- 
Kees van Reeuwijk






More information about the Users mailing list