{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/comments/49766774","id":49766774,"diff_hunk":"@@ -299,6 +299,47 @@ def destroy_vm(vm, pool)\n       end\n     end\n \n+    def create_vm_disk(vm, disk_size)\n+      Thread.new do\n+        _create_vm_disk(vm, disk_size)\n+      end\n+    end\n+\n+    def _create_vm_disk(vm, disk_size)","path":"lib/vmpooler/pool_manager.rb","position":10,"original_position":10,"commit_id":"48a1a8d6216e2a2a01d64df42c7264457db46ac1","original_commit_id":"df2e9177dda68e4234f4bd46925df170e85113c4","user":{"login":"sschneid","id":20033,"avatar_url":"https://avatars.githubusercontent.com/u/20033?v=3","gravatar_id":"","url":"https://api.github.com/users/sschneid","html_url":"https://github.com/sschneid","followers_url":"https://api.github.com/users/sschneid/followers","following_url":"https://api.github.com/users/sschneid/following{/other_user}","gists_url":"https://api.github.com/users/sschneid/gists{/gist_id}","starred_url":"https://api.github.com/users/sschneid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschneid/subscriptions","organizations_url":"https://api.github.com/users/sschneid/orgs","repos_url":"https://api.github.com/users/sschneid/repos","events_url":"https://api.github.com/users/sschneid/events{/privacy}","received_events_url":"https://api.github.com/users/sschneid/received_events","type":"User","site_admin":false},"body":"Addressed at https://github.com/puppetlabs/vmpooler/pull/147/files#diff-9ca942eee48c471766a71aa4fd1df851R312","created_at":"2016-01-14T18:48:34Z","updated_at":"2016-01-14T18:48:34Z","html_url":"https://github.com/puppetlabs/vmpooler/pull/147#discussion_r49766774","pull_request_url":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/147","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/comments/49766774"},"html":{"href":"https://github.com/puppetlabs/vmpooler/pull/147#discussion_r49766774"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/147"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/147","id":55930901,"html_url":"https://github.com/puppetlabs/vmpooler/pull/147","diff_url":"https://github.com/puppetlabs/vmpooler/pull/147.diff","patch_url":"https://github.com/puppetlabs/vmpooler/pull/147.patch","issue_url":"https://api.github.com/repos/puppetlabs/vmpooler/issues/147","number":147,"state":"open","locked":false,"title":"Allow new disks to be added to running VMs via vmpooler API","user":{"login":"sschneid","id":20033,"avatar_url":"https://avatars.githubusercontent.com/u/20033?v=3","gravatar_id":"","url":"https://api.github.com/users/sschneid","html_url":"https://github.com/sschneid","followers_url":"https://api.github.com/users/sschneid/followers","following_url":"https://api.github.com/users/sschneid/following{/other_user}","gists_url":"https://api.github.com/users/sschneid/gists{/gist_id}","starred_url":"https://api.github.com/users/sschneid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschneid/subscriptions","organizations_url":"https://api.github.com/users/sschneid/orgs","repos_url":"https://api.github.com/users/sschneid/repos","events_url":"https://api.github.com/users/sschneid/events{/privacy}","received_events_url":"https://api.github.com/users/sschneid/received_events","type":"User","site_admin":false},"body":"Add an additional disk to a running VM via the vmpooler API.\r\n\r\n````\r\n$ curl -X POST -H X-AUTH-TOKEN:a9znth9dn01t416hrguu56ze37t790bl \\\r\n  --url vmpooler.company.com/api/v1/vm/fq6qlpjlsskycq6/disk/8\r\n````\r\n````json\r\n{\r\n  \"ok\": true,\r\n  \"fq6qlpjlsskycq6\": {\r\n    \"disk\": \"+8mb\"\r\n  }\r\n}\r\n````\r\n\r\nProvisioning and attaching disks can take a moment, but once the task completes it will be reflected in a `GET /v1/vm/<hostname>` query:\r\n\r\n````\r\n$ curl --url vmpooler.company.com/api/v1/vm/fq6qlpjlsskycq6\r\n````\r\n````json\r\n{\r\n  \"ok\": true,\r\n  \"fq6qlpjlsskycq6\": {\r\n    \"template\": \"debian-7-x86_64\",\r\n    \"lifetime\": 2,\r\n    \"running\": 0.08,\r\n    \"state\": \"running\",\r\n    \"disk\": [\r\n      \"+8mb\"\r\n    ],\r\n    \"domain\": \"delivery.puppetlabs.net\"\r\n  }\r\n}","created_at":"2016-01-13T17:44:58Z","updated_at":"2016-01-14T18:48:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94a81cb5cc25fe633754dc98b74fae3b5028ebae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/147/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/147/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/vmpooler/issues/147/comments","statuses_url":"https://api.github.com/repos/puppetlabs/vmpooler/statuses/48a1a8d6216e2a2a01d64df42c7264457db46ac1","head":{"label":"sschneid:add_disk","ref":"add_disk","sha":"48a1a8d6216e2a2a01d64df42c7264457db46ac1","user":{"login":"sschneid","id":20033,"avatar_url":"https://avatars.githubusercontent.com/u/20033?v=3","gravatar_id":"","url":"https://api.github.com/users/sschneid","html_url":"https://github.com/sschneid","followers_url":"https://api.github.com/users/sschneid/followers","following_url":"https://api.github.com/users/sschneid/following{/other_user}","gists_url":"https://api.github.com/users/sschneid/gists{/gist_id}","starred_url":"https://api.github.com/users/sschneid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschneid/subscriptions","organizations_url":"https://api.github.com/users/sschneid/orgs","repos_url":"https://api.github.com/users/sschneid/repos","events_url":"https://api.github.com/users/sschneid/events{/privacy}","received_events_url":"https://api.github.com/users/sschneid/received_events","type":"User","site_admin":false},"repo":{"id":21907793,"name":"vmpooler","full_name":"sschneid/vmpooler","owner":{"login":"sschneid","id":20033,"avatar_url":"https://avatars.githubusercontent.com/u/20033?v=3","gravatar_id":"","url":"https://api.github.com/users/sschneid","html_url":"https://github.com/sschneid","followers_url":"https://api.github.com/users/sschneid/followers","following_url":"https://api.github.com/users/sschneid/following{/other_user}","gists_url":"https://api.github.com/users/sschneid/gists{/gist_id}","starred_url":"https://api.github.com/users/sschneid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschneid/subscriptions","organizations_url":"https://api.github.com/users/sschneid/orgs","repos_url":"https://api.github.com/users/sschneid/repos","events_url":"https://api.github.com/users/sschneid/events{/privacy}","received_events_url":"https://api.github.com/users/sschneid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sschneid/vmpooler","description":"Provide configurable 'pools' of instantly-available (running) virtual machines","fork":true,"url":"https://api.github.com/repos/sschneid/vmpooler","forks_url":"https://api.github.com/repos/sschneid/vmpooler/forks","keys_url":"https://api.github.com/repos/sschneid/vmpooler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sschneid/vmpooler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sschneid/vmpooler/teams","hooks_url":"https://api.github.com/repos/sschneid/vmpooler/hooks","issue_events_url":"https://api.github.com/repos/sschneid/vmpooler/issues/events{/number}","events_url":"https://api.github.com/repos/sschneid/vmpooler/events","assignees_url":"https://api.github.com/repos/sschneid/vmpooler/assignees{/user}","branches_url":"https://api.github.com/repos/sschneid/vmpooler/branches{/branch}","tags_url":"https://api.github.com/repos/sschneid/vmpooler/tags","blobs_url":"https://api.github.com/repos/sschneid/vmpooler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sschneid/vmpooler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sschneid/vmpooler/git/refs{/sha}","trees_url":"https://api.github.com/repos/sschneid/vmpooler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sschneid/vmpooler/statuses/{sha}","languages_url":"https://api.github.com/repos/sschneid/vmpooler/languages","stargazers_url":"https://api.github.com/repos/sschneid/vmpooler/stargazers","contributors_url":"https://api.github.com/repos/sschneid/vmpooler/contributors","subscribers_url":"https://api.github.com/repos/sschneid/vmpooler/subscribers","subscription_url":"https://api.github.com/repos/sschneid/vmpooler/subscription","commits_url":"https://api.github.com/repos/sschneid/vmpooler/commits{/sha}","git_commits_url":"https://api.github.com/repos/sschneid/vmpooler/git/commits{/sha}","comments_url":"https://api.github.com/repos/sschneid/vmpooler/comments{/number}","issue_comment_url":"https://api.github.com/repos/sschneid/vmpooler/issues/comments{/number}","contents_url":"https://api.github.com/repos/sschneid/vmpooler/contents/{+path}","compare_url":"https://api.github.com/repos/sschneid/vmpooler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sschneid/vmpooler/merges","archive_url":"https://api.github.com/repos/sschneid/vmpooler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sschneid/vmpooler/downloads","issues_url":"https://api.github.com/repos/sschneid/vmpooler/issues{/number}","pulls_url":"https://api.github.com/repos/sschneid/vmpooler/pulls{/number}","milestones_url":"https://api.github.com/repos/sschneid/vmpooler/milestones{/number}","notifications_url":"https://api.github.com/repos/sschneid/vmpooler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sschneid/vmpooler/labels{/name}","releases_url":"https://api.github.com/repos/sschneid/vmpooler/releases{/id}","created_at":"2014-07-16T16:07:36Z","updated_at":"2016-01-14T01:00:08Z","pushed_at":"2016-01-14T18:47:05Z","git_url":"git://github.com/sschneid/vmpooler.git","ssh_url":"git@github.com:sschneid/vmpooler.git","clone_url":"https://github.com/sschneid/vmpooler.git","svn_url":"https://github.com/sschneid/vmpooler","homepage":"","size":1966,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"9e8a7d034b4aa129fa3524e4d784bfd2a0dc2bb4","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":13072980,"name":"vmpooler","full_name":"puppetlabs/vmpooler","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/vmpooler","description":"Provide configurable 'pools' of instantly-available (running) virtual machines","fork":false,"url":"https://api.github.com/repos/puppetlabs/vmpooler","forks_url":"https://api.github.com/repos/puppetlabs/vmpooler/forks","keys_url":"https://api.github.com/repos/puppetlabs/vmpooler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/vmpooler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/vmpooler/teams","hooks_url":"https://api.github.com/repos/puppetlabs/vmpooler/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/vmpooler/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/vmpooler/events","assignees_url":"https://api.github.com/repos/puppetlabs/vmpooler/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/vmpooler/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/vmpooler/tags","blobs_url":"https://api.github.com/repos/puppetlabs/vmpooler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/vmpooler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/vmpooler/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/vmpooler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/vmpooler/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/vmpooler/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/vmpooler/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/vmpooler/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/vmpooler/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/vmpooler/subscription","commits_url":"https://api.github.com/repos/puppetlabs/vmpooler/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/vmpooler/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/vmpooler/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/vmpooler/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/vmpooler/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/vmpooler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/vmpooler/merges","archive_url":"https://api.github.com/repos/puppetlabs/vmpooler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/vmpooler/downloads","issues_url":"https://api.github.com/repos/puppetlabs/vmpooler/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/vmpooler/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/vmpooler/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/vmpooler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/vmpooler/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/vmpooler/releases{/id}","created_at":"2013-09-24T18:27:35Z","updated_at":"2016-01-13T23:15:58Z","pushed_at":"2016-01-14T18:47:06Z","git_url":"git://github.com/puppetlabs/vmpooler.git","ssh_url":"git@github.com:puppetlabs/vmpooler.git","clone_url":"https://github.com/puppetlabs/vmpooler.git","svn_url":"https://github.com/puppetlabs/vmpooler","homepage":"","size":1304,"stargazers_count":44,"watchers_count":44,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":21,"mirror_url":null,"open_issues_count":13,"forks":21,"open_issues":13,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/147"},"html":{"href":"https://github.com/puppetlabs/vmpooler/pull/147"},"issue":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/issues/147"},"comments":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/vmpooler/statuses/48a1a8d6216e2a2a01d64df42c7264457db46ac1"}}}}