{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/comments/23705858","id":23705858,"diff_hunk":"@@ -9,8 +9,6 @@ class Host::Discovered < ::Host::Base\n   belongs_to :hostgroup\n   has_one    :discovery_attribute_set, :foreign_key => :host_id, :dependent => :destroy\n \n-  validates :mac, :uniqueness => true, :mac_address => true, :presence => true\n-  validates :ip, :format => {:with => Net::Validations::IP_REGEXP}, :uniqueness => true","path":"app/models/host/discovered.rb","position":5,"original_position":5,"commit_id":"dddf7baf1315bc87579f114661e2fb41383abf54","original_commit_id":"dddf7baf1315bc87579f114661e2fb41383abf54","user":{"login":"GregSutcliffe","id":827786,"avatar_url":"https://avatars.githubusercontent.com/u/827786?v=3","gravatar_id":"","url":"https://api.github.com/users/GregSutcliffe","html_url":"https://github.com/GregSutcliffe","followers_url":"https://api.github.com/users/GregSutcliffe/followers","following_url":"https://api.github.com/users/GregSutcliffe/following{/other_user}","gists_url":"https://api.github.com/users/GregSutcliffe/gists{/gist_id}","starred_url":"https://api.github.com/users/GregSutcliffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregSutcliffe/subscriptions","organizations_url":"https://api.github.com/users/GregSutcliffe/orgs","repos_url":"https://api.github.com/users/GregSutcliffe/repos","events_url":"https://api.github.com/users/GregSutcliffe/events{/privacy}","received_events_url":"https://api.github.com/users/GregSutcliffe/received_events","type":"User","site_admin":false},"body":"Note this is validated by the Nic model now.","created_at":"2015-01-28T17:44:02Z","updated_at":"2015-01-28T17:44:02Z","html_url":"https://github.com/theforeman/foreman_discovery/pull/143#discussion_r23705858","pull_request_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/comments/23705858"},"html":{"href":"https://github.com/theforeman/foreman_discovery/pull/143#discussion_r23705858"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/143","id":28213530,"html_url":"https://github.com/theforeman/foreman_discovery/pull/143","diff_url":"https://github.com/theforeman/foreman_discovery/pull/143.diff","patch_url":"https://github.com/theforeman/foreman_discovery/pull/143.patch","issue_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues/143","number":143,"state":"open","locked":false,"title":"WIP update discovery to work with new multinic core","user":{"login":"GregSutcliffe","id":827786,"avatar_url":"https://avatars.githubusercontent.com/u/827786?v=3","gravatar_id":"","url":"https://api.github.com/users/GregSutcliffe","html_url":"https://github.com/GregSutcliffe","followers_url":"https://api.github.com/users/GregSutcliffe/followers","following_url":"https://api.github.com/users/GregSutcliffe/following{/other_user}","gists_url":"https://api.github.com/users/GregSutcliffe/gists{/gist_id}","starred_url":"https://api.github.com/users/GregSutcliffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregSutcliffe/subscriptions","organizations_url":"https://api.github.com/users/GregSutcliffe/orgs","repos_url":"https://api.github.com/users/GregSutcliffe/repos","events_url":"https://api.github.com/users/GregSutcliffe/events{/privacy}","received_events_url":"https://api.github.com/users/GregSutcliffe/received_events","type":"User","site_admin":false},"body":"OK, here's my minimal changes to fix discovery for multinic support. Also needs theforeman/foreman#2116. Seems to work for both manual and auto-provisioning on latest core/develop.\r\n\r\nI'm not sure how to make this compatible with 1.7 - most could be wrapped in version tests or .try() calls I guess?\r\n\r\nI'll check back tomorrow to see how the tests are going :)\r\n\r\nI also think we'll need to revisit this once the new multinic support has settled down and discuss how we want to consume it in Discovery.\r\n","created_at":"2015-01-28T17:43:09Z","updated_at":"2015-01-28T17:44:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"066641222f2e4662213096c39183b92c07b86066","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/143/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/143/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/comments/{number}","comments_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues/143/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman_discovery/statuses/dddf7baf1315bc87579f114661e2fb41383abf54","head":{"label":"GregSutcliffe:develop","ref":"develop","sha":"dddf7baf1315bc87579f114661e2fb41383abf54","user":{"login":"GregSutcliffe","id":827786,"avatar_url":"https://avatars.githubusercontent.com/u/827786?v=3","gravatar_id":"","url":"https://api.github.com/users/GregSutcliffe","html_url":"https://github.com/GregSutcliffe","followers_url":"https://api.github.com/users/GregSutcliffe/followers","following_url":"https://api.github.com/users/GregSutcliffe/following{/other_user}","gists_url":"https://api.github.com/users/GregSutcliffe/gists{/gist_id}","starred_url":"https://api.github.com/users/GregSutcliffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregSutcliffe/subscriptions","organizations_url":"https://api.github.com/users/GregSutcliffe/orgs","repos_url":"https://api.github.com/users/GregSutcliffe/repos","events_url":"https://api.github.com/users/GregSutcliffe/events{/privacy}","received_events_url":"https://api.github.com/users/GregSutcliffe/received_events","type":"User","site_admin":false},"repo":{"id":9765409,"name":"foreman_discovery","full_name":"GregSutcliffe/foreman_discovery","owner":{"login":"GregSutcliffe","id":827786,"avatar_url":"https://avatars.githubusercontent.com/u/827786?v=3","gravatar_id":"","url":"https://api.github.com/users/GregSutcliffe","html_url":"https://github.com/GregSutcliffe","followers_url":"https://api.github.com/users/GregSutcliffe/followers","following_url":"https://api.github.com/users/GregSutcliffe/following{/other_user}","gists_url":"https://api.github.com/users/GregSutcliffe/gists{/gist_id}","starred_url":"https://api.github.com/users/GregSutcliffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregSutcliffe/subscriptions","organizations_url":"https://api.github.com/users/GregSutcliffe/orgs","repos_url":"https://api.github.com/users/GregSutcliffe/repos","events_url":"https://api.github.com/users/GregSutcliffe/events{/privacy}","received_events_url":"https://api.github.com/users/GregSutcliffe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GregSutcliffe/foreman_discovery","description":"A plugin to enable Metal-as-a-Service discovery functionality in foreman","fork":true,"url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery","forks_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/forks","keys_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/teams","hooks_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/hooks","issue_events_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/issues/events{/number}","events_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/events","assignees_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/assignees{/user}","branches_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/branches{/branch}","tags_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/tags","blobs_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/git/refs{/sha}","trees_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/statuses/{sha}","languages_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/languages","stargazers_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/stargazers","contributors_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/contributors","subscribers_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/subscribers","subscription_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/subscription","commits_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/commits{/sha}","git_commits_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/git/commits{/sha}","comments_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/comments{/number}","issue_comment_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/issues/comments/{number}","contents_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/contents/{+path}","compare_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/merges","archive_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/downloads","issues_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/issues{/number}","pulls_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/pulls{/number}","milestones_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/milestones{/number}","notifications_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/labels{/name}","releases_url":"https://api.github.com/repos/GregSutcliffe/foreman_discovery/releases{/id}","created_at":"2013-04-30T06:36:40Z","updated_at":"2014-06-23T11:47:47Z","pushed_at":"2015-01-28T17:41:50Z","git_url":"git://github.com/GregSutcliffe/foreman_discovery.git","ssh_url":"git@github.com:GregSutcliffe/foreman_discovery.git","clone_url":"https://github.com/GregSutcliffe/foreman_discovery.git","svn_url":"https://github.com/GregSutcliffe/foreman_discovery","homepage":null,"size":919,"stargazers_count":2,"watchers_count":2,"language":"Ruby","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":2,"default_branch":"master"}},"base":{"label":"theforeman:2.0-stable","ref":"2.0-stable","sha":"16263750618798f1491ae6df5cab2a7f8dadb55c","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":8454019,"name":"foreman_discovery","full_name":"theforeman/foreman_discovery","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman_discovery","description":"A plugin to enable Metal-as-a-Service discovery functionality in foreman","fork":false,"url":"https://api.github.com/repos/theforeman/foreman_discovery","forks_url":"https://api.github.com/repos/theforeman/foreman_discovery/forks","keys_url":"https://api.github.com/repos/theforeman/foreman_discovery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman_discovery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman_discovery/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman_discovery/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman_discovery/events","assignees_url":"https://api.github.com/repos/theforeman/foreman_discovery/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman_discovery/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman_discovery/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman_discovery/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman_discovery/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman_discovery/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman_discovery/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman_discovery/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman_discovery/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman_discovery/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman_discovery/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman_discovery/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues/comments/{number}","contents_url":"https://api.github.com/repos/theforeman/foreman_discovery/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman_discovery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman_discovery/merges","archive_url":"https://api.github.com/repos/theforeman/foreman_discovery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman_discovery/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman_discovery/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman_discovery/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman_discovery/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman_discovery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman_discovery/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman_discovery/releases{/id}","created_at":"2013-02-27T10:45:55Z","updated_at":"2015-01-28T16:08:13Z","pushed_at":"2015-01-28T16:09:21Z","git_url":"git://github.com/theforeman/foreman_discovery.git","ssh_url":"git@github.com:theforeman/foreman_discovery.git","clone_url":"https://github.com/theforeman/foreman_discovery.git","svn_url":"https://github.com/theforeman/foreman_discovery","homepage":null,"size":2548,"stargazers_count":21,"watchers_count":21,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":5,"forks":29,"open_issues":5,"watchers":21,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/143"},"html":{"href":"https://github.com/theforeman/foreman_discovery/pull/143"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/issues/143"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman_discovery/statuses/dddf7baf1315bc87579f114661e2fb41383abf54"}}}}