Sha256: 1653dc3dfde5630d3be54307afa850aa92a6a84a5712e26d4e83e99082df1b35

Contents?: true

Size: 737 Bytes

Versions: 13

Compression:

Stored size: 737 Bytes

Contents

module Katello
  module Concerns
    module ContainerExtensions
      extend ActiveSupport::Concern

      included do
        belongs_to :capsule, :inverse_of => :containers, :foreign_key => :capsule_id,
          :class_name => "SmartProxy"
        attr_accessible :capsule_id

        alias_method_chain :repository_pull_url, :katello
      end

      def repository_pull_url_with_katello
        repo_url = repository_pull_url_without_katello
        if Repository.where(:pulp_id => repository_name).count > 0
          manifest_capsule = self.capsule || CapsuleContent.default_capsule.capsule
          "#{URI(manifest_capsule.url).hostname}:5000/#{repo_url}"
        else
          repo_url
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
katello-3.1.0.1 app/models/katello/concerns/container_extensions.rb
katello-3.1.0 app/models/katello/concerns/container_extensions.rb
katello-3.1.0.rc2.1 app/models/katello/concerns/container_extensions.rb
katello-3.0.2 app/models/katello/concerns/container_extensions.rb
katello-3.1.0.rc1 app/models/katello/concerns/container_extensions.rb
katello-3.0.1 app/models/katello/concerns/container_extensions.rb
katello-3.0.0 app/models/katello/concerns/container_extensions.rb
katello-3.0.0.rc7 app/models/katello/concerns/container_extensions.rb
katello-3.0.0.rc5 app/models/katello/concerns/container_extensions.rb
katello-3.0.0.rc4 app/models/katello/concerns/container_extensions.rb
katello-3.0.0.rc3 app/models/katello/concerns/container_extensions.rb
katello-3.0.0.rc2 app/models/katello/concerns/container_extensions.rb
katello-3.0.0.rc1 app/models/katello/concerns/container_extensions.rb