Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Num Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword ListLoad Str Str keyword Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr Dict AttributeLoad NameLoad attr NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr DictComp NameLoad IfExp CompareEq NameLoad AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Raise Call AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Dict Str Str SubscriptLoad AttributeLoad NameLoad attr Index Str SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Return Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Return If CompareEq NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad If SubscriptLoad NameLoad Index Str body If Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Return orelse Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad NameLoad body Assign NameStore IfExp CompareIs NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Dict Str Str NameLoad ListLoad AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad keyword NameLoad body If Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr If CompareIn NameLoad AttributeLoad NameLoad attr body If NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Dict Expr Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad Return CompareIn SubscriptLoad NameLoad Index AttributeLoad NameLoad attr NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Dict If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr orelse Raise Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore NameLoad body TryExcept body Assign TupleStore NameStore NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Call NameLoad Str NameLoad decorator_list NameLoad decorator_list
N/A neutron_lib constants oslo_config cfg oslo_log log neutron._i18n _ _LE _LW neutron.extensions portbindings neutron.plugins.common constants p_const neutron.plugins.ml2 driver_api api neutron.plugins.ml2.drivers.mech_sriov.mech_driver exceptions exc neutron.services.qos qos_consts N/A LOG N/A N/A log getLogger __name__ N/A VIF_TYPE_HW_VEB hw_veb N/A VIF_TYPE_HOSTDEV_PHY hostdev_physical N/A FLAT_VLAN 0 N/A sriov_opts N/A N/A N/A cfg ListOpt supported_pci_vendor_devs default N/A 15b3:1004 8086:10ca help N/A _ Comma-separated list of supported PCI vendor devices, as defined by vendor_id:product_id according to the PCI ID Repository. Default enables support for Intel and Mellanox SR-IOV capable NICs. N/A N/A N/A N/A cfg CONF register_opts sriov_opts ml2_sriov SriovNicSwitchMechanismDriver N/A N/A api MechanismDriver N/A N/A Mechanism Driver for SR-IOV capable NIC based switching.

    The SriovNicSwitchMechanismDriver integrates the ml2 plugin with the
    sriovNicSwitch L2 agent depending on configuration option.
    Port binding with this driver may require the sriovNicSwitch agent
    to be running on the port's host, and that agent to have connectivity
    to at least one segment of the port's network.
    L2 agent is not essential for port binding; port binding is handled by
    VIF Driver via libvirt domain XML.
    L2 Agent presents in  order to manage port update events.
     N/A supported_qos_rule_types N/A N/A qos_consts RULE_TYPE_BANDWIDTH_LIMIT __init__ N/A N/A self agent_type vif_details supported_vnic_types supported_pci_vendor_info N/A N/A constants AGENT_TYPE_NIC_SWITCH N/A N/A portbindings CAP_PORT_FILTER False N/A N/A portbindings VNIC_DIRECT N/A portbindings VNIC_MACVTAP N/A portbindings VNIC_DIRECT_PHYSICAL None N/A N/A Initialize base class for SriovNicSwitch L2 agent type.

        :param agent_type: Constant identifying agent type in agents_db
        :param vif_details: Dictionary with details for VIF driver when bound
        :param supported_vnic_types: The binding:vnic_type values we can bind
        :param supported_pci_vendor_info: The pci_vendor_info values to bind
         N/A N/A self agent_type agent_type N/A N/A self supported_vnic_types supported_vnic_types N/A N/A self vnic_type_for_vif_type N/A vtype N/A N/A vtype N/A portbindings VNIC_DIRECT_PHYSICAL VIF_TYPE_HOSTDEV_PHY VIF_TYPE_HW_VEB N/A vtype N/A self supported_vnic_types N/A N/A self vif_details vif_details N/A N/A self supported_network_types N/A N/A p_const TYPE_VLAN N/A p_const TYPE_FLAT N/A initialize N/A N/A self N/A N/A N/A N/A N/A N/A self pci_vendor_info N/A N/A N/A cfg CONF ml2_sriov supported_pci_vendor_devs N/A N/A N/A self _check_pci_vendor_config N/A self pci_vendor_info N/A N/A N/A ValueError N/A N/A N/A N/A LOG exception N/A _LE Failed to parse supported PCI vendor devices N/A N/A N/A cfg Error N/A _ Parsing supported pci_vendor_devs failed N/A bind_port N/A N/A self context N/A N/A N/A N/A N/A LOG debug Attempting to bind port %(port)s on network %(network)s N/A port network N/A N/A context current N/A id N/A N/A N/A context network current N/A id N/A vnic_type N/A N/A N/A context current get N/A portbindings VNIC_TYPE N/A portbindings VNIC_NORMAL N/A N/A vnic_type N/A self supported_vnic_types N/A N/A N/A N/A LOG debug Refusing to bind due to unsupported vnic_type: %s vnic_type N/A N/A vif_type N/A N/A N/A self vnic_type_for_vif_type get vnic_type VIF_TYPE_HW_VEB N/A N/A N/A N/A self _check_supported_pci_vendor_device context N/A N/A N/A N/A LOG debug Refusing to bind due to unsupported pci_vendor device N/A N/A N/A vnic_type N/A portbindings VNIC_DIRECT_PHYSICAL N/A N/A N/A N/A self try_to_bind context None vif_type N/A N/A agent N/A N/A context host_agents N/A self agent_type N/A N/A N/A N/A LOG debug Checking agent: %s agent N/A N/A agent N/A alive N/A N/A N/A N/A self try_to_bind context agent vif_type N/A N/A N/A N/A N/A N/A LOG warning N/A _LW Attempting to bind with dead agent: %s agent N/A try_to_bind N/A N/A self context agent vif_type N/A N/A N/A segment N/A context segments_to_bind N/A N/A N/A N/A self check_segment segment agent N/A N/A port_status N/A N/A agent None N/A constants PORT_STATUS_ACTIVE N/A constants PORT_STATUS_DOWN N/A N/A N/A context set_binding N/A segment N/A N/A api ID vif_type N/A N/A self _get_vif_details segment port_status N/A N/A N/A LOG debug Bound using segment: %s segment N/A True N/A False N/A filter_hosts_with_segment_access N/A N/A self context segments candidate_hosts agent_getter N/A N/A N/A hosts N/A set N/A filters N/A host agent_type candidate_hosts N/A N/A self agent_type N/A agent N/A agent_getter context filters filters N/A N/A N/A any N/A N/A N/A self check_segment s agent N/A s segments N/A N/A N/A N/A hosts add N/A agent N/A host N/A hosts N/A check_segment N/A N/A self segment agent N/A None N/A N/A Check if segment can be bound.

        :param segment: segment dictionary describing segment to bind
        :param agent: agents_db entry describing agent to bind or None
        :returns: True if segment can be bound for agent
         N/A network_type N/A segment N/A N/A api NETWORK_TYPE N/A N/A network_type N/A self supported_network_types N/A N/A agent N/A N/A mappings N/A N/A N/A agent N/A configurations get device_mappings N/A N/A N/A N/A LOG debug Checking segment: %(segment)s for mappings: %(mappings)s  N/A segment mappings segment mappings N/A N/A N/A segment N/A N/A api PHYSICAL_NETWORK mappings N/A True N/A False N/A _check_supported_pci_vendor_device N/A N/A self context N/A N/A N/A N/A self pci_vendor_info N/A N/A profile N/A N/A N/A context current get N/A portbindings PROFILE N/A N/A N/A profile N/A N/A N/A N/A LOG debug Missing profile in port binding N/A False N/A pci_vendor_info N/A N/A profile get pci_vendor_info N/A N/A pci_vendor_info N/A N/A N/A N/A LOG debug Missing pci vendor info in profile N/A False N/A N/A pci_vendor_info N/A self pci_vendor_info N/A N/A N/A N/A LOG debug Unsupported pci_vendor %s pci_vendor_info N/A False N/A True N/A False N/A _get_vif_details N/A N/A self segment N/A N/A N/A network_type N/A segment N/A N/A api NETWORK_TYPE N/A N/A network_type N/A p_const TYPE_FLAT N/A N/A vlan_id FLAT_VLAN N/A N/A N/A network_type N/A p_const TYPE_VLAN N/A N/A vlan_id N/A segment N/A N/A api SEGMENTATION_ID N/A N/A N/A N/A exc SriovUnsupportedNetworkType net_type network_type N/A vif_details N/A N/A N/A self vif_details copy N/A N/A vif_details N/A N/A portbindings VIF_DETAILS_VLAN N/A str vlan_id N/A vif_details N/A _check_pci_vendor_config N/A N/A pci_vendor_list N/A N/A N/A pci_vendor_info pci_vendor_list N/A N/A N/A N/A N/A vendor_id product_id N/A N/A N/A item strip N/A item N/A N/A pci_vendor_info split : N/A N/A item strip N/A N/A N/A ValueError N/A N/A N/A ValueError N/A N/A _ Incorrect pci_vendor_info: "%s", should be pair vendor_id:product_id pci_vendor_info N/A staticmethod N/A