{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments/92902636","pull_request_review_id":13424840,"id":92902636,"diff_hunk":"@@ -191,12 +194,24 @@ def get_privileges(tenant_uuid, datastore):\n         error_info, privileges = get_default_privileges()\n         return error_info, privileges\n \n-def has_privilege(privileges, type):\n-    \"\"\" Check the privileges has the specific type of privilege set. \"\"\"\n+def has_privilege(privileges, type=None):\n+    \"\"\" Check the privileges has the specific type of privilege set.\n+        if param \"allow_create\" is None or False, which means check","path":"esx_service/utils/auth.py","position":44,"original_position":44,"commit_id":"8bbc0787103abb2d92386f75ed40276d23b1be0b","original_commit_id":"8bbc0787103abb2d92386f75ed40276d23b1be0b","user":{"login":"shaominchen","id":23061118,"avatar_url":"https://avatars.githubusercontent.com/u/23061118?v=3","gravatar_id":"","url":"https://api.github.com/users/shaominchen","html_url":"https://github.com/shaominchen","followers_url":"https://api.github.com/users/shaominchen/followers","following_url":"https://api.github.com/users/shaominchen/following{/other_user}","gists_url":"https://api.github.com/users/shaominchen/gists{/gist_id}","starred_url":"https://api.github.com/users/shaominchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaominchen/subscriptions","organizations_url":"https://api.github.com/users/shaominchen/orgs","repos_url":"https://api.github.com/users/shaominchen/repos","events_url":"https://api.github.com/users/shaominchen/events{/privacy}","received_events_url":"https://api.github.com/users/shaominchen/received_events","type":"User","site_admin":false},"body":"What does this \"param\" mean? I guess it means the param \"type\". Please clarify this.","created_at":"2016-12-16T23:19:45Z","updated_at":"2016-12-16T23:19:45Z","html_url":"https://github.com/vmware/docker-volume-vsphere/pull/828#discussion_r92902636","pull_request_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/828","_links":{"self":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments/92902636"},"html":{"href":"https://github.com/vmware/docker-volume-vsphere/pull/828#discussion_r92902636"},"pull_request":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/828"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/828","id":98406248,"html_url":"https://github.com/vmware/docker-volume-vsphere/pull/828","diff_url":"https://github.com/vmware/docker-volume-vsphere/pull/828.diff","patch_url":"https://github.com/vmware/docker-volume-vsphere/pull/828.patch","issue_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/828","number":828,"state":"open","locked":false,"title":"Support for default_datastore and data privileges change","user":{"login":"lipingxue","id":4754483,"avatar_url":"https://avatars.githubusercontent.com/u/4754483?v=3","gravatar_id":"","url":"https://api.github.com/users/lipingxue","html_url":"https://github.com/lipingxue","followers_url":"https://api.github.com/users/lipingxue/followers","following_url":"https://api.github.com/users/lipingxue/following{/other_user}","gists_url":"https://api.github.com/users/lipingxue/gists{/gist_id}","starred_url":"https://api.github.com/users/lipingxue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lipingxue/subscriptions","organizations_url":"https://api.github.com/users/lipingxue/orgs","repos_url":"https://api.github.com/users/lipingxue/repos","events_url":"https://api.github.com/users/lipingxue/events{/privacy}","received_events_url":"https://api.github.com/users/lipingxue/received_events","type":"User","site_admin":false},"body":"This change includes:\r\n1. support for default_datastore (including APIs to manage default_datastore, and corresponding VMDK op changes)\r\n2. change privileges from three privileges(create/remove/mount) to two (\"mount_only\" and \"full_access\")\r\n3. auth DB schema change to reflect the privilege change \r\n4. auth DB schema change: in \"tenants\" and \"volumes\" table, store datastore url instead of datastore name since datastore name may change;  don't store vm name in table \"vms\" since vm name may change\r\n5. add table \"versions\" to record auth-db schema version and corresponding logic to check it upgrade is needed or not\r\n6. add unit test and change some existing unit tests to test support for default_datastore\r\n7. remove some unused code in vmdkops_admin.py. Functions which have been removed have been put in auth_api.py.\r\n ","created_at":"2016-12-16T21:31:24Z","updated_at":"2016-12-17T00:03:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"809f3e85644f8a76490e14eacbe495629b4a2376","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/828/commits","review_comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/828/comments","review_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/828/comments","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/8bbc0787103abb2d92386f75ed40276d23b1be0b","head":{"label":"vmware:issue_709.liping","ref":"issue_709.liping","sha":"8bbc0787103abb2d92386f75ed40276d23b1be0b","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49599693,"name":"docker-volume-vsphere","full_name":"vmware/docker-volume-vsphere","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/docker-volume-vsphere","description":"vSphere Docker Volume Service","fork":false,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere","forks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/forks","keys_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/teams","hooks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/hooks","issue_events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/events","assignees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/tags","blobs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/languages","stargazers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/stargazers","contributors_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contributors","subscribers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscribers","subscription_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscription","commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/merges","archive_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/downloads","issues_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/deployments","created_at":"2016-01-13T20:25:36Z","updated_at":"2016-12-14T16:23:22Z","pushed_at":"2016-12-16T23:18:39Z","git_url":"git://github.com/vmware/docker-volume-vsphere.git","ssh_url":"git@github.com:vmware/docker-volume-vsphere.git","clone_url":"https://github.com/vmware/docker-volume-vsphere.git","svn_url":"https://github.com/vmware/docker-volume-vsphere","homepage":"https://vmware.github.io/docker-volume-vsphere","size":9065,"stargazers_count":93,"watchers_count":93,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":22,"mirror_url":null,"open_issues_count":122,"forks":22,"open_issues":122,"watchers":93,"default_branch":"master"}},"base":{"label":"vmware:master","ref":"master","sha":"1a47eb816851e8bf71dc9425051368af9fe9ae4a","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49599693,"name":"docker-volume-vsphere","full_name":"vmware/docker-volume-vsphere","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/docker-volume-vsphere","description":"vSphere Docker Volume Service","fork":false,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere","forks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/forks","keys_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/teams","hooks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/hooks","issue_events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/events","assignees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/tags","blobs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/languages","stargazers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/stargazers","contributors_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contributors","subscribers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscribers","subscription_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscription","commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/merges","archive_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/downloads","issues_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/deployments","created_at":"2016-01-13T20:25:36Z","updated_at":"2016-12-14T16:23:22Z","pushed_at":"2016-12-16T23:18:39Z","git_url":"git://github.com/vmware/docker-volume-vsphere.git","ssh_url":"git@github.com:vmware/docker-volume-vsphere.git","clone_url":"https://github.com/vmware/docker-volume-vsphere.git","svn_url":"https://github.com/vmware/docker-volume-vsphere","homepage":"https://vmware.github.io/docker-volume-vsphere","size":9065,"stargazers_count":93,"watchers_count":93,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":22,"mirror_url":null,"open_issues_count":122,"forks":22,"open_issues":122,"watchers":93,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/828"},"html":{"href":"https://github.com/vmware/docker-volume-vsphere/pull/828"},"issue":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/828"},"comments":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/828/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/828/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/828/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/8bbc0787103abb2d92386f75ed40276d23b1be0b"}}}}
{"actor":{"display_login":"shaominchen"}}