Sha256: 5415e187f859e2bc3362a916d3d196210d9b16d574ccccbc5c35a58122ce83d4

Contents?: true

Size: 849 Bytes

Versions: 39

Compression:

Stored size: 849 Bytes

Contents

object @resource

extends "katello/api/v2/subscriptions/base"

attributes :arch
attributes :description
attributes :support_type

node(:host_count) do |subscription|
  subscription.hosts.count
end

node :provided_products, :if => lambda { |sub| sub && !sub.products.blank? } do |subscription|
  subscription.products.map do |product|
    {id: product[:id], name: product[:name]}
  end
end

node :activation_keys do |subscription|
  subscription.activation_keys.readable.map do |key|
    {
      id: key.id,
      name: key.name,
      release_version: key.release_version,
      service_level: key.service_level,
      environment: {
        id: key.environment.try(:id),
        name: key.environment.try(:name)
      },
      content_view: {
        id: key.content_view.try(:id),
        name: key.content_view.try(:name)
      }
    }
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
katello-3.11.2 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.10.2 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.12.0 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.12.0.rc2 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.10.1.1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.12.0.rc1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.10.1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.11.1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.11.0 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.11.0.rc2 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.11.0.rc1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.10.0 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.10.0.rc1.1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.9.1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.10.0.rc1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.9.0 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.8.1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.9.0.rc2 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.9.0.rc1 app/views/katello/api/v2/subscriptions/show.json.rabl
katello-3.7.1.1 app/views/katello/api/v2/subscriptions/show.json.rabl