Merge "Update dhcp host portbinding on failover"

This commit is contained in:
Jenkins 2015-08-03 15:27:13 +00:00 committed by Gerrit Code Review
commit 05db2fdc67
2 changed files with 3 additions and 0 deletions

View File

@ -233,5 +233,6 @@ class DhcpRpcCallback(object):
'from %(host)s.',
{'port': port,
'host': host})
port['port'][portbindings.HOST_ID] = host
plugin = manager.NeutronManager.get_plugin()
return self._port_action(plugin, context, port, 'update_port')

View File

@ -162,6 +162,7 @@ class TestDhcpRpcCallback(base.BaseTestCase):
}
expected_port = {'port': {'network_id': 'foo_network_id',
'device_owner': constants.DEVICE_OWNER_DHCP,
'binding:host_id': 'foo_host',
'fixed_ips': [{'subnet_id': 'foo_subnet_id'}]
},
'id': 'foo_port_id'
@ -183,6 +184,7 @@ class TestDhcpRpcCallback(base.BaseTestCase):
}
expected_port = {'port': {'network_id': 'foo_network_id',
'device_owner': constants.DEVICE_OWNER_DHCP,
'binding:host_id': 'foo_host',
'fixed_ips': [{'subnet_id': 'foo_subnet_id'}]
},
'id': 'foo_port_id'