Skip to content

Commit 7bcc2d0

Browse files
authored
Fix error "flavor_names" is not defined (#21)
A previous commit stopped the collector working: 004077b
1 parent 004077b commit 7bcc2d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

os_capacity/prometheus.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ def get_host_details(compute_client, placement_client):
190190
rp = resource_providers[hostname]
191191
rp_id = rp["uuid"]
192192
free_space_found = False
193-
for flavor_name in flavor_names:
193+
for flavor in flavors:
194+
flavor_name = flavor.name
194195
all_counts = capacity_per_flavor.get(flavor_name, {})
195196
our_count = all_counts.get(rp_id, 0)
196197
if our_count == 0:

0 commit comments

Comments
 (0)