Support legacy drivers

Adds support for pxe_ipmitool, pxe_ipmitool_socat, agent_ipmitool and
agent_ipmitool_socat drivers with virtualbmc. Also adds entries for SNMP-based
drivers.

Change-Id: I461e74e3199e02a35ee0d3ddc1f6e49c1eda0536
This commit is contained in:
Mark Goddard 2018-12-19 14:02:26 +00:00
parent 1a0d953737
commit f3cc81fc55
2 changed files with 20 additions and 6 deletions

View File

@ -105,7 +105,13 @@ state_file_path: >-
# The default Ironic driver of a node. Can be overridden per-node. # The default Ironic driver of a node. Can be overridden per-node.
default_ironic_driver: ipmi default_ironic_driver: ipmi
# Maps BMC emulation tools to the Ironic driver they support. # Maps Ironic drivers to the BMC emulation tool they support.
bmc_emulators: bmc_emulators:
virtualbmc: ipmi agent_ipmitool: virtualbmc
sushy-tools: redfish agent_ipmitool_socat: virtualbmc
ipmi: virtualbmc
pxe_ipmitool: virtualbmc
pxe_ipmitool_socat: virtualbmc
pxe_snmp: virtualpdu
redfish: sushy-tools
snmp: virtualpdu

View File

@ -9,10 +9,18 @@
- name: Perform Virtual BMC configuration - name: Perform Virtual BMC configuration
hosts: libvirt hosts: libvirt
vars: vars:
# List of ironic drivers that require virtualbmc.
vbmc_drivers: >-
{{ bmc_emulators.items() |
selectattr('1', 'eq', 'virtualbmc') |
map(attribute='0') |
list }}
# List of ironic nodes using drivers that require virtualbmc.
vbmc_nodes: >- vbmc_nodes: >-
{{ hostvars.localhost.tenks_state[inventory_hostname].nodes {{ hostvars.localhost.tenks_state[inventory_hostname].nodes |
| default([]) | selectattr('ironic_driver', 'eq', default([]) |
bmc_emulators.virtualbmc) | list }} selectattr('ironic_driver', 'in', vbmc_drivers) |
list }}
tasks: tasks:
- name: Check that enough ports are available for Virtual BMC - name: Check that enough ports are available for Virtual BMC
fail: fail: