Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- foreman-rake console
- ```
- ```
- hypervisors = Katello::Host::SubscriptionFacet.all.select{|i| i.candlepin_consumer.consumer_attributes['type']['label'] == 'hypervisor' }
- hypervisors.each do |hypervisor|
- guests = hypervisor.candlepin_consumer.virtual_guests
- puts "#{hypervisor.host.name} - #{hypervisor.host.id} - #{guests.count} guest(s)"
- guests.each do |guest|
- puts " - #{guest.name} - #{guest.id}"
- end
- puts "\n"
- end
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement