From d2f6fdf55948a86e12550d1fafbe6ae420a2b6d4 Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Tue, 23 Jul 2024 09:42:51 -0300 Subject: [PATCH 1/3] fixed rack algorithm --- networkapi/rack/resource/GeraConfig.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/networkapi/rack/resource/GeraConfig.py b/networkapi/rack/resource/GeraConfig.py index efb456c0f..74aa6b947 100644 --- a/networkapi/rack/resource/GeraConfig.py +++ b/networkapi/rack/resource/GeraConfig.py @@ -958,6 +958,7 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine1['INTERFACE'] = INTERFACE_SP1 variablestochangespine1['LEAFNAME'] = HOSTNAME_LF1 variablestochangespine1['INT_LF_UPLINK'] = int_lf1_sp1 + variablestochangespine1['RACK_NUM'] = str(rack) # # variablestochangespine2['IPSPINEIPV4'] = str(IPSPINEipv4[rack][1]) @@ -973,6 +974,8 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine2['INTERFACE'] = INTERFACE_SP2 variablestochangespine2['LEAFNAME'] = HOSTNAME_LF1 variablestochangespine2['INT_LF_UPLINK'] = int_lf1_sp2 + variablestochangespine2['RACK_NUM'] = str(rack) + # # variablestochangespine3['IPSPINEIPV4'] = str(IPSPINEipv4[rack][2]) @@ -988,6 +991,8 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine3['INTERFACE'] = INTERFACE_SP3 variablestochangespine3['LEAFNAME'] = HOSTNAME_LF2 variablestochangespine3['INT_LF_UPLINK'] = int_lf2_sp3 + variablestochangespine3['RACK_NUM'] = str(rack) + # # variablestochangespine4['IPSPINEIPV4'] = str(IPSPINEipv4[rack][3]) @@ -1003,6 +1008,8 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine4['INTERFACE'] = INTERFACE_SP4 variablestochangespine4['LEAFNAME'] = HOSTNAME_LF2 variablestochangespine4['INT_LF_UPLINK'] = int_lf2_sp4 + variablestochangespine4['RACK_NUM'] = str(rack) + # # variablestochangeleaf1['IPLEAFSP1IPV4'] = str(IPLEAFipv4[rack][0]) From 53e34e5d5a4e3a54b0f4e790447b3038698eecd8 Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Tue, 23 Jul 2024 09:45:28 -0300 Subject: [PATCH 2/3] Revert "fixed rack algorithm" This reverts commit d2f6fdf55948a86e12550d1fafbe6ae420a2b6d4. --- networkapi/rack/resource/GeraConfig.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/networkapi/rack/resource/GeraConfig.py b/networkapi/rack/resource/GeraConfig.py index 74aa6b947..efb456c0f 100644 --- a/networkapi/rack/resource/GeraConfig.py +++ b/networkapi/rack/resource/GeraConfig.py @@ -958,7 +958,6 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine1['INTERFACE'] = INTERFACE_SP1 variablestochangespine1['LEAFNAME'] = HOSTNAME_LF1 variablestochangespine1['INT_LF_UPLINK'] = int_lf1_sp1 - variablestochangespine1['RACK_NUM'] = str(rack) # # variablestochangespine2['IPSPINEIPV4'] = str(IPSPINEipv4[rack][1]) @@ -974,8 +973,6 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine2['INTERFACE'] = INTERFACE_SP2 variablestochangespine2['LEAFNAME'] = HOSTNAME_LF1 variablestochangespine2['INT_LF_UPLINK'] = int_lf1_sp2 - variablestochangespine2['RACK_NUM'] = str(rack) - # # variablestochangespine3['IPSPINEIPV4'] = str(IPSPINEipv4[rack][2]) @@ -991,8 +988,6 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine3['INTERFACE'] = INTERFACE_SP3 variablestochangespine3['LEAFNAME'] = HOSTNAME_LF2 variablestochangespine3['INT_LF_UPLINK'] = int_lf2_sp3 - variablestochangespine3['RACK_NUM'] = str(rack) - # # variablestochangespine4['IPSPINEIPV4'] = str(IPSPINEipv4[rack][3]) @@ -1008,8 +1003,6 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine4['INTERFACE'] = INTERFACE_SP4 variablestochangespine4['LEAFNAME'] = HOSTNAME_LF2 variablestochangespine4['INT_LF_UPLINK'] = int_lf2_sp4 - variablestochangespine4['RACK_NUM'] = str(rack) - # # variablestochangeleaf1['IPLEAFSP1IPV4'] = str(IPLEAFipv4[rack][0]) From 5f3e5f8f1a0e34acc7f4ab54b095f624785011ff Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Tue, 23 Jul 2024 09:47:22 -0300 Subject: [PATCH 3/3] fix algorithm --- networkapi/rack/resource/GeraConfig.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/networkapi/rack/resource/GeraConfig.py b/networkapi/rack/resource/GeraConfig.py index efb456c0f..74aa6b947 100644 --- a/networkapi/rack/resource/GeraConfig.py +++ b/networkapi/rack/resource/GeraConfig.py @@ -958,6 +958,7 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine1['INTERFACE'] = INTERFACE_SP1 variablestochangespine1['LEAFNAME'] = HOSTNAME_LF1 variablestochangespine1['INT_LF_UPLINK'] = int_lf1_sp1 + variablestochangespine1['RACK_NUM'] = str(rack) # # variablestochangespine2['IPSPINEIPV4'] = str(IPSPINEipv4[rack][1]) @@ -973,6 +974,8 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine2['INTERFACE'] = INTERFACE_SP2 variablestochangespine2['LEAFNAME'] = HOSTNAME_LF1 variablestochangespine2['INT_LF_UPLINK'] = int_lf1_sp2 + variablestochangespine2['RACK_NUM'] = str(rack) + # # variablestochangespine3['IPSPINEIPV4'] = str(IPSPINEipv4[rack][2]) @@ -988,6 +991,8 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine3['INTERFACE'] = INTERFACE_SP3 variablestochangespine3['LEAFNAME'] = HOSTNAME_LF2 variablestochangespine3['INT_LF_UPLINK'] = int_lf2_sp3 + variablestochangespine3['RACK_NUM'] = str(rack) + # # variablestochangespine4['IPSPINEIPV4'] = str(IPSPINEipv4[rack][3]) @@ -1003,6 +1008,8 @@ def autoprovision_splf(rack,FILEINLF1, FILEINLF2,FILEINSP1, FILEINSP2, FILEINSP3 variablestochangespine4['INTERFACE'] = INTERFACE_SP4 variablestochangespine4['LEAFNAME'] = HOSTNAME_LF2 variablestochangespine4['INT_LF_UPLINK'] = int_lf2_sp4 + variablestochangespine4['RACK_NUM'] = str(rack) + # # variablestochangeleaf1['IPLEAFSP1IPV4'] = str(IPLEAFipv4[rack][0])