Seems like a logical thing to do. What specific mechanism do youOn 03/01/14 12:20 +0000, Dan Kenigsberg wrote:
Recently, Miguel Angel Ajo (CCed) has added a nice functionality to the
implementation of setupNetworks in Vdsm: two hook points where added:
before and after the setupNetworks verb takes place.
[....]
suggest for passing the JSON strings to the hook script? If passed as
arguments to the hook script we would need to consider shell escaping
and argv length restrictions.
What about writing these out to a special file and adding a new
getContext() call to the hooking module. A script that is unconcerned
with the context would not require any changes. But a script that
wants access would simply do:
ctx = hooking.getContext()
and ctx would be the contents of the special file already decoded into
a native Python object for easy consumption. This could easily be
extended to any hook which may want to provide some context to
implementors.
One more question comes to mind: Are there any pieces of information
that we would need to redact from the context (passwords or other
sensitive information)?