{"action":"created","comment":{"url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/comments/68475029","id":68475029,"diff_hunk":"@@ -0,0 +1,187 @@\n+/*\n+Copyright 2016 The Kubernetes Authors 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 controllers\n+\n+import (\n+\t\"bytes\"\n+\t\"fmt\"\n+\t\"net\"\n+\n+\t\"github.com/golang/glog\"\n+\t\"k8s.io/kubernetes/pkg/api\"\n+\t\"k8s.io/kubernetes/pkg/client/unversioned\"\n+)\n+\n+type IPManager struct {\n+\tconfigMapName string\n+\tipRange       ipRange\n+\tnamespace     string\n+\tkubeClient    *unversioned.Client\n+\tipStatusMap   map[string]bool\n+}\n+\n+type ipRange struct {\n+\tstartIP string\n+\tendIP   string\n+}\n+\n+func NewIPManager(startIP string, endIP string, ipConfigMapName string, namespace string, kubeClient *unversioned.Client) *IPManager {","path":"loadbalancer/loadbalancer/controllers/ipmanager.go","position":42,"original_position":42,"commit_id":"471f216934dc3f79efb845321887a2cf38afd81d","original_commit_id":"471f216934dc3f79efb845321887a2cf38afd81d","user":{"login":"kokhang","id":1672672,"avatar_url":"https://avatars.githubusercontent.com/u/1672672?v=3","gravatar_id":"","url":"https://api.github.com/users/kokhang","html_url":"https://github.com/kokhang","followers_url":"https://api.github.com/users/kokhang/followers","following_url":"https://api.github.com/users/kokhang/following{/other_user}","gists_url":"https://api.github.com/users/kokhang/gists{/gist_id}","starred_url":"https://api.github.com/users/kokhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokhang/subscriptions","organizations_url":"https://api.github.com/users/kokhang/orgs","repos_url":"https://api.github.com/users/kokhang/repos","events_url":"https://api.github.com/users/kokhang/events{/privacy}","received_events_url":"https://api.github.com/users/kokhang/received_events","type":"User","site_admin":false},"body":"Since you already have a ipRange struct defined, you should use a param of this type instead of startIP and endIP string","created_at":"2016-06-24T23:09:53Z","updated_at":"2016-06-24T23:09:53Z","html_url":"https://github.com/hpcloud/kubernetes-contrib/pull/7#discussion_r68475029","pull_request_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/comments/68475029"},"html":{"href":"https://github.com/hpcloud/kubernetes-contrib/pull/7#discussion_r68475029"},"pull_request":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/7","id":75184438,"html_url":"https://github.com/hpcloud/kubernetes-contrib/pull/7","diff_url":"https://github.com/hpcloud/kubernetes-contrib/pull/7.diff","patch_url":"https://github.com/hpcloud/kubernetes-contrib/pull/7.patch","issue_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/issues/7","number":7,"state":"open","locked":false,"title":"L4 Configmap IP address management","user":{"login":"abithap","id":7987995,"avatar_url":"https://avatars.githubusercontent.com/u/7987995?v=3","gravatar_id":"","url":"https://api.github.com/users/abithap","html_url":"https://github.com/abithap","followers_url":"https://api.github.com/users/abithap/followers","following_url":"https://api.github.com/users/abithap/following{/other_user}","gists_url":"https://api.github.com/users/abithap/gists{/gist_id}","starred_url":"https://api.github.com/users/abithap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abithap/subscriptions","organizations_url":"https://api.github.com/users/abithap/orgs","repos_url":"https://api.github.com/users/abithap/repos","events_url":"https://api.github.com/users/abithap/events{/privacy}","received_events_url":"https://api.github.com/users/abithap/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-24T22:55:15Z","updated_at":"2016-06-24T23:09:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18dfedf25fa18f7672298dc9421ee0221a46cee4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/7/commits","review_comments_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/7/comments","review_comment_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/issues/7/comments","statuses_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/statuses/471f216934dc3f79efb845321887a2cf38afd81d","head":{"label":"abithap:ipaddr-manager","ref":"ipaddr-manager","sha":"471f216934dc3f79efb845321887a2cf38afd81d","user":{"login":"abithap","id":7987995,"avatar_url":"https://avatars.githubusercontent.com/u/7987995?v=3","gravatar_id":"","url":"https://api.github.com/users/abithap","html_url":"https://github.com/abithap","followers_url":"https://api.github.com/users/abithap/followers","following_url":"https://api.github.com/users/abithap/following{/other_user}","gists_url":"https://api.github.com/users/abithap/gists{/gist_id}","starred_url":"https://api.github.com/users/abithap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abithap/subscriptions","organizations_url":"https://api.github.com/users/abithap/orgs","repos_url":"https://api.github.com/users/abithap/repos","events_url":"https://api.github.com/users/abithap/events{/privacy}","received_events_url":"https://api.github.com/users/abithap/received_events","type":"User","site_admin":false},"repo":{"id":61913862,"name":"kubernetes-contrib","full_name":"abithap/kubernetes-contrib","owner":{"login":"abithap","id":7987995,"avatar_url":"https://avatars.githubusercontent.com/u/7987995?v=3","gravatar_id":"","url":"https://api.github.com/users/abithap","html_url":"https://github.com/abithap","followers_url":"https://api.github.com/users/abithap/followers","following_url":"https://api.github.com/users/abithap/following{/other_user}","gists_url":"https://api.github.com/users/abithap/gists{/gist_id}","starred_url":"https://api.github.com/users/abithap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abithap/subscriptions","organizations_url":"https://api.github.com/users/abithap/orgs","repos_url":"https://api.github.com/users/abithap/repos","events_url":"https://api.github.com/users/abithap/events{/privacy}","received_events_url":"https://api.github.com/users/abithap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abithap/kubernetes-contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core. Consider creating a new repo instead.","fork":true,"url":"https://api.github.com/repos/abithap/kubernetes-contrib","forks_url":"https://api.github.com/repos/abithap/kubernetes-contrib/forks","keys_url":"https://api.github.com/repos/abithap/kubernetes-contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abithap/kubernetes-contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abithap/kubernetes-contrib/teams","hooks_url":"https://api.github.com/repos/abithap/kubernetes-contrib/hooks","issue_events_url":"https://api.github.com/repos/abithap/kubernetes-contrib/issues/events{/number}","events_url":"https://api.github.com/repos/abithap/kubernetes-contrib/events","assignees_url":"https://api.github.com/repos/abithap/kubernetes-contrib/assignees{/user}","branches_url":"https://api.github.com/repos/abithap/kubernetes-contrib/branches{/branch}","tags_url":"https://api.github.com/repos/abithap/kubernetes-contrib/tags","blobs_url":"https://api.github.com/repos/abithap/kubernetes-contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abithap/kubernetes-contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abithap/kubernetes-contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/abithap/kubernetes-contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abithap/kubernetes-contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/abithap/kubernetes-contrib/languages","stargazers_url":"https://api.github.com/repos/abithap/kubernetes-contrib/stargazers","contributors_url":"https://api.github.com/repos/abithap/kubernetes-contrib/contributors","subscribers_url":"https://api.github.com/repos/abithap/kubernetes-contrib/subscribers","subscription_url":"https://api.github.com/repos/abithap/kubernetes-contrib/subscription","commits_url":"https://api.github.com/repos/abithap/kubernetes-contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/abithap/kubernetes-contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/abithap/kubernetes-contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/abithap/kubernetes-contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/abithap/kubernetes-contrib/contents/{+path}","compare_url":"https://api.github.com/repos/abithap/kubernetes-contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abithap/kubernetes-contrib/merges","archive_url":"https://api.github.com/repos/abithap/kubernetes-contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abithap/kubernetes-contrib/downloads","issues_url":"https://api.github.com/repos/abithap/kubernetes-contrib/issues{/number}","pulls_url":"https://api.github.com/repos/abithap/kubernetes-contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/abithap/kubernetes-contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/abithap/kubernetes-contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abithap/kubernetes-contrib/labels{/name}","releases_url":"https://api.github.com/repos/abithap/kubernetes-contrib/releases{/id}","deployments_url":"https://api.github.com/repos/abithap/kubernetes-contrib/deployments","created_at":"2016-06-24T21:40:41Z","updated_at":"2016-06-24T21:40:45Z","pushed_at":"2016-06-24T22:54:26Z","git_url":"git://github.com/abithap/kubernetes-contrib.git","ssh_url":"git@github.com:abithap/kubernetes-contrib.git","clone_url":"https://github.com/abithap/kubernetes-contrib.git","svn_url":"https://github.com/abithap/kubernetes-contrib","homepage":"","size":93201,"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":"hpcloud:hpe-service-loadbalancer","ref":"hpe-service-loadbalancer","sha":"bf7959504c7911d86d444ba9346820391280d267","user":{"login":"hpcloud","id":366390,"avatar_url":"https://avatars.githubusercontent.com/u/366390?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcloud","html_url":"https://github.com/hpcloud","followers_url":"https://api.github.com/users/hpcloud/followers","following_url":"https://api.github.com/users/hpcloud/following{/other_user}","gists_url":"https://api.github.com/users/hpcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcloud/subscriptions","organizations_url":"https://api.github.com/users/hpcloud/orgs","repos_url":"https://api.github.com/users/hpcloud/repos","events_url":"https://api.github.com/users/hpcloud/events{/privacy}","received_events_url":"https://api.github.com/users/hpcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":61072999,"name":"kubernetes-contrib","full_name":"hpcloud/kubernetes-contrib","owner":{"login":"hpcloud","id":366390,"avatar_url":"https://avatars.githubusercontent.com/u/366390?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcloud","html_url":"https://github.com/hpcloud","followers_url":"https://api.github.com/users/hpcloud/followers","following_url":"https://api.github.com/users/hpcloud/following{/other_user}","gists_url":"https://api.github.com/users/hpcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcloud/subscriptions","organizations_url":"https://api.github.com/users/hpcloud/orgs","repos_url":"https://api.github.com/users/hpcloud/repos","events_url":"https://api.github.com/users/hpcloud/events{/privacy}","received_events_url":"https://api.github.com/users/hpcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcloud/kubernetes-contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core. Consider creating a new repo instead.","fork":true,"url":"https://api.github.com/repos/hpcloud/kubernetes-contrib","forks_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/forks","keys_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/teams","hooks_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/hooks","issue_events_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/issues/events{/number}","events_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/events","assignees_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/assignees{/user}","branches_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/branches{/branch}","tags_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/tags","blobs_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/languages","stargazers_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/stargazers","contributors_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/contributors","subscribers_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/subscribers","subscription_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/subscription","commits_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/contents/{+path}","compare_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/merges","archive_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/downloads","issues_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/issues{/number}","pulls_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/labels{/name}","releases_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/releases{/id}","deployments_url":"https://api.github.com/repos/hpcloud/kubernetes-contrib/deployments","created_at":"2016-06-13T22:07:59Z","updated_at":"2016-06-13T22:35:56Z","pushed_at":"2016-06-24T22:55:15Z","git_url":"git://github.com/hpcloud/kubernetes-contrib.git","ssh_url":"git@github.com:hpcloud/kubernetes-contrib.git","clone_url":"https://github.com/hpcloud/kubernetes-contrib.git","svn_url":"https://github.com/hpcloud/kubernetes-contrib","homepage":"","size":93201,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/7"},"html":{"href":"https://github.com/hpcloud/kubernetes-contrib/pull/7"},"issue":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/issues/7"},"comments":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/hpcloud/kubernetes-contrib/statuses/471f216934dc3f79efb845321887a2cf38afd81d"}}}}
{"actor":{"display_login":"kokhang"}}