{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments/50801421","id":50801421,"diff_hunk":"@@ -50,26 +43,29 @@ def available_clusters\n       clusters\n     end\n \n-    # Returns: name of the barclamp and of the proposal for this cluster\n-    def cluster_get_barclamp_and_proposal(element)\n-      if is_cluster?(element)\n-        [\"pacemaker\", cluster_name(element)]\n-      else\n-        [nil, nil]\n+    # Returns: List of available clusters including remotes\n+    def available_clusters_including_remotes\n+      remotes = {}\n+      # we only care about the deployed clusters, not about existing\n+      # proposals\n+      RoleObject.find_roles_by_name(\"pacemaker-config-*\").select do |role|\n+        elements = role.override_attributes[\"pacemaker\"][\"elements\"]\n+        elements[\"pacemaker-remote\"] && !elements[\"pacemaker-remote\"].empty?\n+      end.each do |role|","path":"crowbar_framework/app/models/pacemaker_service_object.rb","position":32,"original_position":32,"commit_id":"90488a949d0ec0d3fbb4f75cd3658471e7e5956a","original_commit_id":"90488a949d0ec0d3fbb4f75cd3658471e7e5956a","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Style/MultilineBlockChain: Avoid multi-line chains of blocks. (https://github.com/bbatsov/ruby-style-guide#single-line-blocks)","created_at":"2016-01-26T07:19:21Z","updated_at":"2016-01-26T07:19:21Z","html_url":"https://github.com/crowbar/crowbar-ha/pull/70#discussion_r50801421","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments/50801421"},"html":{"href":"https://github.com/crowbar/crowbar-ha/pull/70#discussion_r50801421"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/70","id":56616357,"html_url":"https://github.com/crowbar/crowbar-ha/pull/70","diff_url":"https://github.com/crowbar/crowbar-ha/pull/70.diff","patch_url":"https://github.com/crowbar/crowbar-ha/pull/70.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/70","number":70,"state":"open","locked":false,"title":"Added required new methods for ha setups with remote nodes","user":{"login":"tboerger","id":156964,"avatar_url":"https://avatars.githubusercontent.com/u/156964?v=3","gravatar_id":"","url":"https://api.github.com/users/tboerger","html_url":"https://github.com/tboerger","followers_url":"https://api.github.com/users/tboerger/followers","following_url":"https://api.github.com/users/tboerger/following{/other_user}","gists_url":"https://api.github.com/users/tboerger/gists{/gist_id}","starred_url":"https://api.github.com/users/tboerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tboerger/subscriptions","organizations_url":"https://api.github.com/users/tboerger/orgs","repos_url":"https://api.github.com/users/tboerger/repos","events_url":"https://api.github.com/users/tboerger/events{/privacy}","received_events_url":"https://api.github.com/users/tboerger/received_events","type":"User","site_admin":false},"body":"**Depends on https://github.com/crowbar/crowbar-core/pull/193**","created_at":"2016-01-20T14:44:33Z","updated_at":"2016-01-26T07:19:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f8e6c05803da9f7cdee5846a47b7aa7166814b6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/70/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/70/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/70/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/90488a949d0ec0d3fbb4f75cd3658471e7e5956a","head":{"label":"tboerger:feature/ha-remotes","ref":"feature/ha-remotes","sha":"90488a949d0ec0d3fbb4f75cd3658471e7e5956a","user":{"login":"tboerger","id":156964,"avatar_url":"https://avatars.githubusercontent.com/u/156964?v=3","gravatar_id":"","url":"https://api.github.com/users/tboerger","html_url":"https://github.com/tboerger","followers_url":"https://api.github.com/users/tboerger/followers","following_url":"https://api.github.com/users/tboerger/following{/other_user}","gists_url":"https://api.github.com/users/tboerger/gists{/gist_id}","starred_url":"https://api.github.com/users/tboerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tboerger/subscriptions","organizations_url":"https://api.github.com/users/tboerger/orgs","repos_url":"https://api.github.com/users/tboerger/repos","events_url":"https://api.github.com/users/tboerger/events{/privacy}","received_events_url":"https://api.github.com/users/tboerger/received_events","type":"User","site_admin":false},"repo":{"id":40902233,"name":"crowbar-ha","full_name":"tboerger/crowbar-ha","owner":{"login":"tboerger","id":156964,"avatar_url":"https://avatars.githubusercontent.com/u/156964?v=3","gravatar_id":"","url":"https://api.github.com/users/tboerger","html_url":"https://github.com/tboerger","followers_url":"https://api.github.com/users/tboerger/followers","following_url":"https://api.github.com/users/tboerger/following{/other_user}","gists_url":"https://api.github.com/users/tboerger/gists{/gist_id}","starred_url":"https://api.github.com/users/tboerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tboerger/subscriptions","organizations_url":"https://api.github.com/users/tboerger/orgs","repos_url":"https://api.github.com/users/tboerger/repos","events_url":"https://api.github.com/users/tboerger/events{/privacy}","received_events_url":"https://api.github.com/users/tboerger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tboerger/crowbar-ha","description":"HA deployment for Crowbar","fork":true,"url":"https://api.github.com/repos/tboerger/crowbar-ha","forks_url":"https://api.github.com/repos/tboerger/crowbar-ha/forks","keys_url":"https://api.github.com/repos/tboerger/crowbar-ha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tboerger/crowbar-ha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tboerger/crowbar-ha/teams","hooks_url":"https://api.github.com/repos/tboerger/crowbar-ha/hooks","issue_events_url":"https://api.github.com/repos/tboerger/crowbar-ha/issues/events{/number}","events_url":"https://api.github.com/repos/tboerger/crowbar-ha/events","assignees_url":"https://api.github.com/repos/tboerger/crowbar-ha/assignees{/user}","branches_url":"https://api.github.com/repos/tboerger/crowbar-ha/branches{/branch}","tags_url":"https://api.github.com/repos/tboerger/crowbar-ha/tags","blobs_url":"https://api.github.com/repos/tboerger/crowbar-ha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tboerger/crowbar-ha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tboerger/crowbar-ha/git/refs{/sha}","trees_url":"https://api.github.com/repos/tboerger/crowbar-ha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tboerger/crowbar-ha/statuses/{sha}","languages_url":"https://api.github.com/repos/tboerger/crowbar-ha/languages","stargazers_url":"https://api.github.com/repos/tboerger/crowbar-ha/stargazers","contributors_url":"https://api.github.com/repos/tboerger/crowbar-ha/contributors","subscribers_url":"https://api.github.com/repos/tboerger/crowbar-ha/subscribers","subscription_url":"https://api.github.com/repos/tboerger/crowbar-ha/subscription","commits_url":"https://api.github.com/repos/tboerger/crowbar-ha/commits{/sha}","git_commits_url":"https://api.github.com/repos/tboerger/crowbar-ha/git/commits{/sha}","comments_url":"https://api.github.com/repos/tboerger/crowbar-ha/comments{/number}","issue_comment_url":"https://api.github.com/repos/tboerger/crowbar-ha/issues/comments{/number}","contents_url":"https://api.github.com/repos/tboerger/crowbar-ha/contents/{+path}","compare_url":"https://api.github.com/repos/tboerger/crowbar-ha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tboerger/crowbar-ha/merges","archive_url":"https://api.github.com/repos/tboerger/crowbar-ha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tboerger/crowbar-ha/downloads","issues_url":"https://api.github.com/repos/tboerger/crowbar-ha/issues{/number}","pulls_url":"https://api.github.com/repos/tboerger/crowbar-ha/pulls{/number}","milestones_url":"https://api.github.com/repos/tboerger/crowbar-ha/milestones{/number}","notifications_url":"https://api.github.com/repos/tboerger/crowbar-ha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tboerger/crowbar-ha/labels{/name}","releases_url":"https://api.github.com/repos/tboerger/crowbar-ha/releases{/id}","deployments_url":"https://api.github.com/repos/tboerger/crowbar-ha/deployments","created_at":"2015-08-17T14:39:39Z","updated_at":"2016-01-20T14:45:56Z","pushed_at":"2016-01-26T07:19:15Z","git_url":"git://github.com/tboerger/crowbar-ha.git","ssh_url":"git@github.com:tboerger/crowbar-ha.git","clone_url":"https://github.com/tboerger/crowbar-ha.git","svn_url":"https://github.com/tboerger/crowbar-ha","homepage":"","size":1074,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"crowbar:master","ref":"master","sha":"71efcc42cf570ea415832334df5f4d6eb7ae0135","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":39006836,"name":"crowbar-ha","full_name":"crowbar/crowbar-ha","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/crowbar-ha","description":"HA deployment for Crowbar","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-ha","forks_url":"https://api.github.com/repos/crowbar/crowbar-ha/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-ha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-ha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-ha/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-ha/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-ha/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-ha/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-ha/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-ha/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-ha/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-ha/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-ha/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-ha/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-ha/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-ha/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-ha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-ha/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-ha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-ha/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-ha/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-ha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-ha/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-ha/releases{/id}","deployments_url":"https://api.github.com/repos/crowbar/crowbar-ha/deployments","created_at":"2015-07-13T10:53:43Z","updated_at":"2016-01-14T00:05:21Z","pushed_at":"2016-01-26T07:19:15Z","git_url":"git://github.com/crowbar/crowbar-ha.git","ssh_url":"git@github.com:crowbar/crowbar-ha.git","clone_url":"https://github.com/crowbar/crowbar-ha.git","svn_url":"https://github.com/crowbar/crowbar-ha","homepage":"","size":1322,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":18,"forks":17,"open_issues":18,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/70"},"html":{"href":"https://github.com/crowbar/crowbar-ha/pull/70"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/issues/70"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/90488a949d0ec0d3fbb4f75cd3658471e7e5956a"}}}}