Ironic inspector port_physnet_cidr_map support

Add support for laying out the configuration for
the physnet_cidr_map processing hook in ironic
inspector.

Also enable the physnet_cidr_map processing hook
by adding it to IronicInspectorExtraProcessingHooks
default.

Depends-On: https://review.opendev.org/722066
Related-Bug: #1870529
Change-Id: I5f0f3b254edf25fdcfa328f42d8bf4324e5bbd0d
This commit is contained in:
Harald Jensås 2020-04-22 19:00:55 +02:00
parent 5e62d5da1d
commit 2c2f8c4c79
2 changed files with 21 additions and 1 deletions

View File

@ -82,7 +82,7 @@ parameters:
description: Comma-separated list of IPA inspection collectors
type: string
IronicInspectorExtraProcessingHooks:
default: extra_hardware,lldp_basic,local_link_connection
default: extra_hardware,lldp_basic,local_link_connection,physnet_cidr_map
description: |
Comma-separated list of processing hooks to append to the default list.
type: string
@ -164,6 +164,17 @@ parameters:
default: []
description: List of additional architectures to enable.
type: comma_delimited_list
PortPhysnetCidrMap:
default: {}
description: |
Mapping of IP subnet CIDR to physical network. When the physnet_cidr_map
processing hook is enabled the physical_network property of baremetal
ports is populated based on this mapping.
Example:
PortPhysnetCidrMap:
'10.10.10.0/24': 'physnet_a'
'2001:db8::/64': 'physnet_b'
type: json
conditions:
enable_ipxe: {equals : [{get_param: IronicInspectorIPXEEnabled}, true]}
@ -281,6 +292,7 @@ outputs:
ironic::inspector::additional_processing_hooks: {get_param: IronicInspectorExtraProcessingHooks}
ironic::inspector::ramdisk_collectors: {get_param: IronicInspectorCollectors}
ironic::inspector::ramdisk_kernel_args: {get_param: IronicInspectorKernelArgs}
ironic::inspector::port_physnet_cidr_map: {get_param: PortPhysnetCidrMap}
ironic::inspector::db::database_connection:
make_url:
scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}

View File

@ -0,0 +1,8 @@
---
features:
- |
Added the parameter ``PortPhysnetCidrMap`` in the ironic inspector service
template. The parameter takes a mapping of IP subnet CIDR to physical
network. When the ``physnet_cidr_map`` processing hook is enabled the
physical_network property of baremetal ports is populated based on this
mapping. See Bug: `1870529 <https://launchpad.net/bugs/1870529>`_.