Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. ```
  2. foreman-rake console
  3. ```
  4. ```
  5. hypervisors = Katello::Host::SubscriptionFacet.all.select{|i| i.candlepin_consumer.consumer_attributes['type']['label'] == 'hypervisor' }
  6.  
  7. hypervisors.each do |hypervisor|
  8. guests = hypervisor.candlepin_consumer.virtual_guests
  9. puts "#{hypervisor.host.name} - #{hypervisor.host.id} - #{guests.count} guest(s)"
  10. guests.each do |guest|
  11. puts " - #{guest.name} - #{guest.id}"
  12. end
  13. puts "\n"
  14. end
  15. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement