# Path: neutron_taas/common/constants.py
# TAAS = 'TAAS'
# VLAN_RANGE = '0-4095'
# 
# Path: neutron_taas/common/utils.py
# def get_list_from_ranges_str(ranges_str):
# def get_ranges_str_from_list(ranges):
# 
# Path: neutron_taas/services/taas/agents/extensions/taas.py
# LOG = logging.getLogger(__name__)
# OPTS = [
#     cfg.IntOpt(
#         'taas_agent_periodic_interval',
#         default=5,
#         help=_('Seconds between periodic task runs')
#     )
# ]
# class TaasAgentDriver(object):
# class TaasAgentExtension(l2_extension.L2AgentExtension):
#     def initialize(self):
#     def consume_api(self, agent_api):
#     def create_tap_service(self, tap_service):
#     def create_tap_flow(self, tap_flow):
#     def delete_tap_service(self, tap_service):
#     def delete_tap_flow(self, tap_flow):
#     def initialize(self, connection, driver_type):
#     def consume_api(self, agent_api):
#     def handle_port(self, context, port):
#     def delete_port(self, context, port):
# 
# Path: neutron_taas/services/taas/drivers/linux/sriov_nic_exceptions.py
# class SriovNicSwitchDriverInvocationError(qexception.Invalid):
# class PciDeviceNotFoundById(qexception.NotFound):
# class PciSlotNotFound(qexception.NotFound):
# 
# Path: neutron_taas/services/taas/drivers/linux/sriov_nic_utils.py
# LOG = logging.getLogger(__name__)
#         VIRTFN_RE = re.compile(r"virtfn(\d+)")
# class SriovNicUtils(object):
#     def __init__(self):
#     def execute_sysfs_command(self, command, ts_port_params,
#                               src_port_params,
#                               common_vlans_ranges_str,
#                               vf_to_vf_all_vlans, direction):
#     def _get_sysfs_netdev_path(self, pci_addr, pf_interface):
#     def get_ifname_by_pci_address(self, pci_addr, pf_interface=False):
#     def get_mac_by_pci_address(self, pci_addr, pf_interface=False):
#     def get_vf_num_by_pci_address(self, pci_addr):
#     def get_net_name_by_vf_pci_address(self, vfaddress, pf_interface=False):
#     def get_sriov_port_params(self, sriov_port):


from neutron.conf.agent import common
from neutron_taas.common import constants as taas_consts
from neutron_taas.common import utils as common_utils
from neutron_taas.services.taas.agents.extensions import taas as taas_base
from neutron_taas.services.taas.drivers.linux import sriov_nic_exceptions \
    as taas_exc
from neutron_taas.services.taas.drivers.linux import sriov_nic_utils \
    as sriov_utils
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
import threading
                 "port %(id)s, MAC %(port_mac)s, PCI %(pci_slot)s, "
                 "VF-Index %(vf_index)s, PF-Device %(pf_device)s, "
                 "src_vlans %(src_vlans)s; ",
                 {'id': source_port['id'],
                  'port_mac': src_port_params['mac'],
                  'pci_slot': src_port_params['pci_slot'],
                  'vf_index': src_port_params['vf_index'],
                  'pf_device': src_port_params['pf_device'],
                  'src_vlans': src_port_params['src_vlans']})

        LOG.info("TaaS ts_port_params "
                 "port %(id)s, MAC %(port_mac)s, PCI %(pci_slot)s, "
                 "VF-Index %(vf_index)s, PF-Device %(pf_device)s, "
                 "VLAN-Filter %(vlan_filter)s, src_vlans %(src_vlans)s; ",
                 {'id': ts_port['id'],
                  'port_mac': ts_port_params['mac'],
                  'pci_slot': ts_port_params['pci_slot'],
                  'vf_index': ts_port_params['vf_index'],
                  'pf_device': ts_port_params['pf_device'],
                  'vlan_filter': vlan_filter,
                  'src_vlans': ts_port_params['src_vlans']})

        # If no VLAN filter configured on source port, then include all vlans
        if not src_port_params['src_vlans'] or \
                src_port_params['src_vlans'] == '0':
            src_port_params['src_vlans'] = taas_consts.VLAN_RANGE
            LOG.debug("TaaS no src_vlans in src_port")

        # If no VLAN filter configured on probe port, then include all vlans
        if not vlan_filter:

# Path: neutron_taas/common/constants.py
# TAAS = 'TAAS'
# VLAN_RANGE = '0-4095'
# 
# Path: neutron_taas/common/utils.py
# def get_list_from_ranges_str(ranges_str):
# def get_ranges_str_from_list(ranges):
# 
# Path: neutron_taas/services/taas/agents/extensions/taas.py
# LOG = logging.getLogger(__name__)
# OPTS = [
#     cfg.IntOpt(
#         'taas_agent_periodic_interval',
#         default=5,
#         help=_('Seconds between periodic task runs')
#     )
# ]
# class TaasAgentDriver(object):
# class TaasAgentExtension(l2_extension.L2AgentExtension):
#     def initialize(self):
#     def consume_api(self, agent_api):
#     def create_tap_service(self, tap_service):
#     def create_tap_flow(self, tap_flow):
#     def delete_tap_service(self, tap_service):
#     def delete_tap_flow(self, tap_flow):
#     def initialize(self, connection, driver_type):
#     def consume_api(self, agent_api):
#     def handle_port(self, context, port):
#     def delete_port(self, context, port):
# 
# Path: neutron_taas/services/taas/drivers/linux/sriov_nic_exceptions.py
# class SriovNicSwitchDriverInvocationError(qexception.Invalid):
# class PciDeviceNotFoundById(qexception.NotFound):
# class PciSlotNotFound(qexception.NotFound):
# 
# Path: neutron_taas/services/taas/drivers/linux/sriov_nic_utils.py
# LOG = logging.getLogger(__name__)
#         VIRTFN_RE = re.compile(r"virtfn(\d+)")
# class SriovNicUtils(object):
#     def __init__(self):
#     def execute_sysfs_command(self, command, ts_port_params,
#                               src_port_params,
#                               common_vlans_ranges_str,
#                               vf_to_vf_all_vlans, direction):
#     def _get_sysfs_netdev_path(self, pci_addr, pf_interface):
#     def get_ifname_by_pci_address(self, pci_addr, pf_interface=False):
#     def get_mac_by_pci_address(self, pci_addr, pf_interface=False):
#     def get_vf_num_by_pci_address(self, pci_addr):
#     def get_net_name_by_vf_pci_address(self, vfaddress, pf_interface=False):
#     def get_sriov_port_params(self, sriov_port):


# Path: neutron_taas/services/taas/drivers/linux/sriov_nic_taas.py
from neutron.conf.agent import common
from neutron_taas.common import constants as taas_consts
from neutron_taas.common import utils as common_utils
from neutron_taas.services.taas.agents.extensions import taas as taas_base
from neutron_taas.services.taas.drivers.linux import sriov_nic_exceptions \
    as taas_exc
from neutron_taas.services.taas.drivers.linux import sriov_nic_utils \
    as sriov_utils
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import excutils
import threading

                 "port %(id)s, MAC %(port_mac)s, PCI %(pci_slot)s, "
                 "VF-Index %(vf_index)s, PF-Device %(pf_device)s, "
                 "src_vlans %(src_vlans)s; ",
                 {'id': source_port['id'],
                  'port_mac': src_port_params['mac'],
                  'pci_slot': src_port_params['pci_slot'],
                  'vf_index': src_port_params['vf_index'],
                  'pf_device': src_port_params['pf_device'],
                  'src_vlans': src_port_params['src_vlans']})

        LOG.info("TaaS ts_port_params "
                 "port %(id)s, MAC %(port_mac)s, PCI %(pci_slot)s, "
                 "VF-Index %(vf_index)s, PF-Device %(pf_device)s, "
                 "VLAN-Filter %(vlan_filter)s, src_vlans %(src_vlans)s; ",
                 {'id': ts_port['id'],
                  'port_mac': ts_port_params['mac'],
                  'pci_slot': ts_port_params['pci_slot'],
                  'vf_index': ts_port_params['vf_index'],
                  'pf_device': ts_port_params['pf_device'],
                  'vlan_filter': vlan_filter,
                  'src_vlans': ts_port_params['src_vlans']})

        # If no VLAN filter configured on source port, then include all vlans
        if not src_port_params['src_vlans'] or \
                src_port_params['src_vlans'] == '0':
            src_port_params['src_vlans'] = taas_consts.VLAN_RANGE
            LOG.debug("TaaS no src_vlans in src_port")

        # If no VLAN filter configured on probe port, then include all vlans
        if not vlan_filter:

            vlan_filter = taas_consts.VLAN_RANGE