예제 #1
0
 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)
예제 #2
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)
예제 #3
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)
예제 #4
0
 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
예제 #5
0
    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
예제 #6
0
    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