{"action":"created","comment":{"url":"https://api.github.com/repos/contiv/netplugin/pulls/comments/39782324","id":39782324,"diff_hunk":"@@ -79,6 +80,16 @@ func NewAPIController(router *mux.Router) *APIController {\n \treturn ctrler\n }\n \n+// Utility function to check if string exists in a slice\n+func stringInSlice(a string, list []string) bool {","path":"netmaster/objApi/apiController.go","position":13,"original_position":13,"commit_id":"15e53a27c5d5292ae2af871cea0d6a4df49498b8","original_commit_id":"15e53a27c5d5292ae2af871cea0d6a4df49498b8","user":{"login":"mapuri","id":9538438,"avatar_url":"https://avatars.githubusercontent.com/u/9538438?v=3","gravatar_id":"","url":"https://api.github.com/users/mapuri","html_url":"https://github.com/mapuri","followers_url":"https://api.github.com/users/mapuri/followers","following_url":"https://api.github.com/users/mapuri/following{/other_user}","gists_url":"https://api.github.com/users/mapuri/gists{/gist_id}","starred_url":"https://api.github.com/users/mapuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapuri/subscriptions","organizations_url":"https://api.github.com/users/mapuri/orgs","repos_url":"https://api.github.com/users/mapuri/repos","events_url":"https://api.github.com/users/mapuri/events{/privacy}","received_events_url":"https://api.github.com/users/mapuri/received_events","type":"User","site_admin":false},"body":"minor:\r\nAs an search optimization we can maintain a `map[string]bool` than `[]string`. But totally optional.","created_at":"2015-09-17T18:35:57Z","updated_at":"2015-09-17T18:35:57Z","html_url":"https://github.com/contiv/netplugin/pull/148#discussion_r39782324","pull_request_url":"https://api.github.com/repos/contiv/netplugin/pulls/148","_links":{"self":{"href":"https://api.github.com/repos/contiv/netplugin/pulls/comments/39782324"},"html":{"href":"https://github.com/contiv/netplugin/pull/148#discussion_r39782324"},"pull_request":{"href":"https://api.github.com/repos/contiv/netplugin/pulls/148"}}},"pull_request":{"url":"https://api.github.com/repos/contiv/netplugin/pulls/148","id":45248699,"html_url":"https://github.com/contiv/netplugin/pull/148","diff_url":"https://github.com/contiv/netplugin/pull/148.diff","patch_url":"https://github.com/contiv/netplugin/pull/148.patch","issue_url":"https://api.github.com/repos/contiv/netplugin/issues/148","number":148,"state":"open","locked":false,"title":"First commit for policy support","user":{"login":"shaleman","id":5446536,"avatar_url":"https://avatars.githubusercontent.com/u/5446536?v=3","gravatar_id":"","url":"https://api.github.com/users/shaleman","html_url":"https://github.com/shaleman","followers_url":"https://api.github.com/users/shaleman/followers","following_url":"https://api.github.com/users/shaleman/following{/other_user}","gists_url":"https://api.github.com/users/shaleman/gists{/gist_id}","starred_url":"https://api.github.com/users/shaleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaleman/subscriptions","organizations_url":"https://api.github.com/users/shaleman/orgs","repos_url":"https://api.github.com/users/shaleman/repos","events_url":"https://api.github.com/users/shaleman/events{/privacy}","received_events_url":"https://api.github.com/users/shaleman/received_events","type":"User","site_admin":false},"body":"This is the first commit for policy support. This is not fully complete. its work in progress. But, its reasonably stable that we can start playing with it.\r\nChanges include:\r\n- Group based policy support\r\n- Move ofnet master to net master.\r\n- add a discovery logic to discover peers and masters.\r\n- Add some tests to verify policies","created_at":"2015-09-17T03:32:35Z","updated_at":"2015-09-17T18:35:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ffa781062a9b5e13562a5d123dd5d422f2b39c9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/contiv/netplugin/pulls/148/commits","review_comments_url":"https://api.github.com/repos/contiv/netplugin/pulls/148/comments","review_comment_url":"https://api.github.com/repos/contiv/netplugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/contiv/netplugin/issues/148/comments","statuses_url":"https://api.github.com/repos/contiv/netplugin/statuses/15e53a27c5d5292ae2af871cea0d6a4df49498b8","head":{"label":"shaleman:policy","ref":"policy","sha":"15e53a27c5d5292ae2af871cea0d6a4df49498b8","user":{"login":"shaleman","id":5446536,"avatar_url":"https://avatars.githubusercontent.com/u/5446536?v=3","gravatar_id":"","url":"https://api.github.com/users/shaleman","html_url":"https://github.com/shaleman","followers_url":"https://api.github.com/users/shaleman/followers","following_url":"https://api.github.com/users/shaleman/following{/other_user}","gists_url":"https://api.github.com/users/shaleman/gists{/gist_id}","starred_url":"https://api.github.com/users/shaleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaleman/subscriptions","organizations_url":"https://api.github.com/users/shaleman/orgs","repos_url":"https://api.github.com/users/shaleman/repos","events_url":"https://api.github.com/users/shaleman/events{/privacy}","received_events_url":"https://api.github.com/users/shaleman/received_events","type":"User","site_admin":false},"repo":{"id":39166523,"name":"netplugin","full_name":"shaleman/netplugin","owner":{"login":"shaleman","id":5446536,"avatar_url":"https://avatars.githubusercontent.com/u/5446536?v=3","gravatar_id":"","url":"https://api.github.com/users/shaleman","html_url":"https://github.com/shaleman","followers_url":"https://api.github.com/users/shaleman/followers","following_url":"https://api.github.com/users/shaleman/following{/other_user}","gists_url":"https://api.github.com/users/shaleman/gists{/gist_id}","starred_url":"https://api.github.com/users/shaleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaleman/subscriptions","organizations_url":"https://api.github.com/users/shaleman/orgs","repos_url":"https://api.github.com/users/shaleman/repos","events_url":"https://api.github.com/users/shaleman/events{/privacy}","received_events_url":"https://api.github.com/users/shaleman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shaleman/netplugin","description":"(experimental) network plugin framework for container based environments","fork":true,"url":"https://api.github.com/repos/shaleman/netplugin","forks_url":"https://api.github.com/repos/shaleman/netplugin/forks","keys_url":"https://api.github.com/repos/shaleman/netplugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shaleman/netplugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shaleman/netplugin/teams","hooks_url":"https://api.github.com/repos/shaleman/netplugin/hooks","issue_events_url":"https://api.github.com/repos/shaleman/netplugin/issues/events{/number}","events_url":"https://api.github.com/repos/shaleman/netplugin/events","assignees_url":"https://api.github.com/repos/shaleman/netplugin/assignees{/user}","branches_url":"https://api.github.com/repos/shaleman/netplugin/branches{/branch}","tags_url":"https://api.github.com/repos/shaleman/netplugin/tags","blobs_url":"https://api.github.com/repos/shaleman/netplugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shaleman/netplugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shaleman/netplugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/shaleman/netplugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shaleman/netplugin/statuses/{sha}","languages_url":"https://api.github.com/repos/shaleman/netplugin/languages","stargazers_url":"https://api.github.com/repos/shaleman/netplugin/stargazers","contributors_url":"https://api.github.com/repos/shaleman/netplugin/contributors","subscribers_url":"https://api.github.com/repos/shaleman/netplugin/subscribers","subscription_url":"https://api.github.com/repos/shaleman/netplugin/subscription","commits_url":"https://api.github.com/repos/shaleman/netplugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/shaleman/netplugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/shaleman/netplugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/shaleman/netplugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/shaleman/netplugin/contents/{+path}","compare_url":"https://api.github.com/repos/shaleman/netplugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shaleman/netplugin/merges","archive_url":"https://api.github.com/repos/shaleman/netplugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shaleman/netplugin/downloads","issues_url":"https://api.github.com/repos/shaleman/netplugin/issues{/number}","pulls_url":"https://api.github.com/repos/shaleman/netplugin/pulls{/number}","milestones_url":"https://api.github.com/repos/shaleman/netplugin/milestones{/number}","notifications_url":"https://api.github.com/repos/shaleman/netplugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shaleman/netplugin/labels{/name}","releases_url":"https://api.github.com/repos/shaleman/netplugin/releases{/id}","created_at":"2015-07-15T23:44:05Z","updated_at":"2015-07-15T23:44:05Z","pushed_at":"2015-09-17T03:27:45Z","git_url":"git://github.com/shaleman/netplugin.git","ssh_url":"git@github.com:shaleman/netplugin.git","clone_url":"https://github.com/shaleman/netplugin.git","svn_url":"https://github.com/shaleman/netplugin","homepage":"","size":2436,"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":"contiv:master","ref":"master","sha":"a1e025970a701c569f070f8c86478fd1ca7c5676","user":{"login":"contiv","id":10272443,"avatar_url":"https://avatars.githubusercontent.com/u/10272443?v=3","gravatar_id":"","url":"https://api.github.com/users/contiv","html_url":"https://github.com/contiv","followers_url":"https://api.github.com/users/contiv/followers","following_url":"https://api.github.com/users/contiv/following{/other_user}","gists_url":"https://api.github.com/users/contiv/gists{/gist_id}","starred_url":"https://api.github.com/users/contiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contiv/subscriptions","organizations_url":"https://api.github.com/users/contiv/orgs","repos_url":"https://api.github.com/users/contiv/repos","events_url":"https://api.github.com/users/contiv/events{/privacy}","received_events_url":"https://api.github.com/users/contiv/received_events","type":"User","site_admin":false},"repo":{"id":28353322,"name":"netplugin","full_name":"contiv/netplugin","owner":{"login":"contiv","id":10272443,"avatar_url":"https://avatars.githubusercontent.com/u/10272443?v=3","gravatar_id":"","url":"https://api.github.com/users/contiv","html_url":"https://github.com/contiv","followers_url":"https://api.github.com/users/contiv/followers","following_url":"https://api.github.com/users/contiv/following{/other_user}","gists_url":"https://api.github.com/users/contiv/gists{/gist_id}","starred_url":"https://api.github.com/users/contiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contiv/subscriptions","organizations_url":"https://api.github.com/users/contiv/orgs","repos_url":"https://api.github.com/users/contiv/repos","events_url":"https://api.github.com/users/contiv/events{/privacy}","received_events_url":"https://api.github.com/users/contiv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/contiv/netplugin","description":"network plugin framework for container based environments","fork":false,"url":"https://api.github.com/repos/contiv/netplugin","forks_url":"https://api.github.com/repos/contiv/netplugin/forks","keys_url":"https://api.github.com/repos/contiv/netplugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contiv/netplugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contiv/netplugin/teams","hooks_url":"https://api.github.com/repos/contiv/netplugin/hooks","issue_events_url":"https://api.github.com/repos/contiv/netplugin/issues/events{/number}","events_url":"https://api.github.com/repos/contiv/netplugin/events","assignees_url":"https://api.github.com/repos/contiv/netplugin/assignees{/user}","branches_url":"https://api.github.com/repos/contiv/netplugin/branches{/branch}","tags_url":"https://api.github.com/repos/contiv/netplugin/tags","blobs_url":"https://api.github.com/repos/contiv/netplugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contiv/netplugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contiv/netplugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/contiv/netplugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contiv/netplugin/statuses/{sha}","languages_url":"https://api.github.com/repos/contiv/netplugin/languages","stargazers_url":"https://api.github.com/repos/contiv/netplugin/stargazers","contributors_url":"https://api.github.com/repos/contiv/netplugin/contributors","subscribers_url":"https://api.github.com/repos/contiv/netplugin/subscribers","subscription_url":"https://api.github.com/repos/contiv/netplugin/subscription","commits_url":"https://api.github.com/repos/contiv/netplugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/contiv/netplugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/contiv/netplugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/contiv/netplugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/contiv/netplugin/contents/{+path}","compare_url":"https://api.github.com/repos/contiv/netplugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contiv/netplugin/merges","archive_url":"https://api.github.com/repos/contiv/netplugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contiv/netplugin/downloads","issues_url":"https://api.github.com/repos/contiv/netplugin/issues{/number}","pulls_url":"https://api.github.com/repos/contiv/netplugin/pulls{/number}","milestones_url":"https://api.github.com/repos/contiv/netplugin/milestones{/number}","notifications_url":"https://api.github.com/repos/contiv/netplugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contiv/netplugin/labels{/name}","releases_url":"https://api.github.com/repos/contiv/netplugin/releases{/id}","created_at":"2014-12-22T18:45:21Z","updated_at":"2015-09-16T18:38:47Z","pushed_at":"2015-09-17T03:32:35Z","git_url":"git://github.com/contiv/netplugin.git","ssh_url":"git@github.com:contiv/netplugin.git","clone_url":"https://github.com/contiv/netplugin.git","svn_url":"https://github.com/contiv/netplugin","homepage":"","size":3646,"stargazers_count":25,"watchers_count":25,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":26,"forks":14,"open_issues":26,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/contiv/netplugin/pulls/148"},"html":{"href":"https://github.com/contiv/netplugin/pull/148"},"issue":{"href":"https://api.github.com/repos/contiv/netplugin/issues/148"},"comments":{"href":"https://api.github.com/repos/contiv/netplugin/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/contiv/netplugin/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/contiv/netplugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/contiv/netplugin/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/contiv/netplugin/statuses/15e53a27c5d5292ae2af871cea0d6a4df49498b8"}}}}