Merge "Handle interface names containing ".", "-" or ":""

This commit is contained in:
Jenkins
2014-06-16 07:15:51 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
if "%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s" {
$localip = $ipaddress_%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s
$iface = regsubst('%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s', '[\.\-\:]', '_', 'G')
$localip = inline_template("<%%= scope.lookupvar('::ipaddress_${iface}') %%>")
} else {
$localip = '%(CONFIG_NEUTRON_OVS_HOST)s'
}

View File

@@ -1,6 +1,7 @@
if "%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s" {
$localip = $ipaddress_%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s
$iface = regsubst('%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s', '[\.\-\:]', '_', 'G')
$localip = inline_template("<%%= scope.lookupvar('::ipaddress_${iface}') %%>")
} else {
$localip = '%(CONFIG_NEUTRON_OVS_HOST)s'
}