def import_single_row(data)
@vguests ||= {}
@map ||= Set.new
cvs = (split_multival(data['base_channel_id']) + split_multival(data['child_channel_id'])).collect do
|channel_id|
begin
get_translated_id(:redhat_content_views, [data['organization_id'].to_i, channel_id])
rescue HammerCLIImport::MissingObjectError
get_translated_id(:content_views, channel_id)
end
end
cv_id = create_composite_content_view(
:system_content_views,
get_translated_id(:organizations, data['organization_id'].to_i),
_build_composite_cv_label(data, cvs),
'Composite content view for content hosts',
cvs)
profile = mk_profile_hash data, cv_id
c_host = create_entity(:systems, profile, data['server_id'].to_i)
@map << {
:org_id => data['organization_id'].to_i,
:system_id => data['server_id'].to_i,
:uuid => c_host['uuid']}
@vguests[data['server_id'].to_i] = split_multival(data['virtual_guest']) if data['virtual_host'] == data['server_id']
debug "vguests: #{@vguests[data['server_id'].to_i].inspect}" if @vguests[data['server_id'].to_i]
end