Merge pull request #13858 from whiteinge/raet-auth-mktoken

Raet auth mktoken
This commit is contained in:
Thomas S Hatch 2014-06-30 19:02:49 -06:00
commit 0d7e0b7f29
2 changed files with 7 additions and 5 deletions

View File

@ -320,9 +320,10 @@ class Resolver(object):
tdata = sreq.send('clear', load)
return tdata
elif self.opts['transport'] == 'raet':
sreq = salt.transport.Channel(
sreq = salt.transport.Channel.factory(
self.opts)
sreq.route['dst'] = (None, None, 'local_cmd')
sreq.route['src'] = (None, sreq.stack.local.name, None)
tdata = sreq.send(load)
return tdata

View File

@ -60,12 +60,13 @@ class RAETChannel(Channel):
'''
Prepare the stack objects
'''
id = self.opts.get('id', 'master')
yid = salt.utils.gen_jid()
stackname = self.opts['id'] + yid
stackname = id + yid
dirpath = os.path.join(self.opts['cachedir'], 'raet')
self.stack = LaneStack(
name=stackname,
lanename=self.opts['id'],
lanename=id,
yid=yid,
basedirpath=dirpath,
sockdirpath=self.opts['sock_dir'])
@ -73,10 +74,10 @@ class RAETChannel(Channel):
self.router_yard = yarding.RemoteYard(
stack=self.stack,
yid=0,
lanename=self.opts['id'],
lanename=id,
dirpath=self.opts['sock_dir'])
self.stack.addRemote(self.router_yard)
src = (self.opts['id'], self.stack.local.name, None)
src = (id, self.stack.local.name, None)
dst = ('master', None, 'remote_cmd')
self.route = {'src': src, 'dst': dst}