本文整理汇总了Python中neutron.db.portbindings_base.register_port_dict_function函数的典型用法代码示例。如果您正苦于以下问题:Python register_port_dict_function函数的具体用法?Python register_port_dict_function怎么用?Python register_port_dict_function使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了register_port_dict_function函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __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
示例2: __init__
def __init__(self):
"""Initialize Brocade Plugin.
Specify switch address and db configuration.
"""
super(BrocadePluginV2, self).__init__()
self.supported_extension_aliases = ["binding", "security-group",
"external-net", "router",
"extraroute", "agent",
"l3_agent_scheduler",
"dhcp_agent_scheduler"]
self.physical_interface = (cfg.CONF.PHYSICAL_INTERFACE.
physical_interface)
self.base_binding_dict = self._get_base_binding_dict()
portbindings_base.register_port_dict_function()
self.ctxt = n_context.get_admin_context()
self._vlan_bitmap = vbm.VlanBitmap(self.ctxt)
self._setup_rpc()
self.network_scheduler = importutils.import_object(
cfg.CONF.network_scheduler_driver
)
self.router_scheduler = importutils.import_object(
cfg.CONF.router_scheduler_driver
)
self.brocade_init()
self.start_periodic_dhcp_agent_status_check()
开发者ID:davidcusatis,项目名称:neutron,代码行数:28,代码来源:NeutronPlugin.py
示例3: __init__
def __init__(self, configfile=None):
super(RyuNeutronPluginV2, self).__init__()
self.base_binding_dict = {
portbindings.VIF_TYPE: portbindings.VIF_TYPE_OVS,
portbindings.VIF_DETAILS: {
# TODO(rkukura): Replace with new VIF security details
portbindings.CAP_PORT_FILTER:
'security-group' in self.supported_extension_aliases,
portbindings.OVS_HYBRID_PLUG: True
}
}
portbindings_base.register_port_dict_function()
self.tunnel_key = db_api_v2.TunnelKey(
cfg.CONF.OVS.tunnel_key_min, cfg.CONF.OVS.tunnel_key_max)
self.ofp_api_host = cfg.CONF.OVS.openflow_rest_api
if not self.ofp_api_host:
raise n_exc.Invalid(_('Invalid configuration. check ryu.ini'))
self.client = client.OFPClient(self.ofp_api_host)
self.tun_client = client.TunnelClient(self.ofp_api_host)
self.iface_client = client.NeutronIfaceClient(self.ofp_api_host)
for nw_id in rest_nw_id.RESERVED_NETWORK_IDS:
if nw_id != rest_nw_id.NW_ID_UNKNOWN:
self.client.update_network(nw_id)
self._setup_rpc()
# register known all network list on startup
self._create_all_tenant_network()
开发者ID:xiandiancloud,项目名称:neutron,代码行数:28,代码来源:ryu_neutron_plugin.py
示例4: __init__
def __init__(self):
super(NeutronPluginContrailCoreBase, self).__init__()
portbindings_base.register_port_dict_function()
cfg.CONF.register_opts(vnc_opts, 'APISERVER')
cfg.CONF.register_opts(analytics_opts, 'COLLECTOR')
cfg.CONF.register_opts(vrouter_opts, 'VROUTER')
self._parse_class_args()
开发者ID:litdong001,项目名称:contrail-neutron-plugin,代码行数:7,代码来源:contrail_plugin_base.py
示例5: __init__
def __init__(self):
super(NeutronPluginContrailCoreBase, self).__init__()
if hasattr(portbindings_base, 'register_port_dict_function'):
portbindings_base.register_port_dict_function()
utils.register_vnc_api_options()
self._parse_class_args()
self.api_servers = utils.RoundRobinApiServers()
开发者ID:Juniper,项目名称:contrail-neutron-plugin,代码行数:7,代码来源:contrail_plugin_base.py
示例6: __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()
# Set the plugin default extension path
# if no api_extensions_path is specified.
if not config.CONF.api_extensions_path:
config.CONF.set_override('api_extensions_path',
'neutron/plugins/nec/extensions')
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:qingw,项目名称:neutron,代码行数:35,代码来源:nec_plugin.py
示例7: __init__
def __init__(self, configfile=None):
self._db = hyperv_db.HyperVPluginDB()
self.base_binding_dict = {portbindings.VIF_TYPE: portbindings.VIF_TYPE_HYPERV}
portbindings_base.register_port_dict_function()
self._set_tenant_network_type()
self._parse_network_vlan_ranges()
self._create_network_providers_map()
self._db.sync_vlan_allocations(self._network_vlan_ranges)
self._setup_rpc()
开发者ID:asadoughi,项目名称:neutron,代码行数:11,代码来源:hyperv_neutron_plugin.py
示例8: __init__
def __init__(self):
cfg.CONF.register_opts(vnc_opts, 'APISERVER')
cfg_parser = ConfigParser.ConfigParser()
ContrailPlugin._parse_class_args(cfg_parser)
ContrailPlugin._connect_to_db()
self._cfgdb = ContrailPlugin._cfgdb
ContrailPlugin._tenant_list_from_keystone()
self.base_binding_dict = self._get_base_binding_dict()
portbindings_base.register_port_dict_function()
开发者ID:dsetia,项目名称:neutron,代码行数:12,代码来源:contrailplugin.py
示例9: __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()
# Set the plugin default extension path
# if no api_extensions_path is specified.
if not config.CONF.api_extensions_path:
config.CONF.set_override("api_extensions_path", "neutron/plugins/nec/extensions")
self.setup_rpc()
self.network_scheduler = importutils.import_object(config.CONF.network_scheduler_driver)
self.router_scheduler = importutils.import_object(config.CONF.router_scheduler_driver)
开发者ID:haohonglin,项目名称:neutron,代码行数:15,代码来源:nec_plugin.py
示例10: __init__
def __init__(self):
super(OneConvergencePluginV2, self).__init__()
self.oneconvergence_init()
self.base_binding_dict = {
portbindings.VIF_TYPE: portbindings.VIF_TYPE_OVS}
portbindings_base.register_port_dict_function()
self.setup_rpc()
self.network_scheduler = importutils.import_object(
cfg.CONF.network_scheduler_driver)
self.router_scheduler = importutils.import_object(
cfg.CONF.router_scheduler_driver)
开发者ID:Doude,项目名称:neutron,代码行数:17,代码来源:plugin.py
示例11: __init__
def __init__(self):
super(OneConvergencePluginV2, self).__init__()
self.oneconvergence_init()
self.base_binding_dict = {
portbindings.VIF_TYPE: portbindings.VIF_TYPE_OVS,
portbindings.VIF_DETAILS: {
portbindings.CAP_PORT_FILTER: "security-group" in self.supported_extension_aliases
},
}
portbindings_base.register_port_dict_function()
self.setup_rpc()
self.network_scheduler = importutils.import_object(cfg.CONF.network_scheduler_driver)
self.router_scheduler = importutils.import_object(cfg.CONF.router_scheduler_driver)
开发者ID:AsherBond,项目名称:quantum,代码行数:19,代码来源:plugin.py
示例12: __init__
def __init__(self, configfile=None):
super(RyuNeutronPluginV2, self).__init__()
self.base_binding_dict = self._get_base_binding_dict()
portbindings_base.register_port_dict_function()
self.tunnel_key = db_api_v2.TunnelKey(
cfg.CONF.OVS.tunnel_key_min, cfg.CONF.OVS.tunnel_key_max)
self.ofp_api_host = cfg.CONF.OVS.openflow_rest_api
if not self.ofp_api_host:
raise n_exc.Invalid(_('Invalid configuration. check ryu.ini'))
self.client = client.OFPClient(self.ofp_api_host)
self.tun_client = client.TunnelClient(self.ofp_api_host)
self.iface_client = client.NeutronIfaceClient(self.ofp_api_host)
for nw_id in rest_nw_id.RESERVED_NETWORK_IDS:
if nw_id != rest_nw_id.NW_ID_UNKNOWN:
self.client.update_network(nw_id)
self._setup_rpc()
# register known all network list on startup
self._create_all_tenant_network()
开发者ID:HybridCloud-dew,项目名称:hws,代码行数:20,代码来源:ryu_neutron_plugin.py
示例13: __init__
def __init__(self):
super(NECPluginV2Impl, self).__init__()
self.ofc = ofc_manager.OFCManager(self.safe_reference)
self.l2mgr = l2manager.L2Manager(self.safe_reference)
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 = router_plugin.L3AgentNotifyAPI()
self.network_scheduler = importutils.import_object(
cfg.CONF.network_scheduler_driver
)
self.router_scheduler = importutils.import_object(
cfg.CONF.router_scheduler_driver
)
router_plugin.load_driver(self.safe_reference, self.ofc)
self.start_periodic_dhcp_agent_status_check()
开发者ID:nec-openstack,项目名称:networking-nec-nwa,代码行数:21,代码来源:plugin.py
示例14: __init__
def __init__(self, configfile=None):
self.base_binding_dict = {
portbindings.VIF_TYPE: portbindings.VIF_TYPE_OVS,
portbindings.CAPABILITIES: {
portbindings.CAP_PORT_FILTER:
'security-group' in self.supported_extension_aliases}}
portbindings_base.register_port_dict_function()
db.configure_db()
self.tunnel_key = db_api_v2.TunnelKey(
cfg.CONF.OVS.tunnel_key_min, cfg.CONF.OVS.tunnel_key_max)
self.ofp_api_host = cfg.CONF.OVS.openflow_rest_api
if not self.ofp_api_host:
raise q_exc.Invalid(_('Invalid configuration. check ryu.ini'))
self.client = client.OFPClient(self.ofp_api_host)
self.tun_client = client.TunnelClient(self.ofp_api_host)
self.iface_client = client.NeutronIfaceClient(self.ofp_api_host)
for nw_id in rest_nw_id.RESERVED_NETWORK_IDS:
if nw_id != rest_nw_id.NW_ID_UNKNOWN:
self.client.update_network(nw_id)
self._setup_rpc()
# register known all network list on startup
self._create_all_tenant_network()
开发者ID:Taejun,项目名称:neutron,代码行数:24,代码来源:ryu_neutron_plugin.py
示例15: __init__
def __init__(self):
super(NeutronPluginContrailCoreV2, self).__init__()
portbindings_base.register_port_dict_function()
cfg.CONF.register_opts(vnc_opts, 'APISERVER')
self._parse_class_args()
开发者ID:anirban-c,项目名称:contrail-neutron-plugin,代码行数:5,代码来源:contrail_plugin_core.py
示例16: __init__
def __init__(self):
"""Initialize the plugin class."""
super(NeutronPluginContrailCoreV2, self).__init__()
portbindings_base.register_port_dict_function()
self.base_binding_dict = self._get_base_binding_dict()
开发者ID:AsherBond,项目名称:quantum,代码行数:6,代码来源:contrail_plugin.py
注:本文中的neutron.db.portbindings_base.register_port_dict_function函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论