{"action":"created","comment":{"url":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/comments/151918930","pull_request_review_id":77698962,"id":151918930,"diff_hunk":"@@ -0,0 +1,192 @@\n+/*\n+ * Copyright (C) 2017 XLAB, Ltd.\n+ *\n+ * This work is open source software, licensed under the terms of the\n+ * BSD license as described in the LICENSE file in the top-level directory.\n+ */\n+\n+package cmd\n+\n+import (\n+\t\"fmt\"\n+\t\"os\"\n+\t\"path/filepath\"\n+\n+\t\"github.com/mikelangelo-project/capstan/hypervisor\"\n+\t\"github.com/mikelangelo-project/capstan/util\"\n+\n+\t. \"github.com/mikelangelo-project/capstan/testing\"\n+\t. \"gopkg.in/check.v1\"\n+)\n+\n+type volumesSuite struct {\n+\tcapstanBinary string\n+\tpackageDir    string\n+\tpackageFiles  map[string]string\n+\trepo          *util.Repo\n+}\n+\n+func (s *volumesSuite) SetUpTest(c *C) {\n+\ts.packageDir = c.MkDir()\n+\tos.Chmod(s.packageDir, 0777)\n+}\n+\n+var _ = Suite(&volumesSuite{})\n+\n+func (s *volumesSuite) TestCreateVolume(c *C) {\n+\tm := []struct {\n+\t\tcomment      string\n+\t\tvolume       Volume\n+\t\texpectedMeta string\n+\t\texpectedInfo string\n+\t}{\n+\t\t{\n+\t\t\t\"create qcow2\",","path":"cmd/volume_test.go","position":44,"original_position":44,"commit_id":"d1e423c59a5d1ab5a095a0615df492b8eae890f5","original_commit_id":"d1e423c59a5d1ab5a095a0615df492b8eae890f5","user":{"login":"gberginc","id":1437960,"avatar_url":"https://avatars3.githubusercontent.com/u/1437960?v=4","gravatar_id":"","url":"https://api.github.com/users/gberginc","html_url":"https://github.com/gberginc","followers_url":"https://api.github.com/users/gberginc/followers","following_url":"https://api.github.com/users/gberginc/following{/other_user}","gists_url":"https://api.github.com/users/gberginc/gists{/gist_id}","starred_url":"https://api.github.com/users/gberginc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gberginc/subscriptions","organizations_url":"https://api.github.com/users/gberginc/orgs","repos_url":"https://api.github.com/users/gberginc/repos","events_url":"https://api.github.com/users/gberginc/events{/privacy}","received_events_url":"https://api.github.com/users/gberginc/received_events","type":"User","site_admin":false},"body":"Please make a test case for \"default\" config - this will allow us to be alerted whenever defaults are changed.","created_at":"2017-11-20T07:44:42Z","updated_at":"2017-11-20T07:50:42Z","html_url":"https://github.com/mikelangelo-project/capstan/pull/74#discussion_r151918930","pull_request_url":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/74","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/comments/151918930"},"html":{"href":"https://github.com/mikelangelo-project/capstan/pull/74#discussion_r151918930"},"pull_request":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/74","id":151142478,"html_url":"https://github.com/mikelangelo-project/capstan/pull/74","diff_url":"https://github.com/mikelangelo-project/capstan/pull/74.diff","patch_url":"https://github.com/mikelangelo-project/capstan/pull/74.patch","issue_url":"https://api.github.com/repos/mikelangelo-project/capstan/issues/74","number":74,"state":"open","locked":false,"title":"Create volumes with Capstan","user":{"login":"miha-plesko","id":8102426,"avatar_url":"https://avatars1.githubusercontent.com/u/8102426?v=4","gravatar_id":"","url":"https://api.github.com/users/miha-plesko","html_url":"https://github.com/miha-plesko","followers_url":"https://api.github.com/users/miha-plesko/followers","following_url":"https://api.github.com/users/miha-plesko/following{/other_user}","gists_url":"https://api.github.com/users/miha-plesko/gists{/gist_id}","starred_url":"https://api.github.com/users/miha-plesko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miha-plesko/subscriptions","organizations_url":"https://api.github.com/users/miha-plesko/orgs","repos_url":"https://api.github.com/users/miha-plesko/repos","events_url":"https://api.github.com/users/miha-plesko/events{/privacy}","received_events_url":"https://api.github.com/users/miha-plesko/received_events","type":"User","site_admin":false},"body":"With this commit we implement a simple wrapper around qemu-img to simplify volume creation for user by using Capstan:\r\n\r\n```\r\n$ capstan volume create vol1 --size 1GB --format qcow2\r\n```\r\n\r\nThe above command needs to be executed inside package (presence of meta/package.yaml is tested) and will create `volumes` directory with two files:\r\n\r\n```\r\n<package_root>\r\n  |-volumes\r\n    |-vol1.qcow2      # volume itself\r\n    |-vol1.qcow2.yaml # metadata for Capstan\r\n```\r\n\r\nThe metadata file is currently not used by Capstan yet, but will be soon since Capstan will automatically detect all the volumes inside ./volumes directory. Also `capstan volume delete` is implemented in this commit and `./volumes` directory is implicitly added to the .capstanignore.","created_at":"2017-11-07T15:23:01Z","updated_at":"2017-11-20T07:50:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5841859e14a60eae29949356d8e80ceb66ee58e5","assignee":{"login":"gberginc","id":1437960,"avatar_url":"https://avatars3.githubusercontent.com/u/1437960?v=4","gravatar_id":"","url":"https://api.github.com/users/gberginc","html_url":"https://github.com/gberginc","followers_url":"https://api.github.com/users/gberginc/followers","following_url":"https://api.github.com/users/gberginc/following{/other_user}","gists_url":"https://api.github.com/users/gberginc/gists{/gist_id}","starred_url":"https://api.github.com/users/gberginc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gberginc/subscriptions","organizations_url":"https://api.github.com/users/gberginc/orgs","repos_url":"https://api.github.com/users/gberginc/repos","events_url":"https://api.github.com/users/gberginc/events{/privacy}","received_events_url":"https://api.github.com/users/gberginc/received_events","type":"User","site_admin":false},"assignees":[{"login":"gberginc","id":1437960,"avatar_url":"https://avatars3.githubusercontent.com/u/1437960?v=4","gravatar_id":"","url":"https://api.github.com/users/gberginc","html_url":"https://github.com/gberginc","followers_url":"https://api.github.com/users/gberginc/followers","following_url":"https://api.github.com/users/gberginc/following{/other_user}","gists_url":"https://api.github.com/users/gberginc/gists{/gist_id}","starred_url":"https://api.github.com/users/gberginc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gberginc/subscriptions","organizations_url":"https://api.github.com/users/gberginc/orgs","repos_url":"https://api.github.com/users/gberginc/repos","events_url":"https://api.github.com/users/gberginc/events{/privacy}","received_events_url":"https://api.github.com/users/gberginc/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/74/commits","review_comments_url":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/74/comments","review_comment_url":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mikelangelo-project/capstan/issues/74/comments","statuses_url":"https://api.github.com/repos/mikelangelo-project/capstan/statuses/d1e423c59a5d1ab5a095a0615df492b8eae890f5","head":{"label":"miha-plesko:create-volume","ref":"create-volume","sha":"d1e423c59a5d1ab5a095a0615df492b8eae890f5","user":{"login":"miha-plesko","id":8102426,"avatar_url":"https://avatars1.githubusercontent.com/u/8102426?v=4","gravatar_id":"","url":"https://api.github.com/users/miha-plesko","html_url":"https://github.com/miha-plesko","followers_url":"https://api.github.com/users/miha-plesko/followers","following_url":"https://api.github.com/users/miha-plesko/following{/other_user}","gists_url":"https://api.github.com/users/miha-plesko/gists{/gist_id}","starred_url":"https://api.github.com/users/miha-plesko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miha-plesko/subscriptions","organizations_url":"https://api.github.com/users/miha-plesko/orgs","repos_url":"https://api.github.com/users/miha-plesko/repos","events_url":"https://api.github.com/users/miha-plesko/events{/privacy}","received_events_url":"https://api.github.com/users/miha-plesko/received_events","type":"User","site_admin":false},"repo":{"id":70180532,"name":"capstan","full_name":"miha-plesko/capstan","owner":{"login":"miha-plesko","id":8102426,"avatar_url":"https://avatars1.githubusercontent.com/u/8102426?v=4","gravatar_id":"","url":"https://api.github.com/users/miha-plesko","html_url":"https://github.com/miha-plesko","followers_url":"https://api.github.com/users/miha-plesko/followers","following_url":"https://api.github.com/users/miha-plesko/following{/other_user}","gists_url":"https://api.github.com/users/miha-plesko/gists{/gist_id}","starred_url":"https://api.github.com/users/miha-plesko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miha-plesko/subscriptions","organizations_url":"https://api.github.com/users/miha-plesko/orgs","repos_url":"https://api.github.com/users/miha-plesko/repos","events_url":"https://api.github.com/users/miha-plesko/events{/privacy}","received_events_url":"https://api.github.com/users/miha-plesko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miha-plesko/capstan","description":"Capstan, a tool for packaging and running your application on OSv.","fork":true,"url":"https://api.github.com/repos/miha-plesko/capstan","forks_url":"https://api.github.com/repos/miha-plesko/capstan/forks","keys_url":"https://api.github.com/repos/miha-plesko/capstan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miha-plesko/capstan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miha-plesko/capstan/teams","hooks_url":"https://api.github.com/repos/miha-plesko/capstan/hooks","issue_events_url":"https://api.github.com/repos/miha-plesko/capstan/issues/events{/number}","events_url":"https://api.github.com/repos/miha-plesko/capstan/events","assignees_url":"https://api.github.com/repos/miha-plesko/capstan/assignees{/user}","branches_url":"https://api.github.com/repos/miha-plesko/capstan/branches{/branch}","tags_url":"https://api.github.com/repos/miha-plesko/capstan/tags","blobs_url":"https://api.github.com/repos/miha-plesko/capstan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miha-plesko/capstan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miha-plesko/capstan/git/refs{/sha}","trees_url":"https://api.github.com/repos/miha-plesko/capstan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miha-plesko/capstan/statuses/{sha}","languages_url":"https://api.github.com/repos/miha-plesko/capstan/languages","stargazers_url":"https://api.github.com/repos/miha-plesko/capstan/stargazers","contributors_url":"https://api.github.com/repos/miha-plesko/capstan/contributors","subscribers_url":"https://api.github.com/repos/miha-plesko/capstan/subscribers","subscription_url":"https://api.github.com/repos/miha-plesko/capstan/subscription","commits_url":"https://api.github.com/repos/miha-plesko/capstan/commits{/sha}","git_commits_url":"https://api.github.com/repos/miha-plesko/capstan/git/commits{/sha}","comments_url":"https://api.github.com/repos/miha-plesko/capstan/comments{/number}","issue_comment_url":"https://api.github.com/repos/miha-plesko/capstan/issues/comments{/number}","contents_url":"https://api.github.com/repos/miha-plesko/capstan/contents/{+path}","compare_url":"https://api.github.com/repos/miha-plesko/capstan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miha-plesko/capstan/merges","archive_url":"https://api.github.com/repos/miha-plesko/capstan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miha-plesko/capstan/downloads","issues_url":"https://api.github.com/repos/miha-plesko/capstan/issues{/number}","pulls_url":"https://api.github.com/repos/miha-plesko/capstan/pulls{/number}","milestones_url":"https://api.github.com/repos/miha-plesko/capstan/milestones{/number}","notifications_url":"https://api.github.com/repos/miha-plesko/capstan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miha-plesko/capstan/labels{/name}","releases_url":"https://api.github.com/repos/miha-plesko/capstan/releases{/id}","deployments_url":"https://api.github.com/repos/miha-plesko/capstan/deployments","created_at":"2016-10-06T18:16:12Z","updated_at":"2016-10-06T18:16:13Z","pushed_at":"2017-11-16T15:23:23Z","git_url":"git://github.com/miha-plesko/capstan.git","ssh_url":"git@github.com:miha-plesko/capstan.git","clone_url":"https://github.com/miha-plesko/capstan.git","svn_url":"https://github.com/miha-plesko/capstan","homepage":"http://osv.io/capstan/","size":817,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"mikelangelo-project:master","ref":"master","sha":"4248dd0b0d48b094bd1cac83c7dff81873283b62","user":{"login":"mikelangelo-project","id":19607578,"avatar_url":"https://avatars2.githubusercontent.com/u/19607578?v=4","gravatar_id":"","url":"https://api.github.com/users/mikelangelo-project","html_url":"https://github.com/mikelangelo-project","followers_url":"https://api.github.com/users/mikelangelo-project/followers","following_url":"https://api.github.com/users/mikelangelo-project/following{/other_user}","gists_url":"https://api.github.com/users/mikelangelo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelangelo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelangelo-project/subscriptions","organizations_url":"https://api.github.com/users/mikelangelo-project/orgs","repos_url":"https://api.github.com/users/mikelangelo-project/repos","events_url":"https://api.github.com/users/mikelangelo-project/events{/privacy}","received_events_url":"https://api.github.com/users/mikelangelo-project/received_events","type":"Organization","site_admin":false},"repo":{"id":59827827,"name":"capstan","full_name":"mikelangelo-project/capstan","owner":{"login":"mikelangelo-project","id":19607578,"avatar_url":"https://avatars2.githubusercontent.com/u/19607578?v=4","gravatar_id":"","url":"https://api.github.com/users/mikelangelo-project","html_url":"https://github.com/mikelangelo-project","followers_url":"https://api.github.com/users/mikelangelo-project/followers","following_url":"https://api.github.com/users/mikelangelo-project/following{/other_user}","gists_url":"https://api.github.com/users/mikelangelo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelangelo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelangelo-project/subscriptions","organizations_url":"https://api.github.com/users/mikelangelo-project/orgs","repos_url":"https://api.github.com/users/mikelangelo-project/repos","events_url":"https://api.github.com/users/mikelangelo-project/events{/privacy}","received_events_url":"https://api.github.com/users/mikelangelo-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mikelangelo-project/capstan","description":"Capstan, a tool for packaging and running your application on OSv.","fork":true,"url":"https://api.github.com/repos/mikelangelo-project/capstan","forks_url":"https://api.github.com/repos/mikelangelo-project/capstan/forks","keys_url":"https://api.github.com/repos/mikelangelo-project/capstan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikelangelo-project/capstan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikelangelo-project/capstan/teams","hooks_url":"https://api.github.com/repos/mikelangelo-project/capstan/hooks","issue_events_url":"https://api.github.com/repos/mikelangelo-project/capstan/issues/events{/number}","events_url":"https://api.github.com/repos/mikelangelo-project/capstan/events","assignees_url":"https://api.github.com/repos/mikelangelo-project/capstan/assignees{/user}","branches_url":"https://api.github.com/repos/mikelangelo-project/capstan/branches{/branch}","tags_url":"https://api.github.com/repos/mikelangelo-project/capstan/tags","blobs_url":"https://api.github.com/repos/mikelangelo-project/capstan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikelangelo-project/capstan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikelangelo-project/capstan/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikelangelo-project/capstan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikelangelo-project/capstan/statuses/{sha}","languages_url":"https://api.github.com/repos/mikelangelo-project/capstan/languages","stargazers_url":"https://api.github.com/repos/mikelangelo-project/capstan/stargazers","contributors_url":"https://api.github.com/repos/mikelangelo-project/capstan/contributors","subscribers_url":"https://api.github.com/repos/mikelangelo-project/capstan/subscribers","subscription_url":"https://api.github.com/repos/mikelangelo-project/capstan/subscription","commits_url":"https://api.github.com/repos/mikelangelo-project/capstan/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikelangelo-project/capstan/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikelangelo-project/capstan/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikelangelo-project/capstan/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikelangelo-project/capstan/contents/{+path}","compare_url":"https://api.github.com/repos/mikelangelo-project/capstan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikelangelo-project/capstan/merges","archive_url":"https://api.github.com/repos/mikelangelo-project/capstan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikelangelo-project/capstan/downloads","issues_url":"https://api.github.com/repos/mikelangelo-project/capstan/issues{/number}","pulls_url":"https://api.github.com/repos/mikelangelo-project/capstan/pulls{/number}","milestones_url":"https://api.github.com/repos/mikelangelo-project/capstan/milestones{/number}","notifications_url":"https://api.github.com/repos/mikelangelo-project/capstan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikelangelo-project/capstan/labels{/name}","releases_url":"https://api.github.com/repos/mikelangelo-project/capstan/releases{/id}","deployments_url":"https://api.github.com/repos/mikelangelo-project/capstan/deployments","created_at":"2016-05-27T10:51:12Z","updated_at":"2017-10-18T03:16:29Z","pushed_at":"2017-11-16T15:24:53Z","git_url":"git://github.com/mikelangelo-project/capstan.git","ssh_url":"git@github.com:mikelangelo-project/capstan.git","clone_url":"https://github.com/mikelangelo-project/capstan.git","svn_url":"https://github.com/mikelangelo-project/capstan","homepage":"http://osv.io/capstan/","size":788,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":13,"forks":5,"open_issues":13,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/74"},"html":{"href":"https://github.com/mikelangelo-project/capstan/pull/74"},"issue":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/issues/74"},"comments":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/mikelangelo-project/capstan/statuses/d1e423c59a5d1ab5a095a0615df492b8eae890f5"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gberginc"}}