当前位置: 首页>>代码示例>>Python>>正文


Python extensions.append_api_extensions_path函数代码示例

本文整理汇总了Python中neutron.api.extensions.append_api_extensions_path函数的典型用法代码示例。如果您正苦于以下问题:Python append_api_extensions_path函数的具体用法?Python append_api_extensions_path怎么用?Python append_api_extensions_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了append_api_extensions_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self):
     super(NuagePlugin, self).__init__()
     neutron_extensions.append_api_extensions_path(extensions.__path__)
     config.nuage_register_cfg_opts()
     self.nuageclient_init()
     net_partition = cfg.CONF.RESTPROXY.default_net_partition_name
     self._create_default_net_partition(net_partition)
开发者ID:PFZheng,项目名称:neutron,代码行数:7,代码来源:plugin.py

示例2: __init__

    def __init__(self, server_timeout=None):
        super(NeutronRestProxyV2, self).__init__()
        LOG.info(_('NeutronRestProxy: Starting plugin. Version=%s'),
                 version_string_with_vcs())
        pl_config.register_config()
        self.evpool = eventlet.GreenPool(cfg.CONF.RESTPROXY.thread_pool_size)

        # Include the BigSwitch Extensions path in the api_extensions
        neutron_extensions.append_api_extensions_path(extensions.__path__)

        self.add_meta_server_route = cfg.CONF.RESTPROXY.add_meta_server_route

        # init network ctrl connections
        self.servers = servermanager.ServerPool(server_timeout)
        self.servers.get_topo_function = self._get_all_data
        self.servers.get_topo_function_args = {'get_ports': True,
                                               'get_floating_ips': True,
                                               'get_routers': True}

        self.network_scheduler = importutils.import_object(
            cfg.CONF.network_scheduler_driver
        )

        # setup rpc for security and DHCP agents
        self._setup_rpc()

        if cfg.CONF.RESTPROXY.sync_data:
            self._send_all_data()

        LOG.debug(_("NeutronRestProxyV2: initialization done"))
开发者ID:dobriak,项目名称:neutron,代码行数:30,代码来源:plugin.py

示例3: __init__

    def __init__(self):

        ndb.initialize()
        self.ofc = ofc_manager.OFCManager()
        self.base_binding_dict = self._get_base_binding_dict()
        portbindings_base.register_port_dict_function()

        neutron_extensions.append_api_extensions_path(extensions.__path__)

        self.setup_rpc()
        self.l3_rpc_notifier = nec_router.L3AgentNotifyAPI()

        self.network_scheduler = importutils.import_object(
            config.CONF.network_scheduler_driver
        )
        self.router_scheduler = importutils.import_object(
            config.CONF.router_scheduler_driver
        )

        nec_router.load_driver(self, self.ofc)
        self.port_handlers = {
            'create': {
                const.DEVICE_OWNER_ROUTER_GW: self.create_router_port,
                const.DEVICE_OWNER_ROUTER_INTF: self.create_router_port,
                'default': self.activate_port_if_ready,
            },
            'delete': {
                const.DEVICE_OWNER_ROUTER_GW: self.delete_router_port,
                const.DEVICE_OWNER_ROUTER_INTF: self.delete_router_port,
                'default': self.deactivate_port,
            }
        }
开发者ID:ChengZuo,项目名称:neutron,代码行数:32,代码来源:nec_plugin.py

示例4: __init__

    def __init__(self, server_timeout=None):
        super(NeutronRestProxyV2, self).__init__()
        LOG.info(_('NeutronRestProxy: Starting plugin. Version=%s'),
                 version_string_with_vcs())
        pl_config.register_config()

        # Include the BigSwitch Extensions path in the api_extensions
        neutron_extensions.append_api_extensions_path(extensions.__path__)

        self.add_meta_server_route = cfg.CONF.RESTPROXY.add_meta_server_route

        # init network ctrl connections
        self.servers = servermanager.ServerPool(server_timeout)

        # init dhcp support
        self.topic = topics.PLUGIN
        self.network_scheduler = importutils.import_object(
            cfg.CONF.network_scheduler_driver
        )
        self._dhcp_agent_notifier = dhcp_rpc_agent_api.DhcpAgentNotifyAPI()
        self.agent_notifiers[const.AGENT_TYPE_DHCP] = (
            self._dhcp_agent_notifier
        )
        self.conn = rpc.create_connection(new=True)
        self.callbacks = RpcProxy()
        self.dispatcher = self.callbacks.create_rpc_dispatcher()
        self.conn.create_consumer(self.topic, self.dispatcher,
                                  fanout=False)
        # Consume from all consumers in a thread
        self.conn.consume_in_thread()
        if cfg.CONF.RESTPROXY.sync_data:
            self._send_all_data()

        LOG.debug(_("NeutronRestProxyV2: initialization done"))
开发者ID:yuhui7red,项目名称:neutron,代码行数:34,代码来源:plugin.py

示例5: __init__

    def __init__(self):
        super(MidonetL3ServicePlugin, self).__init__()

        # Instantiate MidoNet API client
        self.client = c_base.load_client(cfg.CONF.MIDONET)

        neutron_extensions.append_api_extensions_path(extensions.__path__)
开发者ID:midonet,项目名称:networking-midonet,代码行数:7,代码来源:l3_midonet.py

示例6: __init__

 def __init__(self):
     # Dynamically change the validators so that they are applicable to
     # the MidoNet implementation of L2GW.
     l2gw_validators.validate_gwdevice_list = (l2gw_midonet_validators.
                                               validate_gwdevice_list)
     neutron_extensions.append_api_extensions_path(l2gateway_ext.__path__)
     super(MidonetL2GatewayPlugin, self).__init__()
开发者ID:yo-iura,项目名称:networking-midonet,代码行数:7,代码来源:plugin.py

示例7: __init__

 def __init__(self):
     extensions.append_api_extensions_path(extensions_pkg.__path__)
     super(ApicL3ServicePlugin, self).__init__()
     self.synchronizer = None
     # NB(tbachman): the mechanism driver depends on the existence
     # of the _apic_driver member. If this member is changed or
     # deleted, the code in the mechanism driver should be changed
     # as well.
     self._apic_driver = apic_driver.ApicL3Driver(self)
开发者ID:noironetworks,项目名称:apic-ml2-driver,代码行数:9,代码来源:l3_apic.py

示例8: __init__

    def __init__(self):
        super(MidonetL3ServicePlugin, self).__init__()

        # Instantiate MidoNet API client
        self.client = c_base.load_client(cfg.CONF.MIDONET)

        # Avoid any side effect from DVR getting set to true
        cfg.CONF.set_override("router_distributed", False)
        neutron_extensions.append_api_extensions_path(extensions.__path__)
开发者ID:gayatrihk,项目名称:networking-midonet,代码行数:9,代码来源:l3_midonet.py

示例9: __init__

 def __init__(self):
     super(NuageFWaaSPlugin, self).__init__()
     from neutron.api import extensions as neutron_extensions
     from neutron_fwaas import extensions
     neutron_extensions.append_api_extensions_path(extensions.__path__)
     self.agent_rpc = NuageNoOpAgent()
     enterprise_name = cfg.CONF.RESTPROXY.default_net_partition_name
     netpart_db = nuagedb.get_net_partition_by_name(db_api.get_session(),
                                                    enterprise_name)
     self.enterprise_id = netpart_db.id
开发者ID:nuagenetworks,项目名称:nuage-openstack-neutron,代码行数:10,代码来源:fwaas_plugin.py

示例10: setUp

 def setUp(self):
     extensions.append_api_extensions_path(dr_extensions.__path__)
     service_plugins = {ext_bgp.BGP_EXT_ALIAS: BGP_PLUGIN}
     super(TestNSXvBgpPlugin, self).setUp(service_plugins=service_plugins)
     self.bgp_plugin = bgp_plugin.NSXvBgpPlugin()
     self.nsxv_driver = self.bgp_plugin.drivers['nsx-v']
     self.nsxv_driver._validate_gateway_network = mock.Mock()
     self.nsxv_driver._validate_bgp_configuration_on_peer_esg = (
         mock.Mock())
     self.plugin = directory.get_plugin()
     self.l3plugin = self.plugin
     self.plugin.init_is_complete = True
     self.context = context.get_admin_context()
     self.project_id = 'dummy_project'
开发者ID:openstack,项目名称:vmware-nsx,代码行数:14,代码来源:test_nsxv_bgp_driver.py

示例11: __init__

    def __init__(self):
        """Load the model class."""
        self._model_name = config.CISCO.model_class
        self._model = importutils.import_object(self._model_name)
        native_bulk_attr_name = ("_%s__native_bulk_support"
                                 % self._model.__class__.__name__)
        self.__native_bulk_support = getattr(self._model,
                                             native_bulk_attr_name, False)

        neutron_extensions.append_api_extensions_path(extensions.__path__)

        # Extend the fault map
        self._extend_fault_map()

        LOG.debug("Plugin initialization complete")
开发者ID:Akanksha08,项目名称:neutron,代码行数:15,代码来源:network_plugin.py

示例12: __init__

    def __init__(self):
        super(NsxDvsV2, self).__init__()
        config.validate_config_options()
        LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled())
        neutron_extensions.append_api_extensions_path([vmware.NSX_EXT_PATH])
        self._dvs = dvs.DvsManager()

        # Common driver code
        self.base_binding_dict = {
            pbin.VIF_TYPE: pbin.VIF_TYPE_DVS,
            pbin.VIF_DETAILS: {
                # TODO(rkukura): Replace with new VIF security details
                pbin.CAP_PORT_FILTER:
                'security-group' in self.supported_extension_aliases}}

        self.setup_dhcpmeta_access()
开发者ID:yxdh,项目名称:vmware-nsx,代码行数:16,代码来源:dvs.py

示例13: setUp

    def setUp(self):
        # Enable the test mechanism driver to ensure that
        # we can successfully call through to all mechanism
        # driver apis.
        cfg.CONF.set_override('mechanism_drivers',
                ['logger_plus', 'test'], group='ml2')
        cfg.CONF.set_override('network_vlan_ranges',
                ['physnet1:1000:1099'], group='ml2_type_vlan')

        extensions.append_api_extensions_path(
            gbpservice.neutron.extensions.__path__)
        super(Ml2PlusPluginV2TestCase, self).setUp(PLUGIN_NAME)
        ext_mgr = extensions.PluginAwareExtensionManager.get_instance()
        self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)
        self.port_create_status = 'DOWN'
        self.plugin = directory.get_plugin()
开发者ID:openstack,项目名称:group-based-policy,代码行数:16,代码来源:test_plugin.py

示例14: setUp

    def setUp(self, core_plugin=None, sc_plugin=None, service_plugins=None,
              ext_mgr=None):
        extensions.append_api_extensions_path(gbp.neutron.extensions.__path__)
        if not sc_plugin:
            sc_plugin = DB_GP_PLUGIN_KLASS
        self.plugin = importutils.import_object(sc_plugin)
        if not service_plugins:
            service_plugins = {'sc_plugin_name': sc_plugin}

        super(ServiceChainDbTestCase, self).setUp(
            plugin=core_plugin, ext_mgr=ext_mgr,
            service_plugins=service_plugins
        )

        if not ext_mgr:
            ext_mgr = extensions.PluginAwareExtensionManager.get_instance()
            self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)
开发者ID:yapengwu,项目名称:group-based-policy,代码行数:17,代码来源:test_servicechain_db.py

示例15: __init__

    def __init__(self):
        """Override initialization to avoid any RPC setup as MidoNet does not
        rely on any agent to implement FWaaS.  Instead, set the rpc handling
        to the _MidonetFirewallDriver class so that it handles the FWaaS update
        events.
        """

        # Register the FWaaS extensions path
        neutron_extensions.append_api_extensions_path(extensions.__path__)

        # Although callbacks are unnecessary in midonet, use FirewallCallbacks
        # because it contains useful methods for DB updates.
        self.callbacks = fw_plugin.FirewallCallbacks(self)
        self.client = c_base.load_client(cfg.CONF.MIDONET)
        self.agent_rpc = _MidonetFirewallDriver(self.client, self.callbacks)
        self.endpoints = [self.callbacks]  # So that tests don't complain
        firewall_db.subscribe()
开发者ID:Prabhat2015,项目名称:networking-midonet,代码行数:17,代码来源:plugin.py


注:本文中的neutron.api.extensions.append_api_extensions_path函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。