Pass skip_networking=True to machine.commission(), the API equivalent
of checking "Retain network configuration" in the MAAS UI, so a
machine commissioned by the reimage job keeps its existing interface
configuration instead of having it replaced by whatever commissioning
discovers.
Signed-off-by: David Galloway <david.galloway@ibm.com>
# -------------------------------------------------------------------------
async def commission_machine(machine):
if get_normalized_status(machine) == "new":
- await machine.commission()
+ # skip_networking is the API equivalent of checking "Retain network
+ # configuration" in the MAAS UI: keep the machine's existing interface
+ # config instead of replacing it with what commissioning discovers.
+ await machine.commission(skip_networking=True)
# -------------------------------------------------------------------------
# Reimage