Note: This patch is in response to the discussion in D35598. It allows to choose between different behaviors on mismatching machine information including the previous behavior of creating a new machine with the same name. My original plan was to always enforce unique machine names and append number suffixes in the duplication/splitting case. But it turns out this was extremely hard to implement correctly while support concurrent accesses, so I went with the previous solution instead where we can have multiple machines with the same name but different ids.
r309247 changed LNTs response to mismatching machine information to
either reject the submission or update the existing machine data. Some
users prefer the previous behavior of creating a separate machine with
the same name instead.
This changes LNT interface to accept an select-machine parameter:
- match: Rejects submission with mismatching machine information
- update: Updates the existing machine on mismatching machine information.
- split: Creates a new machine with the same name (but different id number) when none of the existing ones match the machine information.