Class: Actions::Katello::ContentViewEnvironment::ReassignObjects

Inherits:
Base
  • Object
show all
Defined in:
app/lib/actions/katello/content_view_environment/reassign_objects.rb

Instance Method Summary collapse

Instance Method Details

#plan(content_view_environment, options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'app/lib/actions/katello/content_view_environment/reassign_objects.rb', line 5

def plan(content_view_environment, options)
  concurrence do
    content_view_environment.hosts.each do |host|
      plan_action(Host::Reassign, host, options[:system_content_view_id], options[:system_environment_id])
    end

    content_view_environment.activation_keys.each do |key|
      plan_action(ActivationKey::Reassign, key, options[:key_content_view_id], options[:key_environment_id])
    end
  end
end