]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Merge "Fixes a typo phys_brs in place of phys_br"
authorJenkins <jenkins@review.openstack.org>
Sat, 1 Aug 2015 11:01:37 +0000 (11:01 +0000)
committerGerrit Code Review <review@openstack.org>
Sat, 1 Aug 2015 11:01:37 +0000 (11:01 +0000)
1  2 
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py

index 5a07d0d2625a040bea0ac2f03f9529f7990488b6,32e7f246f40b61ccfb750d08c39df2262c1f5d50..5930fc50aa3285677be6fb94cc99d89a2fd01a3d
@@@ -1689,18 -1675,21 +1701,24 @@@ class TestOvsDvrNeutronAgent(object)
  
          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(