{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/53937548","id":53937548,"diff_hunk":"@@ -26,39 +26,36 @@ def build_topology\n     topology[:kinds] = build_kinds\n   end\n \n-  def build_entity_data(entity, kind)\n-    status = entity_status(entity, kind)\n-    id = case kind\n-         when 'MiddlewareDeployment', 'MiddlewareServer' then entity.nativeid\n-         when 'Hawkular' then entity.id.to_s\n-         else entity.ems_ref\n-         end\n-\n-    {:id => id, :name => entity.name, :status => status, :kind => kind, :miq_id => entity.id}\n+  def entity_display_type(entity)\n+    if entity.kind_of?(ManageIQ::Providers::MiddlewareManager)\n+      entity.type.split('::')[2]","path":"app/services/middleware_topology_service.rb","position":41,"original_position":41,"commit_id":"55d756d05575b7818c5f8a94dd24230433451a80","original_commit_id":"55d756d05575b7818c5f8a94dd24230433451a80","user":{"login":"himdel","id":289743,"avatar_url":"https://avatars.githubusercontent.com/u/289743?v=3","gravatar_id":"","url":"https://api.github.com/users/himdel","html_url":"https://github.com/himdel","followers_url":"https://api.github.com/users/himdel/followers","following_url":"https://api.github.com/users/himdel/following{/other_user}","gists_url":"https://api.github.com/users/himdel/gists{/gist_id}","starred_url":"https://api.github.com/users/himdel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himdel/subscriptions","organizations_url":"https://api.github.com/users/himdel/orgs","repos_url":"https://api.github.com/users/himdel/repos","events_url":"https://api.github.com/users/himdel/events{/privacy}","received_events_url":"https://api.github.com/users/himdel/received_events","type":"User","site_admin":false},"body":"@abonas Aaah, that's it, thanks... well, I would hope for a more descriptive solution, I see `split('::')[2]` is already used in a bunch of places but it's neither clean nor descriptive. Maybe define something like `.provider_name` on the classes so we can rewrite to `entity.class.provider_name`? Anyone?","created_at":"2016-02-24T13:30:07Z","updated_at":"2016-02-24T13:30:07Z","html_url":"https://github.com/ManageIQ/manageiq/pull/6842#discussion_r53937548","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6842","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/53937548"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/6842#discussion_r53937548"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6842"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6842","id":60092781,"html_url":"https://github.com/ManageIQ/manageiq/pull/6842","diff_url":"https://github.com/ManageIQ/manageiq/pull/6842.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/6842.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6842","number":6842,"state":"open","locked":false,"title":"move mw topology to inherit from generic topology","user":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"body":"@miq-bot add_label refactoring, providers/hawkular\r\ncc @pilhuhn ","created_at":"2016-02-21T16:08:32Z","updated_at":"2016-02-24T13:30:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bbd238a5d72649dc404300be76752f9ff0edb35e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6842/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6842/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6842/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/55d756d05575b7818c5f8a94dd24230433451a80","head":{"label":"abonas:moveMWTopologyToGenericTopology","ref":"moveMWTopologyToGenericTopology","sha":"55d756d05575b7818c5f8a94dd24230433451a80","user":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"repo":{"id":27865006,"name":"manageiq","full_name":"abonas/manageiq","owner":{"login":"abonas","id":6277245,"avatar_url":"https://avatars.githubusercontent.com/u/6277245?v=3","gravatar_id":"","url":"https://api.github.com/users/abonas","html_url":"https://github.com/abonas","followers_url":"https://api.github.com/users/abonas/followers","following_url":"https://api.github.com/users/abonas/following{/other_user}","gists_url":"https://api.github.com/users/abonas/gists{/gist_id}","starred_url":"https://api.github.com/users/abonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abonas/subscriptions","organizations_url":"https://api.github.com/users/abonas/orgs","repos_url":"https://api.github.com/users/abonas/repos","events_url":"https://api.github.com/users/abonas/events{/privacy}","received_events_url":"https://api.github.com/users/abonas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abonas/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/abonas/manageiq","forks_url":"https://api.github.com/repos/abonas/manageiq/forks","keys_url":"https://api.github.com/repos/abonas/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abonas/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abonas/manageiq/teams","hooks_url":"https://api.github.com/repos/abonas/manageiq/hooks","issue_events_url":"https://api.github.com/repos/abonas/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/abonas/manageiq/events","assignees_url":"https://api.github.com/repos/abonas/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/abonas/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/abonas/manageiq/tags","blobs_url":"https://api.github.com/repos/abonas/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abonas/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abonas/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/abonas/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abonas/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/abonas/manageiq/languages","stargazers_url":"https://api.github.com/repos/abonas/manageiq/stargazers","contributors_url":"https://api.github.com/repos/abonas/manageiq/contributors","subscribers_url":"https://api.github.com/repos/abonas/manageiq/subscribers","subscription_url":"https://api.github.com/repos/abonas/manageiq/subscription","commits_url":"https://api.github.com/repos/abonas/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/abonas/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/abonas/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/abonas/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/abonas/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/abonas/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abonas/manageiq/merges","archive_url":"https://api.github.com/repos/abonas/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abonas/manageiq/downloads","issues_url":"https://api.github.com/repos/abonas/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/abonas/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/abonas/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/abonas/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abonas/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/abonas/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/abonas/manageiq/deployments","created_at":"2014-12-11T10:02:50Z","updated_at":"2015-04-14T15:32:19Z","pushed_at":"2016-02-24T08:29:59Z","git_url":"git://github.com/abonas/manageiq.git","ssh_url":"git@github.com:abonas/manageiq.git","clone_url":"https://github.com/abonas/manageiq.git","svn_url":"https://github.com/abonas/manageiq","homepage":"manageiq.org","size":106500,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"ManageIQ:master","ref":"master","sha":"cf91ead14f5af2c9d45cb4793d514a3032cf622e","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.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":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.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","description":"ManageIQ Cloud Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2016-02-22T06:10:01Z","pushed_at":"2016-02-24T13:26:40Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":143278,"stargazers_count":222,"watchers_count":222,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":241,"mirror_url":null,"open_issues_count":581,"forks":241,"open_issues":581,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6842"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/6842"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/6842"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/6842/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6842/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6842/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/55d756d05575b7818c5f8a94dd24230433451a80"}}}}