def _services(ip, timeout, *extra_args):
args = ['ssh', ip, '-t']
if extra_args:
args += list(extra_args)
args += ['-o', 'StrictHostKeyChecking no',
'-o', 'ConnectTimeout %d' % timeout,
'-o', 'BatchMode yes',
'--',
'cat', '/etc/aeriscloud.d/*']
try:
return [
dict(zip(
['name', 'port', 'path'],
service.strip().split(',')
))
for service in check_output(args).split('\n')
if service
]
except CalledProcessError:
return []
评论列表
文章目录