{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/comments/117746157","pull_request_review_id":39476681,"id":117746157,"diff_hunk":"@@ -6,4 +6,49 @@\n   it \".description\" do\n     expect(described_class.description).to eq('Hawkular')\n   end\n+\n+  describe \"miq_id_prefix\" do\n+    let(:random_id) { SecureRandom.hex(10) }\n+    let(:my_region) do\n+      MiqRegion.my_region || FactoryGirl.create(:miq_region, :region => MiqRegion.my_region_number)\n+    end\n+    let(:random_region) do\n+      region = Random.rand(1..99) while !region || region == my_region.region\n+      MiqRegion.find_by(:region => region) || FactoryGirl.create(:miq_region, :region => region)\n+    end\n+\n+    before(:each) do\n+      # Ensure \"my region\" exists\n+      my_region\n+    end\n+\n+    it \"must return non-empty string\" do\n+      rval = subject.miq_id_prefix\n+\n+      expect(rval).to be_a(String)\n+      expect(rval.strip).not_to be_empty\n+    end\n+\n+    it \"must prefix the provided string/identifier\" do\n+      rval = subject.miq_id_prefix(random_id)\n+\n+      expect(rval).to end_with(random_id)\n+      expect(rval).not_to be == random_id","path":"spec/models/manageiq/providers/hawkular/middleware_manager_spec.rb","position":31,"original_position":31,"commit_id":"2896a49680d3a769876a0786777f84fb2826ea71","original_commit_id":"2896a49680d3a769876a0786777f84fb2826ea71","user":{"login":"cfcosta","id":14752,"avatar_url":"https://avatars1.githubusercontent.com/u/14752?v=3","gravatar_id":"","url":"https://api.github.com/users/cfcosta","html_url":"https://github.com/cfcosta","followers_url":"https://api.github.com/users/cfcosta/followers","following_url":"https://api.github.com/users/cfcosta/following{/other_user}","gists_url":"https://api.github.com/users/cfcosta/gists{/gist_id}","starred_url":"https://api.github.com/users/cfcosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfcosta/subscriptions","organizations_url":"https://api.github.com/users/cfcosta/orgs","repos_url":"https://api.github.com/users/cfcosta/repos","events_url":"https://api.github.com/users/cfcosta/events{/privacy}","received_events_url":"https://api.github.com/users/cfcosta/received_events","type":"User","site_admin":false},"body":"`expect(rval).not_to eq random_id`","created_at":"2017-05-22T13:35:39Z","updated_at":"2017-05-22T13:42:09Z","html_url":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/22#discussion_r117746157","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/comments/117746157"},"html":{"href":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/22#discussion_r117746157"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/22","id":120206143,"html_url":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/22","diff_url":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/22.diff","patch_url":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/22.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/22","number":22,"state":"open","locked":false,"title":"[WIP] Avoid trigger id collisions when Hawkular is linked to multiple MiQ installations","user":{"login":"israel-hdez","id":23639005,"avatar_url":"https://avatars0.githubusercontent.com/u/23639005?v=3","gravatar_id":"","url":"https://api.github.com/users/israel-hdez","html_url":"https://github.com/israel-hdez","followers_url":"https://api.github.com/users/israel-hdez/followers","following_url":"https://api.github.com/users/israel-hdez/following{/other_user}","gists_url":"https://api.github.com/users/israel-hdez/gists{/gist_id}","starred_url":"https://api.github.com/users/israel-hdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/israel-hdez/subscriptions","organizations_url":"https://api.github.com/users/israel-hdez/orgs","repos_url":"https://api.github.com/users/israel-hdez/repos","events_url":"https://api.github.com/users/israel-hdez/events{/privacy}","received_events_url":"https://api.github.com/users/israel-hdez/received_events","type":"User","site_admin":false},"body":"This is a border case. Issue is discussed in ManageIQ/manageiq#10674.\r\n\r\n@miq-bot add_label enhancement, alerts","created_at":"2017-05-11T21:32:52Z","updated_at":"2017-05-22T13:42:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe944ec9866d4f5c4b6d97ea2e125c4989bca743","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lucasponce","id":1662329,"avatar_url":"https://avatars3.githubusercontent.com/u/1662329?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasponce","html_url":"https://github.com/lucasponce","followers_url":"https://api.github.com/users/lucasponce/followers","following_url":"https://api.github.com/users/lucasponce/following{/other_user}","gists_url":"https://api.github.com/users/lucasponce/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasponce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasponce/subscriptions","organizations_url":"https://api.github.com/users/lucasponce/orgs","repos_url":"https://api.github.com/users/lucasponce/repos","events_url":"https://api.github.com/users/lucasponce/events{/privacy}","received_events_url":"https://api.github.com/users/lucasponce/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/22/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/22/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/22/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/statuses/2896a49680d3a769876a0786777f84fb2826ea71","head":{"label":"israel-hdez:miq-id-to-alerts","ref":"miq-id-to-alerts","sha":"2896a49680d3a769876a0786777f84fb2826ea71","user":{"login":"israel-hdez","id":23639005,"avatar_url":"https://avatars0.githubusercontent.com/u/23639005?v=3","gravatar_id":"","url":"https://api.github.com/users/israel-hdez","html_url":"https://github.com/israel-hdez","followers_url":"https://api.github.com/users/israel-hdez/followers","following_url":"https://api.github.com/users/israel-hdez/following{/other_user}","gists_url":"https://api.github.com/users/israel-hdez/gists{/gist_id}","starred_url":"https://api.github.com/users/israel-hdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/israel-hdez/subscriptions","organizations_url":"https://api.github.com/users/israel-hdez/orgs","repos_url":"https://api.github.com/users/israel-hdez/repos","events_url":"https://api.github.com/users/israel-hdez/events{/privacy}","received_events_url":"https://api.github.com/users/israel-hdez/received_events","type":"User","site_admin":false},"repo":{"id":87842201,"name":"manageiq-providers-hawkular","full_name":"israel-hdez/manageiq-providers-hawkular","owner":{"login":"israel-hdez","id":23639005,"avatar_url":"https://avatars0.githubusercontent.com/u/23639005?v=3","gravatar_id":"","url":"https://api.github.com/users/israel-hdez","html_url":"https://github.com/israel-hdez","followers_url":"https://api.github.com/users/israel-hdez/followers","following_url":"https://api.github.com/users/israel-hdez/following{/other_user}","gists_url":"https://api.github.com/users/israel-hdez/gists{/gist_id}","starred_url":"https://api.github.com/users/israel-hdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/israel-hdez/subscriptions","organizations_url":"https://api.github.com/users/israel-hdez/orgs","repos_url":"https://api.github.com/users/israel-hdez/repos","events_url":"https://api.github.com/users/israel-hdez/events{/privacy}","received_events_url":"https://api.github.com/users/israel-hdez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/israel-hdez/manageiq-providers-hawkular","description":"ManageIQ plugin for the Hawkular provider","fork":true,"url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular","forks_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/forks","keys_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/teams","hooks_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/hooks","issue_events_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/issues/events{/number}","events_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/events","assignees_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/assignees{/user}","branches_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/branches{/branch}","tags_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/tags","blobs_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/git/refs{/sha}","trees_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/statuses/{sha}","languages_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/languages","stargazers_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/stargazers","contributors_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/contributors","subscribers_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/subscribers","subscription_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/subscription","commits_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/commits{/sha}","git_commits_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/git/commits{/sha}","comments_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/comments{/number}","issue_comment_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/issues/comments{/number}","contents_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/contents/{+path}","compare_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/merges","archive_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/downloads","issues_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/issues{/number}","pulls_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/pulls{/number}","milestones_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/milestones{/number}","notifications_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/labels{/name}","releases_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/releases{/id}","deployments_url":"https://api.github.com/repos/israel-hdez/manageiq-providers-hawkular/deployments","created_at":"2017-04-10T18:08:17Z","updated_at":"2017-04-10T18:08:19Z","pushed_at":"2017-05-12T15:51:28Z","git_url":"git://github.com/israel-hdez/manageiq-providers-hawkular.git","ssh_url":"git@github.com:israel-hdez/manageiq-providers-hawkular.git","clone_url":"https://github.com/israel-hdez/manageiq-providers-hawkular.git","svn_url":"https://github.com/israel-hdez/manageiq-providers-hawkular","homepage":null,"size":844,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":"ManageIQ:master","ref":"master","sha":"681fab520601886cbe2bba3fef9f6f91ebb10ff1","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars3.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":87439518,"name":"manageiq-providers-hawkular","full_name":"ManageIQ/manageiq-providers-hawkular","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars3.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq-providers-hawkular","description":"ManageIQ plugin for the Hawkular provider","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular","forks_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/deployments","created_at":"2017-04-06T14:36:28Z","updated_at":"2017-05-16T16:09:31Z","pushed_at":"2017-05-22T13:28:19Z","git_url":"git://github.com/ManageIQ/manageiq-providers-hawkular.git","ssh_url":"git@github.com:ManageIQ/manageiq-providers-hawkular.git","clone_url":"https://github.com/ManageIQ/manageiq-providers-hawkular.git","svn_url":"https://github.com/ManageIQ/manageiq-providers-hawkular","homepage":null,"size":841,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":10,"forks":14,"open_issues":10,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/22"},"html":{"href":"https://github.com/ManageIQ/manageiq-providers-hawkular/pull/22"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/22"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-hawkular/statuses/2896a49680d3a769876a0786777f84fb2826ea71"}}}}
{"actor":{"display_login":"cfcosta"}}