From 6ac6e61e37d2caf77ac09a24a240863847348098 Mon Sep 17 00:00:00 2001 From: Aldo Ortega Date: Fri, 13 Oct 2023 14:36:03 -0400 Subject: [PATCH] Filtered out archived EVCs --- scripts/vlan_pool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vlan_pool.py b/scripts/vlan_pool.py index 0893aee..428e6c0 100644 --- a/scripts/vlan_pool.py +++ b/scripts/vlan_pool.py @@ -56,7 +56,7 @@ def update_database(mongo: Mongo): """Update database""" db = mongo.client[mongo.db_name] intf_documents = db.interface_details.find() - evc_documents = db.evcs.find() + evc_documents = db.evcs.find({"archived": False}) evc_intf = defaultdict(set) evc_tags = defaultdict(set) @@ -150,7 +150,7 @@ def aggregate_outdated_interfaces(mongo: Mongo): " amount of items, minimum and maximum items will be shown only") print(messages) - evc_documents = db.evcs.find() + evc_documents = db.evcs.find({"archived": False}) evc_intf = defaultdict(set) evc_tags = defaultdict(set)