{"action":"created","comment":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments/86182546","pull_request_review_id":6852576,"id":86182546,"diff_hunk":"@@ -199,6 +239,33 @@ func (c *ModelAdaptor) getProfile(k model.Key) (*model.KVPair, error) {\n \treturn &d, nil\n }\n \n+// getBlockAffinity gets KVPair for Block. It gets the block value first,\n+// then checks for `Affinity` field first, then `HostAffinity` as a backup.\n+// For more details see: https://github.com/projectcalico/libcalico-go/issues/226\n+func (c *ModelAdaptor) getBlockAffinity(k model.Key) (*model.KVPair, error) {","path":"lib/backend/compat/compat.go","position":96,"original_position":96,"commit_id":"3ed862c8dbf0267ee108bdd189177186c1797ecd","original_commit_id":"3ed862c8dbf0267ee108bdd189177186c1797ecd","user":{"login":"caseydavenport","id":1944093,"avatar_url":"https://avatars.githubusercontent.com/u/1944093?v=3","gravatar_id":"","url":"https://api.github.com/users/caseydavenport","html_url":"https://github.com/caseydavenport","followers_url":"https://api.github.com/users/caseydavenport/followers","following_url":"https://api.github.com/users/caseydavenport/following{/other_user}","gists_url":"https://api.github.com/users/caseydavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/caseydavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseydavenport/subscriptions","organizations_url":"https://api.github.com/users/caseydavenport/orgs","repos_url":"https://api.github.com/users/caseydavenport/repos","events_url":"https://api.github.com/users/caseydavenport/events{/privacy}","received_events_url":"https://api.github.com/users/caseydavenport/received_events","type":"User","site_admin":false},"body":"I think this should just be called `getBlock`\r\n\r\nA `blockAffinity` is a different thing :)","created_at":"2016-11-02T16:22:25Z","updated_at":"2016-11-02T16:22:26Z","html_url":"https://github.com/projectcalico/libcalico-go/pull/241#discussion_r86182546","pull_request_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/241","_links":{"self":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments/86182546"},"html":{"href":"https://github.com/projectcalico/libcalico-go/pull/241#discussion_r86182546"},"pull_request":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/241"}}},"pull_request":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/241","id":91922997,"html_url":"https://github.com/projectcalico/libcalico-go/pull/241","diff_url":"https://github.com/projectcalico/libcalico-go/pull/241.diff","patch_url":"https://github.com/projectcalico/libcalico-go/pull/241.patch","issue_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/241","number":241,"state":"open","locked":false,"title":"host affinity backwards compatiblity","user":{"login":"gunjan5","id":5966968,"avatar_url":"https://avatars.githubusercontent.com/u/5966968?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjan5","html_url":"https://github.com/gunjan5","followers_url":"https://api.github.com/users/gunjan5/followers","following_url":"https://api.github.com/users/gunjan5/following{/other_user}","gists_url":"https://api.github.com/users/gunjan5/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjan5/subscriptions","organizations_url":"https://api.github.com/users/gunjan5/orgs","repos_url":"https://api.github.com/users/gunjan5/repos","events_url":"https://api.github.com/users/gunjan5/events{/privacy}","received_events_url":"https://api.github.com/users/gunjan5/received_events","type":"User","site_admin":false},"body":"Fixes #226  ","created_at":"2016-11-02T07:56:23Z","updated_at":"2016-11-02T16:22:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e254144f87136d05286f9aefa5c3759dc6f19ead","assignee":{"login":"caseydavenport","id":1944093,"avatar_url":"https://avatars.githubusercontent.com/u/1944093?v=3","gravatar_id":"","url":"https://api.github.com/users/caseydavenport","html_url":"https://github.com/caseydavenport","followers_url":"https://api.github.com/users/caseydavenport/followers","following_url":"https://api.github.com/users/caseydavenport/following{/other_user}","gists_url":"https://api.github.com/users/caseydavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/caseydavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseydavenport/subscriptions","organizations_url":"https://api.github.com/users/caseydavenport/orgs","repos_url":"https://api.github.com/users/caseydavenport/repos","events_url":"https://api.github.com/users/caseydavenport/events{/privacy}","received_events_url":"https://api.github.com/users/caseydavenport/received_events","type":"User","site_admin":false},"assignees":[{"login":"caseydavenport","id":1944093,"avatar_url":"https://avatars.githubusercontent.com/u/1944093?v=3","gravatar_id":"","url":"https://api.github.com/users/caseydavenport","html_url":"https://github.com/caseydavenport","followers_url":"https://api.github.com/users/caseydavenport/followers","following_url":"https://api.github.com/users/caseydavenport/following{/other_user}","gists_url":"https://api.github.com/users/caseydavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/caseydavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseydavenport/subscriptions","organizations_url":"https://api.github.com/users/caseydavenport/orgs","repos_url":"https://api.github.com/users/caseydavenport/repos","events_url":"https://api.github.com/users/caseydavenport/events{/privacy}","received_events_url":"https://api.github.com/users/caseydavenport/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/milestones/2","html_url":"https://github.com/projectcalico/libcalico-go/milestones/libcalico/GA","labels_url":"https://api.github.com/repos/projectcalico/libcalico-go/milestones/2/labels","id":1952255,"number":2,"title":"libcalico/GA","description":"First GA release of libcalico-go.","creator":{"login":"caseydavenport","id":1944093,"avatar_url":"https://avatars.githubusercontent.com/u/1944093?v=3","gravatar_id":"","url":"https://api.github.com/users/caseydavenport","html_url":"https://github.com/caseydavenport","followers_url":"https://api.github.com/users/caseydavenport/followers","following_url":"https://api.github.com/users/caseydavenport/following{/other_user}","gists_url":"https://api.github.com/users/caseydavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/caseydavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseydavenport/subscriptions","organizations_url":"https://api.github.com/users/caseydavenport/orgs","repos_url":"https://api.github.com/users/caseydavenport/repos","events_url":"https://api.github.com/users/caseydavenport/events{/privacy}","received_events_url":"https://api.github.com/users/caseydavenport/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":44,"state":"open","created_at":"2016-08-19T20:19:54Z","updated_at":"2016-11-02T07:56:32Z","due_on":"2016-10-31T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/241/commits","review_comments_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/241/comments","review_comment_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/241/comments","statuses_url":"https://api.github.com/repos/projectcalico/libcalico-go/statuses/3ed862c8dbf0267ee108bdd189177186c1797ecd","head":{"label":"gunjan5:host-affinity","ref":"host-affinity","sha":"3ed862c8dbf0267ee108bdd189177186c1797ecd","user":{"login":"gunjan5","id":5966968,"avatar_url":"https://avatars.githubusercontent.com/u/5966968?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjan5","html_url":"https://github.com/gunjan5","followers_url":"https://api.github.com/users/gunjan5/followers","following_url":"https://api.github.com/users/gunjan5/following{/other_user}","gists_url":"https://api.github.com/users/gunjan5/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjan5/subscriptions","organizations_url":"https://api.github.com/users/gunjan5/orgs","repos_url":"https://api.github.com/users/gunjan5/repos","events_url":"https://api.github.com/users/gunjan5/events{/privacy}","received_events_url":"https://api.github.com/users/gunjan5/received_events","type":"User","site_admin":false},"repo":{"id":71182096,"name":"libcalico-go","full_name":"gunjan5/libcalico-go","owner":{"login":"gunjan5","id":5966968,"avatar_url":"https://avatars.githubusercontent.com/u/5966968?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjan5","html_url":"https://github.com/gunjan5","followers_url":"https://api.github.com/users/gunjan5/followers","following_url":"https://api.github.com/users/gunjan5/following{/other_user}","gists_url":"https://api.github.com/users/gunjan5/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjan5/subscriptions","organizations_url":"https://api.github.com/users/gunjan5/orgs","repos_url":"https://api.github.com/users/gunjan5/repos","events_url":"https://api.github.com/users/gunjan5/events{/privacy}","received_events_url":"https://api.github.com/users/gunjan5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gunjan5/libcalico-go","description":"Golang Calico library functions:  https://www.projectcalico.org","fork":true,"url":"https://api.github.com/repos/gunjan5/libcalico-go","forks_url":"https://api.github.com/repos/gunjan5/libcalico-go/forks","keys_url":"https://api.github.com/repos/gunjan5/libcalico-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gunjan5/libcalico-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gunjan5/libcalico-go/teams","hooks_url":"https://api.github.com/repos/gunjan5/libcalico-go/hooks","issue_events_url":"https://api.github.com/repos/gunjan5/libcalico-go/issues/events{/number}","events_url":"https://api.github.com/repos/gunjan5/libcalico-go/events","assignees_url":"https://api.github.com/repos/gunjan5/libcalico-go/assignees{/user}","branches_url":"https://api.github.com/repos/gunjan5/libcalico-go/branches{/branch}","tags_url":"https://api.github.com/repos/gunjan5/libcalico-go/tags","blobs_url":"https://api.github.com/repos/gunjan5/libcalico-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gunjan5/libcalico-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gunjan5/libcalico-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/gunjan5/libcalico-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gunjan5/libcalico-go/statuses/{sha}","languages_url":"https://api.github.com/repos/gunjan5/libcalico-go/languages","stargazers_url":"https://api.github.com/repos/gunjan5/libcalico-go/stargazers","contributors_url":"https://api.github.com/repos/gunjan5/libcalico-go/contributors","subscribers_url":"https://api.github.com/repos/gunjan5/libcalico-go/subscribers","subscription_url":"https://api.github.com/repos/gunjan5/libcalico-go/subscription","commits_url":"https://api.github.com/repos/gunjan5/libcalico-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/gunjan5/libcalico-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/gunjan5/libcalico-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/gunjan5/libcalico-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/gunjan5/libcalico-go/contents/{+path}","compare_url":"https://api.github.com/repos/gunjan5/libcalico-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gunjan5/libcalico-go/merges","archive_url":"https://api.github.com/repos/gunjan5/libcalico-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gunjan5/libcalico-go/downloads","issues_url":"https://api.github.com/repos/gunjan5/libcalico-go/issues{/number}","pulls_url":"https://api.github.com/repos/gunjan5/libcalico-go/pulls{/number}","milestones_url":"https://api.github.com/repos/gunjan5/libcalico-go/milestones{/number}","notifications_url":"https://api.github.com/repos/gunjan5/libcalico-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gunjan5/libcalico-go/labels{/name}","releases_url":"https://api.github.com/repos/gunjan5/libcalico-go/releases{/id}","deployments_url":"https://api.github.com/repos/gunjan5/libcalico-go/deployments","created_at":"2016-10-17T21:18:27Z","updated_at":"2016-10-17T21:18:28Z","pushed_at":"2016-11-02T16:12:19Z","git_url":"git://github.com/gunjan5/libcalico-go.git","ssh_url":"git@github.com:gunjan5/libcalico-go.git","clone_url":"https://github.com/gunjan5/libcalico-go.git","svn_url":"https://github.com/gunjan5/libcalico-go","homepage":null,"size":776,"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":"projectcalico:master","ref":"master","sha":"c7fc05237fca3713fa3a5139c2fd4d57f035ed56","user":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"repo":{"id":63438319,"name":"libcalico-go","full_name":"projectcalico/libcalico-go","owner":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectcalico/libcalico-go","description":"Golang Calico library functions:  https://www.projectcalico.org","fork":false,"url":"https://api.github.com/repos/projectcalico/libcalico-go","forks_url":"https://api.github.com/repos/projectcalico/libcalico-go/forks","keys_url":"https://api.github.com/repos/projectcalico/libcalico-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectcalico/libcalico-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectcalico/libcalico-go/teams","hooks_url":"https://api.github.com/repos/projectcalico/libcalico-go/hooks","issue_events_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/events{/number}","events_url":"https://api.github.com/repos/projectcalico/libcalico-go/events","assignees_url":"https://api.github.com/repos/projectcalico/libcalico-go/assignees{/user}","branches_url":"https://api.github.com/repos/projectcalico/libcalico-go/branches{/branch}","tags_url":"https://api.github.com/repos/projectcalico/libcalico-go/tags","blobs_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectcalico/libcalico-go/statuses/{sha}","languages_url":"https://api.github.com/repos/projectcalico/libcalico-go/languages","stargazers_url":"https://api.github.com/repos/projectcalico/libcalico-go/stargazers","contributors_url":"https://api.github.com/repos/projectcalico/libcalico-go/contributors","subscribers_url":"https://api.github.com/repos/projectcalico/libcalico-go/subscribers","subscription_url":"https://api.github.com/repos/projectcalico/libcalico-go/subscription","commits_url":"https://api.github.com/repos/projectcalico/libcalico-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectcalico/libcalico-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectcalico/libcalico-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectcalico/libcalico-go/contents/{+path}","compare_url":"https://api.github.com/repos/projectcalico/libcalico-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectcalico/libcalico-go/merges","archive_url":"https://api.github.com/repos/projectcalico/libcalico-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectcalico/libcalico-go/downloads","issues_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues{/number}","pulls_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls{/number}","milestones_url":"https://api.github.com/repos/projectcalico/libcalico-go/milestones{/number}","notifications_url":"https://api.github.com/repos/projectcalico/libcalico-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectcalico/libcalico-go/labels{/name}","releases_url":"https://api.github.com/repos/projectcalico/libcalico-go/releases{/id}","deployments_url":"https://api.github.com/repos/projectcalico/libcalico-go/deployments","created_at":"2016-07-15T17:09:40Z","updated_at":"2016-10-28T11:09:44Z","pushed_at":"2016-11-02T16:12:19Z","git_url":"git://github.com/projectcalico/libcalico-go.git","ssh_url":"git@github.com:projectcalico/libcalico-go.git","clone_url":"https://github.com/projectcalico/libcalico-go.git","svn_url":"https://github.com/projectcalico/libcalico-go","homepage":null,"size":1355,"stargazers_count":13,"watchers_count":13,"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":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/241"},"html":{"href":"https://github.com/projectcalico/libcalico-go/pull/241"},"issue":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/issues/241"},"comments":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/issues/241/comments"},"review_comments":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/241/comments"},"review_comment":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/241/commits"},"statuses":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/statuses/3ed862c8dbf0267ee108bdd189177186c1797ecd"}}}}
{"actor":{"display_login":"caseydavenport"}}