Sha256: 65b51719628b1bbebfad6126b04614aca054946356a2400b127da444ee8fba9f

Contents?: true

Size: 1.37 KB

Versions: 16

Compression:

Stored size: 1.37 KB

Contents

object @resource

@resource ||= @object

glue :content do
  node do |content|
    {
      id: content.cp_content_id,
      name: content.name,
      label: content.label,
      vendor: content.vendor,
      type: content.content_type,
      gpgUrl: content.gpg_url,
      contentUrl: content.content_url
    }
  end

  attributes :name, :vendor, :label
end
attribute :enabled

if @resource.product
  child :product => :product do
    attributes :id, :name
  end
end

# For backwards compatibility with the original
# ActivationKeys#product_contents

child :content => :content do
  attributes :id, :name, :label, :vendor, :content_type, :content_url, :gpg_url
end

child @resource.repositories => :repositories do
  attributes :id, :name, :arch
  attributes :minor => :releasever
end

node :archRestricted do |pc|
  pc.arch
end

node :osRestricted do |pc|
  pc.os_versions&.first
end

node :override do |pc|
  pc.override if pc.respond_to? :override
end

node :overrides do |pc|
  if pc.respond_to? :content_overrides
    pc.content_overrides.map do |override|
      {:name => override.name, :value => override.computed_value}
    end
  end
end

node :enabled_content_override do |pc|
  if pc.respond_to? :enabled_content_override
    override = pc.enabled_content_override
    override&.computed_value
  end
end

node :redhat do |pc|
  if pc&.product&.respond_to? :redhat?
    pc.product.redhat?
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
katello-4.13.1 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.13.0 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.12.1 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.13.0.rc1 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.12.0 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.12.0.rc3 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.12.0.rc2 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.12.0.rc1 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.11.1 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.11.0 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.11.0.rc2 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.11.0.rc1 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.10.0 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.9.2 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.10.0.rc2 app/views/katello/api/v2/repository_sets/show.json.rabl
katello-4.10.0.rc1 app/views/katello/api/v2/repository_sets/show.json.rabl