From 55ad888bb1e8495f30bcc5ecb61276623524df10 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Wed, 27 Oct 2021 07:19:55 -0600 Subject: [PATCH] l3_cxprofile.py : alias code, added put in exception of the number of expected stations does not match the number of stations present. Signed-off-by: Chuck SmileyRekiere --- py-json/l3_cxprofile.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/py-json/l3_cxprofile.py b/py-json/l3_cxprofile.py index 6506a596..c7e29302 100644 --- a/py-json/l3_cxprofile.py +++ b/py-json/l3_cxprofile.py @@ -252,7 +252,12 @@ class L3CXProfile(LFCliBase): for port in portdata_df['port-alias']: if port in cross_connect: layer3_alias.append(port) - layer3['alias'] = layer3_alias + try: + layer3['alias'] = layer3_alias + except: + print("The Stations or Connection on LANforge did not match expected, \ + Check if LANForge initial state correct or delete/cleanup corrects") + exit(1) timestamp_df = pd.merge(layer3, portdata_df, on='alias') else: