Skip to content

Commit

Permalink
Metric::Target capture_cloud_targets rewrite
Browse files Browse the repository at this point in the history
- only bring back vms that are on (when availability_zone.nil?)
- only bring back vms that have an ems

https://bugzilla.redhat.com/show_bug.cgi?id=1332579
https://bugzilla.redhat.com/show_bug.cgi?id=1331803
  • Loading branch information
kbrock committed May 5, 2016
1 parent 271a3f2 commit db0a246
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/metric/targets.rb
Expand Up @@ -33,6 +33,7 @@ def self.capture_cloud_targets(zone, options = {})
# 2) need to find all the VMs that may not be in an availability zone
# 3) cloudy clusters?
targets = []
return [] if options[:exclude_vms]

includes = {:availability_zones => :tags}
MiqPreloader.preload(zone.ems_clouds, includes)
Expand Down

0 comments on commit db0a246

Please sign in to comment.