Sha256: eee854f4a671ef4216ee702048809c3fd8d8bb20730e3fb8e9bcdfbdf2421bf8

Contents?: true

Size: 736 Bytes

Versions: 26

Compression:

Stored size: 736 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"

        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}:#{Setting['pulp_docker_registry_port']}/#{repo_url}"
        else
          repo_url
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
katello-3.5.0.rc2 app/models/katello/concerns/container_extensions.rb
katello-3.5.0.rc1 app/models/katello/concerns/container_extensions.rb
katello-3.4.5 app/models/katello/concerns/container_extensions.rb
katello-3.4.4 app/models/katello/concerns/container_extensions.rb
katello-3.4.2 app/models/katello/concerns/container_extensions.rb
katello-3.4.1 app/models/katello/concerns/container_extensions.rb
katello-3.4.0.2 app/models/katello/concerns/container_extensions.rb
katello-3.4.0.1 app/models/katello/concerns/container_extensions.rb
katello-3.3.2 app/models/katello/concerns/container_extensions.rb
katello-3.4.0 app/models/katello/concerns/container_extensions.rb
katello-3.4.0.rc2 app/models/katello/concerns/container_extensions.rb
katello-3.4.0.rc1 app/models/katello/concerns/container_extensions.rb
katello-3.3.1.1 app/models/katello/concerns/container_extensions.rb
katello-3.3.1 app/models/katello/concerns/container_extensions.rb
katello-3.3.0.1 app/models/katello/concerns/container_extensions.rb
katello-3.3.0 app/models/katello/concerns/container_extensions.rb
katello-3.3.0.rc2 app/models/katello/concerns/container_extensions.rb
katello-3.3.0.rc1.1 app/models/katello/concerns/container_extensions.rb
katello-3.3.0.rc1 app/models/katello/concerns/container_extensions.rb
katello-3.2.1.1 app/models/katello/concerns/container_extensions.rb