{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/openshift-sdn/pulls/comments/65760208","id":65760208,"diff_hunk":"@@ -0,0 +1,94 @@\n+package netid\n+\n+/*\n+Accessor methods to annotate namespace for multitenant support\n+*/\n+\n+import (\n+\t\"fmt\"\n+\t\"math\"\n+\t\"strconv\"\n+\n+\tkapi \"k8s.io/kubernetes/pkg/api\"\n+)\n+\n+const (\n+\t// Maximum VXLAN Virtual Network Identifier(VNID) as per RFC#7348\n+\tMaxVNID = uint((1 << 24) - 1)\n+\t// VNID: 1 to 9 are internally reserved for any special cases in the future\n+\tMinVNID = 10\n+\t// VNID: 0 reserved for default namespace and can reach any network in the cluster\n+\tGlobalVNID = uint(0)\n+\n+\t// Current assigned VNID for the namespace\n+\tVNIDAnnotation string = \"pod.network.openshift.io/multitenant.vnid\"\n+\t// Desired VNID for the namespace\n+\tWantsVNIDAnnotation string = \"pod.network.openshift.io/multitenant.wants-vnid\"","path":"pkg/netid/netid.go","position":26,"original_position":26,"commit_id":"7918a79239fb027cd52a09a070fe2e9b40c0b7e4","original_commit_id":"7918a79239fb027cd52a09a070fe2e9b40c0b7e4","user":{"login":"pravisankar","id":1258630,"avatar_url":"https://avatars.githubusercontent.com/u/1258630?v=3","gravatar_id":"","url":"https://api.github.com/users/pravisankar","html_url":"https://github.com/pravisankar","followers_url":"https://api.github.com/users/pravisankar/followers","following_url":"https://api.github.com/users/pravisankar/following{/other_user}","gists_url":"https://api.github.com/users/pravisankar/gists{/gist_id}","starred_url":"https://api.github.com/users/pravisankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravisankar/subscriptions","organizations_url":"https://api.github.com/users/pravisankar/orgs","repos_url":"https://api.github.com/users/pravisankar/repos","events_url":"https://api.github.com/users/pravisankar/events{/privacy}","received_events_url":"https://api.github.com/users/pravisankar/received_events","type":"User","site_admin":false},"body":"Ok, I will change the name to `pod.network.openshift.io/multitenant.requested-vnid`","created_at":"2016-06-03T19:06:39Z","updated_at":"2016-06-03T19:06:39Z","html_url":"https://github.com/openshift/openshift-sdn/pull/303#discussion_r65760208","pull_request_url":"https://api.github.com/repos/openshift/openshift-sdn/pulls/303","_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-sdn/pulls/comments/65760208"},"html":{"href":"https://github.com/openshift/openshift-sdn/pull/303#discussion_r65760208"},"pull_request":{"href":"https://api.github.com/repos/openshift/openshift-sdn/pulls/303"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/openshift-sdn/pulls/303","id":68409692,"html_url":"https://github.com/openshift/openshift-sdn/pull/303","diff_url":"https://github.com/openshift/openshift-sdn/pull/303.diff","patch_url":"https://github.com/openshift/openshift-sdn/pull/303.patch","issue_url":"https://api.github.com/repos/openshift/openshift-sdn/issues/303","number":303,"state":"open","locked":false,"title":"Support network ID allocation as annotation on namespace resource","user":{"login":"pravisankar","id":1258630,"avatar_url":"https://avatars.githubusercontent.com/u/1258630?v=3","gravatar_id":"","url":"https://api.github.com/users/pravisankar","html_url":"https://github.com/pravisankar","followers_url":"https://api.github.com/users/pravisankar/followers","following_url":"https://api.github.com/users/pravisankar/following{/other_user}","gists_url":"https://api.github.com/users/pravisankar/gists{/gist_id}","starred_url":"https://api.github.com/users/pravisankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravisankar/subscriptions","organizations_url":"https://api.github.com/users/pravisankar/orgs","repos_url":"https://api.github.com/users/pravisankar/repos","events_url":"https://api.github.com/users/pravisankar/events{/privacy}","received_events_url":"https://api.github.com/users/pravisankar/received_events","type":"User","site_admin":false},"body":"Trello card: https://trello.com/c/nULFSjXm/29-13-store-vnid-as-annotation-on-namespace-techdebt-supportability","created_at":"2016-04-29T17:58:03Z","updated_at":"2016-06-03T19:06:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83c3274b4ec2ee5f1ef8b81cfb7953eef2046a5f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/openshift-sdn/pulls/303/commits","review_comments_url":"https://api.github.com/repos/openshift/openshift-sdn/pulls/303/comments","review_comment_url":"https://api.github.com/repos/openshift/openshift-sdn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/openshift-sdn/issues/303/comments","statuses_url":"https://api.github.com/repos/openshift/openshift-sdn/statuses/7918a79239fb027cd52a09a070fe2e9b40c0b7e4","head":{"label":"pravisankar:vnid-annotation","ref":"vnid-annotation","sha":"7918a79239fb027cd52a09a070fe2e9b40c0b7e4","user":{"login":"pravisankar","id":1258630,"avatar_url":"https://avatars.githubusercontent.com/u/1258630?v=3","gravatar_id":"","url":"https://api.github.com/users/pravisankar","html_url":"https://github.com/pravisankar","followers_url":"https://api.github.com/users/pravisankar/followers","following_url":"https://api.github.com/users/pravisankar/following{/other_user}","gists_url":"https://api.github.com/users/pravisankar/gists{/gist_id}","starred_url":"https://api.github.com/users/pravisankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravisankar/subscriptions","organizations_url":"https://api.github.com/users/pravisankar/orgs","repos_url":"https://api.github.com/users/pravisankar/repos","events_url":"https://api.github.com/users/pravisankar/events{/privacy}","received_events_url":"https://api.github.com/users/pravisankar/received_events","type":"User","site_admin":false},"repo":{"id":39804494,"name":"openshift-sdn","full_name":"pravisankar/openshift-sdn","owner":{"login":"pravisankar","id":1258630,"avatar_url":"https://avatars.githubusercontent.com/u/1258630?v=3","gravatar_id":"","url":"https://api.github.com/users/pravisankar","html_url":"https://github.com/pravisankar","followers_url":"https://api.github.com/users/pravisankar/followers","following_url":"https://api.github.com/users/pravisankar/following{/other_user}","gists_url":"https://api.github.com/users/pravisankar/gists{/gist_id}","starred_url":"https://api.github.com/users/pravisankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravisankar/subscriptions","organizations_url":"https://api.github.com/users/pravisankar/orgs","repos_url":"https://api.github.com/users/pravisankar/repos","events_url":"https://api.github.com/users/pravisankar/events{/privacy}","received_events_url":"https://api.github.com/users/pravisankar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pravisankar/openshift-sdn","description":"","fork":true,"url":"https://api.github.com/repos/pravisankar/openshift-sdn","forks_url":"https://api.github.com/repos/pravisankar/openshift-sdn/forks","keys_url":"https://api.github.com/repos/pravisankar/openshift-sdn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pravisankar/openshift-sdn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pravisankar/openshift-sdn/teams","hooks_url":"https://api.github.com/repos/pravisankar/openshift-sdn/hooks","issue_events_url":"https://api.github.com/repos/pravisankar/openshift-sdn/issues/events{/number}","events_url":"https://api.github.com/repos/pravisankar/openshift-sdn/events","assignees_url":"https://api.github.com/repos/pravisankar/openshift-sdn/assignees{/user}","branches_url":"https://api.github.com/repos/pravisankar/openshift-sdn/branches{/branch}","tags_url":"https://api.github.com/repos/pravisankar/openshift-sdn/tags","blobs_url":"https://api.github.com/repos/pravisankar/openshift-sdn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pravisankar/openshift-sdn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pravisankar/openshift-sdn/git/refs{/sha}","trees_url":"https://api.github.com/repos/pravisankar/openshift-sdn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pravisankar/openshift-sdn/statuses/{sha}","languages_url":"https://api.github.com/repos/pravisankar/openshift-sdn/languages","stargazers_url":"https://api.github.com/repos/pravisankar/openshift-sdn/stargazers","contributors_url":"https://api.github.com/repos/pravisankar/openshift-sdn/contributors","subscribers_url":"https://api.github.com/repos/pravisankar/openshift-sdn/subscribers","subscription_url":"https://api.github.com/repos/pravisankar/openshift-sdn/subscription","commits_url":"https://api.github.com/repos/pravisankar/openshift-sdn/commits{/sha}","git_commits_url":"https://api.github.com/repos/pravisankar/openshift-sdn/git/commits{/sha}","comments_url":"https://api.github.com/repos/pravisankar/openshift-sdn/comments{/number}","issue_comment_url":"https://api.github.com/repos/pravisankar/openshift-sdn/issues/comments{/number}","contents_url":"https://api.github.com/repos/pravisankar/openshift-sdn/contents/{+path}","compare_url":"https://api.github.com/repos/pravisankar/openshift-sdn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pravisankar/openshift-sdn/merges","archive_url":"https://api.github.com/repos/pravisankar/openshift-sdn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pravisankar/openshift-sdn/downloads","issues_url":"https://api.github.com/repos/pravisankar/openshift-sdn/issues{/number}","pulls_url":"https://api.github.com/repos/pravisankar/openshift-sdn/pulls{/number}","milestones_url":"https://api.github.com/repos/pravisankar/openshift-sdn/milestones{/number}","notifications_url":"https://api.github.com/repos/pravisankar/openshift-sdn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pravisankar/openshift-sdn/labels{/name}","releases_url":"https://api.github.com/repos/pravisankar/openshift-sdn/releases{/id}","deployments_url":"https://api.github.com/repos/pravisankar/openshift-sdn/deployments","created_at":"2015-07-28T00:23:09Z","updated_at":"2015-07-28T00:23:09Z","pushed_at":"2016-06-02T20:28:06Z","git_url":"git://github.com/pravisankar/openshift-sdn.git","ssh_url":"git@github.com:pravisankar/openshift-sdn.git","clone_url":"https://github.com/pravisankar/openshift-sdn.git","svn_url":"https://github.com/pravisankar/openshift-sdn","homepage":null,"size":851,"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":"0dc6df565f43a29c5914918f70b6b8331045edea","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":29500061,"name":"openshift-sdn","full_name":"openshift/openshift-sdn","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/openshift-sdn","description":"","fork":false,"url":"https://api.github.com/repos/openshift/openshift-sdn","forks_url":"https://api.github.com/repos/openshift/openshift-sdn/forks","keys_url":"https://api.github.com/repos/openshift/openshift-sdn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/openshift-sdn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/openshift-sdn/teams","hooks_url":"https://api.github.com/repos/openshift/openshift-sdn/hooks","issue_events_url":"https://api.github.com/repos/openshift/openshift-sdn/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/openshift-sdn/events","assignees_url":"https://api.github.com/repos/openshift/openshift-sdn/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/openshift-sdn/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/openshift-sdn/tags","blobs_url":"https://api.github.com/repos/openshift/openshift-sdn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/openshift-sdn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/openshift-sdn/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/openshift-sdn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/openshift-sdn/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/openshift-sdn/languages","stargazers_url":"https://api.github.com/repos/openshift/openshift-sdn/stargazers","contributors_url":"https://api.github.com/repos/openshift/openshift-sdn/contributors","subscribers_url":"https://api.github.com/repos/openshift/openshift-sdn/subscribers","subscription_url":"https://api.github.com/repos/openshift/openshift-sdn/subscription","commits_url":"https://api.github.com/repos/openshift/openshift-sdn/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/openshift-sdn/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/openshift-sdn/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/openshift-sdn/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/openshift-sdn/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/openshift-sdn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/openshift-sdn/merges","archive_url":"https://api.github.com/repos/openshift/openshift-sdn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/openshift-sdn/downloads","issues_url":"https://api.github.com/repos/openshift/openshift-sdn/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/openshift-sdn/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/openshift-sdn/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/openshift-sdn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/openshift-sdn/labels{/name}","releases_url":"https://api.github.com/repos/openshift/openshift-sdn/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/openshift-sdn/deployments","created_at":"2015-01-19T22:32:20Z","updated_at":"2016-05-25T17:55:39Z","pushed_at":"2016-06-02T20:28:06Z","git_url":"git://github.com/openshift/openshift-sdn.git","ssh_url":"git@github.com:openshift/openshift-sdn.git","clone_url":"https://github.com/openshift/openshift-sdn.git","svn_url":"https://github.com/openshift/openshift-sdn","homepage":null,"size":1079,"stargazers_count":39,"watchers_count":39,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":18,"forks":37,"open_issues":18,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-sdn/pulls/303"},"html":{"href":"https://github.com/openshift/openshift-sdn/pull/303"},"issue":{"href":"https://api.github.com/repos/openshift/openshift-sdn/issues/303"},"comments":{"href":"https://api.github.com/repos/openshift/openshift-sdn/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/openshift-sdn/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/openshift-sdn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/openshift-sdn/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/openshift-sdn/statuses/7918a79239fb027cd52a09a070fe2e9b40c0b7e4"}}}}
{"actor":{"display_login":"pravisankar"}}