app/views/katello/api/v2/subscriptions/show.json.rabl in katello-3.4.5 vs app/views/katello/api/v2/subscriptions/show.json.rabl in katello-3.5.0.rc1
- old
+ new
@@ -4,49 +4,16 @@
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 :systems do |subscription|
- subscription.hosts.map do |host|
- facts = host.facts
- {
- uuid: host.subscription_facet.try(:uuid),
- host_id: host.id,
- name: host.name,
- environment: { id: host.content_facet.try(:lifecycle_environment).try(:id),
- name: host.content_facet.try(:lifecycle_environment).try(:name) },
- content_view: { id: host.content_facet.try(:content_view).try(:id),
- name: host.content_facet.try(:content_view).try(:name) },
- created: host.subscription_facet.try(:registered_at),
- checkin_time: host.subscription_facet.try(:last_checkin),
- entitlement_status: host.subscription_status,
- service_level: host.subscription_facet.try(:service_level),
- autoheal: host.subscription_facet.try(:autoheal),
- facts: {
- dmi: {
- memory: {
- size: facts['dmi::memory::size']
- }
- },
- memory: {
- memtotal: facts['memory::memtotal']
- },
- cpu: {
- 'cpu_socket(s)' => facts['cpu::cpu_socket(s)'],
- 'core(s)_per_socket' => facts['cpu::core(s)_per_socket']
- },
- virt: {
- is_guest: facts['virt::is_guest']
- }
- }
- }
end
end
node :activation_keys do |subscription|
subscription.activation_keys.readable.map do |key|