only add the port if it's not already there
@@ -94,6 +94,7 @@ class Parser:
else:
obj_doc['dps'][switch_found]['interfaces'][self.mirror_ports[switch_found]]['mirror'] = []
if ok:
+ if not port in obj_doc['dps'][switch_found]['interfaces'][self.mirror_ports[switch_found]]['mirror']:
obj_doc['dps'][switch_found]['interfaces'][self.mirror_ports[switch_found]]['mirror'].append(port)
else:
self.logger.error("Unable to mirror due to warnings")
