Skip to content

Commit

Permalink
Connect clusterless hosts directly to the provider in infra topology
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Apr 25, 2017
1 parent b6d814f commit 4e23c99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/services/infra_topology_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ class InfraTopologyService < TopologyService

@included_relations = [
:tags,
:ems_clusters => [
:ems_clusters => [
:tags,
:hosts => [
:tags,
:vms => :tags
]
],
:clusterless_hosts => [
:tags,
:vms => :tags
],
]

def entity_type(entity)
Expand Down
2 changes: 1 addition & 1 deletion app/services/topology_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def build_recursive_topology(entity, entity_relationships_mapping, topo_items, l
unless entity_relationships_mapping.nil?
entity_relationships_mapping.keys.each do |rel_name|
relations = entity.send(rel_name.to_s.underscore.downcase)
if relations.kind_of?(ActiveRecord::Associations::CollectionProxy)
if relations.respond_to?(:each)
relations.each do |relation|
build_rel_data_and_links(entity, entity_relationships_mapping, rel_name, links, relation, topo_items)
end
Expand Down

0 comments on commit 4e23c99

Please sign in to comment.