Skip to content
Snippets Groups Projects
user avatar
Guido Trotter authored
In order to do that we change the way nics are espected to be passed to
the _BuildInstanceHookEnv function, from (ip, bridge, mac) to (ip, mac,
mode, link).

To translate new nics, which have the ip, mac and nicparams fields to
this new format we add an auxiliary _PreBuildNICHooksList function,
which is called both in _BuildInstanceHookEnvByObject and in
LUCreateInstance, where we don't have an Instance object created yet, at
hooks execution time.

LUSetInstanceParams hooks generation is also changed to provide the
right override to the nics field, should any nics be modified.

Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
62f0dd02
Name Last commit Last update