Backport of d0a34d08f4b0fe245423939229daa3b71e0843a7
LP: #1806969 -- Explicitly search for bridges, bonds, followed by the remaining interfaces when retrieving a requested machine via interface constraints.
Backport of 302d171 LP: #1835275 - Remove netplan interface lock.
Netplan creates a configuration file which locks the interface used to boot.
This ensures netbooted environments don't get disconnected. MAAS may send
a netplan configuration file which will reconfigure the boot interface. The
script runner will ensure the machine reconnects.
Fixes LP: #1836867 - Change config merge order to allow overrides
The contains the user-supplied config from e.g.. Settings made in there are
expected to be passed to curtin as is. However, with other
(Maas-generated) configs being merged after it, values that the user set
explicitly may be overwritten by Maas.
Merging the last ensures that the user-supplied values
override the Maas-generated ones.
Backport of 396f0cc4ef741ed57bf247830b09df49974cd2cf.
Backport of 36d5dd0 - LP: #1835289 - Fix error handling on the commissioning API.
The commissioning API was returning an exception instead or raising it. This
caused a 500 internal error with no readable error message. Fixing this
revealed the commissioning API cannot be used with embedded script YAML as
the commissioning API sets the script_type to commissioning. The form now
allows fields to be set as long as they match what is in the script YAML.