int_br.reset_mock()
tun_br.reset_mock()
+ phys_br = mock.create_autospec(self.br_phys_cls('br-phys'))
with mock.patch.object(self.agent, 'reclaim_local_vlan'),\
- mock.patch.object(self.agent.plugin_rpc,
- 'update_device_down',
- return_value=None),\
+ mock.patch.object(self.agent.plugin_rpc, 'update_device_list',
+ return_value={
+ 'devices_up': [],
+ 'devices_down': [self._port.vif_id],
+ 'failed_devices_up': [],
+ 'failed_devices_down': []}),\
mock.patch.object(self.agent, 'int_br', new=int_br),\
mock.patch.object(self.agent, 'tun_br', new=tun_br),\
+ mock.patch.dict(self.agent.phys_brs,
+ {self._physical_network: phys_br}),\
mock.patch.object(self.agent.dvr_agent, 'int_br', new=int_br),\
- mock.patch.object(self.agent.dvr_agent, 'tun_br', new=tun_br):
+ mock.patch.object(self.agent.dvr_agent, 'tun_br', new=tun_br),\
+ mock.patch.dict(self.agent.dvr_agent.phys_brs,
+ {self._physical_network: phys_br}):
self.agent.treat_devices_removed([self._port.vif_id])
+ lvid = self.agent.local_vlan_map[self._net_uuid].vlan
if ip_version == 4:
expected = [
mock.call.delete_dvr_process_ipv4(