'Invoked by test cases for injecting failures in plugin.'

def _fail_second_call(self, patched_plugin, orig, *args, **kwargs):

    def second_call(*args, **kwargs):
        raise lib_exc.NeutronException()
    patched_plugin.side_effect = second_call
    return orig(*args, **kwargs)
