{"action":"created","comment":{"url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/comments/26193010","id":26193010,"diff_hunk":"@@ -91,16 +106,19 @@ sub add_host {\n         $self->warn(\"Host $hostname should be added as new, but is not reachable, so it will be ignored\");\n     } else {\n         $structures->{configs}->{$hostname}->{global} = $host->{config} if ($host->{config});\n-        $structures->{configs}->{$hostname}->{\"client.radosgw.gateway\"} = $host->{radosgw} if ($host->{radosgw});\n-        if ($host->{mon}) {\n-            $self->add_mon($hostname, $host->{mon}, $structures) or return 0;\n-        }\n-        if ($host->{mds}) {\n-            $self->add_mds($hostname, $host->{mds}, $structures) or return 0;\n+        my @uniqs = ('mon', 'mds');\n+        foreach my $dtype (@uniqs) {\n+            if ($host->{$dtype}) {\n+                $ACTIONS{\"add_$dtype\"}($self, $hostname, $host->{$dtype}, $structures) or return 0;\n+            }\n         }\n-        if ($host->{osds}){\n-            while  (my ($osdkey, $osd) = each(%{$host->{osds}})) {\n-                $self->add_osd($hostname, $osdkey, $osd, $structures) or return 0;\n+        my @multiples = ('osds', 'gtws');","path":"ncm-ceph/src/main/perl/Ceph/compare.pm","position":93,"original_position":93,"commit_id":"e3894358cd7f6bf911aeb6b18e2235b7446895b2","original_commit_id":"e3894358cd7f6bf911aeb6b18e2235b7446895b2","user":{"login":"stdweird","id":1517606,"avatar_url":"https://avatars.githubusercontent.com/u/1517606?v=3","gravatar_id":"","url":"https://api.github.com/users/stdweird","html_url":"https://github.com/stdweird","followers_url":"https://api.github.com/users/stdweird/followers","following_url":"https://api.github.com/users/stdweird/following{/other_user}","gists_url":"https://api.github.com/users/stdweird/gists{/gist_id}","starred_url":"https://api.github.com/users/stdweird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stdweird/subscriptions","organizations_url":"https://api.github.com/users/stdweird/orgs","repos_url":"https://api.github.com/users/stdweird/repos","events_url":"https://api.github.com/users/stdweird/events{/privacy}","received_events_url":"https://api.github.com/users/stdweird/received_events","type":"User","site_admin":false},"body":"(and why didn't the unittest pick this up?)","created_at":"2015-03-11T07:32:12Z","updated_at":"2015-03-11T07:32:12Z","html_url":"https://github.com/quattor/configuration-modules-core/pull/443#discussion_r26193010","pull_request_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/443","_links":{"self":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/comments/26193010"},"html":{"href":"https://github.com/quattor/configuration-modules-core/pull/443#discussion_r26193010"},"pull_request":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/443"}}},"pull_request":{"url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/443","id":30895005,"html_url":"https://github.com/quattor/configuration-modules-core/pull/443","diff_url":"https://github.com/quattor/configuration-modules-core/pull/443.diff","patch_url":"https://github.com/quattor/configuration-modules-core/pull/443.patch","issue_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues/443","number":443,"state":"open","locked":false,"title":"ncm-ceph: add support for multiple gateways","user":{"login":"kwaegema","id":5611130,"avatar_url":"https://avatars.githubusercontent.com/u/5611130?v=3","gravatar_id":"","url":"https://api.github.com/users/kwaegema","html_url":"https://github.com/kwaegema","followers_url":"https://api.github.com/users/kwaegema/followers","following_url":"https://api.github.com/users/kwaegema/following{/other_user}","gists_url":"https://api.github.com/users/kwaegema/gists{/gist_id}","starred_url":"https://api.github.com/users/kwaegema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwaegema/subscriptions","organizations_url":"https://api.github.com/users/kwaegema/orgs","repos_url":"https://api.github.com/users/kwaegema/repos","events_url":"https://api.github.com/users/kwaegema/events{/privacy}","received_events_url":"https://api.github.com/users/kwaegema/received_events","type":"User","site_admin":false},"body":"Fixes #428 \r\nGeneralised some code while at it","created_at":"2015-03-10T21:35:49Z","updated_at":"2015-03-11T07:32:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9840725ff5cdc3b519f37df0a73af6988f0c7032","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/443/commits","review_comments_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/443/comments","review_comment_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues/443/comments","statuses_url":"https://api.github.com/repos/quattor/configuration-modules-core/statuses/e3894358cd7f6bf911aeb6b18e2235b7446895b2","head":{"label":"kwaegema:gateways","ref":"gateways","sha":"e3894358cd7f6bf911aeb6b18e2235b7446895b2","user":{"login":"kwaegema","id":5611130,"avatar_url":"https://avatars.githubusercontent.com/u/5611130?v=3","gravatar_id":"","url":"https://api.github.com/users/kwaegema","html_url":"https://github.com/kwaegema","followers_url":"https://api.github.com/users/kwaegema/followers","following_url":"https://api.github.com/users/kwaegema/following{/other_user}","gists_url":"https://api.github.com/users/kwaegema/gists{/gist_id}","starred_url":"https://api.github.com/users/kwaegema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwaegema/subscriptions","organizations_url":"https://api.github.com/users/kwaegema/orgs","repos_url":"https://api.github.com/users/kwaegema/repos","events_url":"https://api.github.com/users/kwaegema/events{/privacy}","received_events_url":"https://api.github.com/users/kwaegema/received_events","type":"User","site_admin":false},"repo":{"id":15112448,"name":"configuration-modules-core","full_name":"kwaegema/configuration-modules-core","owner":{"login":"kwaegema","id":5611130,"avatar_url":"https://avatars.githubusercontent.com/u/5611130?v=3","gravatar_id":"","url":"https://api.github.com/users/kwaegema","html_url":"https://github.com/kwaegema","followers_url":"https://api.github.com/users/kwaegema/followers","following_url":"https://api.github.com/users/kwaegema/following{/other_user}","gists_url":"https://api.github.com/users/kwaegema/gists{/gist_id}","starred_url":"https://api.github.com/users/kwaegema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwaegema/subscriptions","organizations_url":"https://api.github.com/users/kwaegema/orgs","repos_url":"https://api.github.com/users/kwaegema/repos","events_url":"https://api.github.com/users/kwaegema/events{/privacy}","received_events_url":"https://api.github.com/users/kwaegema/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kwaegema/configuration-modules-core","description":"Core NCM components for Quattor","fork":true,"url":"https://api.github.com/repos/kwaegema/configuration-modules-core","forks_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/forks","keys_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/teams","hooks_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/hooks","issue_events_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/issues/events{/number}","events_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/events","assignees_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/assignees{/user}","branches_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/branches{/branch}","tags_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/tags","blobs_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/statuses/{sha}","languages_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/languages","stargazers_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/stargazers","contributors_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/contributors","subscribers_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/subscribers","subscription_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/subscription","commits_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/contents/{+path}","compare_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/merges","archive_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/downloads","issues_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/issues{/number}","pulls_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/pulls{/number}","milestones_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/milestones{/number}","notifications_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/labels{/name}","releases_url":"https://api.github.com/repos/kwaegema/configuration-modules-core/releases{/id}","created_at":"2013-12-11T16:25:54Z","updated_at":"2014-09-05T12:11:55Z","pushed_at":"2015-03-10T21:33:27Z","git_url":"git://github.com/kwaegema/configuration-modules-core.git","ssh_url":"git@github.com:kwaegema/configuration-modules-core.git","clone_url":"https://github.com/kwaegema/configuration-modules-core.git","svn_url":"https://github.com/kwaegema/configuration-modules-core","homepage":null,"size":8325,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"quattor:master","ref":"master","sha":"8520e6299bcd3d3ae5ae7cf2a0bec4ab5dd56f19","user":{"login":"quattor","id":1557169,"avatar_url":"https://avatars.githubusercontent.com/u/1557169?v=3","gravatar_id":"","url":"https://api.github.com/users/quattor","html_url":"https://github.com/quattor","followers_url":"https://api.github.com/users/quattor/followers","following_url":"https://api.github.com/users/quattor/following{/other_user}","gists_url":"https://api.github.com/users/quattor/gists{/gist_id}","starred_url":"https://api.github.com/users/quattor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quattor/subscriptions","organizations_url":"https://api.github.com/users/quattor/orgs","repos_url":"https://api.github.com/users/quattor/repos","events_url":"https://api.github.com/users/quattor/events{/privacy}","received_events_url":"https://api.github.com/users/quattor/received_events","type":"Organization","site_admin":false},"repo":{"id":6471233,"name":"configuration-modules-core","full_name":"quattor/configuration-modules-core","owner":{"login":"quattor","id":1557169,"avatar_url":"https://avatars.githubusercontent.com/u/1557169?v=3","gravatar_id":"","url":"https://api.github.com/users/quattor","html_url":"https://github.com/quattor","followers_url":"https://api.github.com/users/quattor/followers","following_url":"https://api.github.com/users/quattor/following{/other_user}","gists_url":"https://api.github.com/users/quattor/gists{/gist_id}","starred_url":"https://api.github.com/users/quattor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quattor/subscriptions","organizations_url":"https://api.github.com/users/quattor/orgs","repos_url":"https://api.github.com/users/quattor/repos","events_url":"https://api.github.com/users/quattor/events{/privacy}","received_events_url":"https://api.github.com/users/quattor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quattor/configuration-modules-core","description":"Node Configuration Manager Components for Everyone","fork":false,"url":"https://api.github.com/repos/quattor/configuration-modules-core","forks_url":"https://api.github.com/repos/quattor/configuration-modules-core/forks","keys_url":"https://api.github.com/repos/quattor/configuration-modules-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quattor/configuration-modules-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quattor/configuration-modules-core/teams","hooks_url":"https://api.github.com/repos/quattor/configuration-modules-core/hooks","issue_events_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues/events{/number}","events_url":"https://api.github.com/repos/quattor/configuration-modules-core/events","assignees_url":"https://api.github.com/repos/quattor/configuration-modules-core/assignees{/user}","branches_url":"https://api.github.com/repos/quattor/configuration-modules-core/branches{/branch}","tags_url":"https://api.github.com/repos/quattor/configuration-modules-core/tags","blobs_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quattor/configuration-modules-core/statuses/{sha}","languages_url":"https://api.github.com/repos/quattor/configuration-modules-core/languages","stargazers_url":"https://api.github.com/repos/quattor/configuration-modules-core/stargazers","contributors_url":"https://api.github.com/repos/quattor/configuration-modules-core/contributors","subscribers_url":"https://api.github.com/repos/quattor/configuration-modules-core/subscribers","subscription_url":"https://api.github.com/repos/quattor/configuration-modules-core/subscription","commits_url":"https://api.github.com/repos/quattor/configuration-modules-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/quattor/configuration-modules-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/quattor/configuration-modules-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/quattor/configuration-modules-core/contents/{+path}","compare_url":"https://api.github.com/repos/quattor/configuration-modules-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quattor/configuration-modules-core/merges","archive_url":"https://api.github.com/repos/quattor/configuration-modules-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quattor/configuration-modules-core/downloads","issues_url":"https://api.github.com/repos/quattor/configuration-modules-core/issues{/number}","pulls_url":"https://api.github.com/repos/quattor/configuration-modules-core/pulls{/number}","milestones_url":"https://api.github.com/repos/quattor/configuration-modules-core/milestones{/number}","notifications_url":"https://api.github.com/repos/quattor/configuration-modules-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quattor/configuration-modules-core/labels{/name}","releases_url":"https://api.github.com/repos/quattor/configuration-modules-core/releases{/id}","created_at":"2012-10-31T09:08:07Z","updated_at":"2015-03-05T22:07:49Z","pushed_at":"2015-03-05T22:07:49Z","git_url":"git://github.com/quattor/configuration-modules-core.git","ssh_url":"git@github.com:quattor/configuration-modules-core.git","clone_url":"https://github.com/quattor/configuration-modules-core.git","svn_url":"https://github.com/quattor/configuration-modules-core","homepage":"www.quattor.org","size":13828,"stargazers_count":5,"watchers_count":5,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":62,"forks":23,"open_issues":62,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/443"},"html":{"href":"https://github.com/quattor/configuration-modules-core/pull/443"},"issue":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/issues/443"},"comments":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/issues/443/comments"},"review_comments":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/443/comments"},"review_comment":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/pulls/443/commits"},"statuses":{"href":"https://api.github.com/repos/quattor/configuration-modules-core/statuses/e3894358cd7f6bf911aeb6b18e2235b7446895b2"}}}}