Add support for node groups in NetConfigDataLookup
authorHarald Jensas <harald.jensas@gmail.com>
Sun, 4 Dec 2016 22:34:40 +0000 (23:34 +0100)
committerHarald Jensas <harald.jensas@gmail.com>
Sun, 4 Dec 2016 23:11:24 +0000 (00:11 +0100)
commited2ed55ffb952e5333a8d80467822a31dfb99ea0
tree2d30c841ae49063f4c116057cf101bac77660de8
parenta23ad11958ac23b042facedd4dde9281c4a353fd
Add support for node groups in NetConfigDataLookup

By using DMI String as identifier, such as 'system-product-name'
or 'system-version' add support for node groups. This allow the
use of a single entry in 'NetConfigDataLookup' to match a group
of systems of the same model, vendor etc.

Try to match on ethernet mac address first, then if no match is
found 'dmiString' and 'id' is used, if the keys are set.

Example:

  NetConfigDataLookup:
    node1:
      nic1: "00:c8:7c:e6:f0:2e"
    node2:
      nic1: "00:18:7d:99:0c:b6"
    node3:
      dmiString: 'system-version'
      id: 'ThinkPad T460p'
      nic1: enp0s31f6
    # Dell PowerEdge R630 - nodegroup
    nodegroup1:
      dmiString: "system-product-name"
      id: "PowerEdge R630"
      nic1: em3
      nic2: em1
      nic3: em2
    # Cisco UCS B200-M4 - nodegroup
    nodegroup2:
      dmiString: "system-product-name"
      id: "UCSB-B200-M4"
      nic1: enp7s0
      nic2: enp6s0

Change-Id: Ie2547cd8805c57ed9afe7362eada802580ffc215
firstboot/os-net-config-mappings.yaml