コード例 #1
0
ファイル: mechanism_apic.py プロジェクト: COSHPC/neutron
 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
ファイル: apic_manager.py プロジェクト: AsherBond/quantum
    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