Class: Actions::Katello::ContentViewPuppetEnvironment::CreateForVersion

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#new_puppet_environmentObject

allows accessing the build object from the superior action



6
7
8
# File 'app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb', line 6

def new_puppet_environment
  @new_puppet_environment
end

Instance Method Details

#plan(content_view_version) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb', line 8

def plan(content_view_version)
  content_view = content_view_version.content_view
  modules_by_repoid = content_view.computed_module_ids_by_repoid

  self.new_puppet_environment = content_view.build_puppet_env(:version => content_view_version)

  sequence do
    plan_action(ContentViewPuppetEnvironment::Create, new_puppet_environment, true)
    plan_action(ContentViewPuppetEnvironment::CloneContent, new_puppet_environment, modules_by_repoid)
  end
end