Class: Actions::Katello::ContentView::AddToEnvironment

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

Instance Method Summary collapse

Instance Method Details

#plan(content_view_version, environment) ⇒ Object



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

def plan(content_view_version, environment)
  cve = ::Katello::ContentViewManager.add_version_to_environment(
    content_view_version: content_view_version,
    environment: environment
  )

  ::Katello::ContentViewManager.create_candlepin_environment(
    content_view_environment: cve
  )

  content_view_version.save!
end