mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
commit
224602437a
@ -341,7 +341,7 @@ class Resolver(object):
|
|||||||
self.auth = salt.loader.auth(opts)
|
self.auth = salt.loader.auth(opts)
|
||||||
|
|
||||||
def _send_token_request(self, load):
|
def _send_token_request(self, load):
|
||||||
if self.opts['transport'] == 'zeromq':
|
if self.opts['transport'] in ('zeromq', 'tcp'):
|
||||||
master_uri = 'tcp://' + salt.utils.ip_bracket(self.opts['interface']) + \
|
master_uri = 'tcp://' + salt.utils.ip_bracket(self.opts['interface']) + \
|
||||||
':' + str(self.opts['ret_port'])
|
':' + str(self.opts['ret_port'])
|
||||||
channel = salt.transport.client.ReqChannel.factory(self.opts,
|
channel = salt.transport.client.ReqChannel.factory(self.opts,
|
||||||
|
@ -67,7 +67,7 @@ def _mine_send(load, opts):
|
|||||||
|
|
||||||
|
|
||||||
def _mine_get(load, opts):
|
def _mine_get(load, opts):
|
||||||
if opts.get('transport', '') == 'zeromq':
|
if opts.get('transport', '') in ('zeromq', 'tcp'):
|
||||||
try:
|
try:
|
||||||
load['tok'] = _auth().gen_token('salt')
|
load['tok'] = _auth().gen_token('salt')
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
@ -21,7 +21,7 @@ __virtualname__ = 'publish'
|
|||||||
|
|
||||||
|
|
||||||
def __virtual__():
|
def __virtual__():
|
||||||
return __virtualname__ if __opts__.get('transport', '') == 'zeromq' else False
|
return __virtualname__ if __opts__.get('transport', '') in ('zeromq', 'tcp') else False
|
||||||
|
|
||||||
|
|
||||||
def _parse_args(arg):
|
def _parse_args(arg):
|
||||||
|
@ -38,9 +38,13 @@ class NetapiClient(object):
|
|||||||
Note, this will return an invalid success if the master crashed or was
|
Note, this will return an invalid success if the master crashed or was
|
||||||
not shut down cleanly.
|
not shut down cleanly.
|
||||||
'''
|
'''
|
||||||
|
if self.opts['transport'] == 'tcp':
|
||||||
|
ipc_file = 'publish_pull.ipc'
|
||||||
|
else:
|
||||||
|
ipc_file = 'workers.ipc'
|
||||||
return os.path.exists(os.path.join(
|
return os.path.exists(os.path.join(
|
||||||
self.opts['sock_dir'],
|
self.opts['sock_dir'],
|
||||||
'workers.ipc'))
|
ipc_file))
|
||||||
|
|
||||||
def run(self, low):
|
def run(self, low):
|
||||||
'''
|
'''
|
||||||
|
@ -82,11 +82,9 @@ class AsyncTCPReqChannel(salt.transport.client.ReqChannel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __key(cls, opts, **kwargs):
|
def __key(cls, opts, **kwargs):
|
||||||
if 'master_uri' in kwargs:
|
|
||||||
opts['master_uri'] = kwargs['master_uri']
|
|
||||||
return (opts['pki_dir'], # where the keys are stored
|
return (opts['pki_dir'], # where the keys are stored
|
||||||
opts['id'], # minion ID
|
opts['id'], # minion ID
|
||||||
opts['master_uri'], # master ID
|
kwargs.get('master_uri') or opts.get('master_uri'), # master ID
|
||||||
kwargs.get('crypt', 'aes'), # TODO: use the same channel for crypt
|
kwargs.get('crypt', 'aes'), # TODO: use the same channel for crypt
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ class MatchTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||||||
self.assertNotIn('minion', data.replace('sub_minion', 'stub'))
|
self.assertNotIn('minion', data.replace('sub_minion', 'stub'))
|
||||||
data = self.run_salt('-G "planets:pluto" test.ping')
|
data = self.run_salt('-G "planets:pluto" test.ping')
|
||||||
expect = None
|
expect = None
|
||||||
if self.master_opts['transport'] == 'zeromq':
|
if self.master_opts['transport'] in ('zeromq', 'tcp'):
|
||||||
expect = (
|
expect = (
|
||||||
'No minions matched the target. '
|
'No minions matched the target. '
|
||||||
'No command was sent, no jid was '
|
'No command was sent, no jid was '
|
||||||
|
Loading…
Reference in New Issue
Block a user