If the gateway IP was not a subnet (IPv4 or IPv6), the network extract
command was generating a network_data.yaml file that had an entry for
gateway_ip set to null. Example:
- dns_domain: storagemgmt.tripleodomain.
mtu: 1400
name: StorageMgmt
name_lower: storage_mgmt
subnets:
storage_mgmt_subnet:
allocation_pools:
- end: 172.16.3.250
start: 172.16.3.4
gateway_ip: null
ip_subnet: 172.16.3.0/24
physical_network: storage_mgmt
routes: []
vlan: 40
vip: true
During "openstack overcloud network provision", the yaml was then
failing validation since null is not a valid string value for gateway_ip
as defined in the schema.
This patch updates the tripleo_overcloud_network_extract module to only
add the gateway_ip[v6] key to the subnet info if it's actually defined
on the subnet object.
Change-Id: I9701064c33c2e319617d90da99db00d10ad68a0f
Signed-off-by: James Slagle <jslagle@redhat.com>