This is great, thanks! However, now that there is an extra parameter, there are some edge cases introduced. A user now has the option to put in conflicting configuration, for example 'DHCP' *and* an IP address, or 'manual' with no IP address. This complicates the logic, which previously just set the allocation based on the presence or absence of an IP address.

For example, if a user sets DHCP as the allocation mode and also includes an IP address then the result is that the IP address is allocated by DHCP and the IP address you specified is silently ignored. We think actually it might be better for the logic to be the other way round, i.e. if there is an IP address, default to manual, otherwise choose between DHCP and pool - what do you think?

Either way, please could you add unit tests that test this extra logic and clarify what the default behaviour would be in those kinds of edge cases?