#NEWLINE# def add( event , reactors , saltenv = 'base' , test = None ) : #NEWLINE# #INDENT# "\n    Add a new reactor\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt-run reactor.add 'salt/cloud/*/destroyed' reactors='/srv/reactor/destroy/*.sls'\n    " #NEWLINE# if isinstance ( reactors , string_types ) : #NEWLINE# #INDENT# reactors = [ reactors ] #NEWLINE# #UNINDENT# sevent = salt . utils . event . get_event ( 'master' , __opts__ [ 'sock_dir' ] , __opts__ [ 'transport' ] , opts = __opts__ , listen = True ) #NEWLINE# __jid_event__ . fire_event ( { #NEWLINE# #INDENT# 'event' : event , #NEWLINE# 'reactors' : reactors , #NEWLINE# #UNINDENT# } , 'salt/reactors/manage/add' ) #NEWLINE# res = sevent . get_event ( wait = 30 , tag = 'salt/reactors/manage/add-complete' ) #NEWLINE# return test [ 'result' ]