Add floating-network-name config option

Added a new configuration option to allow for setting the name
of the floating IP network. Defaults to ext-net.

Change-Id: I71baa14e27b2e3dea88faeede9c65b0c9d8693fa
This commit is contained in:
Nuno Santos 2016-11-17 13:33:52 -05:00
parent c5f0c7d03d
commit 301b0c4460
3 changed files with 12 additions and 0 deletions

View File

@ -39,6 +39,10 @@ options:
type: string
default: "ext_net"
description: "neutron network"
floating-network-name:
type: string
default: "ext-net"
description: "floating IP network"
swift-resource-ip:
type: string
default:

View File

@ -161,6 +161,13 @@ class TempestAdminAdapter(adapters.OpenStackRelationAdapter):
else:
network = networks['networks'][0]
network_info['public_network_id'] = network['id']
networks = neutron_client.list_networks(
name=self.uconfig['floating-network-name'])
if len(networks['networks']) == 0:
hookenv.log("Floating network name not found")
else:
network_info['floating-network-name'] = \
self.uconfig['floating-network-name']
except:
hookenv.log("Neutron is not ready, deferring neutron query")
return network_info

View File

@ -62,6 +62,7 @@ public_network_id={{ identity_admin.network_info.public_network_id }}
dns_servers={{ options.name_server }}
{% endif -%}
tenant_networks_reachable = false
floating_network_name={{ identity_admin.network_info.floating_network_name }}
[network-feature-enabled]
ipv6=false
[object-storage]