{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/58958","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/58958/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/58958/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/58958/events","html_url":"https://github.com/kubernetes/kubernetes/pull/58958","id":292390211,"number":58958,"title":"Assemble csi shared utility functions to csi_util","user":{"login":"Lion-Wei","id":28696384,"avatar_url":"https://avatars1.githubusercontent.com/u/28696384?v=4","gravatar_id":"","url":"https://api.github.com/users/Lion-Wei","html_url":"https://github.com/Lion-Wei","followers_url":"https://api.github.com/users/Lion-Wei/followers","following_url":"https://api.github.com/users/Lion-Wei/following{/other_user}","gists_url":"https://api.github.com/users/Lion-Wei/gists{/gist_id}","starred_url":"https://api.github.com/users/Lion-Wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lion-Wei/subscriptions","organizations_url":"https://api.github.com/users/Lion-Wei/orgs","repos_url":"https://api.github.com/users/Lion-Wei/repos","events_url":"https://api.github.com/users/Lion-Wei/events{/privacy}","received_events_url":"https://api.github.com/users/Lion-Wei/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":253450978,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900","default":false}],"state":"open","locked":false,"assignee":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars1.githubusercontent.com/u/10052848?v=4","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"assignees":[{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars1.githubusercontent.com/u/10052848?v=4","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-01-29T12:32:19Z","updated_at":"2018-02-12T16:31:47Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/58958","html_url":"https://github.com/kubernetes/kubernetes/pull/58958","diff_url":"https://github.com/kubernetes/kubernetes/pull/58958.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/58958.patch"},"body":"**What this PR does / why we need it**:\r\n\r\nAssemble csi shared utility functions to csi_util and add unit test.\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nFixes #58628\r\n\r\n**Special notes for your reviewer**:\r\n\r\nThe function list moved to csi_util\r\n```go\r\nfunc log(msg string, parts ...interface{}) string{}\r\nfunc getCSISourceFromSpec(spec *volume.Spec) (*v1.CSIPersistentVolumeSource, error){}\r\nfunc getCSIClient(volume, driverName string) *csiDriverClient{}\r\nfunc getTargetPath(uid types.UID, specVolumeID string, host volume.VolumeHost) string{}\r\nfunc getAttachmentName(volName, csiDriverName, nodeName string) string{}\r\nfunc saveVolumeData(p *csiPlugin, podUID types.UID, specVolID string, data map[string]string) error{}\r\nfunc loadVolumeData(dir string, fileName string) (map[string]string, error){}\r\n```\r\nAnd also, extracted common part of `csiPlugin.NetAttacher` and `csiPlugin.NewDetached` to `csiPlugin.newCSIAttacher`.\r\n\r\n**Release note**:\r\n```release-note\r\nNONE\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/364978955","html_url":"https://github.com/kubernetes/kubernetes/pull/58958#issuecomment-364978955","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/58958","id":364978955,"user":{"login":"vladimirvivien","id":309126,"avatar_url":"https://avatars0.githubusercontent.com/u/309126?v=4","gravatar_id":"","url":"https://api.github.com/users/vladimirvivien","html_url":"https://github.com/vladimirvivien","followers_url":"https://api.github.com/users/vladimirvivien/followers","following_url":"https://api.github.com/users/vladimirvivien/following{/other_user}","gists_url":"https://api.github.com/users/vladimirvivien/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimirvivien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimirvivien/subscriptions","organizations_url":"https://api.github.com/users/vladimirvivien/orgs","repos_url":"https://api.github.com/users/vladimirvivien/repos","events_url":"https://api.github.com/users/vladimirvivien/events{/privacy}","received_events_url":"https://api.github.com/users/vladimirvivien/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T16:31:47Z","updated_at":"2018-02-12T16:31:47Z","author_association":"CONTRIBUTOR","body":"@Lion-Wei squash commits."}}
{"actor":{"display_login":"vladimirvivien"}}