def post_import(_csv_file)
return unless @ak_content_views
@ak_content_views.each do |ak_id, cvs|
handle_missing_and_supress "processing activation key #{ak_id}" do
ak = lookup_entity(:activation_keys, ak_id)
ak_cv_hash = {}
org_id = lookup_entity_in_cache(:organizations, {'label' => ak['organization']['label']})['id']
ak_cv_hash[:content_view_id] = create_composite_content_view(
:ak_content_views,
org_id,
"ak_#{ak_id}",
"Composite content view for activation key #{ak['name']}",
cvs)
ak_cv_hash[:environment_id] = get_env(org_id, 'Library')['id']
info " Associating activation key [#{ak_id}] with content view [#{ak_cv_hash[:content_view_id]}]"
update_entity(:activation_keys, ak_id, ak_cv_hash)
end
end
end