From 2c2f8c4c79c40a7319dc17d335083d19a724f916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Wed, 22 Apr 2020 19:00:55 +0200 Subject: [PATCH] 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 --- .../ironic/ironic-inspector-container-puppet.yaml | 14 +++++++++++++- .../port-physnet-cidr-map-7032fec5a1905314.yaml | 8 ++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/port-physnet-cidr-map-7032fec5a1905314.yaml diff --git a/deployment/ironic/ironic-inspector-container-puppet.yaml b/deployment/ironic/ironic-inspector-container-puppet.yaml index 291c51fd55..3d366f7882 100644 --- a/deployment/ironic/ironic-inspector-container-puppet.yaml +++ b/deployment/ironic/ironic-inspector-container-puppet.yaml @@ -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]} diff --git a/releasenotes/notes/port-physnet-cidr-map-7032fec5a1905314.yaml b/releasenotes/notes/port-physnet-cidr-map-7032fec5a1905314.yaml new file mode 100644 index 0000000000..a95b5fc908 --- /dev/null +++ b/releasenotes/notes/port-physnet-cidr-map-7032fec5a1905314.yaml @@ -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 `_.