GitHub PullRequestReviewCommentEvent at 2014-12-02 13:14:05
Repository: flocker
Actor: exarkun
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/21157502","id":21157502,"diff_hunk":"@@ -242,17 +242,36 @@ def test_create_result(self):\n         pool = FilesystemStoragePool(FilePath(self.mktemp()))\n         service = VolumeService(FilePath(self.mktemp()), pool, reactor=Clock())\n         service.startService()\n-        d = service.create(MY_VOLUME)\n+        d = service.create(service.get(MY_VOLUME))\n         self.assertEqual(\n             self.successResultOf(d),\n             Volume(uuid=service.uuid, name=MY_VOLUME, service=service))\n \n+    def test_create_filesystem_with_size(self):\n+        \"\"\"\n+        ``create()`` creates the volume's filesystem respecting the specified\n+        ``VolumeSize`` maximum_size.\n+        \"\"\"\n+        EXPECTED_SIZE = VolumeSize(maximum_size=100000000)\n+        pool = FilesystemStoragePool(FilePath(self.mktemp()))\n+        service = VolumeService(FilePath(self.mktemp()), pool, reactor=Clock())\n+        service.startService()\n+        volume = self.successResultOf(\n+            service.create(service.get(MY_VOLUME, size=EXPECTED_SIZE))\n+        )\n+        created_volume = pool.get(volume)\n+        self.assertTrue(created_volume.get_path().isdir())\n+        self.assertEqual(\n+            (EXPECTED_SIZE, EXPECTED_SIZE),\n+            (created_volume.size, volume.size)\n+        )\n+\n     def test_create_filesystem(self):\n         \"\"\"``create()`` creates the volume's filesystem.\"\"\"\n         pool = FilesystemStoragePool(FilePath(self.mktemp()))\n         service = VolumeService(FilePath(self.mktemp()), pool, reactor=Clock())\n         service.startService()\n-        volume = self.successResultOf(service.create(MY_VOLUME))","path":"flocker/volume/test/test_service.py","position":34,"original_position":34,"commit_id":"162b1639a93527028bb597e6c9de4c285aac5917","original_commit_id":"162b1639a93527028bb597e6c9de4c285aac5917","user":{"login":"exarkun","id":254565,"avatar_url":"https://avatars.githubusercontent.com/u/254565?v=3","gravatar_id":"","url":"https://api.github.com/users/exarkun","html_url":"https://github.com/exarkun","followers_url":"https://api.github.com/users/exarkun/followers","following_url":"https://api.github.com/users/exarkun/following{/other_user}","gists_url":"https://api.github.com/users/exarkun/gists{/gist_id}","starred_url":"https://api.github.com/users/exarkun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exarkun/subscriptions","organizations_url":"https://api.github.com/users/exarkun/orgs","repos_url":"https://api.github.com/users/exarkun/repos","events_url":"https://api.github.com/users/exarkun/events{/privacy}","received_events_url":"https://api.github.com/users/exarkun/received_events","type":"User","site_admin":false},"body":"Likewise if we had `ModelVolume(name, size)` - which hopefully is where we're headed. :smile:  As mentioned above, using `AttachedVolume` here would be slightly problematic because it implies the existence of an application (because `AttachedVolume` names are application names) and the presence of mountpoint information - both of which are lacking at this point.","created_at":"2014-12-02T13:14:05Z","updated_at":"2014-12-02T13:14:05Z","html_url":"https://github.com/ClusterHQ/flocker/pull/1001#discussion_r21157502","pull_request_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1001","_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/21157502"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/1001#discussion_r21157502"},"pull_request":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1001"}}},"pull_request":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1001","id":25147186,"html_url":"https://github.com/ClusterHQ/flocker/pull/1001","diff_url":"https://github.com/ClusterHQ/flocker/pull/1001.diff","patch_url":"https://github.com/ClusterHQ/flocker/pull/1001.patch","issue_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1001","number":1001,"state":"open","locked":false,"title":"Create sized volume floc 978","user":{"login":"dwgebler","id":646585,"avatar_url":"https://avatars.githubusercontent.com/u/646585?v=3","gravatar_id":"","url":"https://api.github.com/users/dwgebler","html_url":"https://github.com/dwgebler","followers_url":"https://api.github.com/users/dwgebler/followers","following_url":"https://api.github.com/users/dwgebler/following{/other_user}","gists_url":"https://api.github.com/users/dwgebler/gists{/gist_id}","starred_url":"https://api.github.com/users/dwgebler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwgebler/subscriptions","organizations_url":"https://api.github.com/users/dwgebler/orgs","repos_url":"https://api.github.com/users/dwgebler/repos","events_url":"https://api.github.com/users/dwgebler/events{/privacy}","received_events_url":"https://api.github.com/users/dwgebler/received_events","type":"User","site_admin":false},"body":"Fixes FLOC-978","created_at":"2014-11-27T12:10:53Z","updated_at":"2014-12-02T13:14:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e52c2f178b8f9e0a62f0c774d558cb0438174b75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1001/commits","review_comments_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1001/comments","review_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1001/comments","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/162b1639a93527028bb597e6c9de4c285aac5917","head":{"label":"ClusterHQ:create-sized-volume-FLOC-978","ref":"create-sized-volume-FLOC-978","sha":"162b1639a93527028bb597e6c9de4c285aac5917","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":19248542,"name":"flocker","full_name":"ClusterHQ/flocker","owner":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterHQ/flocker","description":"Easily manage Docker containers & their data","fork":false,"url":"https://api.github.com/repos/ClusterHQ/flocker","forks_url":"https://api.github.com/repos/ClusterHQ/flocker/forks","keys_url":"https://api.github.com/repos/ClusterHQ/flocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterHQ/flocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterHQ/flocker/teams","hooks_url":"https://api.github.com/repos/ClusterHQ/flocker/hooks","issue_events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterHQ/flocker/events","assignees_url":"https://api.github.com/repos/ClusterHQ/flocker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterHQ/flocker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterHQ/flocker/tags","blobs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterHQ/flocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterHQ/flocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterHQ/flocker/languages","stargazers_url":"https://api.github.com/repos/ClusterHQ/flocker/stargazers","contributors_url":"https://api.github.com/repos/ClusterHQ/flocker/contributors","subscribers_url":"https://api.github.com/repos/ClusterHQ/flocker/subscribers","subscription_url":"https://api.github.com/repos/ClusterHQ/flocker/subscription","commits_url":"https://api.github.com/repos/ClusterHQ/flocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterHQ/flocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments/{number}","contents_url":"https://api.github.com/repos/ClusterHQ/flocker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterHQ/flocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterHQ/flocker/merges","archive_url":"https://api.github.com/repos/ClusterHQ/flocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterHQ/flocker/downloads","issues_url":"https://api.github.com/repos/ClusterHQ/flocker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterHQ/flocker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterHQ/flocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterHQ/flocker/releases{/id}","created_at":"2014-04-28T18:02:14Z","updated_at":"2014-12-02T12:41:04Z","pushed_at":"2014-12-02T12:18:58Z","git_url":"git://github.com/ClusterHQ/flocker.git","ssh_url":"git@github.com:ClusterHQ/flocker.git","clone_url":"https://github.com/ClusterHQ/flocker.git","svn_url":"https://github.com/ClusterHQ/flocker","homepage":"https://clusterhq.com","size":43292,"stargazers_count":931,"watchers_count":931,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":279,"forks":38,"open_issues":279,"watchers":931,"default_branch":"master"}},"base":{"label":"ClusterHQ:master","ref":"master","sha":"200dc81c1055da660df3ba1816142ca66f2e1d12","user":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"repo":{"id":19248542,"name":"flocker","full_name":"ClusterHQ/flocker","owner":{"login":"ClusterHQ","id":7913449,"avatar_url":"https://avatars.githubusercontent.com/u/7913449?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterHQ","html_url":"https://github.com/ClusterHQ","followers_url":"https://api.github.com/users/ClusterHQ/followers","following_url":"https://api.github.com/users/ClusterHQ/following{/other_user}","gists_url":"https://api.github.com/users/ClusterHQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterHQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterHQ/subscriptions","organizations_url":"https://api.github.com/users/ClusterHQ/orgs","repos_url":"https://api.github.com/users/ClusterHQ/repos","events_url":"https://api.github.com/users/ClusterHQ/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterHQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterHQ/flocker","description":"Easily manage Docker containers & their data","fork":false,"url":"https://api.github.com/repos/ClusterHQ/flocker","forks_url":"https://api.github.com/repos/ClusterHQ/flocker/forks","keys_url":"https://api.github.com/repos/ClusterHQ/flocker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterHQ/flocker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterHQ/flocker/teams","hooks_url":"https://api.github.com/repos/ClusterHQ/flocker/hooks","issue_events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterHQ/flocker/events","assignees_url":"https://api.github.com/repos/ClusterHQ/flocker/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterHQ/flocker/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterHQ/flocker/tags","blobs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterHQ/flocker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterHQ/flocker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterHQ/flocker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterHQ/flocker/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterHQ/flocker/languages","stargazers_url":"https://api.github.com/repos/ClusterHQ/flocker/stargazers","contributors_url":"https://api.github.com/repos/ClusterHQ/flocker/contributors","subscribers_url":"https://api.github.com/repos/ClusterHQ/flocker/subscribers","subscription_url":"https://api.github.com/repos/ClusterHQ/flocker/subscription","commits_url":"https://api.github.com/repos/ClusterHQ/flocker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterHQ/flocker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments/{number}","contents_url":"https://api.github.com/repos/ClusterHQ/flocker/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterHQ/flocker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterHQ/flocker/merges","archive_url":"https://api.github.com/repos/ClusterHQ/flocker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterHQ/flocker/downloads","issues_url":"https://api.github.com/repos/ClusterHQ/flocker/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterHQ/flocker/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterHQ/flocker/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterHQ/flocker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/labels{/name}","releases_url":"https://api.github.com/repos/ClusterHQ/flocker/releases{/id}","created_at":"2014-04-28T18:02:14Z","updated_at":"2014-12-02T12:41:04Z","pushed_at":"2014-12-02T12:18:58Z","git_url":"git://github.com/ClusterHQ/flocker.git","ssh_url":"git@github.com:ClusterHQ/flocker.git","clone_url":"https://github.com/ClusterHQ/flocker.git","svn_url":"https://github.com/ClusterHQ/flocker","homepage":"https://clusterhq.com","size":43292,"stargazers_count":931,"watchers_count":931,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":279,"forks":38,"open_issues":279,"watchers":931,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1001"},"html":{"href":"https://github.com/ClusterHQ/flocker/pull/1001"},"issue":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/1001"},"comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/issues/1001/comments"},"review_comments":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1001/comments"},"review_comment":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1001/commits"},"statuses":{"href":"https://api.github.com/repos/ClusterHQ/flocker/statuses/162b1639a93527028bb597e6c9de4c285aac5917"}}}}