Merge "ofagent: Fix an argument mismatch bug in commit 9d13ea88"

This commit is contained in:
Jenkins 2014-07-15 21:31:45 +00:00 committed by Gerrit Code Review
commit 8588320194
2 changed files with 4 additions and 2 deletions

View File

@ -1089,7 +1089,8 @@ class OFANeutronAgent(n_rpc.RpcCallback,
def treat_devices_added_or_updated(self, devices):
resync = False
all_ports = dict((p.port_name, p) for p in self._get_ports())
all_ports = dict((p.port_name, p) for p in
self._get_ports(self.int_br))
for device in devices:
LOG.debug(_("Processing port %s"), device)
if device not in all_ports:

View File

@ -438,9 +438,10 @@ class TestOFANeutronAgent(OFAAgentTestCase):
mock.patch.object(self.agent.plugin_rpc, 'update_device_up'),
mock.patch.object(self.agent.plugin_rpc, 'update_device_down'),
mock.patch.object(self.agent, func_name)
) as (get_dev_fn, get_vif_func, upd_dev_up, upd_dev_down, func):
) as (get_dev_fn, _get_ports, upd_dev_up, upd_dev_down, func):
self.assertFalse(self.agent.treat_devices_added_or_updated(
[port.port_name]))
_get_ports.assert_called_once_with(self.agent.int_br)
return func.called
def test_treat_devices_added_updated_ignores_invalid_ofport(self):