saltstack/salt — pull request #13961 by whiteinge (2014-07-03 09:05:00+00:00)
Title: Add sync/async Runner calls & sync/async Wheel calls that all respect eauth

This pull request addresses #9324 and sets up the fix for #13930.

These changes are all additive and are backward compatible. (Unless I missed something of course.)

Fix 1: this adds a synchronous function to ``RunnerClient()`` that goes through the ``master_call`` interface. (It does this by watching the event bus.)

Fix 2: this adds an asynchronous function to ``WheelClient()`` that goes through the ``master_call`` interface. (It does this by copying the ``RunnerClient()`` async code.)

Fix: 3: this adds two methods, ``cmd_sync`` and ``cmd_async``, that present a consistent interface between ``RunnerClient()`` and ``WheelClient()`` for executing both sync and async commands that both respect eauth.

Fix 4: this moves some of the duplicate code between ``RunnerClient()`` and ``WheelClient()`` into mixin classes so fixes and additions can be made to both. Other *Client interfaces can easily get sync/async methods by inheriting these. Future changes to how the async behavior works can be made in a single place. (ioflo-centric worker management, anyone?)