def elaborate_descriptor
self.group_instance_map = {} if group_instance_map.nil?
self.comp_instance_map = {} if comp_instance_map.nil?
self.working_comp_inst_hash = {}
self.working_group_inst_hash = {}
self.group_override_map = {}
self.conn_endpoints_list = []
default_profile = @profile_name_map[@default_profile]
default_profile.groups.each { |g|
gpath = self.get_name_prefix + g.get_name_prefix
gi = working_group_inst_hash[gpath]
if gi.nil?
gi = self.group_instance_map[gpath]
if gi.nil?
gi = GroupInstance.new(self, self.name, self.default_profile, g.name, gpath)
else
gi.merge(self.name, self.default_profile, g.name, gpath)
end
else
gi.merge(self.name, self.default_profile, g.name, gpath)
end
self.group_instance_map[gpath] = gi
self.working_group_inst_hash[gpath] = gi
gi.elaborate(default_profile, g, self.get_name_prefix, self)
}
default_profile.connections.each { |conn|
inst1 = ComponentInstance::find_component_in_cart(default_profile, self, conn.components[0], self.get_name_prefix)
inst2 = ComponentInstance::find_component_in_cart(default_profile, self, conn.components[1], self.get_name_prefix)
ComponentInstance::establish_connections(inst1, inst2, self)
}
colocate_groups
get_exec_order(default_profile)
deleted_components_list = []
self.comp_instance_map.each { |k,v| deleted_components_list << k if self.working_comp_inst_hash[k].nil? }
yield deleted_components_list if block_given?
self.group_instance_map.delete_if { |k,v|
v.component_instances.delete(k) if self.working_comp_inst_hash[k].nil? and v.component_instances.include?(k)
self.working_group_inst_hash[k].nil?
}
self.comp_instance_map.delete_if { |k,v| self.working_comp_inst_hash[k].nil? }
end