{"action":"created","comment":{"url":"https://api.github.com/repos/libopenstorage/openstorage/pulls/comments/57038723","id":57038723,"diff_hunk":"@@ -1,27 +1,155 @@\n package server\n \n-type flexVolumeClient struct{}\n+import (\n+\t\"errors\"\n+\t\"fmt\"\n \n-func newFlexVolumeClient() *flexVolumeClient {\n-\treturn &flexVolumeClient{}\n-}\n+\t\"github.com/libopenstorage/openstorage/pkg/mount\"\n+\t\"github.com/libopenstorage/openstorage/volume\"\n+\n+\t\"go.pedge.io/dlog\"\n+)\n+\n+const (\n+\tosdDriverKey = \"osdDriver\"\n+\tvolumeIDKey  = \"volumeID\"\n+\tpxDriverKey  = \"pxd\"\n+)\n+\n+var (\n+\tdeviceDriverMap map[string]string","path":"api/server/flexvolume.go","position":24,"original_position":24,"commit_id":"99f481b2f973744aabeeda9b173f17dfceabe793","original_commit_id":"99f481b2f973744aabeeda9b173f17dfceabe793","user":{"login":"peter-edge","id":4228796,"avatar_url":"https://avatars.githubusercontent.com/u/4228796?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-edge","html_url":"https://github.com/peter-edge","followers_url":"https://api.github.com/users/peter-edge/followers","following_url":"https://api.github.com/users/peter-edge/following{/other_user}","gists_url":"https://api.github.com/users/peter-edge/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-edge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-edge/subscriptions","organizations_url":"https://api.github.com/users/peter-edge/orgs","repos_url":"https://api.github.com/users/peter-edge/repos","events_url":"https://api.github.com/users/peter-edge/events{/privacy}","received_events_url":"https://api.github.com/users/peter-edge/received_events","type":"User","site_admin":false},"body":"private below public","created_at":"2016-03-22T18:07:07Z","updated_at":"2016-03-22T18:07:07Z","html_url":"https://github.com/libopenstorage/openstorage/pull/126#discussion_r57038723","pull_request_url":"https://api.github.com/repos/libopenstorage/openstorage/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/libopenstorage/openstorage/pulls/comments/57038723"},"html":{"href":"https://github.com/libopenstorage/openstorage/pull/126#discussion_r57038723"},"pull_request":{"href":"https://api.github.com/repos/libopenstorage/openstorage/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/libopenstorage/openstorage/pulls/126","id":63628488,"html_url":"https://github.com/libopenstorage/openstorage/pull/126","diff_url":"https://github.com/libopenstorage/openstorage/pull/126.diff","patch_url":"https://github.com/libopenstorage/openstorage/pull/126.patch","issue_url":"https://api.github.com/repos/libopenstorage/openstorage/issues/126","number":126,"state":"open","locked":false,"title":"Flexvolume for k8s integration","user":{"login":"adityadani","id":313611,"avatar_url":"https://avatars.githubusercontent.com/u/313611?v=3","gravatar_id":"","url":"https://api.github.com/users/adityadani","html_url":"https://github.com/adityadani","followers_url":"https://api.github.com/users/adityadani/followers","following_url":"https://api.github.com/users/adityadani/following{/other_user}","gists_url":"https://api.github.com/users/adityadani/gists{/gist_id}","starred_url":"https://api.github.com/users/adityadani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityadani/subscriptions","organizations_url":"https://api.github.com/users/adityadani/orgs","repos_url":"https://api.github.com/users/adityadani/repos","events_url":"https://api.github.com/users/adityadani/events{/privacy}","received_events_url":"https://api.github.com/users/adityadani/received_events","type":"User","site_admin":false},"body":"- Implemented the attach/detach/mount/unmount functions in flexvolume server plugin.\r\n- The flexvolume client now writes to stdout the way kubernetes flexvolume plugin expects for each command.\r\n- Modified the mounts package to provide devicePath given a mount point.\r\n\r\nNote: Currently we are storing a mapping of devices and their volume drivers in a in-memory map. If the osd daemon dies and upon restart it does not find a volume driver for a device then it defaults to pwx driver.","created_at":"2016-03-21T20:39:38Z","updated_at":"2016-03-22T18:07:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c158cdf858cbc25facd99a975eb7f19f3f740a90","assignee":{"login":"peter-edge","id":4228796,"avatar_url":"https://avatars.githubusercontent.com/u/4228796?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-edge","html_url":"https://github.com/peter-edge","followers_url":"https://api.github.com/users/peter-edge/followers","following_url":"https://api.github.com/users/peter-edge/following{/other_user}","gists_url":"https://api.github.com/users/peter-edge/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-edge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-edge/subscriptions","organizations_url":"https://api.github.com/users/peter-edge/orgs","repos_url":"https://api.github.com/users/peter-edge/repos","events_url":"https://api.github.com/users/peter-edge/events{/privacy}","received_events_url":"https://api.github.com/users/peter-edge/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/libopenstorage/openstorage/pulls/126/commits","review_comments_url":"https://api.github.com/repos/libopenstorage/openstorage/pulls/126/comments","review_comment_url":"https://api.github.com/repos/libopenstorage/openstorage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libopenstorage/openstorage/issues/126/comments","statuses_url":"https://api.github.com/repos/libopenstorage/openstorage/statuses/99f481b2f973744aabeeda9b173f17dfceabe793","head":{"label":"libopenstorage:flexvolume","ref":"flexvolume","sha":"99f481b2f973744aabeeda9b173f17dfceabe793","user":{"login":"libopenstorage","id":13478636,"avatar_url":"https://avatars.githubusercontent.com/u/13478636?v=3","gravatar_id":"","url":"https://api.github.com/users/libopenstorage","html_url":"https://github.com/libopenstorage","followers_url":"https://api.github.com/users/libopenstorage/followers","following_url":"https://api.github.com/users/libopenstorage/following{/other_user}","gists_url":"https://api.github.com/users/libopenstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/libopenstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libopenstorage/subscriptions","organizations_url":"https://api.github.com/users/libopenstorage/orgs","repos_url":"https://api.github.com/users/libopenstorage/repos","events_url":"https://api.github.com/users/libopenstorage/events{/privacy}","received_events_url":"https://api.github.com/users/libopenstorage/received_events","type":"Organization","site_admin":false},"repo":{"id":39651750,"name":"openstorage","full_name":"libopenstorage/openstorage","owner":{"login":"libopenstorage","id":13478636,"avatar_url":"https://avatars.githubusercontent.com/u/13478636?v=3","gravatar_id":"","url":"https://api.github.com/users/libopenstorage","html_url":"https://github.com/libopenstorage","followers_url":"https://api.github.com/users/libopenstorage/followers","following_url":"https://api.github.com/users/libopenstorage/following{/other_user}","gists_url":"https://api.github.com/users/libopenstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/libopenstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libopenstorage/subscriptions","organizations_url":"https://api.github.com/users/libopenstorage/orgs","repos_url":"https://api.github.com/users/libopenstorage/repos","events_url":"https://api.github.com/users/libopenstorage/events{/privacy}","received_events_url":"https://api.github.com/users/libopenstorage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libopenstorage/openstorage","description":"A multi-host clustered implementation of the open storage specification","fork":false,"url":"https://api.github.com/repos/libopenstorage/openstorage","forks_url":"https://api.github.com/repos/libopenstorage/openstorage/forks","keys_url":"https://api.github.com/repos/libopenstorage/openstorage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libopenstorage/openstorage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libopenstorage/openstorage/teams","hooks_url":"https://api.github.com/repos/libopenstorage/openstorage/hooks","issue_events_url":"https://api.github.com/repos/libopenstorage/openstorage/issues/events{/number}","events_url":"https://api.github.com/repos/libopenstorage/openstorage/events","assignees_url":"https://api.github.com/repos/libopenstorage/openstorage/assignees{/user}","branches_url":"https://api.github.com/repos/libopenstorage/openstorage/branches{/branch}","tags_url":"https://api.github.com/repos/libopenstorage/openstorage/tags","blobs_url":"https://api.github.com/repos/libopenstorage/openstorage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libopenstorage/openstorage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libopenstorage/openstorage/git/refs{/sha}","trees_url":"https://api.github.com/repos/libopenstorage/openstorage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libopenstorage/openstorage/statuses/{sha}","languages_url":"https://api.github.com/repos/libopenstorage/openstorage/languages","stargazers_url":"https://api.github.com/repos/libopenstorage/openstorage/stargazers","contributors_url":"https://api.github.com/repos/libopenstorage/openstorage/contributors","subscribers_url":"https://api.github.com/repos/libopenstorage/openstorage/subscribers","subscription_url":"https://api.github.com/repos/libopenstorage/openstorage/subscription","commits_url":"https://api.github.com/repos/libopenstorage/openstorage/commits{/sha}","git_commits_url":"https://api.github.com/repos/libopenstorage/openstorage/git/commits{/sha}","comments_url":"https://api.github.com/repos/libopenstorage/openstorage/comments{/number}","issue_comment_url":"https://api.github.com/repos/libopenstorage/openstorage/issues/comments{/number}","contents_url":"https://api.github.com/repos/libopenstorage/openstorage/contents/{+path}","compare_url":"https://api.github.com/repos/libopenstorage/openstorage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libopenstorage/openstorage/merges","archive_url":"https://api.github.com/repos/libopenstorage/openstorage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libopenstorage/openstorage/downloads","issues_url":"https://api.github.com/repos/libopenstorage/openstorage/issues{/number}","pulls_url":"https://api.github.com/repos/libopenstorage/openstorage/pulls{/number}","milestones_url":"https://api.github.com/repos/libopenstorage/openstorage/milestones{/number}","notifications_url":"https://api.github.com/repos/libopenstorage/openstorage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libopenstorage/openstorage/labels{/name}","releases_url":"https://api.github.com/repos/libopenstorage/openstorage/releases{/id}","deployments_url":"https://api.github.com/repos/libopenstorage/openstorage/deployments","created_at":"2015-07-24T19:01:34Z","updated_at":"2016-03-22T12:20:41Z","pushed_at":"2016-03-21T22:56:45Z","git_url":"git://github.com/libopenstorage/openstorage.git","ssh_url":"git@github.com:libopenstorage/openstorage.git","clone_url":"https://github.com/libopenstorage/openstorage.git","svn_url":"https://github.com/libopenstorage/openstorage","homepage":"","size":3716,"stargazers_count":79,"watchers_count":79,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":36,"forks":22,"open_issues":36,"watchers":79,"default_branch":"master"}},"base":{"label":"libopenstorage:master","ref":"master","sha":"f659f4fe566f21c76267245984255a5a6aea2b90","user":{"login":"libopenstorage","id":13478636,"avatar_url":"https://avatars.githubusercontent.com/u/13478636?v=3","gravatar_id":"","url":"https://api.github.com/users/libopenstorage","html_url":"https://github.com/libopenstorage","followers_url":"https://api.github.com/users/libopenstorage/followers","following_url":"https://api.github.com/users/libopenstorage/following{/other_user}","gists_url":"https://api.github.com/users/libopenstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/libopenstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libopenstorage/subscriptions","organizations_url":"https://api.github.com/users/libopenstorage/orgs","repos_url":"https://api.github.com/users/libopenstorage/repos","events_url":"https://api.github.com/users/libopenstorage/events{/privacy}","received_events_url":"https://api.github.com/users/libopenstorage/received_events","type":"Organization","site_admin":false},"repo":{"id":39651750,"name":"openstorage","full_name":"libopenstorage/openstorage","owner":{"login":"libopenstorage","id":13478636,"avatar_url":"https://avatars.githubusercontent.com/u/13478636?v=3","gravatar_id":"","url":"https://api.github.com/users/libopenstorage","html_url":"https://github.com/libopenstorage","followers_url":"https://api.github.com/users/libopenstorage/followers","following_url":"https://api.github.com/users/libopenstorage/following{/other_user}","gists_url":"https://api.github.com/users/libopenstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/libopenstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libopenstorage/subscriptions","organizations_url":"https://api.github.com/users/libopenstorage/orgs","repos_url":"https://api.github.com/users/libopenstorage/repos","events_url":"https://api.github.com/users/libopenstorage/events{/privacy}","received_events_url":"https://api.github.com/users/libopenstorage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libopenstorage/openstorage","description":"A multi-host clustered implementation of the open storage specification","fork":false,"url":"https://api.github.com/repos/libopenstorage/openstorage","forks_url":"https://api.github.com/repos/libopenstorage/openstorage/forks","keys_url":"https://api.github.com/repos/libopenstorage/openstorage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libopenstorage/openstorage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libopenstorage/openstorage/teams","hooks_url":"https://api.github.com/repos/libopenstorage/openstorage/hooks","issue_events_url":"https://api.github.com/repos/libopenstorage/openstorage/issues/events{/number}","events_url":"https://api.github.com/repos/libopenstorage/openstorage/events","assignees_url":"https://api.github.com/repos/libopenstorage/openstorage/assignees{/user}","branches_url":"https://api.github.com/repos/libopenstorage/openstorage/branches{/branch}","tags_url":"https://api.github.com/repos/libopenstorage/openstorage/tags","blobs_url":"https://api.github.com/repos/libopenstorage/openstorage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libopenstorage/openstorage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libopenstorage/openstorage/git/refs{/sha}","trees_url":"https://api.github.com/repos/libopenstorage/openstorage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libopenstorage/openstorage/statuses/{sha}","languages_url":"https://api.github.com/repos/libopenstorage/openstorage/languages","stargazers_url":"https://api.github.com/repos/libopenstorage/openstorage/stargazers","contributors_url":"https://api.github.com/repos/libopenstorage/openstorage/contributors","subscribers_url":"https://api.github.com/repos/libopenstorage/openstorage/subscribers","subscription_url":"https://api.github.com/repos/libopenstorage/openstorage/subscription","commits_url":"https://api.github.com/repos/libopenstorage/openstorage/commits{/sha}","git_commits_url":"https://api.github.com/repos/libopenstorage/openstorage/git/commits{/sha}","comments_url":"https://api.github.com/repos/libopenstorage/openstorage/comments{/number}","issue_comment_url":"https://api.github.com/repos/libopenstorage/openstorage/issues/comments{/number}","contents_url":"https://api.github.com/repos/libopenstorage/openstorage/contents/{+path}","compare_url":"https://api.github.com/repos/libopenstorage/openstorage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libopenstorage/openstorage/merges","archive_url":"https://api.github.com/repos/libopenstorage/openstorage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libopenstorage/openstorage/downloads","issues_url":"https://api.github.com/repos/libopenstorage/openstorage/issues{/number}","pulls_url":"https://api.github.com/repos/libopenstorage/openstorage/pulls{/number}","milestones_url":"https://api.github.com/repos/libopenstorage/openstorage/milestones{/number}","notifications_url":"https://api.github.com/repos/libopenstorage/openstorage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libopenstorage/openstorage/labels{/name}","releases_url":"https://api.github.com/repos/libopenstorage/openstorage/releases{/id}","deployments_url":"https://api.github.com/repos/libopenstorage/openstorage/deployments","created_at":"2015-07-24T19:01:34Z","updated_at":"2016-03-22T12:20:41Z","pushed_at":"2016-03-21T22:56:45Z","git_url":"git://github.com/libopenstorage/openstorage.git","ssh_url":"git@github.com:libopenstorage/openstorage.git","clone_url":"https://github.com/libopenstorage/openstorage.git","svn_url":"https://github.com/libopenstorage/openstorage","homepage":"","size":3716,"stargazers_count":79,"watchers_count":79,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":36,"forks":22,"open_issues":36,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libopenstorage/openstorage/pulls/126"},"html":{"href":"https://github.com/libopenstorage/openstorage/pull/126"},"issue":{"href":"https://api.github.com/repos/libopenstorage/openstorage/issues/126"},"comments":{"href":"https://api.github.com/repos/libopenstorage/openstorage/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/libopenstorage/openstorage/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/libopenstorage/openstorage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libopenstorage/openstorage/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/libopenstorage/openstorage/statuses/99f481b2f973744aabeeda9b173f17dfceabe793"}}}}