• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python securitygroups_rpc.is_firewall_enabled函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _extend_port_dict_binding

    def _extend_port_dict_binding(self, context, port):
        cfg_vif_type = cfg.CONF.NOVA.vif_type.lower()
        if not cfg_vif_type in (portbindings.VIF_TYPE_OVS,
                                portbindings.VIF_TYPE_IVS):
            LOG.warning(_("Unrecognized vif_type in configuration "
                          "[%s]. Defaulting to ovs."),
                        cfg_vif_type)
            cfg_vif_type = portbindings.VIF_TYPE_OVS
        # In ML2, the host_id is already populated
        if portbindings.HOST_ID in port:
            hostid = port[portbindings.HOST_ID]
        elif 'id' in port:
            hostid = porttracker_db.get_port_hostid(context, port['id'])
        else:
            hostid = None
        if hostid:
            port[portbindings.HOST_ID] = hostid
            override = self._check_hostvif_override(hostid)
            if override:
                cfg_vif_type = override
        port[portbindings.VIF_TYPE] = cfg_vif_type

        sg_enabled = sg_rpc.is_firewall_enabled()
        port[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: sg_enabled
        }
        return port
开发者ID:cboling,项目名称:SDNdbg,代码行数:30,代码来源:plugin.py


示例2: __init__

    def __init__(self, context, plugin_rpc):
        self.context = context
        self.plugin_rpc = plugin_rpc

        if sg_rpc.is_firewall_enabled():
            self.init_firewall()
            self._setup_rpc()
开发者ID:projectcalico,项目名称:calico-neutron,代码行数:7,代码来源:hyperv_neutron_agent.py


示例3: __init__

 def __init__(self):
     sg_enabled = securitygroups_rpc.is_firewall_enabled()
     super(LinuxbridgeMechanismDriver, self).__init__(
         constants.AGENT_TYPE_LINUXBRIDGE,
         portbindings.VIF_TYPE_BRIDGE,
         {portbindings.CAP_PORT_FILTER: sg_enabled})
     lb_qos_driver.register()
开发者ID:cubeek,项目名称:neutron,代码行数:7,代码来源:mech_linuxbridge.py


示例4: _get_base_binding_dict

 def _get_base_binding_dict(self):
     sg_enabled = sg_rpc.is_firewall_enabled()
     vif_details = {portbindings.CAP_PORT_FILTER: sg_enabled,
                    portbindings.OVS_HYBRID_PLUG: sg_enabled}
     binding = {portbindings.VIF_TYPE: portbindings.VIF_TYPE_OVS,
                portbindings.VIF_DETAILS: vif_details}
     return binding
开发者ID:kbijon,项目名称:OpenStack-CVRM,代码行数:7,代码来源:nec_plugin.py


示例5: __init__

 def __init__(self, context, plugin_rpc):
     # Note: as rootwrap is not supported on HyperV, root_helper is
     # passed in as None.
     super(HyperVSecurityAgent, self).__init__(context, plugin_rpc,
                                               root_helper=None)
     if sg_rpc.is_firewall_enabled():
         self._setup_rpc()
开发者ID:afori,项目名称:neutron,代码行数:7,代码来源:hyperv_neutron_agent.py


示例6: __init__

    def __init__(self):
        sg_enabled = securitygroups_rpc.is_firewall_enabled()
        hybrid_plug_required = (not cfg.CONF.SECURITYGROUP.firewall_driver or
            cfg.CONF.SECURITYGROUP.firewall_driver in (
                IPTABLES_FW_DRIVER_FULL, 'iptables_hybrid')) and sg_enabled
        vif_details = {portbindings.CAP_PORT_FILTER: sg_enabled,
                       portbindings.OVS_HYBRID_PLUG: hybrid_plug_required}
        # NOTE(moshele): Bind DIRECT (SR-IOV) port allows
        # to offload the OVS flows using tc to the SR-IOV NIC.
        # We are using OVS mechanism driver because the openvswitch (>=2.8.0)
        # support hardware offload via tc and that allow us to manage the VF by
        # OpenFlow control plane using representor net-device.
        super(OpenvswitchMechanismDriver, self).__init__(
            constants.AGENT_TYPE_OVS,
            portbindings.VIF_TYPE_OVS,
            vif_details)

        # TODO(lajoskatona): move this blacklisting to
        # SimpleAgentMechanismDriverBase. By that e blacklisting and validation
        # of the vnic_types would be available for all mechanism drivers.
        self.supported_vnic_types = self.blacklist_supported_vnic_types(
            vnic_types=[portbindings.VNIC_NORMAL, portbindings.VNIC_DIRECT],
            blacklist=cfg.CONF.OVS_DRIVER.vnic_type_blacklist
        )
        LOG.info("%s's supported_vnic_types: %s",
                 self.agent_type, self.supported_vnic_types)

        ovs_qos_driver.register()
        log_driver.register()
开发者ID:igordcard,项目名称:neutron,代码行数:29,代码来源:mech_openvswitch.py


示例7: __init__

 def __init__(self):
     sg_enabled = securitygroups_rpc.is_firewall_enabled()
     vif_details = {portbindings.CAP_PORT_FILTER: sg_enabled,
                    portbindings.OVS_HYBRID_PLUG: sg_enabled}
     super(OpenvswitchMechanismDriver, self).__init__(
         constants.AGENT_TYPE_OVS,
         portbindings.VIF_TYPE_OVS,
         vif_details)
开发者ID:CloudA,项目名称:neutron,代码行数:8,代码来源:mech_openvswitch.py


示例8: __init__

    def __init__(self, context, plugin_rpc):
        super(HyperVSecurityAgent, self).__init__()
        self.context = context
        self.plugin_rpc = plugin_rpc

        if sg_rpc.is_firewall_enabled():
            self.init_firewall()
            self._setup_rpc()
开发者ID:PFZheng,项目名称:neutron,代码行数:8,代码来源:hyperv_neutron_agent.py


示例9: __init__

 def __init__(self):
     sg_enabled = securitygroups_rpc.is_firewall_enabled()
     hybrid_plug_required = (
         cfg.CONF.SECURITYGROUP.firewall_driver in (IPTABLES_FW_DRIVER_FULL, "iptables_hybrid")
     ) and sg_enabled
     vif_details = {portbindings.CAP_PORT_FILTER: sg_enabled, portbindings.OVS_HYBRID_PLUG: hybrid_plug_required}
     super(OpenvswitchMechanismDriver, self).__init__(
         constants.AGENT_TYPE_OVS, portbindings.VIF_TYPE_OVS, vif_details
     )
开发者ID:klmitch,项目名称:neutron,代码行数:9,代码来源:mech_openvswitch.py


示例10: __init__

    def __init__(self):
        sg_enabled = securitygroups_rpc.is_firewall_enabled()
        vif_details = {portbindings.CAP_PORT_FILTER: sg_enabled, portbindings.OVS_HYBRID_PLUG: sg_enabled}
        super(FortinetMechanismDriver, self).__init__(constants.AGENT_TYPE_OVS, portbindings.VIF_TYPE_OVS, vif_details)

        self._driver = None
        self._fortigate = None
        self.task_manager = tasks.TaskManager()
        self.task_manager.start()
开发者ID:samsu,项目名称:neutron,代码行数:9,代码来源:mech_fortinet.py


示例11: __init__

 def __init__(self):
     sg_enabled = securitygroups_rpc.is_firewall_enabled()
     vif_details = {portbindings.CAP_PORT_FILTER: sg_enabled,
                    portbindings.OVS_HYBRID_PLUG: sg_enabled}
     super(FakeAgentMechanismDriver, self).__init__(
         # NOTE(yamamoto): l2pop driver has a hardcoded list of
         # supported agent types.
         constants.AGENT_TYPE_OFA,
         portbindings.VIF_TYPE_OVS,
         vif_details)
开发者ID:bradleyjones,项目名称:neutron,代码行数:10,代码来源:mech_fake_agent.py


示例12: __init__

 def __init__(self):
     self.vif_type = dvs_const.DVS
     sg_enabled = securitygroups_rpc.is_firewall_enabled()
     self.vif_details = {portbindings.CAP_PORT_FILTER: sg_enabled,
                         portbindings.OVS_HYBRID_PLUG: sg_enabled}
     self.context = context.get_admin_context_without_session()
     self.dvs_notifier = dvs_agent_rpc_api.DVSClientAPI(self.context)
     LOG.info(_LI('DVS_notifier'))
     super(VMwareDVSMechanismDriver, self).__init__(
         dvs_const.AGENT_TYPE_DVS,
         self.vif_type,
         self.vif_details)
开发者ID:Zlei1115,项目名称:networking-vsphere,代码行数:12,代码来源:dvs_mechanism_driver.py


示例13: delete_port_postcommit

 def delete_port_postcommit(self, current, original, segment):
     try:
         dvs = self._lookup_dvs_for_context(segment)
     except exceptions.NoDVSForPhysicalNetwork:
         raise exceptions.InvalidSystemState(
             details=_("Port %(port_id)s belong to VMWare VM, but there is " "no mapping from network to DVS.")
             % {"port_id": current["id"]}
         )
     else:
         if sg_rpc.is_firewall_enabled():
             key = current.get("binding:vif_details", {}).get("dvs_port_key")
             if key:
                 dvs.remove_block(key)
         else:
             dvs.release_port(current)
开发者ID:VTabolin,项目名称:vmware-dvs,代码行数:15,代码来源:dvs_neutron_agent.py


示例14: __init__

 def __init__(self):
     sg_enabled = securitygroups_rpc.is_firewall_enabled()
     hybrid_plug_required = (not cfg.CONF.SECURITYGROUP.firewall_driver or
         cfg.CONF.SECURITYGROUP.firewall_driver in (
             IPTABLES_FW_DRIVER_FULL, 'iptables_hybrid')) and sg_enabled
     vif_details = {portbindings.CAP_PORT_FILTER: sg_enabled,
                    portbindings.OVS_HYBRID_PLUG: hybrid_plug_required}
     # NOTE(moshele): Bind DIRECT (SR-IOV) port allows
     # to offload the OVS flows using tc to the SR-IOV NIC.
     # We are using OVS mechanism driver because the openvswitch (>=2.8.0)
     # support hardware offload via tc and that allow us to manage the VF by
     # OpenFlow control plane using representor net-device.
     super(OpenvswitchMechanismDriver, self).__init__(
         constants.AGENT_TYPE_OVS,
         portbindings.VIF_TYPE_OVS,
         vif_details, supported_vnic_types=[portbindings.VNIC_NORMAL,
                                            portbindings.VNIC_DIRECT])
     ovs_qos_driver.register()
     log_driver.register()
开发者ID:cubeek,项目名称:neutron,代码行数:19,代码来源:mech_openvswitch.py


示例15: __init__

 def __init__(self, context, plugin_rpc):
     super(VBoxSecurityAgent, self).__init__(context, plugin_rpc)
     if sg_rpc.is_firewall_enabled():
         self._setup_rpc()
开发者ID:alexcoman,项目名称:vbox-neutron-agent,代码行数:4,代码来源:vbox_neutron_agent.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap