Skip to content

Commit

Permalink
Fixes #7116/bz1130577- Adding install media after repo sync
Browse files Browse the repository at this point in the history
Before this commit the installation media was missing after kickstart repo was synced,
This commit fixes that issue.
  • Loading branch information
parthaa committed Aug 18, 2014
1 parent 2c1e29d commit e8c57c1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/lib/actions/katello/repository/sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def plan(repo)
plan_action(ElasticSearch::Reindex, repo)
plan_action(Katello::Foreman::ContentUpdate, repo.environment, repo.content_view)
plan_action(Katello::Repository::CorrectChecksum, repo)
plan_action(Katello::Repository::UpdateMedia, repo)
end
plan_self(:sync_result => sync_task.output)
end
Expand Down
29 changes: 29 additions & 0 deletions app/lib/actions/katello/repository/update_media.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# Copyright 2014 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the implied warranties of MERCHANTABILITY,
# NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
# have received a copy of GPLv2 along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.

module Actions
module Katello
module Repository
class UpdateMedia < Actions::Base

def plan(repo)
plan_self(:repo_id => repo.id)
end

def finalize
repo = ::Katello::Repository.find(input[:repo_id])
Medium.update_media(repo)
end
end
end
end
end

0 comments on commit e8c57c1

Please sign in to comment.