{"action":"created","comment":{"url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/comments/209652419","pull_request_review_id":145706434,"id":209652419,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTY1MjQxOQ==","diff_hunk":"@@ -0,0 +1,212 @@\n+// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+package filestorage\n+\n+import (\n+\t\"context\"\n+\t\"fmt\"\n+\t\"math/rand\"\n+\t\"os\"\n+\t\"time\"\n+\n+\t\"github.com/golang/glog\"\n+\t\"github.com/kubernetes-incubator/external-storage/lib/controller\"\n+\t\"github.com/oracle/oci-go-sdk/common\"\n+\t\"github.com/oracle/oci-go-sdk/core\"\n+\t\"github.com/oracle/oci-go-sdk/filestorage\"\n+\t\"github.com/oracle/oci-go-sdk/identity\"\n+\n+\t\"github.com/oracle/oci-volume-provisioner/pkg/oci/client\"\n+\t\"github.com/oracle/oci-volume-provisioner/pkg/provisioner/plugin\"\n+\n+\t\"k8s.io/api/core/v1\"\n+\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+)\n+\n+const (\n+\tociVolumeID            = \"volume.beta.kubernetes.io/oci-volume-id\"\n+\tociExportID            = \"volume.beta.kubernetes.io/oci-export-id\"\n+\tvolumePrefixEnvVarName = \"OCI_VOLUME_NAME_PREFIX\"\n+\tfsType                 = \"fsType\"\n+\tsubnetID               = \"subnetId\"\n+\tmntTargetID            = \"mntTargetId\"\n+)\n+\n+// filesystemProvisioner is the internal provisioner for OCI filesystem volumes\n+type filesystemProvisioner struct {\n+\tclient client.ProvisionerClient\n+}\n+\n+var _ plugin.ProvisionerPlugin = &filesystemProvisioner{}\n+\n+// NewFilesystemProvisioner creates a new file system provisioner that creates\n+// filsystems using OCI file system service.\n+func NewFilesystemProvisioner(client client.ProvisionerClient) plugin.ProvisionerPlugin {\n+\trand.Seed(time.Now().Unix())\n+\treturn &filesystemProvisioner{\n+\t\tclient: client,\n+\t}\n+}\n+\n+// getMountTargetFromID retrieves mountTarget from given mountTargetID\n+func getMountTargetFromID(ctx context.Context, mountTargetID string, fileStorageClient client.FileStorage) (*filestorage.MountTarget, error) {\n+\tresponseMnt, err := fileStorageClient.GetMountTarget(ctx, filestorage.GetMountTargetRequest{\n+\t\tMountTargetId: common.String(mountTargetID),\n+\t})\n+\tif err != nil {\n+\t\tglog.Errorf(\"Failed to retrieve mount point mountTargetId=%q: %v\", mountTargetID, err)\n+\t\treturn nil, err\n+\t}\n+\treturn &responseMnt.MountTarget, nil\n+}\n+\n+func getOrCreateMountTarget(ctx context.Context, availabilityDomain *string, subnetID string, compartmentID string, fileStorageClient client.FileStorage) (id *filestorage.MountTarget, err error) {\n+\t// Check if there there already is a mount target in the existing compartment","path":"pkg/provisioner/filestorage/filestorage.go","position":76,"original_position":76,"commit_id":"2bf4d499eb2fe71e32271379ac3cecd27b784709","original_commit_id":"2bf4d499eb2fe71e32271379ac3cecd27b784709","user":{"login":"MadalinaPatrichi","id":1522684,"node_id":"MDQ6VXNlcjE1MjI2ODQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1522684?v=4","gravatar_id":"","url":"https://api.github.com/users/MadalinaPatrichi","html_url":"https://github.com/MadalinaPatrichi","followers_url":"https://api.github.com/users/MadalinaPatrichi/followers","following_url":"https://api.github.com/users/MadalinaPatrichi/following{/other_user}","gists_url":"https://api.github.com/users/MadalinaPatrichi/gists{/gist_id}","starred_url":"https://api.github.com/users/MadalinaPatrichi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadalinaPatrichi/subscriptions","organizations_url":"https://api.github.com/users/MadalinaPatrichi/orgs","repos_url":"https://api.github.com/users/MadalinaPatrichi/repos","events_url":"https://api.github.com/users/MadalinaPatrichi/events{/privacy}","received_events_url":"https://api.github.com/users/MadalinaPatrichi/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2018-08-13T15:25:18Z","updated_at":"2018-08-13T15:25:18Z","html_url":"https://github.com/oracle/oci-volume-provisioner/pull/154#discussion_r209652419","pull_request_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/154","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/comments/209652419"},"html":{"href":"https://github.com/oracle/oci-volume-provisioner/pull/154#discussion_r209652419"},"pull_request":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/154"}},"in_reply_to_id":209650879},"pull_request":{"url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/154","id":205093459,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MDkzNDU5","html_url":"https://github.com/oracle/oci-volume-provisioner/pull/154","diff_url":"https://github.com/oracle/oci-volume-provisioner/pull/154.diff","patch_url":"https://github.com/oracle/oci-volume-provisioner/pull/154.patch","issue_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/154","number":154,"state":"open","locked":false,"title":"Dedicated FSS","user":{"login":"MadalinaPatrichi","id":1522684,"node_id":"MDQ6VXNlcjE1MjI2ODQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1522684?v=4","gravatar_id":"","url":"https://api.github.com/users/MadalinaPatrichi","html_url":"https://github.com/MadalinaPatrichi","followers_url":"https://api.github.com/users/MadalinaPatrichi/followers","following_url":"https://api.github.com/users/MadalinaPatrichi/following{/other_user}","gists_url":"https://api.github.com/users/MadalinaPatrichi/gists{/gist_id}","starred_url":"https://api.github.com/users/MadalinaPatrichi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadalinaPatrichi/subscriptions","organizations_url":"https://api.github.com/users/MadalinaPatrichi/orgs","repos_url":"https://api.github.com/users/MadalinaPatrichi/repos","events_url":"https://api.github.com/users/MadalinaPatrichi/events{/privacy}","received_events_url":"https://api.github.com/users/MadalinaPatrichi/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-31T12:20:46Z","updated_at":"2018-08-13T15:25:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e622e9c276bb0c76cebc71a41a044d4e3d3745e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"bdourallawzi","id":41049863,"node_id":"MDQ6VXNlcjQxMDQ5ODYz","avatar_url":"https://avatars2.githubusercontent.com/u/41049863?v=4","gravatar_id":"","url":"https://api.github.com/users/bdourallawzi","html_url":"https://github.com/bdourallawzi","followers_url":"https://api.github.com/users/bdourallawzi/followers","following_url":"https://api.github.com/users/bdourallawzi/following{/other_user}","gists_url":"https://api.github.com/users/bdourallawzi/gists{/gist_id}","starred_url":"https://api.github.com/users/bdourallawzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdourallawzi/subscriptions","organizations_url":"https://api.github.com/users/bdourallawzi/orgs","repos_url":"https://api.github.com/users/bdourallawzi/repos","events_url":"https://api.github.com/users/bdourallawzi/events{/privacy}","received_events_url":"https://api.github.com/users/bdourallawzi/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/154/commits","review_comments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/154/comments","review_comment_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/154/comments","statuses_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/statuses/2bf4d499eb2fe71e32271379ac3cecd27b784709","head":{"label":"oracle:mp/fileStorageNew","ref":"mp/fileStorageNew","sha":"2bf4d499eb2fe71e32271379ac3cecd27b784709","user":{"login":"oracle","id":4430336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MzAzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4430336?v=4","gravatar_id":"","url":"https://api.github.com/users/oracle","html_url":"https://github.com/oracle","followers_url":"https://api.github.com/users/oracle/followers","following_url":"https://api.github.com/users/oracle/following{/other_user}","gists_url":"https://api.github.com/users/oracle/gists{/gist_id}","starred_url":"https://api.github.com/users/oracle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oracle/subscriptions","organizations_url":"https://api.github.com/users/oracle/orgs","repos_url":"https://api.github.com/users/oracle/repos","events_url":"https://api.github.com/users/oracle/events{/privacy}","received_events_url":"https://api.github.com/users/oracle/received_events","type":"Organization","site_admin":false},"repo":{"id":102543996,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI1NDM5OTY=","name":"oci-volume-provisioner","full_name":"oracle/oci-volume-provisioner","owner":{"login":"oracle","id":4430336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MzAzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4430336?v=4","gravatar_id":"","url":"https://api.github.com/users/oracle","html_url":"https://github.com/oracle","followers_url":"https://api.github.com/users/oracle/followers","following_url":"https://api.github.com/users/oracle/following{/other_user}","gists_url":"https://api.github.com/users/oracle/gists{/gist_id}","starred_url":"https://api.github.com/users/oracle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oracle/subscriptions","organizations_url":"https://api.github.com/users/oracle/orgs","repos_url":"https://api.github.com/users/oracle/repos","events_url":"https://api.github.com/users/oracle/events{/privacy}","received_events_url":"https://api.github.com/users/oracle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oracle/oci-volume-provisioner","description":"The OCI Volume Provisioner enables dynamic provisioning of storage resources when running Kubernetes on Oracle Cloud Infrastructure","fork":false,"url":"https://api.github.com/repos/oracle/oci-volume-provisioner","forks_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/forks","keys_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/teams","hooks_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/hooks","issue_events_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/events","assignees_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/tags","blobs_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/languages","stargazers_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/stargazers","contributors_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/contributors","subscribers_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/subscribers","subscription_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/subscription","commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/merges","archive_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/downloads","issues_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/releases{/id}","deployments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/deployments","created_at":"2017-09-06T00:39:39Z","updated_at":"2018-08-10T14:51:37Z","pushed_at":"2018-08-13T14:52:14Z","git_url":"git://github.com/oracle/oci-volume-provisioner.git","ssh_url":"git@github.com:oracle/oci-volume-provisioner.git","clone_url":"https://github.com/oracle/oci-volume-provisioner.git","svn_url":"https://github.com/oracle/oci-volume-provisioner","homepage":"","size":60666,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":17,"watchers":11,"default_branch":"master"}},"base":{"label":"oracle:master","ref":"master","sha":"8cbb5bfc38fb15dac6062266d9ad83f83eb4fa1d","user":{"login":"oracle","id":4430336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MzAzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4430336?v=4","gravatar_id":"","url":"https://api.github.com/users/oracle","html_url":"https://github.com/oracle","followers_url":"https://api.github.com/users/oracle/followers","following_url":"https://api.github.com/users/oracle/following{/other_user}","gists_url":"https://api.github.com/users/oracle/gists{/gist_id}","starred_url":"https://api.github.com/users/oracle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oracle/subscriptions","organizations_url":"https://api.github.com/users/oracle/orgs","repos_url":"https://api.github.com/users/oracle/repos","events_url":"https://api.github.com/users/oracle/events{/privacy}","received_events_url":"https://api.github.com/users/oracle/received_events","type":"Organization","site_admin":false},"repo":{"id":102543996,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI1NDM5OTY=","name":"oci-volume-provisioner","full_name":"oracle/oci-volume-provisioner","owner":{"login":"oracle","id":4430336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MzAzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4430336?v=4","gravatar_id":"","url":"https://api.github.com/users/oracle","html_url":"https://github.com/oracle","followers_url":"https://api.github.com/users/oracle/followers","following_url":"https://api.github.com/users/oracle/following{/other_user}","gists_url":"https://api.github.com/users/oracle/gists{/gist_id}","starred_url":"https://api.github.com/users/oracle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oracle/subscriptions","organizations_url":"https://api.github.com/users/oracle/orgs","repos_url":"https://api.github.com/users/oracle/repos","events_url":"https://api.github.com/users/oracle/events{/privacy}","received_events_url":"https://api.github.com/users/oracle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oracle/oci-volume-provisioner","description":"The OCI Volume Provisioner enables dynamic provisioning of storage resources when running Kubernetes on Oracle Cloud Infrastructure","fork":false,"url":"https://api.github.com/repos/oracle/oci-volume-provisioner","forks_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/forks","keys_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/teams","hooks_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/hooks","issue_events_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/events","assignees_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/tags","blobs_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/languages","stargazers_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/stargazers","contributors_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/contributors","subscribers_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/subscribers","subscription_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/subscription","commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/merges","archive_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/downloads","issues_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/releases{/id}","deployments_url":"https://api.github.com/repos/oracle/oci-volume-provisioner/deployments","created_at":"2017-09-06T00:39:39Z","updated_at":"2018-08-10T14:51:37Z","pushed_at":"2018-08-13T14:52:14Z","git_url":"git://github.com/oracle/oci-volume-provisioner.git","ssh_url":"git@github.com:oracle/oci-volume-provisioner.git","clone_url":"https://github.com/oracle/oci-volume-provisioner.git","svn_url":"https://github.com/oracle/oci-volume-provisioner","homepage":"","size":60666,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":17,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/154"},"html":{"href":"https://github.com/oracle/oci-volume-provisioner/pull/154"},"issue":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/154"},"comments":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/oracle/oci-volume-provisioner/statuses/2bf4d499eb2fe71e32271379ac3cecd27b784709"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MadalinaPatrichi"}}