def test_renew_not_called(self): s_name = mapper.ApicName('name', 'id') s_name.renew = mock.Mock() self._mock_authenticate() self.mock_response_for_get('fvSubnet', name=s_name) self.apic.fvSubnet.create(mocked.APIC_TENANT, 'bd', s_name) self.assertFalse(s_name.renew.called)
APIC_DOMAIN = 'cumuloNimbus' APIC_L3EXT_DOMAIN = '%s_l3ext' % APIC_SYSTEM_ID APIC_SW_PG_NAME = 'switch_pg' APIC_NODE_PROF = 'red' APIC_FUNC_PROF = 'beta' APIC_ATT_ENT_PROF = 'delta' APIC_L3EXT_FUNC_PROF = '%s_l3ext_function_profile' % APIC_SYSTEM_ID APIC_L3EXT_ATT_ENT_PROF = '%s_l3ext_entity_profile' % APIC_SYSTEM_ID APIC_VLAN_NAME = 'gamma' APIC_VLANID_FROM = 2900 APIC_VLANID_TO = 2999 APIC_VLAN_FROM = 'vlan-%d' % APIC_VLANID_FROM APIC_VLAN_TO = 'vlan-%d' % APIC_VLANID_TO APIC_ROUTER = apic_mapper.ApicName('router', 'router_id') APIC_EXT_SWITCH = '203' APIC_EXT_MODULE = '1' APIC_EXT_PORT = '34' APIC_EXT_ENCAP = 'vlan-100' APIC_EXT_CIDR_EXPOSED = '10.10.40.2/16' APIC_EXT_GATEWAY_IP = '10.10.40.1' class ControllerMixin(object): """Mock the controller for APIC driver and service unit tests.""" def __init__(self): self.response = None