def _call_on_drivers(self, method_name, context,
                         continue_on_failure=False):
        error = False
        for driver in self.ordered_mech_drivers:
            try:
                getattr(driver.obj, method_name)(context)
            except Exception:
                LOG.exception(
                    _LE("Mechanism driver '%(name)s' failed in %(method)s"),
                    {'name': driver.name, 'method': method_name}
                )
                error = True
                if not continue_on_failure:
                    break
        if error:
            raise ml2_exc.MechanismDriverError(
                method=method_name
            )
Helper method for calling a method across all mechanism drivers.
dataset/ETHPy150Open openstack/neutron/neutron/plugins/ml2/managers.py/MechanismManager._call_on_drivers