diff --git a/network/service_net_map.j2.yaml b/network/service_net_map.j2.yaml index a87f5f914f..a53d5e2fb9 100644 --- a/network/service_net_map.j2.yaml +++ b/network/service_net_map.j2.yaml @@ -127,7 +127,11 @@ resources: - {get_param: ServiceNetMapDefaults} - values: {%- for network in networks %} +{%- if network.service_net_map_replace is defined %} + {{network.service_net_map_replace}}: {{network.name_lower}} +{%- else %} {{network.name_lower}}: {get_param: {{network.name}}NetName} +{%- endif %} {%- endfor %} - map_replace: - {get_param: ServiceNetMap} diff --git a/network_data.yaml b/network_data.yaml index 7d96eec532..e2a5f32349 100644 --- a/network_data.yaml +++ b/network_data.yaml @@ -5,6 +5,9 @@ # name: Name of the network (mandatory) # name_lower: lowercase version of name used for filenames # (optional, defaults to name.lower()) +# service_net_map_replace: if name_lower is set to a custom name this should be set +# to original default (optional). This field is only necessary when +# changing the default network names, not when adding a new custom network. # enabled: Is the network enabled (optional, defaults to true) # NOTE: False will use noop.yaml for unused legacy networks to support upgrades. # vlan: vlan for the network (optional) diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index c014b6e605..bcc28a32de 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -794,14 +794,6 @@ resources: ControlPlaneNetwork: {get_param: NeutronControlPlaneID} PortName: public_virtual_ip FixedIPs: {get_param: PublicVirtualFixedIPs} -{%- elif network.name == 'StorageMgmt' %} - {{network.name}}VirtualIP: - depends_on: Networks - type: OS::TripleO::Network::Ports::{{network.name}}VipPort - properties: - ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]} - PortName: storage_management_virtual_ip - FixedIPs: {get_param: {{network.name}}VirtualFixedIPs} {%- else %} {{network.name}}VirtualIP: depends_on: Networks diff --git a/releasenotes/notes/custom-network-names-c62a57827d98eea5.yaml b/releasenotes/notes/custom-network-names-c62a57827d98eea5.yaml new file mode 100644 index 0000000000..f0cdd6d810 --- /dev/null +++ b/releasenotes/notes/custom-network-names-c62a57827d98eea5.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - The name_lower field in network_data.yaml can be used to + define custom network names but the ServiceNetMap must be + updated with the new names in all places. This change + adds a new field to network_data.yaml - service_net_map_replace, + that should be set to the original name_lower so that ServiceNetMap + will be automatically updated.