{"action":"created","comment":{"url":"https://api.github.com/repos/AppScale/appscale-tools/pulls/comments/77714782","id":77714782,"diff_hunk":"@@ -122,7 +121,24 @@ def start_head_node(cls, options, my_id, node_layout):\n       options.verbose)\n \n     if options.infrastructure:\n-      instance_id, public_ip, private_ip = cls.spawn_node_in_cloud(options)\n+      agent = InfrastructureAgentFactory.create_agent(options.infrastructure)\n+\n+      params = agent.get_params_from_args(options)\n+      public_ips, private_ips, instance_ids = agent.describe_instances(params)\n+      try:\n+        login_ip = LocalState.get_login_host(options.keyname)\n+      except (IOError, BadConfigurationException):\n+        # We don't have the location file, we need to start instances.\n+        login_ip = None\n+\n+      if login_ip in public_ips:","path":"appscale/tools/remote_helper.py","position":21,"original_position":21,"commit_id":"d6a6cd78b1490cca4089d0203eeb78251a4218db","original_commit_id":"d6a6cd78b1490cca4089d0203eeb78251a4218db","user":{"login":"cdonati","id":1923367,"avatar_url":"https://avatars.githubusercontent.com/u/1923367?v=3","gravatar_id":"","url":"https://api.github.com/users/cdonati","html_url":"https://github.com/cdonati","followers_url":"https://api.github.com/users/cdonati/followers","following_url":"https://api.github.com/users/cdonati/following{/other_user}","gists_url":"https://api.github.com/users/cdonati/gists{/gist_id}","starred_url":"https://api.github.com/users/cdonati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdonati/subscriptions","organizations_url":"https://api.github.com/users/cdonati/orgs","repos_url":"https://api.github.com/users/cdonati/repos","events_url":"https://api.github.com/users/cdonati/events{/privacy}","received_events_url":"https://api.github.com/users/cdonati/received_events","type":"User","site_admin":false},"body":"I would be a little more defensive about this rather than relying on `describe_instances` to never return `None` in the list of `public_ips`.","created_at":"2016-09-06T20:42:50Z","updated_at":"2016-09-06T20:42:50Z","html_url":"https://github.com/AppScale/appscale-tools/pull/528#discussion_r77714782","pull_request_url":"https://api.github.com/repos/AppScale/appscale-tools/pulls/528","_links":{"self":{"href":"https://api.github.com/repos/AppScale/appscale-tools/pulls/comments/77714782"},"html":{"href":"https://github.com/AppScale/appscale-tools/pull/528#discussion_r77714782"},"pull_request":{"href":"https://api.github.com/repos/AppScale/appscale-tools/pulls/528"}}},"pull_request":{"url":"https://api.github.com/repos/AppScale/appscale-tools/pulls/528","id":80132515,"html_url":"https://github.com/AppScale/appscale-tools/pull/528","diff_url":"https://github.com/AppScale/appscale-tools/pull/528.diff","patch_url":"https://github.com/AppScale/appscale-tools/pull/528.patch","issue_url":"https://api.github.com/repos/AppScale/appscale-tools/issues/528","number":528,"state":"open","locked":false,"title":"Specify clean, down, destroy commands a bit better.","user":{"login":"obino","id":902275,"avatar_url":"https://avatars.githubusercontent.com/u/902275?v=3","gravatar_id":"","url":"https://api.github.com/users/obino","html_url":"https://github.com/obino","followers_url":"https://api.github.com/users/obino/followers","following_url":"https://api.github.com/users/obino/following{/other_user}","gists_url":"https://api.github.com/users/obino/gists{/gist_id}","starred_url":"https://api.github.com/users/obino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obino/subscriptions","organizations_url":"https://api.github.com/users/obino/orgs","repos_url":"https://api.github.com/users/obino/repos","events_url":"https://api.github.com/users/obino/events{/privacy}","received_events_url":"https://api.github.com/users/obino/received_events","type":"User","site_admin":false},"body":"Proposal to have clean, down, and destroy have slightly different meaning when running on a public cloud. Clean, would destroy instances and volumes, destroy would terminate the instances (but won't touch volumes), and down will simply stop appscale without terminating instances.","created_at":"2016-08-04T19:07:00Z","updated_at":"2016-09-06T20:42:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75417fe4e57dc7737338d38f261f759570d369fc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/AppScale/appscale-tools/pulls/528/commits","review_comments_url":"https://api.github.com/repos/AppScale/appscale-tools/pulls/528/comments","review_comment_url":"https://api.github.com/repos/AppScale/appscale-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AppScale/appscale-tools/issues/528/comments","statuses_url":"https://api.github.com/repos/AppScale/appscale-tools/statuses/d6a6cd78b1490cca4089d0203eeb78251a4218db","head":{"label":"obino:clean","ref":"clean","sha":"d6a6cd78b1490cca4089d0203eeb78251a4218db","user":{"login":"obino","id":902275,"avatar_url":"https://avatars.githubusercontent.com/u/902275?v=3","gravatar_id":"","url":"https://api.github.com/users/obino","html_url":"https://github.com/obino","followers_url":"https://api.github.com/users/obino/followers","following_url":"https://api.github.com/users/obino/following{/other_user}","gists_url":"https://api.github.com/users/obino/gists{/gist_id}","starred_url":"https://api.github.com/users/obino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obino/subscriptions","organizations_url":"https://api.github.com/users/obino/orgs","repos_url":"https://api.github.com/users/obino/repos","events_url":"https://api.github.com/users/obino/events{/privacy}","received_events_url":"https://api.github.com/users/obino/received_events","type":"User","site_admin":false},"repo":{"id":16622822,"name":"appscale-tools","full_name":"obino/appscale-tools","owner":{"login":"obino","id":902275,"avatar_url":"https://avatars.githubusercontent.com/u/902275?v=3","gravatar_id":"","url":"https://api.github.com/users/obino","html_url":"https://github.com/obino","followers_url":"https://api.github.com/users/obino/followers","following_url":"https://api.github.com/users/obino/following{/other_user}","gists_url":"https://api.github.com/users/obino/gists{/gist_id}","starred_url":"https://api.github.com/users/obino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obino/subscriptions","organizations_url":"https://api.github.com/users/obino/orgs","repos_url":"https://api.github.com/users/obino/repos","events_url":"https://api.github.com/users/obino/events{/privacy}","received_events_url":"https://api.github.com/users/obino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/obino/appscale-tools","description":"A set of command-line tools that can be used to interact with AppScale.","fork":true,"url":"https://api.github.com/repos/obino/appscale-tools","forks_url":"https://api.github.com/repos/obino/appscale-tools/forks","keys_url":"https://api.github.com/repos/obino/appscale-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/obino/appscale-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/obino/appscale-tools/teams","hooks_url":"https://api.github.com/repos/obino/appscale-tools/hooks","issue_events_url":"https://api.github.com/repos/obino/appscale-tools/issues/events{/number}","events_url":"https://api.github.com/repos/obino/appscale-tools/events","assignees_url":"https://api.github.com/repos/obino/appscale-tools/assignees{/user}","branches_url":"https://api.github.com/repos/obino/appscale-tools/branches{/branch}","tags_url":"https://api.github.com/repos/obino/appscale-tools/tags","blobs_url":"https://api.github.com/repos/obino/appscale-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/obino/appscale-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/obino/appscale-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/obino/appscale-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/obino/appscale-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/obino/appscale-tools/languages","stargazers_url":"https://api.github.com/repos/obino/appscale-tools/stargazers","contributors_url":"https://api.github.com/repos/obino/appscale-tools/contributors","subscribers_url":"https://api.github.com/repos/obino/appscale-tools/subscribers","subscription_url":"https://api.github.com/repos/obino/appscale-tools/subscription","commits_url":"https://api.github.com/repos/obino/appscale-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/obino/appscale-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/obino/appscale-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/obino/appscale-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/obino/appscale-tools/contents/{+path}","compare_url":"https://api.github.com/repos/obino/appscale-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/obino/appscale-tools/merges","archive_url":"https://api.github.com/repos/obino/appscale-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/obino/appscale-tools/downloads","issues_url":"https://api.github.com/repos/obino/appscale-tools/issues{/number}","pulls_url":"https://api.github.com/repos/obino/appscale-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/obino/appscale-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/obino/appscale-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/obino/appscale-tools/labels{/name}","releases_url":"https://api.github.com/repos/obino/appscale-tools/releases{/id}","deployments_url":"https://api.github.com/repos/obino/appscale-tools/deployments","created_at":"2014-02-07T18:03:57Z","updated_at":"2015-04-08T01:05:31Z","pushed_at":"2016-09-02T19:28:26Z","git_url":"git://github.com/obino/appscale-tools.git","ssh_url":"git@github.com:obino/appscale-tools.git","clone_url":"https://github.com/obino/appscale-tools.git","svn_url":"https://github.com/obino/appscale-tools","homepage":null,"size":14776,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"AppScale:master","ref":"master","sha":"7d723e755d9b60767c04c7409a5dc1f474f5ec3b","user":{"login":"AppScale","id":1486044,"avatar_url":"https://avatars.githubusercontent.com/u/1486044?v=3","gravatar_id":"","url":"https://api.github.com/users/AppScale","html_url":"https://github.com/AppScale","followers_url":"https://api.github.com/users/AppScale/followers","following_url":"https://api.github.com/users/AppScale/following{/other_user}","gists_url":"https://api.github.com/users/AppScale/gists{/gist_id}","starred_url":"https://api.github.com/users/AppScale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppScale/subscriptions","organizations_url":"https://api.github.com/users/AppScale/orgs","repos_url":"https://api.github.com/users/AppScale/repos","events_url":"https://api.github.com/users/AppScale/events{/privacy}","received_events_url":"https://api.github.com/users/AppScale/received_events","type":"Organization","site_admin":false},"repo":{"id":4082721,"name":"appscale-tools","full_name":"AppScale/appscale-tools","owner":{"login":"AppScale","id":1486044,"avatar_url":"https://avatars.githubusercontent.com/u/1486044?v=3","gravatar_id":"","url":"https://api.github.com/users/AppScale","html_url":"https://github.com/AppScale","followers_url":"https://api.github.com/users/AppScale/followers","following_url":"https://api.github.com/users/AppScale/following{/other_user}","gists_url":"https://api.github.com/users/AppScale/gists{/gist_id}","starred_url":"https://api.github.com/users/AppScale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppScale/subscriptions","organizations_url":"https://api.github.com/users/AppScale/orgs","repos_url":"https://api.github.com/users/AppScale/repos","events_url":"https://api.github.com/users/AppScale/events{/privacy}","received_events_url":"https://api.github.com/users/AppScale/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppScale/appscale-tools","description":"A set of command-line tools that can be used to interact with AppScale.","fork":false,"url":"https://api.github.com/repos/AppScale/appscale-tools","forks_url":"https://api.github.com/repos/AppScale/appscale-tools/forks","keys_url":"https://api.github.com/repos/AppScale/appscale-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppScale/appscale-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppScale/appscale-tools/teams","hooks_url":"https://api.github.com/repos/AppScale/appscale-tools/hooks","issue_events_url":"https://api.github.com/repos/AppScale/appscale-tools/issues/events{/number}","events_url":"https://api.github.com/repos/AppScale/appscale-tools/events","assignees_url":"https://api.github.com/repos/AppScale/appscale-tools/assignees{/user}","branches_url":"https://api.github.com/repos/AppScale/appscale-tools/branches{/branch}","tags_url":"https://api.github.com/repos/AppScale/appscale-tools/tags","blobs_url":"https://api.github.com/repos/AppScale/appscale-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppScale/appscale-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppScale/appscale-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppScale/appscale-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppScale/appscale-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/AppScale/appscale-tools/languages","stargazers_url":"https://api.github.com/repos/AppScale/appscale-tools/stargazers","contributors_url":"https://api.github.com/repos/AppScale/appscale-tools/contributors","subscribers_url":"https://api.github.com/repos/AppScale/appscale-tools/subscribers","subscription_url":"https://api.github.com/repos/AppScale/appscale-tools/subscription","commits_url":"https://api.github.com/repos/AppScale/appscale-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppScale/appscale-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppScale/appscale-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppScale/appscale-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppScale/appscale-tools/contents/{+path}","compare_url":"https://api.github.com/repos/AppScale/appscale-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppScale/appscale-tools/merges","archive_url":"https://api.github.com/repos/AppScale/appscale-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppScale/appscale-tools/downloads","issues_url":"https://api.github.com/repos/AppScale/appscale-tools/issues{/number}","pulls_url":"https://api.github.com/repos/AppScale/appscale-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/AppScale/appscale-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/AppScale/appscale-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppScale/appscale-tools/labels{/name}","releases_url":"https://api.github.com/repos/AppScale/appscale-tools/releases{/id}","deployments_url":"https://api.github.com/repos/AppScale/appscale-tools/deployments","created_at":"2012-04-20T03:21:30Z","updated_at":"2016-08-31T23:54:37Z","pushed_at":"2016-09-06T19:14:23Z","git_url":"git://github.com/AppScale/appscale-tools.git","ssh_url":"git@github.com:AppScale/appscale-tools.git","clone_url":"https://github.com/AppScale/appscale-tools.git","svn_url":"https://github.com/AppScale/appscale-tools","homepage":null,"size":15085,"stargazers_count":45,"watchers_count":45,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":5,"forks":38,"open_issues":5,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AppScale/appscale-tools/pulls/528"},"html":{"href":"https://github.com/AppScale/appscale-tools/pull/528"},"issue":{"href":"https://api.github.com/repos/AppScale/appscale-tools/issues/528"},"comments":{"href":"https://api.github.com/repos/AppScale/appscale-tools/issues/528/comments"},"review_comments":{"href":"https://api.github.com/repos/AppScale/appscale-tools/pulls/528/comments"},"review_comment":{"href":"https://api.github.com/repos/AppScale/appscale-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AppScale/appscale-tools/pulls/528/commits"},"statuses":{"href":"https://api.github.com/repos/AppScale/appscale-tools/statuses/d6a6cd78b1490cca4089d0203eeb78251a4218db"}}}}
{"actor":{"display_login":"cdonati"}}