Sha256: 8f24b8db4158ce526b29523ee1eab707c98fb113ce55a91c7e991c80772a2a74
Contents?: true
Size: 897 Bytes
Versions: 8
Compression:
Stored size: 897 Bytes
Contents
module Actions module Pulp3 module Repository class SaveVersion < Pulp3::Abstract def plan(repository, tasks) plan_self(:repository_id => repository.id, :tasks => tasks) end def run version_href = input[:tasks].last[:created_resources].first repo = ::Katello::Repository.find(input[:repository_id]) repo_version = repo.backend_service(::SmartProxy.pulp_master).lookup_version version_href content_summary = send(:eval, repo_version.content_summary) first_version = (repo_version.number == 1) output[:contents_changed] = first_version || !(content_summary.dig(:added).empty? && content_summary.dig(:removed).empty?) if version_href && output[:contents_changed] repo.update_attributes(:version_href => version_href) end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems