def setUp(self): super(TestCiscoApicMechDriver, self).setUp() mocked.ControllerMixin.set_up_mocks(self) mocked.ConfigMixin.set_up_mocks(self) mocked.DbModelMixin.set_up_mocks(self) self.mock_apic_manager_login_responses() self.driver = md.APICMechanismDriver() self.driver.vif_type = 'test-vif_type' self.driver.cap_port_filter = 'test-cap_port_filter'
def setUp(self): super(TestCiscoApicMechDriver, self).setUp() mocked.ControllerMixin.set_up_mocks(self) mocked.ConfigMixin.set_up_mocks(self) self.mock_apic_manager_login_responses() self.driver = md.APICMechanismDriver() self.driver.synchronizer = None md.APICMechanismDriver.get_base_synchronizer = mock.Mock() self.driver.vif_type = 'test-vif_type' self.driver.cap_port_filter = 'test-cap_port_filter' self.driver.name_mapper = mock.Mock() self.driver.name_mapper.tenant.return_value = mocked.APIC_TENANT self.driver.name_mapper.network.return_value = mocked.APIC_NETWORK self.driver.name_mapper.subnet.return_value = mocked.APIC_SUBNET self.driver.name_mapper.port.return_value = mocked.APIC_PORT self.driver.name_mapper.router.return_value = mocked.APIC_ROUTER self.driver.name_mapper.app_profile.return_value = mocked.APIC_AP self.driver.apic_manager = mock.Mock( name_mapper=mock.Mock(), ext_net_dict=self.external_network_dict) self.driver.apic_manager.apic.transaction = self.fake_transaction