Sha256: cee6dba9af4dfcd28fd23abccead8b685545bf5fac13ddb46734c6cba5b813f0

Contents?: true

Size: 732 Bytes

Versions: 9

Compression:

Stored size: 732 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
          image_capsule = self.capsule  || CapsuleContent.default_capsule.capsule
          "#{URI(image_capsule.url).hostname}:5000/#{repo_url}"
        else
          repo_url
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
katello-2.4.5 app/models/katello/concerns/container_extensions.rb
katello-2.4.4 app/models/katello/concerns/container_extensions.rb
katello-2.4.3 app/models/katello/concerns/container_extensions.rb
katello-2.4.2 app/models/katello/concerns/container_extensions.rb
katello-2.4.1 app/models/katello/concerns/container_extensions.rb
katello-2.4.0 app/models/katello/concerns/container_extensions.rb
katello-2.4.0.rc3 app/models/katello/concerns/container_extensions.rb
katello-2.4.0.rc2 app/models/katello/concerns/container_extensions.rb
katello-2.4.0.rc1 app/models/katello/concerns/container_extensions.rb