mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Add support to detect the backend to the factory
This commit is contained in:
parent
4ad8a04d3b
commit
ebead18ee8
@ -147,6 +147,13 @@ class AsyncPubChannel(AsyncChannel):
|
|||||||
ttype = opts['transport']
|
ttype = opts['transport']
|
||||||
elif 'transport' in opts.get('pillar', {}).get('master', {}):
|
elif 'transport' in opts.get('pillar', {}).get('master', {}):
|
||||||
ttype = opts['pillar']['master']['transport']
|
ttype = opts['pillar']['master']['transport']
|
||||||
|
if ttype == 'detect':
|
||||||
|
opts['__last_transport'] = 'tcp'
|
||||||
|
opts['transport'] = 'tcp'
|
||||||
|
ttype = opts['transport']
|
||||||
|
elif '__last_transport' in opts:
|
||||||
|
opts['transport'] = 'zeromq' if opts['transport'] == 'tcp' else 'tcp'
|
||||||
|
ttype = opts['transport']
|
||||||
|
|
||||||
# switch on available ttypes
|
# switch on available ttypes
|
||||||
if ttype == 'zeromq':
|
if ttype == 'zeromq':
|
||||||
|
Loading…
Reference in New Issue
Block a user