{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/50538494","id":50538494,"diff_hunk":"@@ -39,9 +44,18 @@\n     }\n \n     static public final class Discovery {\n-        public static final String REFRESH = \"discovery.azure.refresh_interval\";\n+        public static final Setting<TimeValue> REFRESH_SETTING = Setting.positiveTimeSetting(\"discovery.azure.refresh_interval\", TimeValue.timeValueSeconds(0), false, Setting.Scope.CLUSTER);\n+\n+        public static final Setting<AzureUnicastHostsProvider.HostType> HOST_TYPE_SETTING = new Setting<>(\n+            \"discovery.azure.host.type\", AzureUnicastHostsProvider.HostType.PRIVATE_IP.name(),\n+            strHostType -> {\n+                AzureUnicastHostsProvider.HostType hostType = AzureUnicastHostsProvider.HostType.fromString(strHostType.toUpperCase(Locale.ROOT));","path":"plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeService.java","position":22,"original_position":22,"commit_id":"6c3c691c542d6c1ec874fbebcad164f72989fe83","original_commit_id":"6c3c691c542d6c1ec874fbebcad164f72989fe83","user":{"login":"danielmitterdorfer","id":1699576,"avatar_url":"https://avatars.githubusercontent.com/u/1699576?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmitterdorfer","html_url":"https://github.com/danielmitterdorfer","followers_url":"https://api.github.com/users/danielmitterdorfer/followers","following_url":"https://api.github.com/users/danielmitterdorfer/following{/other_user}","gists_url":"https://api.github.com/users/danielmitterdorfer/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmitterdorfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmitterdorfer/subscriptions","organizations_url":"https://api.github.com/users/danielmitterdorfer/orgs","repos_url":"https://api.github.com/users/danielmitterdorfer/repos","events_url":"https://api.github.com/users/danielmitterdorfer/events{/privacy}","received_events_url":"https://api.github.com/users/danielmitterdorfer/received_events","type":"User","site_admin":false},"body":"I know you don't have written the code but I think it would be even cleaner if `AzureUnicastHostsProvider.HostType.fromString(String)` would already throw an `IllegalArgumentException` for invalid strings instead of returning `null`. wdyt?","created_at":"2016-01-22T13:56:17Z","updated_at":"2016-01-22T13:56:17Z","html_url":"https://github.com/elastic/elasticsearch/pull/16182#discussion_r50538494","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/16182","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/50538494"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/16182#discussion_r50538494"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/16182"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/16182","id":56887698,"html_url":"https://github.com/elastic/elasticsearch/pull/16182","diff_url":"https://github.com/elastic/elasticsearch/pull/16182.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/16182.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16182","number":16182,"state":"open","locked":false,"title":"Move discovery.* settings to new Setting infrastructure","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-22T13:33:24Z","updated_at":"2016-01-22T13:56:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"danielmitterdorfer","id":1699576,"avatar_url":"https://avatars.githubusercontent.com/u/1699576?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmitterdorfer","html_url":"https://github.com/danielmitterdorfer","followers_url":"https://api.github.com/users/danielmitterdorfer/followers","following_url":"https://api.github.com/users/danielmitterdorfer/following{/other_user}","gists_url":"https://api.github.com/users/danielmitterdorfer/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmitterdorfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmitterdorfer/subscriptions","organizations_url":"https://api.github.com/users/danielmitterdorfer/orgs","repos_url":"https://api.github.com/users/danielmitterdorfer/repos","events_url":"https://api.github.com/users/danielmitterdorfer/events{/privacy}","received_events_url":"https://api.github.com/users/danielmitterdorfer/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/16182/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/16182/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16182/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/6c3c691c542d6c1ec874fbebcad164f72989fe83","head":{"label":"ywelsch:enhance/discovery-settings","ref":"enhance/discovery-settings","sha":"6c3c691c542d6c1ec874fbebcad164f72989fe83","user":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"repo":{"id":43299643,"name":"elasticsearch","full_name":"ywelsch/elasticsearch","owner":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ywelsch/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/ywelsch/elasticsearch","forks_url":"https://api.github.com/repos/ywelsch/elasticsearch/forks","keys_url":"https://api.github.com/repos/ywelsch/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ywelsch/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ywelsch/elasticsearch/teams","hooks_url":"https://api.github.com/repos/ywelsch/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/ywelsch/elasticsearch/events","assignees_url":"https://api.github.com/repos/ywelsch/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/ywelsch/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/ywelsch/elasticsearch/tags","blobs_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ywelsch/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/ywelsch/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/ywelsch/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/ywelsch/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/ywelsch/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/ywelsch/elasticsearch/subscription","commits_url":"https://api.github.com/repos/ywelsch/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/ywelsch/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/ywelsch/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/ywelsch/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/ywelsch/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ywelsch/elasticsearch/merges","archive_url":"https://api.github.com/repos/ywelsch/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ywelsch/elasticsearch/downloads","issues_url":"https://api.github.com/repos/ywelsch/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/ywelsch/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/ywelsch/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/ywelsch/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ywelsch/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/ywelsch/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/ywelsch/elasticsearch/deployments","created_at":"2015-09-28T12:30:36Z","updated_at":"2015-09-28T12:31:12Z","pushed_at":"2016-01-22T13:32:05Z","git_url":"git://github.com/ywelsch/elasticsearch.git","ssh_url":"git@github.com:ywelsch/elasticsearch.git","clone_url":"https://github.com/ywelsch/elasticsearch.git","svn_url":"https://github.com/ywelsch/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":173887,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"elastic:master","ref":"master","sha":"768d171f778bea9c76603f849770352d8e41385c","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2016-01-22T13:42:06Z","pushed_at":"2016-01-22T13:33:24Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":280134,"stargazers_count":14601,"watchers_count":14601,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4845,"mirror_url":null,"open_issues_count":1214,"forks":4845,"open_issues":1214,"watchers":14601,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/16182"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/16182"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/16182"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/16182/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/16182/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/16182/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/6c3c691c542d6c1ec874fbebcad164f72989fe83"}}}}