Skip to content

Commit

Permalink
Fixed detail for aggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
Alopalao committed Sep 27, 2023
1 parent d5b041d commit 3095dba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/vlan_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def aggregate_outdated_interfaces(mongo: Mongo):
"id": 1,
"max_number": {"$max": "$available_vlans"},
"min_number": {"$min": "$available_vlans"},
"available_vlans": 1,
}}
]
)
Expand All @@ -141,13 +142,13 @@ def aggregate_outdated_interfaces(mongo: Mongo):
document_ids.add(document["id"])
if document.get("available_vlans") is None:
continue
document.pop("available_vlans")
messages += str(document) + "\n"

if messages != "":
print("Here are the outdated interfaces. 'available_vlans' have a massive"
" amount of items, minimum and maximum items will be shown only")
print(messages)
print()

evc_documents = db.evcs.find()
evc_intf = defaultdict(set)
Expand Down

0 comments on commit 3095dba

Please sign in to comment.