Skip to content

Commit

Permalink
Fix error "flavor_names" is not defined (#21)
Browse files Browse the repository at this point in the history
A previous commit stopped the collector working:
004077b
  • Loading branch information
JohnGarbutt authored Nov 5, 2024
1 parent 004077b commit 7bcc2d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion os_capacity/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ def get_host_details(compute_client, placement_client):
rp = resource_providers[hostname]
rp_id = rp["uuid"]
free_space_found = False
for flavor_name in flavor_names:
for flavor in flavors:
flavor_name = flavor.name
all_counts = capacity_per_flavor.get(flavor_name, {})
our_count = all_counts.get(rp_id, 0)
if our_count == 0:
Expand Down

0 comments on commit 7bcc2d0

Please sign in to comment.