{"action":"created","comment":{"url":"https://api.github.com/repos/flynn/flynn/pulls/comments/23144521","id":23144521,"diff_hunk":"@@ -0,0 +1,114 @@\n+package volumeapi\n+\n+import (\n+\t\"encoding/json\"\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\n+\t\"github.com/flynn/flynn/Godeps/_workspace/src/github.com/julienschmidt/httprouter\"\n+\t\"github.com/flynn/flynn/host/volume\"\n+\t\"github.com/flynn/flynn/host/volume/zfs\"\n+\t\"github.com/flynn/flynn/pkg/httphelper\"\n+\t\"github.com/flynn/flynn/pkg/random\"\n+)\n+\n+type HttpAPI struct {\n+\tvman *volume.Manager\n+}\n+\n+func NewHttpAPI(vman *volume.Manager) *HttpAPI {\n+\treturn &HttpAPI{vman: vman}\n+}\n+\n+func RegisterRoutes(api *HttpAPI, r *httprouter.Router) {\n+\tr.POST(\"/volume/provider\", api.CreateProvider)\n+\tr.POST(\"/volume/provider/:provider_id/newVolume\", api.Create)\n+\tr.PUT(\"/volume/instances/:id/snapshot\", api.Snapshot)\n+\tr.GET(\"/volume/instances/:id/inspect\", api.Inspect)","path":"host/volume/api/http.go","position":null,"original_position":29,"commit_id":"68e6c4b5ed3c442122f913aa00b91c369e4c4d89","original_commit_id":"544ab2bde2e4db984b0be1eb1bcfabf00eb16bf2","user":{"login":"heavenlyhash","id":627638,"avatar_url":"https://avatars.githubusercontent.com/u/627638?v=3","gravatar_id":"","url":"https://api.github.com/users/heavenlyhash","html_url":"https://github.com/heavenlyhash","followers_url":"https://api.github.com/users/heavenlyhash/followers","following_url":"https://api.github.com/users/heavenlyhash/following{/other_user}","gists_url":"https://api.github.com/users/heavenlyhash/gists{/gist_id}","starred_url":"https://api.github.com/users/heavenlyhash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heavenlyhash/subscriptions","organizations_url":"https://api.github.com/users/heavenlyhash/orgs","repos_url":"https://api.github.com/users/heavenlyhash/repos","events_url":"https://api.github.com/users/heavenlyhash/events{/privacy}","received_events_url":"https://api.github.com/users/heavenlyhash/received_events","type":"User","site_admin":false},"body":"Very much like that storage layout.  Adopted.","created_at":"2015-01-19T06:36:30Z","updated_at":"2015-01-19T06:36:30Z","html_url":"https://github.com/flynn/flynn/pull/750#discussion_r23144521","pull_request_url":"https://api.github.com/repos/flynn/flynn/pulls/750","_links":{"self":{"href":"https://api.github.com/repos/flynn/flynn/pulls/comments/23144521"},"html":{"href":"https://github.com/flynn/flynn/pull/750#discussion_r23144521"},"pull_request":{"href":"https://api.github.com/repos/flynn/flynn/pulls/750"}}},"pull_request":{"url":"https://api.github.com/repos/flynn/flynn/pulls/750","id":27545337,"html_url":"https://github.com/flynn/flynn/pull/750","diff_url":"https://github.com/flynn/flynn/pull/750.diff","patch_url":"https://github.com/flynn/flynn/pull/750.patch","issue_url":"https://api.github.com/repos/flynn/flynn/issues/750","number":750,"state":"open","locked":false,"title":"Volume management","user":{"login":"heavenlyhash","id":627638,"avatar_url":"https://avatars.githubusercontent.com/u/627638?v=3","gravatar_id":"","url":"https://api.github.com/users/heavenlyhash","html_url":"https://github.com/heavenlyhash","followers_url":"https://api.github.com/users/heavenlyhash/followers","following_url":"https://api.github.com/users/heavenlyhash/following{/other_user}","gists_url":"https://api.github.com/users/heavenlyhash/gists{/gist_id}","starred_url":"https://api.github.com/users/heavenlyhash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heavenlyhash/subscriptions","organizations_url":"https://api.github.com/users/heavenlyhash/orgs","repos_url":"https://api.github.com/users/heavenlyhash/repos","events_url":"https://api.github.com/users/heavenlyhash/events{/privacy}","received_events_url":"https://api.github.com/users/heavenlyhash/received_events","type":"User","site_admin":false},"body":"Add 'host/volume' package.\r\n\r\nThis volume system creates shared persistent storage areas, exposing this ability through an API on the host, and allows job creation to specify volumes for mounting into the job container.  The prototype implementation is backed by ZFS.  Not all features we desire from the final system are present, but the ones that are -- basic volume creation though the API and use of that within job config -- should be working.\r\n","created_at":"2015-01-16T23:35:21Z","updated_at":"2015-01-19T06:36:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"958f5c38d05f3593c141ddcccb4524f70935565a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flynn/flynn/pulls/750/commits","review_comments_url":"https://api.github.com/repos/flynn/flynn/pulls/750/comments","review_comment_url":"https://api.github.com/repos/flynn/flynn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/flynn/flynn/issues/750/comments","statuses_url":"https://api.github.com/repos/flynn/flynn/statuses/68e6c4b5ed3c442122f913aa00b91c369e4c4d89","head":{"label":"flynn:volume-management","ref":"volume-management","sha":"68e6c4b5ed3c442122f913aa00b91c369e4c4d89","user":{"login":"flynn","id":4973613,"avatar_url":"https://avatars.githubusercontent.com/u/4973613?v=3","gravatar_id":"","url":"https://api.github.com/users/flynn","html_url":"https://github.com/flynn","followers_url":"https://api.github.com/users/flynn/followers","following_url":"https://api.github.com/users/flynn/following{/other_user}","gists_url":"https://api.github.com/users/flynn/gists{/gist_id}","starred_url":"https://api.github.com/users/flynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flynn/subscriptions","organizations_url":"https://api.github.com/users/flynn/orgs","repos_url":"https://api.github.com/users/flynn/repos","events_url":"https://api.github.com/users/flynn/events{/privacy}","received_events_url":"https://api.github.com/users/flynn/received_events","type":"Organization","site_admin":false},"repo":{"id":11290232,"name":"flynn","full_name":"flynn/flynn","owner":{"login":"flynn","id":4973613,"avatar_url":"https://avatars.githubusercontent.com/u/4973613?v=3","gravatar_id":"","url":"https://api.github.com/users/flynn","html_url":"https://github.com/flynn","followers_url":"https://api.github.com/users/flynn/followers","following_url":"https://api.github.com/users/flynn/following{/other_user}","gists_url":"https://api.github.com/users/flynn/gists{/gist_id}","starred_url":"https://api.github.com/users/flynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flynn/subscriptions","organizations_url":"https://api.github.com/users/flynn/orgs","repos_url":"https://api.github.com/users/flynn/repos","events_url":"https://api.github.com/users/flynn/events{/privacy}","received_events_url":"https://api.github.com/users/flynn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flynn/flynn","description":"A next generation open source platform as a service (PaaS)","fork":false,"url":"https://api.github.com/repos/flynn/flynn","forks_url":"https://api.github.com/repos/flynn/flynn/forks","keys_url":"https://api.github.com/repos/flynn/flynn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flynn/flynn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flynn/flynn/teams","hooks_url":"https://api.github.com/repos/flynn/flynn/hooks","issue_events_url":"https://api.github.com/repos/flynn/flynn/issues/events{/number}","events_url":"https://api.github.com/repos/flynn/flynn/events","assignees_url":"https://api.github.com/repos/flynn/flynn/assignees{/user}","branches_url":"https://api.github.com/repos/flynn/flynn/branches{/branch}","tags_url":"https://api.github.com/repos/flynn/flynn/tags","blobs_url":"https://api.github.com/repos/flynn/flynn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flynn/flynn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flynn/flynn/git/refs{/sha}","trees_url":"https://api.github.com/repos/flynn/flynn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flynn/flynn/statuses/{sha}","languages_url":"https://api.github.com/repos/flynn/flynn/languages","stargazers_url":"https://api.github.com/repos/flynn/flynn/stargazers","contributors_url":"https://api.github.com/repos/flynn/flynn/contributors","subscribers_url":"https://api.github.com/repos/flynn/flynn/subscribers","subscription_url":"https://api.github.com/repos/flynn/flynn/subscription","commits_url":"https://api.github.com/repos/flynn/flynn/commits{/sha}","git_commits_url":"https://api.github.com/repos/flynn/flynn/git/commits{/sha}","comments_url":"https://api.github.com/repos/flynn/flynn/comments{/number}","issue_comment_url":"https://api.github.com/repos/flynn/flynn/issues/comments/{number}","contents_url":"https://api.github.com/repos/flynn/flynn/contents/{+path}","compare_url":"https://api.github.com/repos/flynn/flynn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flynn/flynn/merges","archive_url":"https://api.github.com/repos/flynn/flynn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flynn/flynn/downloads","issues_url":"https://api.github.com/repos/flynn/flynn/issues{/number}","pulls_url":"https://api.github.com/repos/flynn/flynn/pulls{/number}","milestones_url":"https://api.github.com/repos/flynn/flynn/milestones{/number}","notifications_url":"https://api.github.com/repos/flynn/flynn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flynn/flynn/labels{/name}","releases_url":"https://api.github.com/repos/flynn/flynn/releases{/id}","created_at":"2013-07-09T18:22:06Z","updated_at":"2015-01-19T05:10:48Z","pushed_at":"2015-01-19T05:04:31Z","git_url":"git://github.com/flynn/flynn.git","ssh_url":"git@github.com:flynn/flynn.git","clone_url":"https://github.com/flynn/flynn.git","svn_url":"https://github.com/flynn/flynn","homepage":"https://flynn.io","size":30251,"stargazers_count":3148,"watchers_count":3148,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":196,"mirror_url":null,"open_issues_count":110,"forks":196,"open_issues":110,"watchers":3148,"default_branch":"master"}},"base":{"label":"flynn:master","ref":"master","sha":"75d6dcf8883eb1ae049483353b1013a408585a6e","user":{"login":"flynn","id":4973613,"avatar_url":"https://avatars.githubusercontent.com/u/4973613?v=3","gravatar_id":"","url":"https://api.github.com/users/flynn","html_url":"https://github.com/flynn","followers_url":"https://api.github.com/users/flynn/followers","following_url":"https://api.github.com/users/flynn/following{/other_user}","gists_url":"https://api.github.com/users/flynn/gists{/gist_id}","starred_url":"https://api.github.com/users/flynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flynn/subscriptions","organizations_url":"https://api.github.com/users/flynn/orgs","repos_url":"https://api.github.com/users/flynn/repos","events_url":"https://api.github.com/users/flynn/events{/privacy}","received_events_url":"https://api.github.com/users/flynn/received_events","type":"Organization","site_admin":false},"repo":{"id":11290232,"name":"flynn","full_name":"flynn/flynn","owner":{"login":"flynn","id":4973613,"avatar_url":"https://avatars.githubusercontent.com/u/4973613?v=3","gravatar_id":"","url":"https://api.github.com/users/flynn","html_url":"https://github.com/flynn","followers_url":"https://api.github.com/users/flynn/followers","following_url":"https://api.github.com/users/flynn/following{/other_user}","gists_url":"https://api.github.com/users/flynn/gists{/gist_id}","starred_url":"https://api.github.com/users/flynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flynn/subscriptions","organizations_url":"https://api.github.com/users/flynn/orgs","repos_url":"https://api.github.com/users/flynn/repos","events_url":"https://api.github.com/users/flynn/events{/privacy}","received_events_url":"https://api.github.com/users/flynn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flynn/flynn","description":"A next generation open source platform as a service (PaaS)","fork":false,"url":"https://api.github.com/repos/flynn/flynn","forks_url":"https://api.github.com/repos/flynn/flynn/forks","keys_url":"https://api.github.com/repos/flynn/flynn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flynn/flynn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flynn/flynn/teams","hooks_url":"https://api.github.com/repos/flynn/flynn/hooks","issue_events_url":"https://api.github.com/repos/flynn/flynn/issues/events{/number}","events_url":"https://api.github.com/repos/flynn/flynn/events","assignees_url":"https://api.github.com/repos/flynn/flynn/assignees{/user}","branches_url":"https://api.github.com/repos/flynn/flynn/branches{/branch}","tags_url":"https://api.github.com/repos/flynn/flynn/tags","blobs_url":"https://api.github.com/repos/flynn/flynn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flynn/flynn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flynn/flynn/git/refs{/sha}","trees_url":"https://api.github.com/repos/flynn/flynn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flynn/flynn/statuses/{sha}","languages_url":"https://api.github.com/repos/flynn/flynn/languages","stargazers_url":"https://api.github.com/repos/flynn/flynn/stargazers","contributors_url":"https://api.github.com/repos/flynn/flynn/contributors","subscribers_url":"https://api.github.com/repos/flynn/flynn/subscribers","subscription_url":"https://api.github.com/repos/flynn/flynn/subscription","commits_url":"https://api.github.com/repos/flynn/flynn/commits{/sha}","git_commits_url":"https://api.github.com/repos/flynn/flynn/git/commits{/sha}","comments_url":"https://api.github.com/repos/flynn/flynn/comments{/number}","issue_comment_url":"https://api.github.com/repos/flynn/flynn/issues/comments/{number}","contents_url":"https://api.github.com/repos/flynn/flynn/contents/{+path}","compare_url":"https://api.github.com/repos/flynn/flynn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flynn/flynn/merges","archive_url":"https://api.github.com/repos/flynn/flynn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flynn/flynn/downloads","issues_url":"https://api.github.com/repos/flynn/flynn/issues{/number}","pulls_url":"https://api.github.com/repos/flynn/flynn/pulls{/number}","milestones_url":"https://api.github.com/repos/flynn/flynn/milestones{/number}","notifications_url":"https://api.github.com/repos/flynn/flynn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flynn/flynn/labels{/name}","releases_url":"https://api.github.com/repos/flynn/flynn/releases{/id}","created_at":"2013-07-09T18:22:06Z","updated_at":"2015-01-19T05:10:48Z","pushed_at":"2015-01-19T05:04:31Z","git_url":"git://github.com/flynn/flynn.git","ssh_url":"git@github.com:flynn/flynn.git","clone_url":"https://github.com/flynn/flynn.git","svn_url":"https://github.com/flynn/flynn","homepage":"https://flynn.io","size":30251,"stargazers_count":3148,"watchers_count":3148,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":196,"mirror_url":null,"open_issues_count":110,"forks":196,"open_issues":110,"watchers":3148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flynn/flynn/pulls/750"},"html":{"href":"https://github.com/flynn/flynn/pull/750"},"issue":{"href":"https://api.github.com/repos/flynn/flynn/issues/750"},"comments":{"href":"https://api.github.com/repos/flynn/flynn/issues/750/comments"},"review_comments":{"href":"https://api.github.com/repos/flynn/flynn/pulls/750/comments"},"review_comment":{"href":"https://api.github.com/repos/flynn/flynn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/flynn/flynn/pulls/750/commits"},"statuses":{"href":"https://api.github.com/repos/flynn/flynn/statuses/68e6c4b5ed3c442122f913aa00b91c369e4c4d89"}}}}