GitHub PullRequestReviewCommentEvent at 2014-11-04 12:43:30
Repository: kubernetes
Actor: mfojtik
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/19800088","id":19800088,"diff_hunk":"@@ -0,0 +1,85 @@\n+/*\n+Copyright 2014 Google Inc. 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+\n+package config\n+\n+import (\n+\terrs \"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/client\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime\"\n+)\n+\n+// ClientFunc returns the RESTClient defined for given resource\n+type ClientFunc func(mapping *meta.RESTMapping) (*client.RESTClient, error)\n+\n+// ApplyItems creates bulk of resources provided by items list. Each item must\n+// be valid API type. It requires ObjectTyper to parse the Version and Kind and\n+// RESTMapper to get the resource URI and REST client that knows how to create\n+// given type\n+func ApplyItems(typer runtime.ObjectTyper, mapper meta.RESTMapper, clientFor ClientFunc, items []runtime.Object) errs.ValidationErrorList {\n+\tallErrors := errs.ValidationErrorList{}\n+\tfor i, item := range items {\n+\t\tversion, kind, err := typer.ObjectVersionAndKind(item)\n+\t\tif err != nil {\n+\t\t\treportError(&allErrors, i, errs.NewFieldInvalid(\"kind\", item))\n+\t\t\tcontinue\n+\t\t}\n+\n+\t\tmapping, err := mapper.RESTMapping(version, kind)\n+\t\tif err != nil {\n+\t\t\treportError(&allErrors, i, errs.NewFieldNotSupported(\"mapping\", err))\n+\t\t\tcontinue\n+\t\t}\n+\n+\t\tclient, err := clientFor(mapping)\n+\t\tif err != nil {\n+\t\t\treportError(&allErrors, i, errs.NewFieldNotSupported(\"client\", item))\n+\t\t\tcontinue\n+\t\t}\n+\n+\t\tif err := Apply(client, mapping, item); err != nil {\n+\t\t\treportError(&allErrors, i, *err)\n+\t\t}\n+\t}\n+\n+\treturn allErrors.Prefix(\"Config\")\n+}\n+\n+// Apply creates the obj using the provided clients and the resource URI\n+// mapping. It reports ValidationError when the object is missing the Metadata\n+// or the Name and it will report any error occured during create REST call\n+func Apply(client *client.RESTClient, mapping *meta.RESTMapping, obj runtime.Object) *errs.ValidationError {","path":"pkg/config/config.go","position":65,"original_position":65,"commit_id":"4b4f1dbfa9daa187bc96af706a6afa6e294de7d8","original_commit_id":"4b4f1dbfa9daa187bc96af706a6afa6e294de7d8","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=2","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"body":"+1 will update PR","created_at":"2014-11-04T12:43:30Z","updated_at":"2014-11-04T12:43:30Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1958#discussion_r19800088","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1958","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/19800088"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1958#discussion_r19800088"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1958"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1958","id":23153219,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1958","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1958.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1958.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1958","number":1958,"state":"open","locked":false,"title":"Add support for applying set of resources via kubectl","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=2","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"body":"Discussion: https://github.com/GoogleCloudPlatform/kubernetes/issues/1905","created_at":"2014-10-22T12:22:50Z","updated_at":"2014-11-04T12:43:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d49dfdf9dc6b15b1136ec7798415e22e6ab867f","assignee":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=2","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1958/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1958/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/{number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1958/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/4b4f1dbfa9daa187bc96af706a6afa6e294de7d8","head":{"label":"mfojtik:config","ref":"config","sha":"4b4f1dbfa9daa187bc96af706a6afa6e294de7d8","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=2","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"repo":{"id":22151842,"name":"kubernetes","full_name":"mfojtik/kubernetes","owner":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=2","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mfojtik/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/mfojtik/kubernetes","forks_url":"https://api.github.com/repos/mfojtik/kubernetes/forks","keys_url":"https://api.github.com/repos/mfojtik/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfojtik/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfojtik/kubernetes/teams","hooks_url":"https://api.github.com/repos/mfojtik/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/mfojtik/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/mfojtik/kubernetes/events","assignees_url":"https://api.github.com/repos/mfojtik/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/mfojtik/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/mfojtik/kubernetes/tags","blobs_url":"https://api.github.com/repos/mfojtik/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfojtik/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfojtik/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfojtik/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfojtik/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/mfojtik/kubernetes/languages","stargazers_url":"https://api.github.com/repos/mfojtik/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/mfojtik/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/mfojtik/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/mfojtik/kubernetes/subscription","commits_url":"https://api.github.com/repos/mfojtik/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfojtik/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfojtik/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfojtik/kubernetes/issues/comments/{number}","contents_url":"https://api.github.com/repos/mfojtik/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/mfojtik/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfojtik/kubernetes/merges","archive_url":"https://api.github.com/repos/mfojtik/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfojtik/kubernetes/downloads","issues_url":"https://api.github.com/repos/mfojtik/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/mfojtik/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/mfojtik/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/mfojtik/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfojtik/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/mfojtik/kubernetes/releases{/id}","created_at":"2014-07-23T14:06:52Z","updated_at":"2014-08-01T08:25:04Z","pushed_at":"2014-11-03T12:36:33Z","git_url":"git://github.com/mfojtik/kubernetes.git","ssh_url":"git@github.com:mfojtik/kubernetes.git","clone_url":"https://github.com/mfojtik/kubernetes.git","svn_url":"https://github.com/mfojtik/kubernetes","homepage":null,"size":13217,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"808be2d13b7bf14a3cf6985bc7c9d02f48a3d1e0","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=2","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=2","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/{number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2014-11-04T11:38:31Z","pushed_at":"2014-11-04T01:41:32Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":null,"size":49735,"stargazers_count":4271,"watchers_count":4271,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":651,"mirror_url":null,"open_issues_count":364,"forks":651,"open_issues":364,"watchers":4271,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1958"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/1958"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1958"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/1958/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1958/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/1958/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/4b4f1dbfa9daa187bc96af706a6afa6e294de7d8"}}}}