{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/cattle/pulls/comments/40712540","id":40712540,"diff_hunk":"@@ -11,3 +11,104 @@ def test_volume_delete_active(client, context):\n \n     volume = client.wait_success(client.delete(volume))\n     assert volume.state == 'removed'\n+\n+\n+def test_volume_create_state(client, context):\n+    name = random_str()\n+    c = client.create_volume(name=name, driver='local')\n+    c = client.wait_success(c)\n+    assert c.state == 'requested'\n+\n+    assert c.uri == 'local:///%s' % name\n+\n+    volume = client.wait_success(client.delete(c))\n+    assert volume.state == 'removed'\n+\n+\n+def test_volume_create_with_opts(client, context):\n+    name = random_str()\n+    c = client.create_volume(name=name,\n+                             driver='local',\n+                             driverOpts={'size': '1G'})\n+    c = client.wait_success(c)\n+    assert c.state == 'requested'\n+\n+    assert c.uri == 'local:///%s' % name\n+\n+    volume = client.wait_success(client.delete(c))\n+    assert volume.state == 'removed'\n+\n+\n+def test_create_container_with_volume(client, context, super_client):\n+    name1 = random_str()\n+    v1 = client.create_volume(name=name1, driver='local')\n+    v1 = client.wait_success(v1)\n+    assert v1.state == 'requested'\n+\n+    name2 = random_str()\n+    v2 = client.create_volume(name=name2, driver='local')\n+    v2 = client.wait_success(v2)\n+    assert v2.state == 'requested'\n+\n+    dataVolumeMounts = {'/var/lib/docker/mntpt1': v1.id,\n+                        '/var/lib/docker/mntpt2': v2.id}\n+    dataVolumes = {'/home': '/home'}\n+    c = client.create_container(imageUuid=context.image_uuid,\n+                                volumeDriver='local',\n+                                dataVolumes=dataVolumes,\n+                                dataVolumeMounts=dataVolumeMounts)\n+    c = client.wait_success(c, timeout=240)\n+    assert c.state == 'running'\n+\n+    dataVol1 = '%s:/var/lib/docker/mntpt1' % name1\n+    dataVol2 = '%s:/var/lib/docker/mntpt2' % name2\n+\n+    dataVol1Found = False\n+    dataVol2Found = False\n+\n+    for dataVol in c.dataVolumes:\n+        if dataVol == dataVol1:\n+            dataVol1Found = True\n+        if dataVol == dataVol2:\n+            dataVol2Found = True\n+\n+    assert dataVol1Found and dataVol2Found\n+\n+    v1 = client.wait_success(v1)\n+    v2 = client.wait_success(v2)\n+\n+    assert v1.state == 'active'\n+    assert v2.state == 'active'\n+\n+    vol1Found = False\n+    vol2Found = False\n+\n+    for vol in c.volumes():\n+        if vol.id == v1.id:\n+            vol1Found = True\n+        if vol.id == v2.id:\n+            vol2Found = True\n+\n+    assert not vol1Found and not vol2Found\n+\n+    vsp1 = super_client.list_volumeStoragePoolMap(volumeId=v1.id)\n+    vsp2 = super_client.list_volumeStoragePoolMap(volumeId=v2.id)\n+\n+    assert vsp1 is not None\n+    assert vsp2 is not None\n+\n+    new_host = super_client.create_host()\n+    new_host = super_client.wait_success(new_host)\n+\n+    try:","path":"tests/integration/cattletest/core/test_volume.py","position":102,"original_position":102,"commit_id":"ba2db3dfd7b0b2f6e206c9bd47093c9d29dc1e49","original_commit_id":"ba2db3dfd7b0b2f6e206c9bd47093c9d29dc1e49","user":{"login":"ibuildthecloud","id":1754002,"avatar_url":"https://avatars.githubusercontent.com/u/1754002?v=3","gravatar_id":"","url":"https://api.github.com/users/ibuildthecloud","html_url":"https://github.com/ibuildthecloud","followers_url":"https://api.github.com/users/ibuildthecloud/followers","following_url":"https://api.github.com/users/ibuildthecloud/following{/other_user}","gists_url":"https://api.github.com/users/ibuildthecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/ibuildthecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibuildthecloud/subscriptions","organizations_url":"https://api.github.com/users/ibuildthecloud/orgs","repos_url":"https://api.github.com/users/ibuildthecloud/repos","events_url":"https://api.github.com/users/ibuildthecloud/events{/privacy}","received_events_url":"https://api.github.com/users/ibuildthecloud/received_events","type":"User","site_admin":false},"body":"Use this style\r\n\r\n```python\r\n    with pytest.raises(ApiError) as e:\r\n       blah...\r\n    \r\n    assert e.value.error.status == 422\r\n    assert e.value.error.code == 'NotUnique'\r\n    assert e.value.error.fieldName == 'name'\r\n```","created_at":"2015-09-29T18:51:16Z","updated_at":"2015-09-29T18:51:16Z","html_url":"https://github.com/rancher/cattle/pull/899#discussion_r40712540","pull_request_url":"https://api.github.com/repos/rancher/cattle/pulls/899","_links":{"self":{"href":"https://api.github.com/repos/rancher/cattle/pulls/comments/40712540"},"html":{"href":"https://github.com/rancher/cattle/pull/899#discussion_r40712540"},"pull_request":{"href":"https://api.github.com/repos/rancher/cattle/pulls/899"}}},"pull_request":{"url":"https://api.github.com/repos/rancher/cattle/pulls/899","id":45964393,"html_url":"https://github.com/rancher/cattle/pull/899","diff_url":"https://github.com/rancher/cattle/pull/899.diff","patch_url":"https://github.com/rancher/cattle/pull/899.patch","issue_url":"https://api.github.com/repos/rancher/cattle/issues/899","number":899,"state":"open","locked":false,"title":"add volume api support for convoy","user":{"login":"wlan0","id":1050521,"avatar_url":"https://avatars.githubusercontent.com/u/1050521?v=3","gravatar_id":"","url":"https://api.github.com/users/wlan0","html_url":"https://github.com/wlan0","followers_url":"https://api.github.com/users/wlan0/followers","following_url":"https://api.github.com/users/wlan0/following{/other_user}","gists_url":"https://api.github.com/users/wlan0/gists{/gist_id}","starred_url":"https://api.github.com/users/wlan0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlan0/subscriptions","organizations_url":"https://api.github.com/users/wlan0/orgs","repos_url":"https://api.github.com/users/wlan0/repos","events_url":"https://api.github.com/users/wlan0/events{/privacy}","received_events_url":"https://api.github.com/users/wlan0/received_events","type":"User","site_admin":false},"body":"@ibuildthecloud This requires python-agent changes to be implemeneted.","created_at":"2015-09-25T00:00:22Z","updated_at":"2015-09-29T18:51:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60c92f1bb45c0270d0b9c2ab54a259503bd4c268","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rancher/cattle/pulls/899/commits","review_comments_url":"https://api.github.com/repos/rancher/cattle/pulls/899/comments","review_comment_url":"https://api.github.com/repos/rancher/cattle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/cattle/issues/899/comments","statuses_url":"https://api.github.com/repos/rancher/cattle/statuses/ba2db3dfd7b0b2f6e206c9bd47093c9d29dc1e49","head":{"label":"wlan0:master","ref":"master","sha":"ba2db3dfd7b0b2f6e206c9bd47093c9d29dc1e49","user":{"login":"wlan0","id":1050521,"avatar_url":"https://avatars.githubusercontent.com/u/1050521?v=3","gravatar_id":"","url":"https://api.github.com/users/wlan0","html_url":"https://github.com/wlan0","followers_url":"https://api.github.com/users/wlan0/followers","following_url":"https://api.github.com/users/wlan0/following{/other_user}","gists_url":"https://api.github.com/users/wlan0/gists{/gist_id}","starred_url":"https://api.github.com/users/wlan0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlan0/subscriptions","organizations_url":"https://api.github.com/users/wlan0/orgs","repos_url":"https://api.github.com/users/wlan0/repos","events_url":"https://api.github.com/users/wlan0/events{/privacy}","received_events_url":"https://api.github.com/users/wlan0/received_events","type":"User","site_admin":false},"repo":{"id":27775841,"name":"cattle","full_name":"wlan0/cattle","owner":{"login":"wlan0","id":1050521,"avatar_url":"https://avatars.githubusercontent.com/u/1050521?v=3","gravatar_id":"","url":"https://api.github.com/users/wlan0","html_url":"https://github.com/wlan0","followers_url":"https://api.github.com/users/wlan0/followers","following_url":"https://api.github.com/users/wlan0/following{/other_user}","gists_url":"https://api.github.com/users/wlan0/gists{/gist_id}","starred_url":"https://api.github.com/users/wlan0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlan0/subscriptions","organizations_url":"https://api.github.com/users/wlan0/orgs","repos_url":"https://api.github.com/users/wlan0/repos","events_url":"https://api.github.com/users/wlan0/events{/privacy}","received_events_url":"https://api.github.com/users/wlan0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wlan0/cattle","description":"Infrastructure orchestration platform","fork":true,"url":"https://api.github.com/repos/wlan0/cattle","forks_url":"https://api.github.com/repos/wlan0/cattle/forks","keys_url":"https://api.github.com/repos/wlan0/cattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wlan0/cattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wlan0/cattle/teams","hooks_url":"https://api.github.com/repos/wlan0/cattle/hooks","issue_events_url":"https://api.github.com/repos/wlan0/cattle/issues/events{/number}","events_url":"https://api.github.com/repos/wlan0/cattle/events","assignees_url":"https://api.github.com/repos/wlan0/cattle/assignees{/user}","branches_url":"https://api.github.com/repos/wlan0/cattle/branches{/branch}","tags_url":"https://api.github.com/repos/wlan0/cattle/tags","blobs_url":"https://api.github.com/repos/wlan0/cattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wlan0/cattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wlan0/cattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/wlan0/cattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wlan0/cattle/statuses/{sha}","languages_url":"https://api.github.com/repos/wlan0/cattle/languages","stargazers_url":"https://api.github.com/repos/wlan0/cattle/stargazers","contributors_url":"https://api.github.com/repos/wlan0/cattle/contributors","subscribers_url":"https://api.github.com/repos/wlan0/cattle/subscribers","subscription_url":"https://api.github.com/repos/wlan0/cattle/subscription","commits_url":"https://api.github.com/repos/wlan0/cattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/wlan0/cattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/wlan0/cattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/wlan0/cattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/wlan0/cattle/contents/{+path}","compare_url":"https://api.github.com/repos/wlan0/cattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wlan0/cattle/merges","archive_url":"https://api.github.com/repos/wlan0/cattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wlan0/cattle/downloads","issues_url":"https://api.github.com/repos/wlan0/cattle/issues{/number}","pulls_url":"https://api.github.com/repos/wlan0/cattle/pulls{/number}","milestones_url":"https://api.github.com/repos/wlan0/cattle/milestones{/number}","notifications_url":"https://api.github.com/repos/wlan0/cattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wlan0/cattle/labels{/name}","releases_url":"https://api.github.com/repos/wlan0/cattle/releases{/id}","created_at":"2014-12-09T16:32:44Z","updated_at":"2015-05-08T01:23:48Z","pushed_at":"2015-09-29T02:16:52Z","git_url":"git://github.com/wlan0/cattle.git","ssh_url":"git@github.com:wlan0/cattle.git","clone_url":"https://github.com/wlan0/cattle.git","svn_url":"https://github.com/wlan0/cattle","homepage":"","size":22122,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rancher:master","ref":"master","sha":"b4eccc25939f688e3fed1b80597382085b13cf85","user":{"login":"rancher","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":18023059,"name":"cattle","full_name":"rancher/cattle","owner":{"login":"rancher","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/cattle","description":"Infrastructure orchestration platform","fork":false,"url":"https://api.github.com/repos/rancher/cattle","forks_url":"https://api.github.com/repos/rancher/cattle/forks","keys_url":"https://api.github.com/repos/rancher/cattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/cattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/cattle/teams","hooks_url":"https://api.github.com/repos/rancher/cattle/hooks","issue_events_url":"https://api.github.com/repos/rancher/cattle/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/cattle/events","assignees_url":"https://api.github.com/repos/rancher/cattle/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/cattle/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/cattle/tags","blobs_url":"https://api.github.com/repos/rancher/cattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/cattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/cattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/cattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/cattle/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/cattle/languages","stargazers_url":"https://api.github.com/repos/rancher/cattle/stargazers","contributors_url":"https://api.github.com/repos/rancher/cattle/contributors","subscribers_url":"https://api.github.com/repos/rancher/cattle/subscribers","subscription_url":"https://api.github.com/repos/rancher/cattle/subscription","commits_url":"https://api.github.com/repos/rancher/cattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/cattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/cattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/cattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/cattle/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/cattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/cattle/merges","archive_url":"https://api.github.com/repos/rancher/cattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/cattle/downloads","issues_url":"https://api.github.com/repos/rancher/cattle/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/cattle/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/cattle/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/cattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/cattle/labels{/name}","releases_url":"https://api.github.com/repos/rancher/cattle/releases{/id}","created_at":"2014-03-23T00:19:52Z","updated_at":"2015-09-29T08:39:01Z","pushed_at":"2015-09-29T17:10:14Z","git_url":"git://github.com/rancher/cattle.git","ssh_url":"git@github.com:rancher/cattle.git","clone_url":"https://github.com/rancher/cattle.git","svn_url":"https://github.com/rancher/cattle","homepage":"","size":30458,"stargazers_count":163,"watchers_count":163,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":87,"forks":49,"open_issues":87,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/cattle/pulls/899"},"html":{"href":"https://github.com/rancher/cattle/pull/899"},"issue":{"href":"https://api.github.com/repos/rancher/cattle/issues/899"},"comments":{"href":"https://api.github.com/repos/rancher/cattle/issues/899/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/cattle/pulls/899/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/cattle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/cattle/pulls/899/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/cattle/statuses/ba2db3dfd7b0b2f6e206c9bd47093c9d29dc1e49"}}}}