Add boot information into the inventory

Adds a new BootInfo object with 2 fields:

* current_boot_mode - bios or uefi, detected from presence of /sys/firmware/efi
  as per the following answer: http://askubuntu.com/a/162896
  This field will be used for setting the boot_mode capability in ironic-inspector
* pxe_interface - PXE booting interface, if it can be detected.
  This fields is already used by ironic-inspector, added here for consistency.

Change-Id: Ib36b592ffaba3bfa055d65c9526607867d302584
Partial-Bug: #1571580
This commit is contained in:
Dmitry Tantsur
2016-04-20 13:58:14 +02:00
parent 962ee1afb5
commit 53b187a4c3
6 changed files with 61 additions and 3 deletions

@ -306,7 +306,7 @@ def collect_default(data, failures):
LOG.debug('default root device is %s', root_disk.name)
# Both boot interface and IPMI address might not be present,
# we don't count it as failure
data['boot_interface'] = utils.get_agent_params().get('BOOTIF')
data['boot_interface'] = inventory['boot'].pxe_interface
LOG.debug('boot devices was %s', data['boot_interface'])
data['ipmi_address'] = inventory.get('bmc_address')
LOG.debug('BMC IP address: %s', data['ipmi_address'])