{"action":"created","comment":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments/150306904","pull_request_review_id":75843931,"id":150306904,"diff_hunk":"@@ -92,16 +100,26 @@ func init() {\n \t// Register field validators.\n \tregisterFieldValidator(\"action\", validateAction)\n \tregisterFieldValidator(\"interface\", validateInterface)\n+\tregisterFieldValidator(\"datastoreType\", validateDatastoreType)\n \tregisterFieldValidator(\"backendaction\", validateBackendAction)\n \tregisterFieldValidator(\"name\", validateName)\n \tregisterFieldValidator(\"namespacedname\", validateNamespacedName)\n \tregisterFieldValidator(\"selector\", validateSelector)\n \tregisterFieldValidator(\"tag\", validateTag)\n \tregisterFieldValidator(\"labels\", validateLabels)\n+\tregisterFieldValidator(\"labelsToApply\", validateLabelsToApply)\n+\tregisterFieldValidator(\"labelsToApply\", validateLabelsToApply)\n \tregisterFieldValidator(\"scopeglobalornode\", validateScopeGlobalOrNode)\n \tregisterFieldValidator(\"ipversion\", validateIPVersion)\n \tregisterFieldValidator(\"ipipmode\", validateIPIPMode)\n \tregisterFieldValidator(\"policytype\", validatePolicyType)\n+\tregisterFieldValidator(\"bgpLogLevel\", validateBGPLogLevel)\n+\tregisterFieldValidator(\"felixLogLevel\", validateFelixLogLevel)\n+\tregisterFieldValidator(\"dropacceptreturn\", validateFelixEtoHAction)\n+\tregisterFieldValidator(\"acceptreturn\", validateAcceptReturn)\n+\tregisterFieldValidator(\"ipv4\", validateIPv4Address)","path":"lib/validator/validator.go","position":87,"original_position":87,"commit_id":"1c6ef6079f25aa14a6982b0dff3763b6cf27edc5","original_commit_id":"7b9104e68fcd50c519437a8c5af58bd57199038a","user":{"login":"bcreane","id":12074410,"avatar_url":"https://avatars3.githubusercontent.com/u/12074410?v=4","gravatar_id":"","url":"https://api.github.com/users/bcreane","html_url":"https://github.com/bcreane","followers_url":"https://api.github.com/users/bcreane/followers","following_url":"https://api.github.com/users/bcreane/following{/other_user}","gists_url":"https://api.github.com/users/bcreane/gists{/gist_id}","starred_url":"https://api.github.com/users/bcreane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcreane/subscriptions","organizations_url":"https://api.github.com/users/bcreane/orgs","repos_url":"https://api.github.com/users/bcreane/repos","events_url":"https://api.github.com/users/bcreane/events{/privacy}","received_events_url":"https://api.github.com/users/bcreane/received_events","type":"User","site_admin":false},"body":"We use IPv4 and IPv4+CIDR interchangeably which `validator.IPv4` sadly does not support. Let's stick with our home-grown validators since they're efficient, minimal and reflect what the backend is using as well.","created_at":"2017-11-10T18:32:39Z","updated_at":"2017-11-10T18:32:39Z","html_url":"https://github.com/projectcalico/libcalico-go/pull/667#discussion_r150306904","pull_request_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/667","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/comments/150306904"},"html":{"href":"https://github.com/projectcalico/libcalico-go/pull/667#discussion_r150306904"},"pull_request":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/667"}},"in_reply_to_id":150126019},"pull_request":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/667","id":151772043,"html_url":"https://github.com/projectcalico/libcalico-go/pull/667","diff_url":"https://github.com/projectcalico/libcalico-go/pull/667.diff","patch_url":"https://github.com/projectcalico/libcalico-go/pull/667.patch","issue_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/667","number":667,"state":"open","locked":false,"title":"[WIP] Add validation for V2 resources","user":{"login":"bcreane","id":12074410,"avatar_url":"https://avatars3.githubusercontent.com/u/12074410?v=4","gravatar_id":"","url":"https://api.github.com/users/bcreane","html_url":"https://github.com/bcreane","followers_url":"https://api.github.com/users/bcreane/followers","following_url":"https://api.github.com/users/bcreane/following{/other_user}","gists_url":"https://api.github.com/users/bcreane/gists{/gist_id}","starred_url":"https://api.github.com/users/bcreane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcreane/subscriptions","organizations_url":"https://api.github.com/users/bcreane/orgs","repos_url":"https://api.github.com/users/bcreane/repos","events_url":"https://api.github.com/users/bcreane/events{/privacy}","received_events_url":"https://api.github.com/users/bcreane/received_events","type":"User","site_admin":false},"body":"## Description\r\n<!-- A few sentences describing the overall goals of the pull request's commits.\r\nPlease include\r\n- the type of fix - (e.g. bug fix, new feature, documentation)\r\n- some details on _why_ this PR should be merged\r\n- the details of the testing you've done on it (both manual and automated)\r\n- which components are affected by this PR\r\n- links to issues that this PR addresses\r\n-->\r\n\r\n## Todos\r\n- [x] Tests\r\n- [ ] Documentation\r\n- [x] Release note\r\n\r\n## Release Note\r\n<!-- Writing a release note:\r\n- By default, no release note action is required.\r\n- If you're unsure whether or not your PR needs a note, ask your reviewer for guidance.\r\n- If this PR requires a release note, update the block below to include a concise note describing\r\n  the change and any important impacts this PR may have.\r\n-->\r\n\r\n```release-note\r\nAdd validation for V2 resources.\r\n```\r\n","created_at":"2017-11-09T21:51:04Z","updated_at":"2017-11-10T18:32:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c42d2b05d9fec33d1b5ce296863e851cb6d6208","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/milestones/24","html_url":"https://github.com/projectcalico/libcalico-go/milestone/24","labels_url":"https://api.github.com/repos/projectcalico/libcalico-go/milestones/24/labels","id":2871876,"number":24,"title":"Calico v3.0.0-beta1","description":"Issues and PRs being considered for Calico v3.0.0-beta1","creator":{"login":"caseydavenport","id":1944093,"avatar_url":"https://avatars3.githubusercontent.com/u/1944093?v=4","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":4,"closed_issues":21,"state":"open","created_at":"2017-10-28T22:42:49Z","updated_at":"2017-11-10T00:50:02Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/667/commits","review_comments_url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/667/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/667/comments","statuses_url":"https://api.github.com/repos/projectcalico/libcalico-go/statuses/1c6ef6079f25aa14a6982b0dff3763b6cf27edc5","head":{"label":"bcreane:validation","ref":"validation","sha":"1c6ef6079f25aa14a6982b0dff3763b6cf27edc5","user":{"login":"bcreane","id":12074410,"avatar_url":"https://avatars3.githubusercontent.com/u/12074410?v=4","gravatar_id":"","url":"https://api.github.com/users/bcreane","html_url":"https://github.com/bcreane","followers_url":"https://api.github.com/users/bcreane/followers","following_url":"https://api.github.com/users/bcreane/following{/other_user}","gists_url":"https://api.github.com/users/bcreane/gists{/gist_id}","starred_url":"https://api.github.com/users/bcreane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcreane/subscriptions","organizations_url":"https://api.github.com/users/bcreane/orgs","repos_url":"https://api.github.com/users/bcreane/repos","events_url":"https://api.github.com/users/bcreane/events{/privacy}","received_events_url":"https://api.github.com/users/bcreane/received_events","type":"User","site_admin":false},"repo":{"id":94807532,"name":"libcalico-go","full_name":"bcreane/libcalico-go","owner":{"login":"bcreane","id":12074410,"avatar_url":"https://avatars3.githubusercontent.com/u/12074410?v=4","gravatar_id":"","url":"https://api.github.com/users/bcreane","html_url":"https://github.com/bcreane","followers_url":"https://api.github.com/users/bcreane/followers","following_url":"https://api.github.com/users/bcreane/following{/other_user}","gists_url":"https://api.github.com/users/bcreane/gists{/gist_id}","starred_url":"https://api.github.com/users/bcreane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcreane/subscriptions","organizations_url":"https://api.github.com/users/bcreane/orgs","repos_url":"https://api.github.com/users/bcreane/repos","events_url":"https://api.github.com/users/bcreane/events{/privacy}","received_events_url":"https://api.github.com/users/bcreane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcreane/libcalico-go","description":"Golang Calico library functions:  https://www.projectcalico.org","fork":true,"url":"https://api.github.com/repos/bcreane/libcalico-go","forks_url":"https://api.github.com/repos/bcreane/libcalico-go/forks","keys_url":"https://api.github.com/repos/bcreane/libcalico-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcreane/libcalico-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcreane/libcalico-go/teams","hooks_url":"https://api.github.com/repos/bcreane/libcalico-go/hooks","issue_events_url":"https://api.github.com/repos/bcreane/libcalico-go/issues/events{/number}","events_url":"https://api.github.com/repos/bcreane/libcalico-go/events","assignees_url":"https://api.github.com/repos/bcreane/libcalico-go/assignees{/user}","branches_url":"https://api.github.com/repos/bcreane/libcalico-go/branches{/branch}","tags_url":"https://api.github.com/repos/bcreane/libcalico-go/tags","blobs_url":"https://api.github.com/repos/bcreane/libcalico-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcreane/libcalico-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcreane/libcalico-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcreane/libcalico-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcreane/libcalico-go/statuses/{sha}","languages_url":"https://api.github.com/repos/bcreane/libcalico-go/languages","stargazers_url":"https://api.github.com/repos/bcreane/libcalico-go/stargazers","contributors_url":"https://api.github.com/repos/bcreane/libcalico-go/contributors","subscribers_url":"https://api.github.com/repos/bcreane/libcalico-go/subscribers","subscription_url":"https://api.github.com/repos/bcreane/libcalico-go/subscription","commits_url":"https://api.github.com/repos/bcreane/libcalico-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcreane/libcalico-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcreane/libcalico-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcreane/libcalico-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcreane/libcalico-go/contents/{+path}","compare_url":"https://api.github.com/repos/bcreane/libcalico-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcreane/libcalico-go/merges","archive_url":"https://api.github.com/repos/bcreane/libcalico-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcreane/libcalico-go/downloads","issues_url":"https://api.github.com/repos/bcreane/libcalico-go/issues{/number}","pulls_url":"https://api.github.com/repos/bcreane/libcalico-go/pulls{/number}","milestones_url":"https://api.github.com/repos/bcreane/libcalico-go/milestones{/number}","notifications_url":"https://api.github.com/repos/bcreane/libcalico-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcreane/libcalico-go/labels{/name}","releases_url":"https://api.github.com/repos/bcreane/libcalico-go/releases{/id}","deployments_url":"https://api.github.com/repos/bcreane/libcalico-go/deployments","created_at":"2017-06-19T18:20:24Z","updated_at":"2017-06-19T18:20:26Z","pushed_at":"2017-11-10T18:20:55Z","git_url":"git://github.com/bcreane/libcalico-go.git","ssh_url":"git@github.com:bcreane/libcalico-go.git","clone_url":"https://github.com/bcreane/libcalico-go.git","svn_url":"https://github.com/bcreane/libcalico-go","homepage":null,"size":2343,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"projectcalico:master","ref":"master","sha":"83fc14937b8584e65bd6c959c0a85256a2d31e28","user":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars3.githubusercontent.com/u/12304728?v=4","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://avatars3.githubusercontent.com/u/12304728?v=4","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":"2017-11-04T14:00:48Z","pushed_at":"2017-11-10T18:20:56Z","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":2331,"stargazers_count":41,"watchers_count":41,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"archived":false,"open_issues_count":22,"forks":49,"open_issues":22,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/667"},"html":{"href":"https://github.com/projectcalico/libcalico-go/pull/667"},"issue":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/issues/667"},"comments":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/issues/667/comments"},"review_comments":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/667/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/667/commits"},"statuses":{"href":"https://api.github.com/repos/projectcalico/libcalico-go/statuses/1c6ef6079f25aa14a6982b0dff3763b6cf27edc5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"bcreane"}}