# Path: networking_sfc/services/flowclassifier/common/exceptions.py
# class FlowClassifierDriverError(exceptions.NeutronException):
# class FlowClassifierException(exceptions.NeutronException):
# class FlowClassifierBadRequest(exceptions.BadRequest, FlowClassifierException):


from oslo_config import cfg
from oslo_log import log
from stevedore.named import NamedExtensionManager
from networking_sfc.services.flowclassifier.common import exceptions as fc_exc
        # ServiceChain bulk operations requires each driver to support them
        self.native_bulk_support = True
        for driver in self.ordered_drivers:
            LOG.info("Initializing Flow Classifier driver '%s'",
                     driver.name)
            driver.obj.initialize()
            self.native_bulk_support &= getattr(driver.obj,
                                                'native_bulk_support', True)

    def _call_drivers(self, method_name, context, raise_orig_exc=False):
        """Helper method for calling a method across all drivers.

        :param method_name: name of the method to call
        :param context: context parameter to pass to each method call
        :param raise_orig_exc: whether or not to raise the original
        driver exception, or use a general one
        """
        for driver in self.ordered_drivers:
            try:
                getattr(driver.obj, method_name)(context)
            except Exception as e:
                # This is an internal failure.
                LOG.exception(e)
                LOG.error(
                    "Flow Classifier driver '%(name)s' "
                    "failed in %(method)s",
                    {'name': driver.name, 'method': method_name}
                )
                if raise_orig_exc:
                    raise

# Path: networking_sfc/services/flowclassifier/common/exceptions.py
# class FlowClassifierDriverError(exceptions.NeutronException):
# class FlowClassifierException(exceptions.NeutronException):
# class FlowClassifierBadRequest(exceptions.BadRequest, FlowClassifierException):


# Path: networking_sfc/services/flowclassifier/driver_manager.py
from oslo_config import cfg
from oslo_log import log
from stevedore.named import NamedExtensionManager
from networking_sfc.services.flowclassifier.common import exceptions as fc_exc

        # ServiceChain bulk operations requires each driver to support them
        self.native_bulk_support = True
        for driver in self.ordered_drivers:
            LOG.info("Initializing Flow Classifier driver '%s'",
                     driver.name)
            driver.obj.initialize()
            self.native_bulk_support &= getattr(driver.obj,
                                                'native_bulk_support', True)

    def _call_drivers(self, method_name, context, raise_orig_exc=False):
        """Helper method for calling a method across all drivers.

        :param method_name: name of the method to call
        :param context: context parameter to pass to each method call
        :param raise_orig_exc: whether or not to raise the original
        driver exception, or use a general one
        """
        for driver in self.ordered_drivers:
            try:
                getattr(driver.obj, method_name)(context)
            except Exception as e:
                # This is an internal failure.
                LOG.exception(e)
                LOG.error(
                    "Flow Classifier driver '%(name)s' "
                    "failed in %(method)s",
                    {'name': driver.name, 'method': method_name}
                )
                if raise_orig_exc:
                    raise

                raise fc_exc.FlowClassifierDriverError(