{"action":"created","comment":{"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/comments/48484259","id":48484259,"diff_hunk":"@@ -0,0 +1,14 @@\n+#!/bin/bash\n+HOST_IP=$public_ip\n+PORT=$port\n+TIMEOUT_MIN=\"$(($timeout_minutes * 60))\"\n+function wait_for_port\n+{\n+    /bin/netcat -z -w$3 $1 $2\n+    if [ $? -ne 0 ] && $fail_on_timeout; then","path":"cosmo_tester/resources/blueprints/active-directory/scripts/wait_for_active_directory_port.sh","position":8,"original_position":8,"commit_id":"e4240853dc73de520d8437a095b893d5cef4366b","original_commit_id":"e4240853dc73de520d8437a095b893d5cef4366b","user":{"login":"noakup","id":1745412,"avatar_url":"https://avatars.githubusercontent.com/u/1745412?v=3","gravatar_id":"","url":"https://api.github.com/users/noakup","html_url":"https://github.com/noakup","followers_url":"https://api.github.com/users/noakup/followers","following_url":"https://api.github.com/users/noakup/following{/other_user}","gists_url":"https://api.github.com/users/noakup/gists{/gist_id}","starred_url":"https://api.github.com/users/noakup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noakup/subscriptions","organizations_url":"https://api.github.com/users/noakup/orgs","repos_url":"https://api.github.com/users/noakup/repos","events_url":"https://api.github.com/users/noakup/events{/privacy}","received_events_url":"https://api.github.com/users/noakup/received_events","type":"User","site_admin":false},"body":"1. what if fail_on_timeout is set to False and the netcat command fails not because of the timeout?\r\nit should probably be something like:\r\nif return_code is not 0:\r\n  if fail_on_timeout:\r\n    echo and exit 1\r\n  else:\r\n    echo and do something else\r\n2. the error message writes \"minutes\" but it's actually in seconds","created_at":"2015-12-28T15:12:10Z","updated_at":"2015-12-28T15:12:10Z","html_url":"https://github.com/cloudify-cosmo/cloudify-system-tests/pull/336#discussion_r48484259","pull_request_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/336","_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/comments/48484259"},"html":{"href":"https://github.com/cloudify-cosmo/cloudify-system-tests/pull/336#discussion_r48484259"},"pull_request":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/336"}}},"pull_request":{"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/336","id":54624345,"html_url":"https://github.com/cloudify-cosmo/cloudify-system-tests/pull/336","diff_url":"https://github.com/cloudify-cosmo/cloudify-system-tests/pull/336.diff","patch_url":"https://github.com/cloudify-cosmo/cloudify-system-tests/pull/336.patch","issue_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues/336","number":336,"state":"open","locked":false,"title":"CFY-3717 active directory test","user":{"login":"adamlavie","id":929788,"avatar_url":"https://avatars.githubusercontent.com/u/929788?v=3","gravatar_id":"","url":"https://api.github.com/users/adamlavie","html_url":"https://github.com/adamlavie","followers_url":"https://api.github.com/users/adamlavie/followers","following_url":"https://api.github.com/users/adamlavie/following{/other_user}","gists_url":"https://api.github.com/users/adamlavie/gists{/gist_id}","starred_url":"https://api.github.com/users/adamlavie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamlavie/subscriptions","organizations_url":"https://api.github.com/users/adamlavie/orgs","repos_url":"https://api.github.com/users/adamlavie/repos","events_url":"https://api.github.com/users/adamlavie/events{/privacy}","received_events_url":"https://api.github.com/users/adamlavie/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-27T21:37:49Z","updated_at":"2015-12-28T15:12:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"454a66d2997e79c6f91d08e493fa79de42b938c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/336/commits","review_comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/336/comments","review_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues/336/comments","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/statuses/e4240853dc73de520d8437a095b893d5cef4366b","head":{"label":"cloudify-cosmo:CFY-3717-active-directory-test","ref":"CFY-3717-active-directory-test","sha":"e4240853dc73de520d8437a095b893d5cef4366b","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":18327506,"name":"cloudify-system-tests","full_name":"cloudify-cosmo/cloudify-system-tests","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/cloudify-system-tests","description":"Cloudify System Tests","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests","forks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/releases{/id}","created_at":"2014-04-01T11:44:17Z","updated_at":"2015-05-07T14:25:56Z","pushed_at":"2015-12-28T13:50:02Z","git_url":"git://github.com/cloudify-cosmo/cloudify-system-tests.git","ssh_url":"git@github.com:cloudify-cosmo/cloudify-system-tests.git","clone_url":"https://github.com/cloudify-cosmo/cloudify-system-tests.git","svn_url":"https://github.com/cloudify-cosmo/cloudify-system-tests","homepage":null,"size":2389,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":4,"forks":9,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"cloudify-cosmo:master","ref":"master","sha":"7276087cc1f426d698549f56876f8b9a44eda880","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":18327506,"name":"cloudify-system-tests","full_name":"cloudify-cosmo/cloudify-system-tests","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/cloudify-system-tests","description":"Cloudify System Tests","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests","forks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/releases{/id}","created_at":"2014-04-01T11:44:17Z","updated_at":"2015-05-07T14:25:56Z","pushed_at":"2015-12-28T13:50:02Z","git_url":"git://github.com/cloudify-cosmo/cloudify-system-tests.git","ssh_url":"git@github.com:cloudify-cosmo/cloudify-system-tests.git","clone_url":"https://github.com/cloudify-cosmo/cloudify-system-tests.git","svn_url":"https://github.com/cloudify-cosmo/cloudify-system-tests","homepage":null,"size":2389,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":4,"forks":9,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/336"},"html":{"href":"https://github.com/cloudify-cosmo/cloudify-system-tests/pull/336"},"issue":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues/336"},"comments":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-system-tests/statuses/e4240853dc73de520d8437a095b893d5cef4366b"}}}}