5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/lib/actions/katello/content_view/update_environment.rb', line 5
def plan(content_view, environment, new_content_id = nil)
view_env = content_view.content_view_environment(environment)
content_ids = content_view.repos(environment).map(&:content_id).uniq.compact
content_ids << new_content_id if new_content_id && !content_ids.include?(new_content_id)
plan_action(Candlepin::Environment::SetContent,
cp_environment_id: view_env.cp_id,
content_ids: content_ids)
plan_self(:environment_id => environment.id)
end
|