Merge "Set explicit boot mode even for bios boot"

This commit is contained in:
Zuul 2021-09-23 16:04:59 +00:00 committed by Gerrit Code Review
commit e757f3c6f4
2 changed files with 3 additions and 1 deletions

View File

@ -228,6 +228,8 @@ def _build_nodes(nova, glance, bmc_bm_port_pairs, provision_net_map,
image = cache.get(baremetal.image['id'])
if image.get('hw_firmware_type') == 'uefi':
node['capabilities'] += ",boot_mode:uefi"
else:
node['capabilities'] += ",boot_mode:bios"
else:
# With boot from volume the flavor disk size doesn't matter. We
# need to look up the volume disk size.

View File

@ -24,7 +24,7 @@ from openstack_virtual_baremetal import build_nodes_json
TEST_NODES = [{'arch': 'x86_64',
'capabilities': 'boot_option:local',
'capabilities': 'boot_option:local,boot_mode:bios',
'cpu': 128,
'disk': 1024,
'ports': [{'address': 'aa:aa:aa:aa:aa:aa'}],