Sha256: b5f8f16c768558dd468bce04bdd2be55375164b60a55fa1d0624c058a0b7482a

Contents?: true

Size: 1.01 KB

Versions: 26

Compression:

Stored size: 1.01 KB

Contents

extends 'katello/api/v2/common/org_reference'
extends 'katello/api/v2/common/timestamps'

attributes :id, :name, :description, :unlimited_hosts, :auto_attach

attributes :content_view_id

child :content_view => :content_view do
  attributes :id, :name
end

child :environment => :environment do
  attributes :name, :id
end
attributes :environment_id

attributes :usage_count, :user_id, :max_hosts, :system_template_id, :release_version, :purpose_usage, :purpose_role

node :purpose_addons do |key|
  key.purpose_addons.pluck(:name)
end

node :permissions do |activation_key|
  {
    :view_activation_keys => activation_key.readable?,
    :edit_activation_keys => activation_key.editable?,
    :destroy_activation_keys => activation_key.deletable?
  }
end

child :products => :products do |_product|
  attributes :id, :name
end

if ::Foreman::Cast.to_bool(params.fetch(:show_hosts, false))
  child :hosts do
    attributes :id, :name
  end
end

child :host_collections => :host_collections do
  attributes :id
  attributes :name
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
katello-4.10.0.rc2 app/views/katello/api/v2/activation_keys/base.json.rabl
katello-4.10.0.rc1 app/views/katello/api/v2/activation_keys/base.json.rabl
katello-4.9.1 app/views/katello/api/v2/activation_keys/base.json.rabl
katello-4.9.0 app/views/katello/api/v2/activation_keys/base.json.rabl
katello-4.9.0.rc2 app/views/katello/api/v2/activation_keys/base.json.rabl
katello-4.9.0.rc1 app/views/katello/api/v2/activation_keys/base.json.rabl