{"action":"created","comment":{"url":"https://api.github.com/repos/andrey-malets/ndd/pulls/comments/63595832","id":63595832,"diff_hunk":"@@ -178,26 +187,30 @@ def get_ssh_slave_ndd_cmd(args, slave, slaves):\n     return cmd\n \n \n-def get_ssh_slave_cmds(args):\n+def get_ssh_cmds(args):\n     SSH = ['ssh', '-tt', '-o', 'PasswordAuthentication=no']\n     slaves = args.d\n-    cmds = [(SSH + [slave] + get_ssh_slave_ndd_cmd(args, slave, slaves))\\\n+    cmds = [(SSH + [slave] + get_ssh_slave_cmd(args, slave, slaves))\\\n             for slave in slaves]\n     return cmds\n \n \n def run_ssh_master(args):\n-    cmds = [get_master_ndd_cmd(args)] + get_ssh_slave_cmds(args)\n+    cmds = [get_master_ndd_cmd(args)] + get_ssh_cmds(args)\n     procs = {proc.pid: proc for proc in map(init_process, cmds)}\n     return wait(procs)\n \n \n def run_ssh_slave(args, env):\n-    return subprocess.call(get_ssh_slave_ndd_cmd(args, env))\n+    slave = args.c\n+    slaves = args.S.split(',')\n+    return subprocess.call(get_ssh_slave_ndd_cmd(args, slave, slaves))\n \n \n def main(raw_args, env):\n-    if len(raw_args) > 0 and raw_args[0] == '-S':\n+    if len(raw_args) > 0 and raw_args[0] == '-S' and '-H' in raw_args:","path":"ndd_slurm.py","position":64,"original_position":64,"commit_id":"4c9373b9f1c9d9c38c181e6d7c2bdef44963414a","original_commit_id":"4c9373b9f1c9d9c38c181e6d7c2bdef44963414a","user":{"login":"andrey-malets","id":4633506,"avatar_url":"https://avatars.githubusercontent.com/u/4633506?v=3","gravatar_id":"","url":"https://api.github.com/users/andrey-malets","html_url":"https://github.com/andrey-malets","followers_url":"https://api.github.com/users/andrey-malets/followers","following_url":"https://api.github.com/users/andrey-malets/following{/other_user}","gists_url":"https://api.github.com/users/andrey-malets/gists{/gist_id}","starred_url":"https://api.github.com/users/andrey-malets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrey-malets/subscriptions","organizations_url":"https://api.github.com/users/andrey-malets/orgs","repos_url":"https://api.github.com/users/andrey-malets/repos","events_url":"https://api.github.com/users/andrey-malets/events{/privacy}","received_events_url":"https://api.github.com/users/andrey-malets/received_events","type":"User","site_admin":false},"body":"This can be combined:\r\n```\r\nif len(raw_args > 0) and raw_args[0] == '-S':\r\n    if '-H' in raw_args:\r\n        return run_ssh_slave(...)\r\n    else:\r\n        return run_slave(...)\r\n```","created_at":"2016-05-17T20:19:33Z","updated_at":"2016-05-17T20:19:33Z","html_url":"https://github.com/andrey-malets/ndd/pull/13#discussion_r63595832","pull_request_url":"https://api.github.com/repos/andrey-malets/ndd/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/andrey-malets/ndd/pulls/comments/63595832"},"html":{"href":"https://github.com/andrey-malets/ndd/pull/13#discussion_r63595832"},"pull_request":{"href":"https://api.github.com/repos/andrey-malets/ndd/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/andrey-malets/ndd/pulls/13","id":70422557,"html_url":"https://github.com/andrey-malets/ndd/pull/13","diff_url":"https://github.com/andrey-malets/ndd/pull/13.diff","patch_url":"https://github.com/andrey-malets/ndd/pull/13.patch","issue_url":"https://api.github.com/repos/andrey-malets/ndd/issues/13","number":13,"state":"open","locked":false,"title":"Added client-side command building in ssh mode.","user":{"login":"mathcrosp","id":4106483,"avatar_url":"https://avatars.githubusercontent.com/u/4106483?v=3","gravatar_id":"","url":"https://api.github.com/users/mathcrosp","html_url":"https://github.com/mathcrosp","followers_url":"https://api.github.com/users/mathcrosp/followers","following_url":"https://api.github.com/users/mathcrosp/following{/other_user}","gists_url":"https://api.github.com/users/mathcrosp/gists{/gist_id}","starred_url":"https://api.github.com/users/mathcrosp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathcrosp/subscriptions","organizations_url":"https://api.github.com/users/mathcrosp/orgs","repos_url":"https://api.github.com/users/mathcrosp/repos","events_url":"https://api.github.com/users/mathcrosp/events{/privacy}","received_events_url":"https://api.github.com/users/mathcrosp/received_events","type":"User","site_admin":false},"body":"When using ssh to manage slaves, we can build a slave command for `ndd` binary on master. But if we use piping, we should build slave command directly on the slave to manage pipes in driver.","created_at":"2016-05-17T20:16:16Z","updated_at":"2016-05-17T20:19:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"528a1885baf97658eba5286050984160c3b15368","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andrey-malets/ndd/pulls/13/commits","review_comments_url":"https://api.github.com/repos/andrey-malets/ndd/pulls/13/comments","review_comment_url":"https://api.github.com/repos/andrey-malets/ndd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andrey-malets/ndd/issues/13/comments","statuses_url":"https://api.github.com/repos/andrey-malets/ndd/statuses/4c9373b9f1c9d9c38c181e6d7c2bdef44963414a","head":{"label":"mathcrosp:master","ref":"master","sha":"4c9373b9f1c9d9c38c181e6d7c2bdef44963414a","user":{"login":"mathcrosp","id":4106483,"avatar_url":"https://avatars.githubusercontent.com/u/4106483?v=3","gravatar_id":"","url":"https://api.github.com/users/mathcrosp","html_url":"https://github.com/mathcrosp","followers_url":"https://api.github.com/users/mathcrosp/followers","following_url":"https://api.github.com/users/mathcrosp/following{/other_user}","gists_url":"https://api.github.com/users/mathcrosp/gists{/gist_id}","starred_url":"https://api.github.com/users/mathcrosp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathcrosp/subscriptions","organizations_url":"https://api.github.com/users/mathcrosp/orgs","repos_url":"https://api.github.com/users/mathcrosp/repos","events_url":"https://api.github.com/users/mathcrosp/events{/privacy}","received_events_url":"https://api.github.com/users/mathcrosp/received_events","type":"User","site_admin":false},"repo":{"id":26361862,"name":"ndd","full_name":"mathcrosp/ndd","owner":{"login":"mathcrosp","id":4106483,"avatar_url":"https://avatars.githubusercontent.com/u/4106483?v=3","gravatar_id":"","url":"https://api.github.com/users/mathcrosp","html_url":"https://github.com/mathcrosp","followers_url":"https://api.github.com/users/mathcrosp/followers","following_url":"https://api.github.com/users/mathcrosp/following{/other_user}","gists_url":"https://api.github.com/users/mathcrosp/gists{/gist_id}","starred_url":"https://api.github.com/users/mathcrosp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathcrosp/subscriptions","organizations_url":"https://api.github.com/users/mathcrosp/orgs","repos_url":"https://api.github.com/users/mathcrosp/repos","events_url":"https://api.github.com/users/mathcrosp/events{/privacy}","received_events_url":"https://api.github.com/users/mathcrosp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mathcrosp/ndd","description":"Quickly copy files between a group of machines over fast full-duplex network","fork":true,"url":"https://api.github.com/repos/mathcrosp/ndd","forks_url":"https://api.github.com/repos/mathcrosp/ndd/forks","keys_url":"https://api.github.com/repos/mathcrosp/ndd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mathcrosp/ndd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mathcrosp/ndd/teams","hooks_url":"https://api.github.com/repos/mathcrosp/ndd/hooks","issue_events_url":"https://api.github.com/repos/mathcrosp/ndd/issues/events{/number}","events_url":"https://api.github.com/repos/mathcrosp/ndd/events","assignees_url":"https://api.github.com/repos/mathcrosp/ndd/assignees{/user}","branches_url":"https://api.github.com/repos/mathcrosp/ndd/branches{/branch}","tags_url":"https://api.github.com/repos/mathcrosp/ndd/tags","blobs_url":"https://api.github.com/repos/mathcrosp/ndd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mathcrosp/ndd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mathcrosp/ndd/git/refs{/sha}","trees_url":"https://api.github.com/repos/mathcrosp/ndd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mathcrosp/ndd/statuses/{sha}","languages_url":"https://api.github.com/repos/mathcrosp/ndd/languages","stargazers_url":"https://api.github.com/repos/mathcrosp/ndd/stargazers","contributors_url":"https://api.github.com/repos/mathcrosp/ndd/contributors","subscribers_url":"https://api.github.com/repos/mathcrosp/ndd/subscribers","subscription_url":"https://api.github.com/repos/mathcrosp/ndd/subscription","commits_url":"https://api.github.com/repos/mathcrosp/ndd/commits{/sha}","git_commits_url":"https://api.github.com/repos/mathcrosp/ndd/git/commits{/sha}","comments_url":"https://api.github.com/repos/mathcrosp/ndd/comments{/number}","issue_comment_url":"https://api.github.com/repos/mathcrosp/ndd/issues/comments{/number}","contents_url":"https://api.github.com/repos/mathcrosp/ndd/contents/{+path}","compare_url":"https://api.github.com/repos/mathcrosp/ndd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mathcrosp/ndd/merges","archive_url":"https://api.github.com/repos/mathcrosp/ndd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mathcrosp/ndd/downloads","issues_url":"https://api.github.com/repos/mathcrosp/ndd/issues{/number}","pulls_url":"https://api.github.com/repos/mathcrosp/ndd/pulls{/number}","milestones_url":"https://api.github.com/repos/mathcrosp/ndd/milestones{/number}","notifications_url":"https://api.github.com/repos/mathcrosp/ndd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mathcrosp/ndd/labels{/name}","releases_url":"https://api.github.com/repos/mathcrosp/ndd/releases{/id}","deployments_url":"https://api.github.com/repos/mathcrosp/ndd/deployments","created_at":"2014-11-08T13:49:11Z","updated_at":"2016-02-04T12:14:29Z","pushed_at":"2016-05-17T19:49:56Z","git_url":"git://github.com/mathcrosp/ndd.git","ssh_url":"git@github.com:mathcrosp/ndd.git","clone_url":"https://github.com/mathcrosp/ndd.git","svn_url":"https://github.com/mathcrosp/ndd","homepage":null,"size":77,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"andrey-malets:master","ref":"master","sha":"4942b7b5049f733b30f94239f932967a83d2d30a","user":{"login":"andrey-malets","id":4633506,"avatar_url":"https://avatars.githubusercontent.com/u/4633506?v=3","gravatar_id":"","url":"https://api.github.com/users/andrey-malets","html_url":"https://github.com/andrey-malets","followers_url":"https://api.github.com/users/andrey-malets/followers","following_url":"https://api.github.com/users/andrey-malets/following{/other_user}","gists_url":"https://api.github.com/users/andrey-malets/gists{/gist_id}","starred_url":"https://api.github.com/users/andrey-malets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrey-malets/subscriptions","organizations_url":"https://api.github.com/users/andrey-malets/orgs","repos_url":"https://api.github.com/users/andrey-malets/repos","events_url":"https://api.github.com/users/andrey-malets/events{/privacy}","received_events_url":"https://api.github.com/users/andrey-malets/received_events","type":"User","site_admin":false},"repo":{"id":26361806,"name":"ndd","full_name":"andrey-malets/ndd","owner":{"login":"andrey-malets","id":4633506,"avatar_url":"https://avatars.githubusercontent.com/u/4633506?v=3","gravatar_id":"","url":"https://api.github.com/users/andrey-malets","html_url":"https://github.com/andrey-malets","followers_url":"https://api.github.com/users/andrey-malets/followers","following_url":"https://api.github.com/users/andrey-malets/following{/other_user}","gists_url":"https://api.github.com/users/andrey-malets/gists{/gist_id}","starred_url":"https://api.github.com/users/andrey-malets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrey-malets/subscriptions","organizations_url":"https://api.github.com/users/andrey-malets/orgs","repos_url":"https://api.github.com/users/andrey-malets/repos","events_url":"https://api.github.com/users/andrey-malets/events{/privacy}","received_events_url":"https://api.github.com/users/andrey-malets/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrey-malets/ndd","description":"Quickly copy files between a group of machines over fast full-duplex network","fork":false,"url":"https://api.github.com/repos/andrey-malets/ndd","forks_url":"https://api.github.com/repos/andrey-malets/ndd/forks","keys_url":"https://api.github.com/repos/andrey-malets/ndd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrey-malets/ndd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrey-malets/ndd/teams","hooks_url":"https://api.github.com/repos/andrey-malets/ndd/hooks","issue_events_url":"https://api.github.com/repos/andrey-malets/ndd/issues/events{/number}","events_url":"https://api.github.com/repos/andrey-malets/ndd/events","assignees_url":"https://api.github.com/repos/andrey-malets/ndd/assignees{/user}","branches_url":"https://api.github.com/repos/andrey-malets/ndd/branches{/branch}","tags_url":"https://api.github.com/repos/andrey-malets/ndd/tags","blobs_url":"https://api.github.com/repos/andrey-malets/ndd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrey-malets/ndd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrey-malets/ndd/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrey-malets/ndd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrey-malets/ndd/statuses/{sha}","languages_url":"https://api.github.com/repos/andrey-malets/ndd/languages","stargazers_url":"https://api.github.com/repos/andrey-malets/ndd/stargazers","contributors_url":"https://api.github.com/repos/andrey-malets/ndd/contributors","subscribers_url":"https://api.github.com/repos/andrey-malets/ndd/subscribers","subscription_url":"https://api.github.com/repos/andrey-malets/ndd/subscription","commits_url":"https://api.github.com/repos/andrey-malets/ndd/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrey-malets/ndd/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrey-malets/ndd/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrey-malets/ndd/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrey-malets/ndd/contents/{+path}","compare_url":"https://api.github.com/repos/andrey-malets/ndd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrey-malets/ndd/merges","archive_url":"https://api.github.com/repos/andrey-malets/ndd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrey-malets/ndd/downloads","issues_url":"https://api.github.com/repos/andrey-malets/ndd/issues{/number}","pulls_url":"https://api.github.com/repos/andrey-malets/ndd/pulls{/number}","milestones_url":"https://api.github.com/repos/andrey-malets/ndd/milestones{/number}","notifications_url":"https://api.github.com/repos/andrey-malets/ndd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrey-malets/ndd/labels{/name}","releases_url":"https://api.github.com/repos/andrey-malets/ndd/releases{/id}","deployments_url":"https://api.github.com/repos/andrey-malets/ndd/deployments","created_at":"2014-11-08T13:46:57Z","updated_at":"2016-02-09T19:03:45Z","pushed_at":"2016-05-17T20:16:16Z","git_url":"git://github.com/andrey-malets/ndd.git","ssh_url":"git@github.com:andrey-malets/ndd.git","clone_url":"https://github.com/andrey-malets/ndd.git","svn_url":"https://github.com/andrey-malets/ndd","homepage":null,"size":71,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andrey-malets/ndd/pulls/13"},"html":{"href":"https://github.com/andrey-malets/ndd/pull/13"},"issue":{"href":"https://api.github.com/repos/andrey-malets/ndd/issues/13"},"comments":{"href":"https://api.github.com/repos/andrey-malets/ndd/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/andrey-malets/ndd/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/andrey-malets/ndd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andrey-malets/ndd/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/andrey-malets/ndd/statuses/4c9373b9f1c9d9c38c181e6d7c2bdef44963414a"}}}}