Make sure overlay_ip_version is treated as string

puppet throws error if overlay_ip_version is passed in through hiera
as an integer. We should make sure this variable is treated as string
for the 'in' operator.

Closes-Bug: #1691502

Change-Id: I1c034e8018c959672b106e2d57992cf93b945d8a
Signed-off-by: Feng Pan <fpan@redhat.com>
This commit is contained in:
Feng Pan 2017-05-17 11:39:31 -04:00
parent 79a312bb15
commit e3e4a9cf57

View File

@ -171,7 +171,7 @@ class neutron::plugins::ml2 (
warning ('supported_pci_vendor_devs is deprecated, has no effect and will be removed in a future release.')
}
if !is_service_default($overlay_ip_version) and !($overlay_ip_version in [4, 6]) {
if !is_service_default($overlay_ip_version) and !("${overlay_ip_version}" in ['4', '6']) {
fail('Invalid IP version for overlay_ip_version')
}