Sha256: a569758d72d071ea271ef21d0c9cca5869e37777fcf743aa56eb593e11428d53

Contents?: true

Size: 519 Bytes

Versions: 90

Compression:

Stored size: 519 Bytes

Contents

require 'set'

module Katello
  module Glue::Candlepin::Environment
    def self.included(base)
      base.send :include, InstanceMethods
    end

    module InstanceMethods
      def candlepin_info
        Resources::Candlepin::Environment.find(self.cp_id)
      end

      def exists_in_candlepin?
        candlepin_info
        true
      rescue RestClient::NotFound
        false
      end

      def content_ids
        self.candlepin_info['environmentContent'].collect { |c| c['id'] }
      end
    end
  end
end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
katello-4.14.2 app/models/katello/glue/candlepin/environment.rb
katello-4.15.0 app/models/katello/glue/candlepin/environment.rb
katello-4.15.0.rc2 app/models/katello/glue/candlepin/environment.rb
katello-4.15.0.rc1 app/models/katello/glue/candlepin/environment.rb
katello-4.14.1 app/models/katello/glue/candlepin/environment.rb
katello-4.14.0 app/models/katello/glue/candlepin/environment.rb
katello-4.14.0.rc3 app/models/katello/glue/candlepin/environment.rb
katello-4.14.0.rc2 app/models/katello/glue/candlepin/environment.rb
katello-4.14.0.rc1.1 app/models/katello/glue/candlepin/environment.rb
katello-4.14.0.rc1 app/models/katello/glue/candlepin/environment.rb
katello-4.13.1 app/models/katello/glue/candlepin/environment.rb
katello-4.13.0 app/models/katello/glue/candlepin/environment.rb
katello-4.12.1 app/models/katello/glue/candlepin/environment.rb
katello-4.13.0.rc1 app/models/katello/glue/candlepin/environment.rb
katello-4.12.0 app/models/katello/glue/candlepin/environment.rb
katello-4.12.0.rc3 app/models/katello/glue/candlepin/environment.rb
katello-4.12.0.rc2 app/models/katello/glue/candlepin/environment.rb
katello-4.12.0.rc1 app/models/katello/glue/candlepin/environment.rb
katello-4.11.1 app/models/katello/glue/candlepin/environment.rb
katello-4.11.0 app/models/katello/glue/candlepin/environment.rb