NIC Parameters: fix hooks environment generation
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:Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment