{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/30041103","id":30041103,"diff_hunk":"@@ -0,0 +1,66 @@\n+package hostsubnet\n+\n+import (\n+\t\"fmt\"\n+\n+\tkapi \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/fields\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/labels\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors\"\n+\n+\t\"github.com/openshift/origin/pkg/sdn/api\"\n+\t\"github.com/openshift/origin/pkg/sdn/api/validation\"\n+)\n+\n+// sdnStrategy implements behavior for HostSubnets\n+type sdnStrategy struct {\n+\truntime.ObjectTyper\n+}\n+\n+// Strategy is the default logic that applies when creating and updating HostSubnet\n+// objects via the REST API.\n+var Strategy = sdnStrategy{kapi.Scheme}\n+\n+func (sdnStrategy) PrepareForUpdate(obj, old runtime.Object) {}\n+\n+// NamespaceScoped is false for sdns\n+func (sdnStrategy) NamespaceScoped() bool {\n+\treturn false\n+}\n+\n+func (sdnStrategy) GenerateName(base string) string {\n+\treturn base\n+}\n+\n+func (sdnStrategy) PrepareForCreate(obj runtime.Object) {\n+}\n+\n+// Validate validates a new sdn\n+func (sdnStrategy) Validate(ctx kapi.Context, obj runtime.Object) fielderrors.ValidationErrorList {\n+\ths := obj.(*api.HostSubnet)\n+\treturn validation.ValidateHostSubnet(hs)\n+}\n+\n+// AllowCreateOnUpdate is false for sdns\n+func (sdnStrategy) AllowCreateOnUpdate() bool {\n+\treturn false\n+}\n+\n+// ValidateUpdate is the default update validation for a HostSubnet\n+func (sdnStrategy) ValidateUpdate(ctx kapi.Context, obj, old runtime.Object) fielderrors.ValidationErrorList {\n+\treturn validation.ValidateHostSubnet(obj.(*api.HostSubnet))","path":"pkg/sdn/registry/hostsubnet/rest.go","position":53,"original_position":53,"commit_id":"1a9dfa735708d7b80c8fafb83bc36e00f2d914e5","original_commit_id":"1a9dfa735708d7b80c8fafb83bc36e00f2d914e5","user":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"body":"typically a ValidateUpdate method takes the old and the new object to know if the fields changed can be changed.  \r\n\r\nsee: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/api/validation/validation.go#L1378 as an example.\r\n\r\nWhat happens if I update any of these fields?  Does my entire network update?  What happens to running pods?","created_at":"2015-05-11T14:10:02Z","updated_at":"2015-05-11T14:10:02Z","html_url":"https://github.com/openshift/origin/pull/2150#discussion_r30041103","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/2150","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/30041103"},"html":{"href":"https://github.com/openshift/origin/pull/2150#discussion_r30041103"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/2150"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/2150","id":35050838,"html_url":"https://github.com/openshift/origin/pull/2150","diff_url":"https://github.com/openshift/origin/pull/2150.diff","patch_url":"https://github.com/openshift/origin/pull/2150.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/2150","number":2150,"state":"open","locked":false,"title":"Sdn integration","user":{"login":"rajatchopra","id":982221,"avatar_url":"https://avatars.githubusercontent.com/u/982221?v=3","gravatar_id":"","url":"https://api.github.com/users/rajatchopra","html_url":"https://github.com/rajatchopra","followers_url":"https://api.github.com/users/rajatchopra/followers","following_url":"https://api.github.com/users/rajatchopra/following{/other_user}","gists_url":"https://api.github.com/users/rajatchopra/gists{/gist_id}","starred_url":"https://api.github.com/users/rajatchopra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajatchopra/subscriptions","organizations_url":"https://api.github.com/users/rajatchopra/orgs","repos_url":"https://api.github.com/users/rajatchopra/repos","events_url":"https://api.github.com/users/rajatchopra/events{/privacy}","received_events_url":"https://api.github.com/users/rajatchopra/received_events","type":"User","site_admin":false},"body":"Fat PR. \r\n - Integrates openshift-sdn within openshift. When one runs openshift start master, it starts the openshift-sdn in master mode. Same thing on the node side. All necessary config options are exposed alongwith default settings.\r\n - Primary change is that both the sdn-master and sdn-node use apiserver apis as read/write/watch interface to persistent store (etcd).\r\n - Minor conflict in openshift-node systemd unit file: it cannot depend on docker.service because sdn code restarts docker (change has been reflected in vagrant already, need to propagate elsewhere).\r\n - openshift-sdn packages are Godep'ed, but the rpm still needs to be installed because the shell-scripts that are part of rpm need to be present on the node for callouts.","created_at":"2015-05-08T22:04:00Z","updated_at":"2015-05-11T14:10:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16e905b4509991455c2f6dc3da6815fbb3de39fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/2150/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/2150/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/2150/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/1a9dfa735708d7b80c8fafb83bc36e00f2d914e5","head":{"label":"rajatchopra:sdn_integration","ref":"sdn_integration","sha":"1a9dfa735708d7b80c8fafb83bc36e00f2d914e5","user":{"login":"rajatchopra","id":982221,"avatar_url":"https://avatars.githubusercontent.com/u/982221?v=3","gravatar_id":"","url":"https://api.github.com/users/rajatchopra","html_url":"https://github.com/rajatchopra","followers_url":"https://api.github.com/users/rajatchopra/followers","following_url":"https://api.github.com/users/rajatchopra/following{/other_user}","gists_url":"https://api.github.com/users/rajatchopra/gists{/gist_id}","starred_url":"https://api.github.com/users/rajatchopra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajatchopra/subscriptions","organizations_url":"https://api.github.com/users/rajatchopra/orgs","repos_url":"https://api.github.com/users/rajatchopra/repos","events_url":"https://api.github.com/users/rajatchopra/events{/privacy}","received_events_url":"https://api.github.com/users/rajatchopra/received_events","type":"User","site_admin":false},"repo":{"id":24616782,"name":"origin","full_name":"rajatchopra/origin","owner":{"login":"rajatchopra","id":982221,"avatar_url":"https://avatars.githubusercontent.com/u/982221?v=3","gravatar_id":"","url":"https://api.github.com/users/rajatchopra","html_url":"https://github.com/rajatchopra","followers_url":"https://api.github.com/users/rajatchopra/followers","following_url":"https://api.github.com/users/rajatchopra/following{/other_user}","gists_url":"https://api.github.com/users/rajatchopra/gists{/gist_id}","starred_url":"https://api.github.com/users/rajatchopra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajatchopra/subscriptions","organizations_url":"https://api.github.com/users/rajatchopra/orgs","repos_url":"https://api.github.com/users/rajatchopra/repos","events_url":"https://api.github.com/users/rajatchopra/events{/privacy}","received_events_url":"https://api.github.com/users/rajatchopra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rajatchopra/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/rajatchopra/origin","forks_url":"https://api.github.com/repos/rajatchopra/origin/forks","keys_url":"https://api.github.com/repos/rajatchopra/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajatchopra/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajatchopra/origin/teams","hooks_url":"https://api.github.com/repos/rajatchopra/origin/hooks","issue_events_url":"https://api.github.com/repos/rajatchopra/origin/issues/events{/number}","events_url":"https://api.github.com/repos/rajatchopra/origin/events","assignees_url":"https://api.github.com/repos/rajatchopra/origin/assignees{/user}","branches_url":"https://api.github.com/repos/rajatchopra/origin/branches{/branch}","tags_url":"https://api.github.com/repos/rajatchopra/origin/tags","blobs_url":"https://api.github.com/repos/rajatchopra/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajatchopra/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajatchopra/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajatchopra/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajatchopra/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/rajatchopra/origin/languages","stargazers_url":"https://api.github.com/repos/rajatchopra/origin/stargazers","contributors_url":"https://api.github.com/repos/rajatchopra/origin/contributors","subscribers_url":"https://api.github.com/repos/rajatchopra/origin/subscribers","subscription_url":"https://api.github.com/repos/rajatchopra/origin/subscription","commits_url":"https://api.github.com/repos/rajatchopra/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajatchopra/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajatchopra/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajatchopra/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/rajatchopra/origin/contents/{+path}","compare_url":"https://api.github.com/repos/rajatchopra/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajatchopra/origin/merges","archive_url":"https://api.github.com/repos/rajatchopra/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajatchopra/origin/downloads","issues_url":"https://api.github.com/repos/rajatchopra/origin/issues{/number}","pulls_url":"https://api.github.com/repos/rajatchopra/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/rajatchopra/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/rajatchopra/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajatchopra/origin/labels{/name}","releases_url":"https://api.github.com/repos/rajatchopra/origin/releases{/id}","created_at":"2014-09-29T23:22:54Z","updated_at":"2015-04-09T23:58:04Z","pushed_at":"2015-05-10T02:54:29Z","git_url":"git://github.com/rajatchopra/origin.git","ssh_url":"git@github.com:rajatchopra/origin.git","clone_url":"https://github.com/rajatchopra/origin.git","svn_url":"https://github.com/rajatchopra/origin","homepage":"https://openshift.github.io","size":102287,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"openshift:master","ref":"master","sha":"0ff8b6bc91025a4931a3edac5f10c9e90abee498","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-05-10T21:35:59Z","pushed_at":"2015-05-11T14:02:11Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":154722,"stargazers_count":418,"watchers_count":418,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":200,"mirror_url":null,"open_issues_count":248,"forks":200,"open_issues":248,"watchers":418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/2150"},"html":{"href":"https://github.com/openshift/origin/pull/2150"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/2150"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/2150/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/2150/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/2150/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/1a9dfa735708d7b80c8fafb83bc36e00f2d914e5"}}}}