{"action":"opened","number":1248,"pull_request":{"url":"https://api.github.com/repos/librenms/librenms/pulls/1248","id":37495645,"html_url":"https://github.com/librenms/librenms/pull/1248","diff_url":"https://github.com/librenms/librenms/pull/1248.diff","patch_url":"https://github.com/librenms/librenms/pull/1248.patch","issue_url":"https://api.github.com/repos/librenms/librenms/issues/1248","number":1248,"state":"open","locked":false,"title":"Added function to check if ip already exists and updated addHost to use it","user":{"login":"laf","id":3941142,"avatar_url":"https://avatars.githubusercontent.com/u/3941142?v=3","gravatar_id":"","url":"https://api.github.com/users/laf","html_url":"https://github.com/laf","followers_url":"https://api.github.com/users/laf/followers","following_url":"https://api.github.com/users/laf/following{/other_user}","gists_url":"https://api.github.com/users/laf/gists{/gist_id}","starred_url":"https://api.github.com/users/laf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laf/subscriptions","organizations_url":"https://api.github.com/users/laf/orgs","repos_url":"https://api.github.com/users/laf/repos","events_url":"https://api.github.com/users/laf/events{/privacy}","received_events_url":"https://api.github.com/users/laf/received_events","type":"User","site_admin":false},"body":"Ok, this is to finish off all the auto-discover devices that might just use IP.\r\n\r\nWhen addHost is called, if it's an IP that's passed then it's checked against the ip_exists() function, if that returns true then either something has gone wrong or the IP does exist in the DB and the addHost function will not continue.\r\n\r\nThis means adding a device by hostname will continue to work as normal just in case people have an odd requirement to point multiple names at the same device.","created_at":"2015-06-11T18:46:32Z","updated_at":"2015-06-11T18:46:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/librenms/librenms/pulls/1248/commits","review_comments_url":"https://api.github.com/repos/librenms/librenms/pulls/1248/comments","review_comment_url":"https://api.github.com/repos/librenms/librenms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/librenms/librenms/issues/1248/comments","statuses_url":"https://api.github.com/repos/librenms/librenms/statuses/15cd6d5662584a567440a89e3c6117f8d973ad8f","head":{"label":"laf:issue-594-ip","ref":"issue-594-ip","sha":"15cd6d5662584a567440a89e3c6117f8d973ad8f","user":{"login":"laf","id":3941142,"avatar_url":"https://avatars.githubusercontent.com/u/3941142?v=3","gravatar_id":"","url":"https://api.github.com/users/laf","html_url":"https://github.com/laf","followers_url":"https://api.github.com/users/laf/followers","following_url":"https://api.github.com/users/laf/following{/other_user}","gists_url":"https://api.github.com/users/laf/gists{/gist_id}","starred_url":"https://api.github.com/users/laf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laf/subscriptions","organizations_url":"https://api.github.com/users/laf/orgs","repos_url":"https://api.github.com/users/laf/repos","events_url":"https://api.github.com/users/laf/events{/privacy}","received_events_url":"https://api.github.com/users/laf/received_events","type":"User","site_admin":false},"repo":{"id":20421914,"name":"librenms","full_name":"laf/librenms","owner":{"login":"laf","id":3941142,"avatar_url":"https://avatars.githubusercontent.com/u/3941142?v=3","gravatar_id":"","url":"https://api.github.com/users/laf","html_url":"https://github.com/laf","followers_url":"https://api.github.com/users/laf/followers","following_url":"https://api.github.com/users/laf/following{/other_user}","gists_url":"https://api.github.com/users/laf/gists{/gist_id}","starred_url":"https://api.github.com/users/laf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laf/subscriptions","organizations_url":"https://api.github.com/users/laf/orgs","repos_url":"https://api.github.com/users/laf/repos","events_url":"https://api.github.com/users/laf/events{/privacy}","received_events_url":"https://api.github.com/users/laf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/laf/librenms","description":"Community-based GPL-licensed fork of Observium","fork":true,"url":"https://api.github.com/repos/laf/librenms","forks_url":"https://api.github.com/repos/laf/librenms/forks","keys_url":"https://api.github.com/repos/laf/librenms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laf/librenms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laf/librenms/teams","hooks_url":"https://api.github.com/repos/laf/librenms/hooks","issue_events_url":"https://api.github.com/repos/laf/librenms/issues/events{/number}","events_url":"https://api.github.com/repos/laf/librenms/events","assignees_url":"https://api.github.com/repos/laf/librenms/assignees{/user}","branches_url":"https://api.github.com/repos/laf/librenms/branches{/branch}","tags_url":"https://api.github.com/repos/laf/librenms/tags","blobs_url":"https://api.github.com/repos/laf/librenms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laf/librenms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laf/librenms/git/refs{/sha}","trees_url":"https://api.github.com/repos/laf/librenms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laf/librenms/statuses/{sha}","languages_url":"https://api.github.com/repos/laf/librenms/languages","stargazers_url":"https://api.github.com/repos/laf/librenms/stargazers","contributors_url":"https://api.github.com/repos/laf/librenms/contributors","subscribers_url":"https://api.github.com/repos/laf/librenms/subscribers","subscription_url":"https://api.github.com/repos/laf/librenms/subscription","commits_url":"https://api.github.com/repos/laf/librenms/commits{/sha}","git_commits_url":"https://api.github.com/repos/laf/librenms/git/commits{/sha}","comments_url":"https://api.github.com/repos/laf/librenms/comments{/number}","issue_comment_url":"https://api.github.com/repos/laf/librenms/issues/comments{/number}","contents_url":"https://api.github.com/repos/laf/librenms/contents/{+path}","compare_url":"https://api.github.com/repos/laf/librenms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laf/librenms/merges","archive_url":"https://api.github.com/repos/laf/librenms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laf/librenms/downloads","issues_url":"https://api.github.com/repos/laf/librenms/issues{/number}","pulls_url":"https://api.github.com/repos/laf/librenms/pulls{/number}","milestones_url":"https://api.github.com/repos/laf/librenms/milestones{/number}","notifications_url":"https://api.github.com/repos/laf/librenms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laf/librenms/labels{/name}","releases_url":"https://api.github.com/repos/laf/librenms/releases{/id}","created_at":"2014-06-02T22:27:58Z","updated_at":"2015-05-08T17:54:53Z","pushed_at":"2015-06-11T18:42:09Z","git_url":"git://github.com/laf/librenms.git","ssh_url":"git@github.com:laf/librenms.git","clone_url":"https://github.com/laf/librenms.git","svn_url":"https://github.com/laf/librenms","homepage":null,"size":103860,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":0,"default_branch":"master"}},"base":{"label":"librenms:master","ref":"master","sha":"4153a8fb0218c9bff792f8d17e114cba58b1bfb7","user":{"login":"librenms","id":5791783,"avatar_url":"https://avatars.githubusercontent.com/u/5791783?v=3","gravatar_id":"","url":"https://api.github.com/users/librenms","html_url":"https://github.com/librenms","followers_url":"https://api.github.com/users/librenms/followers","following_url":"https://api.github.com/users/librenms/following{/other_user}","gists_url":"https://api.github.com/users/librenms/gists{/gist_id}","starred_url":"https://api.github.com/users/librenms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librenms/subscriptions","organizations_url":"https://api.github.com/users/librenms/orgs","repos_url":"https://api.github.com/users/librenms/repos","events_url":"https://api.github.com/users/librenms/events{/privacy}","received_events_url":"https://api.github.com/users/librenms/received_events","type":"Organization","site_admin":false},"repo":{"id":13914116,"name":"librenms","full_name":"librenms/librenms","owner":{"login":"librenms","id":5791783,"avatar_url":"https://avatars.githubusercontent.com/u/5791783?v=3","gravatar_id":"","url":"https://api.github.com/users/librenms","html_url":"https://github.com/librenms","followers_url":"https://api.github.com/users/librenms/followers","following_url":"https://api.github.com/users/librenms/following{/other_user}","gists_url":"https://api.github.com/users/librenms/gists{/gist_id}","starred_url":"https://api.github.com/users/librenms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librenms/subscriptions","organizations_url":"https://api.github.com/users/librenms/orgs","repos_url":"https://api.github.com/users/librenms/repos","events_url":"https://api.github.com/users/librenms/events{/privacy}","received_events_url":"https://api.github.com/users/librenms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/librenms/librenms","description":"Community-based GPL-licensed network monitoring system","fork":false,"url":"https://api.github.com/repos/librenms/librenms","forks_url":"https://api.github.com/repos/librenms/librenms/forks","keys_url":"https://api.github.com/repos/librenms/librenms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/librenms/librenms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/librenms/librenms/teams","hooks_url":"https://api.github.com/repos/librenms/librenms/hooks","issue_events_url":"https://api.github.com/repos/librenms/librenms/issues/events{/number}","events_url":"https://api.github.com/repos/librenms/librenms/events","assignees_url":"https://api.github.com/repos/librenms/librenms/assignees{/user}","branches_url":"https://api.github.com/repos/librenms/librenms/branches{/branch}","tags_url":"https://api.github.com/repos/librenms/librenms/tags","blobs_url":"https://api.github.com/repos/librenms/librenms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/librenms/librenms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/librenms/librenms/git/refs{/sha}","trees_url":"https://api.github.com/repos/librenms/librenms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/librenms/librenms/statuses/{sha}","languages_url":"https://api.github.com/repos/librenms/librenms/languages","stargazers_url":"https://api.github.com/repos/librenms/librenms/stargazers","contributors_url":"https://api.github.com/repos/librenms/librenms/contributors","subscribers_url":"https://api.github.com/repos/librenms/librenms/subscribers","subscription_url":"https://api.github.com/repos/librenms/librenms/subscription","commits_url":"https://api.github.com/repos/librenms/librenms/commits{/sha}","git_commits_url":"https://api.github.com/repos/librenms/librenms/git/commits{/sha}","comments_url":"https://api.github.com/repos/librenms/librenms/comments{/number}","issue_comment_url":"https://api.github.com/repos/librenms/librenms/issues/comments{/number}","contents_url":"https://api.github.com/repos/librenms/librenms/contents/{+path}","compare_url":"https://api.github.com/repos/librenms/librenms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/librenms/librenms/merges","archive_url":"https://api.github.com/repos/librenms/librenms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/librenms/librenms/downloads","issues_url":"https://api.github.com/repos/librenms/librenms/issues{/number}","pulls_url":"https://api.github.com/repos/librenms/librenms/pulls{/number}","milestones_url":"https://api.github.com/repos/librenms/librenms/milestones{/number}","notifications_url":"https://api.github.com/repos/librenms/librenms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/librenms/librenms/labels{/name}","releases_url":"https://api.github.com/repos/librenms/librenms/releases{/id}","created_at":"2013-10-28T01:37:13Z","updated_at":"2015-06-11T16:50:58Z","pushed_at":"2015-06-11T18:39:26Z","git_url":"git://github.com/librenms/librenms.git","ssh_url":"git@github.com:librenms/librenms.git","clone_url":"https://github.com/librenms/librenms.git","svn_url":"https://github.com/librenms/librenms","homepage":"http://www.librenms.org/","size":57757,"stargazers_count":163,"watchers_count":163,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":93,"forks":87,"open_issues":93,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/librenms/librenms/pulls/1248"},"html":{"href":"https://github.com/librenms/librenms/pull/1248"},"issue":{"href":"https://api.github.com/repos/librenms/librenms/issues/1248"},"comments":{"href":"https://api.github.com/repos/librenms/librenms/issues/1248/comments"},"review_comments":{"href":"https://api.github.com/repos/librenms/librenms/pulls/1248/comments"},"review_comment":{"href":"https://api.github.com/repos/librenms/librenms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/librenms/librenms/pulls/1248/commits"},"statuses":{"href":"https://api.github.com/repos/librenms/librenms/statuses/15cd6d5662584a567440a89e3c6117f8d973ad8f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":23,"deletions":0,"changed_files":1}}