def get_apic_manager(): apic_config = cfg.CONF.ml2_cisco_apic network_config = { 'vlan_ranges': cfg.CONF.ml2_type_vlan.network_vlan_ranges, 'switch_dict': config.create_switch_dictionary(), } return apic_manager.APICManager(apic_model.ApicDbModel(), log, network_config, apic_config)
def get_apic_manager(client=True): apic_config = cfg.CONF.ml2_cisco_apic network_config = { 'vlan_ranges': cfg.CONF.ml2_type_vlan.network_vlan_ranges, 'switch_dict': config.create_switch_dictionary(), 'vpc_dict': config.create_vpc_dictionary(), 'external_network_dict': config.create_external_network_dictionary(), } apic_system_id = cfg.CONF.apic_system_id keyclient_param = keyclient if client else None keystone_authtoken = cfg.CONF.keystone_authtoken if client else None return apic_manager.APICManager(apic_model.ApicDbModel(), log, network_config, apic_config, keyclient_param, keystone_authtoken, apic_system_id)
def get_apic_manager(client=True): if not ApicMappingDriver.manager: apic_config = cfg.CONF.ml2_cisco_apic network_config = { 'vlan_ranges': cfg.CONF.ml2_type_vlan.network_vlan_ranges, 'switch_dict': config.create_switch_dictionary(), 'vpc_dict': config.create_vpc_dictionary(), 'external_network_dict': config.create_external_network_dictionary(), } apic_system_id = cfg.CONF.apic_system_id keyclient_param = keyclient if client else None keystone_authtoken = (cfg.CONF.keystone_authtoken if client else None) ApicMappingDriver.manager = apic_manager.APICManager( apic_model.ApicDbModel(), logging, network_config, apic_config, keyclient_param, keystone_authtoken, apic_system_id) ApicMappingDriver.manager.ensure_infra_created_on_apic() ApicMappingDriver.manager.ensure_bgp_pod_policy_created_on_apic() return ApicMappingDriver.manager
def __init__(self): self.db = apic_model.ApicDbModel() apic_conf = cfg.CONF.ml2_cisco_apic self.switch_dict = config.create_switch_dictionary() # Connect to the APIC self.apic = apic_client.RestClient(apic_conf.apic_host, apic_conf.apic_port, apic_conf.apic_username, apic_conf.apic_password) self.port_profiles = {} self.vmm_domain = None self.phys_domain = None self.vlan_ns = None self.node_profiles = {} self.entity_profile = None self.function_profile = None self.clear_node_profiles = apic_conf.apic_clear_node_profiles
def __init__(self): self.db = apic_model.ApicDbModel() apic_conf = cfg.CONF.ml2_cisco_apic self.switch_dict = config.create_switch_dictionary() # Connect to the APIC self.apic = apic_client.RestClient( apic_conf.apic_host, apic_conf.apic_port, apic_conf.apic_username, apic_conf.apic_password ) self.port_profiles = {} self.vmm_domain = None self.phys_domain = None self.vlan_ns = None self.node_profiles = {} self.entity_profile = None self.function_profile = None self.clear_node_profiles = apic_conf.apic_clear_node_profiles