{"action":"created","comment":{"url":"https://api.github.com/repos/rgardler/acs-cli/pulls/comments/80258385","id":80258385,"diff_hunk":"@@ -124,6 +124,29 @@ def show(self):\n         return json.dumps(config, sort_keys=True,\n                           indent=4, separators=(',', ': '))\n \n+    def shutdown(self):\n+        \"\"\"\n+        Shutdown all VM and VMSS inside the cluster.\n+        \"\"\"\n+        self.logger.debug(\"Shuting down VM and VMSS\")\n+        commandListVm = \"azure vm list -g \" + self.config.get('Group', 'name') + \" --json\"\n+        jsonVMresult = json.loads(subprocess.check_output(commandListVm, shell=True).decode(\"utf-8-sig\"))","path":"acs/acs.py","position":10,"original_position":10,"commit_id":"f1a7f293b7444db6e95d9cdfc7b52e027909eaa2","original_commit_id":"f1a7f293b7444db6e95d9cdfc7b52e027909eaa2","user":{"login":"rgardler","id":250240,"avatar_url":"https://avatars.githubusercontent.com/u/250240?v=3","gravatar_id":"","url":"https://api.github.com/users/rgardler","html_url":"https://github.com/rgardler","followers_url":"https://api.github.com/users/rgardler/followers","following_url":"https://api.github.com/users/rgardler/following{/other_user}","gists_url":"https://api.github.com/users/rgardler/gists{/gist_id}","starred_url":"https://api.github.com/users/rgardler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgardler/subscriptions","organizations_url":"https://api.github.com/users/rgardler/orgs","repos_url":"https://api.github.com/users/rgardler/repos","events_url":"https://api.github.com/users/rgardler/events{/privacy}","received_events_url":"https://api.github.com/users/rgardler/received_events","type":"User","site_admin":false},"body":"When running commands on the client please use `output, errors = self.utils.shell_execute(cmd)`, this provides decent logging and (in the future) will allow us to implement a \"--teach\" mode that will output the commands being run on behalf of the user. It could provide telemetry data for the tool. When working on existing files you will find various ways of executing the cmds. we should standardize on shell_execute for consistency, so feel free to edit any other approaches you find.","created_at":"2016-09-23T14:42:11Z","updated_at":"2016-09-23T14:47:28Z","html_url":"https://github.com/rgardler/acs-cli/pull/75#discussion_r80258385","pull_request_url":"https://api.github.com/repos/rgardler/acs-cli/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/rgardler/acs-cli/pulls/comments/80258385"},"html":{"href":"https://github.com/rgardler/acs-cli/pull/75#discussion_r80258385"},"pull_request":{"href":"https://api.github.com/repos/rgardler/acs-cli/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/rgardler/acs-cli/pulls/75","id":86275083,"html_url":"https://github.com/rgardler/acs-cli/pull/75","diff_url":"https://github.com/rgardler/acs-cli/pull/75.diff","patch_url":"https://github.com/rgardler/acs-cli/pull/75.patch","issue_url":"https://api.github.com/repos/rgardler/acs-cli/issues/75","number":75,"state":"open","locked":false,"title":"Adding shutdown service option","user":{"login":"julienstroheker","id":8661347,"avatar_url":"https://avatars.githubusercontent.com/u/8661347?v=3","gravatar_id":"","url":"https://api.github.com/users/julienstroheker","html_url":"https://github.com/julienstroheker","followers_url":"https://api.github.com/users/julienstroheker/followers","following_url":"https://api.github.com/users/julienstroheker/following{/other_user}","gists_url":"https://api.github.com/users/julienstroheker/gists{/gist_id}","starred_url":"https://api.github.com/users/julienstroheker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienstroheker/subscriptions","organizations_url":"https://api.github.com/users/julienstroheker/orgs","repos_url":"https://api.github.com/users/julienstroheker/repos","events_url":"https://api.github.com/users/julienstroheker/events{/privacy}","received_events_url":"https://api.github.com/users/julienstroheker/received_events","type":"User","site_admin":false},"body":"If you are interested I added the shutdown feature inside the service command.\r\nSome people asked me about that one.\r\nI have to add some tests, and improve the code but let me know if it makes sense to have this feature ?\r\nThanks","created_at":"2016-09-22T03:36:43Z","updated_at":"2016-09-23T14:47:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6717ba646c69ffd5454d7e6f9ca24dafe19423a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rgardler/acs-cli/pulls/75/commits","review_comments_url":"https://api.github.com/repos/rgardler/acs-cli/pulls/75/comments","review_comment_url":"https://api.github.com/repos/rgardler/acs-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rgardler/acs-cli/issues/75/comments","statuses_url":"https://api.github.com/repos/rgardler/acs-cli/statuses/f1a7f293b7444db6e95d9cdfc7b52e027909eaa2","head":{"label":"julienstroheker:feature-shutdown","ref":"feature-shutdown","sha":"f1a7f293b7444db6e95d9cdfc7b52e027909eaa2","user":{"login":"julienstroheker","id":8661347,"avatar_url":"https://avatars.githubusercontent.com/u/8661347?v=3","gravatar_id":"","url":"https://api.github.com/users/julienstroheker","html_url":"https://github.com/julienstroheker","followers_url":"https://api.github.com/users/julienstroheker/followers","following_url":"https://api.github.com/users/julienstroheker/following{/other_user}","gists_url":"https://api.github.com/users/julienstroheker/gists{/gist_id}","starred_url":"https://api.github.com/users/julienstroheker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienstroheker/subscriptions","organizations_url":"https://api.github.com/users/julienstroheker/orgs","repos_url":"https://api.github.com/users/julienstroheker/repos","events_url":"https://api.github.com/users/julienstroheker/events{/privacy}","received_events_url":"https://api.github.com/users/julienstroheker/received_events","type":"User","site_admin":false},"repo":{"id":68842447,"name":"acs-cli","full_name":"julienstroheker/acs-cli","owner":{"login":"julienstroheker","id":8661347,"avatar_url":"https://avatars.githubusercontent.com/u/8661347?v=3","gravatar_id":"","url":"https://api.github.com/users/julienstroheker","html_url":"https://github.com/julienstroheker","followers_url":"https://api.github.com/users/julienstroheker/followers","following_url":"https://api.github.com/users/julienstroheker/following{/other_user}","gists_url":"https://api.github.com/users/julienstroheker/gists{/gist_id}","starred_url":"https://api.github.com/users/julienstroheker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienstroheker/subscriptions","organizations_url":"https://api.github.com/users/julienstroheker/orgs","repos_url":"https://api.github.com/users/julienstroheker/repos","events_url":"https://api.github.com/users/julienstroheker/events{/privacy}","received_events_url":"https://api.github.com/users/julienstroheker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/julienstroheker/acs-cli","description":"Useful scripts for working with Azure Container Service (ACS).","fork":true,"url":"https://api.github.com/repos/julienstroheker/acs-cli","forks_url":"https://api.github.com/repos/julienstroheker/acs-cli/forks","keys_url":"https://api.github.com/repos/julienstroheker/acs-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/julienstroheker/acs-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/julienstroheker/acs-cli/teams","hooks_url":"https://api.github.com/repos/julienstroheker/acs-cli/hooks","issue_events_url":"https://api.github.com/repos/julienstroheker/acs-cli/issues/events{/number}","events_url":"https://api.github.com/repos/julienstroheker/acs-cli/events","assignees_url":"https://api.github.com/repos/julienstroheker/acs-cli/assignees{/user}","branches_url":"https://api.github.com/repos/julienstroheker/acs-cli/branches{/branch}","tags_url":"https://api.github.com/repos/julienstroheker/acs-cli/tags","blobs_url":"https://api.github.com/repos/julienstroheker/acs-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/julienstroheker/acs-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/julienstroheker/acs-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/julienstroheker/acs-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/julienstroheker/acs-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/julienstroheker/acs-cli/languages","stargazers_url":"https://api.github.com/repos/julienstroheker/acs-cli/stargazers","contributors_url":"https://api.github.com/repos/julienstroheker/acs-cli/contributors","subscribers_url":"https://api.github.com/repos/julienstroheker/acs-cli/subscribers","subscription_url":"https://api.github.com/repos/julienstroheker/acs-cli/subscription","commits_url":"https://api.github.com/repos/julienstroheker/acs-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/julienstroheker/acs-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/julienstroheker/acs-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/julienstroheker/acs-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/julienstroheker/acs-cli/contents/{+path}","compare_url":"https://api.github.com/repos/julienstroheker/acs-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/julienstroheker/acs-cli/merges","archive_url":"https://api.github.com/repos/julienstroheker/acs-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/julienstroheker/acs-cli/downloads","issues_url":"https://api.github.com/repos/julienstroheker/acs-cli/issues{/number}","pulls_url":"https://api.github.com/repos/julienstroheker/acs-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/julienstroheker/acs-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/julienstroheker/acs-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/julienstroheker/acs-cli/labels{/name}","releases_url":"https://api.github.com/repos/julienstroheker/acs-cli/releases{/id}","deployments_url":"https://api.github.com/repos/julienstroheker/acs-cli/deployments","created_at":"2016-09-21T17:41:46Z","updated_at":"2016-09-21T17:41:48Z","pushed_at":"2016-09-22T02:53:16Z","git_url":"git://github.com/julienstroheker/acs-cli.git","ssh_url":"git@github.com:julienstroheker/acs-cli.git","clone_url":"https://github.com/julienstroheker/acs-cli.git","svn_url":"https://github.com/julienstroheker/acs-cli","homepage":null,"size":5294,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"rgardler:dev","ref":"dev","sha":"defae2f07e17135c7ac467a090ec9161411a01bd","user":{"login":"rgardler","id":250240,"avatar_url":"https://avatars.githubusercontent.com/u/250240?v=3","gravatar_id":"","url":"https://api.github.com/users/rgardler","html_url":"https://github.com/rgardler","followers_url":"https://api.github.com/users/rgardler/followers","following_url":"https://api.github.com/users/rgardler/following{/other_user}","gists_url":"https://api.github.com/users/rgardler/gists{/gist_id}","starred_url":"https://api.github.com/users/rgardler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgardler/subscriptions","organizations_url":"https://api.github.com/users/rgardler/orgs","repos_url":"https://api.github.com/users/rgardler/repos","events_url":"https://api.github.com/users/rgardler/events{/privacy}","received_events_url":"https://api.github.com/users/rgardler/received_events","type":"User","site_admin":false},"repo":{"id":46402772,"name":"acs-cli","full_name":"rgardler/acs-cli","owner":{"login":"rgardler","id":250240,"avatar_url":"https://avatars.githubusercontent.com/u/250240?v=3","gravatar_id":"","url":"https://api.github.com/users/rgardler","html_url":"https://github.com/rgardler","followers_url":"https://api.github.com/users/rgardler/followers","following_url":"https://api.github.com/users/rgardler/following{/other_user}","gists_url":"https://api.github.com/users/rgardler/gists{/gist_id}","starred_url":"https://api.github.com/users/rgardler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgardler/subscriptions","organizations_url":"https://api.github.com/users/rgardler/orgs","repos_url":"https://api.github.com/users/rgardler/repos","events_url":"https://api.github.com/users/rgardler/events{/privacy}","received_events_url":"https://api.github.com/users/rgardler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rgardler/acs-cli","description":"Useful scripts for working with Azure Container Service (ACS).","fork":false,"url":"https://api.github.com/repos/rgardler/acs-cli","forks_url":"https://api.github.com/repos/rgardler/acs-cli/forks","keys_url":"https://api.github.com/repos/rgardler/acs-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rgardler/acs-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rgardler/acs-cli/teams","hooks_url":"https://api.github.com/repos/rgardler/acs-cli/hooks","issue_events_url":"https://api.github.com/repos/rgardler/acs-cli/issues/events{/number}","events_url":"https://api.github.com/repos/rgardler/acs-cli/events","assignees_url":"https://api.github.com/repos/rgardler/acs-cli/assignees{/user}","branches_url":"https://api.github.com/repos/rgardler/acs-cli/branches{/branch}","tags_url":"https://api.github.com/repos/rgardler/acs-cli/tags","blobs_url":"https://api.github.com/repos/rgardler/acs-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rgardler/acs-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rgardler/acs-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/rgardler/acs-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rgardler/acs-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/rgardler/acs-cli/languages","stargazers_url":"https://api.github.com/repos/rgardler/acs-cli/stargazers","contributors_url":"https://api.github.com/repos/rgardler/acs-cli/contributors","subscribers_url":"https://api.github.com/repos/rgardler/acs-cli/subscribers","subscription_url":"https://api.github.com/repos/rgardler/acs-cli/subscription","commits_url":"https://api.github.com/repos/rgardler/acs-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/rgardler/acs-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/rgardler/acs-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/rgardler/acs-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/rgardler/acs-cli/contents/{+path}","compare_url":"https://api.github.com/repos/rgardler/acs-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rgardler/acs-cli/merges","archive_url":"https://api.github.com/repos/rgardler/acs-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rgardler/acs-cli/downloads","issues_url":"https://api.github.com/repos/rgardler/acs-cli/issues{/number}","pulls_url":"https://api.github.com/repos/rgardler/acs-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/rgardler/acs-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/rgardler/acs-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rgardler/acs-cli/labels{/name}","releases_url":"https://api.github.com/repos/rgardler/acs-cli/releases{/id}","deployments_url":"https://api.github.com/repos/rgardler/acs-cli/deployments","created_at":"2015-11-18T07:32:12Z","updated_at":"2016-09-12T03:36:04Z","pushed_at":"2016-09-23T14:35:00Z","git_url":"git://github.com/rgardler/acs-cli.git","ssh_url":"git@github.com:rgardler/acs-cli.git","clone_url":"https://github.com/rgardler/acs-cli.git","svn_url":"https://github.com/rgardler/acs-cli","homepage":null,"size":5306,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":20,"forks":7,"open_issues":20,"watchers":10,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/rgardler/acs-cli/pulls/75"},"html":{"href":"https://github.com/rgardler/acs-cli/pull/75"},"issue":{"href":"https://api.github.com/repos/rgardler/acs-cli/issues/75"},"comments":{"href":"https://api.github.com/repos/rgardler/acs-cli/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/rgardler/acs-cli/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/rgardler/acs-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rgardler/acs-cli/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/rgardler/acs-cli/statuses/f1a7f293b7444db6e95d9cdfc7b52e027909eaa2"}}}}
{"actor":{"display_login":"rgardler"}}