Exemple #1
0
 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):
     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