Skip to content

Commit

Permalink
Fix error "flavor_names" is not defined
Browse files Browse the repository at this point in the history
A previous commit stopped the collector working:
004077b
  • Loading branch information
JohnGarbutt committed Nov 5, 2024
1 parent 004077b commit 4b4cc3f
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 4b4cc3f

Please sign in to comment.