mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Begin setting up the event client
This commit is contained in:
parent
fb8f921e49
commit
2c58f08ba5
1 changed files with 9 additions and 0 deletions
|
@ -42,6 +42,7 @@ import zmq
|
|||
import salt.config
|
||||
import salt.payload
|
||||
import salt.utils
|
||||
import salt.utils.event
|
||||
from salt.exceptions import SaltClientError, SaltInvocationError
|
||||
|
||||
# Try to import range from https://github.com/ytoolshed/range
|
||||
|
@ -74,6 +75,7 @@ class LocalClient(object):
|
|||
self.serial = salt.payload.Serial(self.opts)
|
||||
self.key = self.__read_master_key()
|
||||
self.salt_user = self.__get_user()
|
||||
self.event = salt.utils.event.MasterEvent(self.opts['sock_dir'])
|
||||
|
||||
def __read_master_key(self):
|
||||
'''
|
||||
|
@ -619,6 +621,13 @@ class LocalClient(object):
|
|||
return ret
|
||||
time.sleep(0.02)
|
||||
|
||||
def get_event_returns(self, jid, minions, timeout=None):
|
||||
'''
|
||||
Gather the return data from the event system
|
||||
'''
|
||||
if timeout is None:
|
||||
timeout = self.opts['timeout']
|
||||
|
||||
def find_cmd(self, cmd):
|
||||
'''
|
||||
Hunt through the old salt calls for when cmd was run, return a dict:
|
||||
|
|
Loading…
Add table
Reference in a new issue