def send_source (hosts, tree, filename):
if source_available_at (hosts):
return True
# need to send a copy of source to hosts which don't have it
send_tree = remove_hosts_from_tree (hosts, tree)
req = {'api': 'send_source'}
req.update ({'tree': send_tree})
req.update ({'name': filename})
resp, content = r.post (controller, json.dumps (req, default=json_util.default), "pathdump")
return source_available_at (json.loads (content, object_hook=json_util.object_hook))
评论列表
文章目录