summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-16 00:04:13 +0000
committerGerrit Code Review <review@openstack.org>2013-01-16 00:04:13 +0000
commitdd974e3c9dcac8aa932c5fe7cd094c2aed8c7bbe (patch)
treed836fbe46ae63344be18035c14031e408c6ca79d
parentdac10bad5fcd89fda85562d7bfc6658c45126df1 (diff)
parentbdc4860866c432ff4be899ffc444f38efd9e371b (diff)
downloadnova-dd974e3c9dcac8aa932c5fe7cd094c2aed8c7bbe.tar.gz
nova-dd974e3c9dcac8aa932c5fe7cd094c2aed8c7bbe.tar.xz
nova-dd974e3c9dcac8aa932c5fe7cd094c2aed8c7bbe.zip
Merge "Override floating interface on callee side"
-rw-r--r--nova/network/manager.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/network/manager.py b/nova/network/manager.py
index ccdac6f60..7b69c7a36 100644
--- a/nova/network/manager.py
+++ b/nova/network/manager.py
@@ -568,7 +568,7 @@ class FloatingIP(object):
else:
host = network['host']
- interface = CONF.public_interface or floating_ip['interface']
+ interface = floating_ip.get('interface')
if host == self.host:
# i'm the correct host
self._associate_floating_ip(context, floating_address,
@@ -585,6 +585,7 @@ class FloatingIP(object):
def _associate_floating_ip(self, context, floating_address, fixed_address,
interface, instance_uuid):
"""Performs db and driver calls to associate floating ip & fixed ip."""
+ interface = CONF.public_interface or interface
@lockutils.synchronized(unicode(floating_address), 'nova-')
def do_associate():
@@ -642,7 +643,7 @@ class FloatingIP(object):
# send to correct host, unless i'm the correct host
network = self._get_network_by_id(context, fixed_ip['network_id'])
- interface = CONF.public_interface or floating_ip['interface']
+ interface = floating_ip.get('interface')
if network['multi_host']:
instance = self.db.instance_get_by_uuid(context,
fixed_ip['instance_uuid'])
@@ -672,7 +673,7 @@ class FloatingIP(object):
def _disassociate_floating_ip(self, context, address, interface,
instance_uuid):
"""Performs db and driver calls to disassociate floating ip."""
- # disassociate floating ip
+ interface = CONF.public_interface or interface
@lockutils.synchronized(unicode(address), 'nova-')
def do_disassociate():