From e87d6652ca53962f9edb14679eefb4a8357ba12b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 11 Feb 2025 08:35:43 -0500 Subject: [PATCH] Fix type of height when pulled from attributes location.height was left as string, which fouled further processing. --- confluent_server/confluent/plugins/info/layout.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/plugins/info/layout.py b/confluent_server/confluent/plugins/info/layout.py index 8604eaeb..2bc80e5b 100644 --- a/confluent_server/confluent/plugins/info/layout.py +++ b/confluent_server/confluent/plugins/info/layout.py @@ -67,7 +67,7 @@ def retrieve(nodes, element, configmanager, inputdata): rackmap[row][rack][u] = {'node': enclosure, 'children': enclosuremap[enclosure]['bays'], 'nodecoordinates': enclosuremap[enclosure]['coordinates']} allnodedata[enclosure] = rackmap[row][rack][u] if height: - allnodedata[enclosure]['height'] = height + allnodedata[enclosure]['height'] = int(height) else: # need to see if enclosure lands in the map naturally or need to pull it needenclosures.add(enclosure) elif u: @@ -78,7 +78,7 @@ def retrieve(nodes, element, configmanager, inputdata): rackmap[row][rack][u] = {'node': node} allnodedata[node] = rackmap[row][rack][u] if height: - allnodedata[node]['height'] = height + allnodedata[node]['height'] = int(height) locatednodes.add(node) cfgenc = needenclosures - locatednodes locationinfo = configmanager.get_node_attributes(cfgenc, (u'location.rack', u'location.row', u'location.u', u'location.height')) @@ -91,7 +91,7 @@ def retrieve(nodes, element, configmanager, inputdata): if u: allnodedata[enclosure] = {'node': enclosure, 'children': enclosuremap[enclosure]['bays'], 'nodecoordinates': enclosuremap[enclosure]['coordinates']} if height: - allnodedata[enclosure]['height'] = height + allnodedata[enclosure]['height'] = int(height) if row not in rackmap: rackmap[row] = {} if rack not in rackmap[row]: