{"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":240247879,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD","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":10,"created_at":"2018-01-29T12:32:19Z","updated_at":"2018-03-01T02:14:57Z","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/369451412","html_url":"https://github.com/kubernetes/kubernetes/pull/58958#issuecomment-369451412","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/58958","id":369451412,"user":{"login":"k8s-ci-robot","id":20407524,"avatar_url":"https://avatars0.githubusercontent.com/u/20407524?v=4","gravatar_id":"","url":"https://api.github.com/users/k8s-ci-robot","html_url":"https://github.com/k8s-ci-robot","followers_url":"https://api.github.com/users/k8s-ci-robot/followers","following_url":"https://api.github.com/users/k8s-ci-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-ci-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-ci-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-ci-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-ci-robot/orgs","repos_url":"https://api.github.com/users/k8s-ci-robot/repos","events_url":"https://api.github.com/users/k8s-ci-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-ci-robot/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T02:14:57Z","updated_at":"2018-03-01T02:14:57Z","author_association":"COLLABORATOR","body":"@Lion-Wei: PR needs rebase.\n\n<details>\n\nInstructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/devel/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.\n</details>"}}
{"actor":{"display_login":"k8s-ci-robot"}}