Add default value for name_lower in network_data.yaml to update ServiceNetMap
In Pike and later, the name_lower field in network_data.yaml can be re-defined to contain a custom network name. When this is done the ServiceNetMap field must be overridden to reflect the new name in all places. This changes adds a new optional field to network_data.yaml that should be set to the original default name_lower value. ServiceNetMap will then be automatically updated and will not need to be overridden. This also fixes the VipPort naming for the StorageManagement network to not use a static value. Change-Id: I8a238038122288899cef49faf38ea2c2ffc2176b
This commit is contained in:
parent
e2bbd55a45
commit
d3eb296e19
@ -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}
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user