From 44556906c6def02af4b08f48126fd59ce2dd3db2 Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Tue, 23 Jul 2024 18:06:55 -0300 Subject: [PATCH] testing --- networkapi/api_rack/provision.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/networkapi/api_rack/provision.py b/networkapi/api_rack/provision.py index 8d5e8c40..a0ef9b02 100644 --- a/networkapi/api_rack/provision.py +++ b/networkapi/api_rack/provision.py @@ -411,8 +411,12 @@ def spine_provision(self, rack, equips): variablestochangespine1["ASLEAF"] = str(ASLEAF[numero_rack][0]) ### TO BERRINI - variablestochangespine1["IPNEIGHLEAF2IPV4"] = str(IPLEAFipv4[numero_rack][spine_num]) - variablestochangespine1["IPNEIGHLEAF2IPV6"] = str(IPLEAFipv6[numero_rack][spine_num]) + if spine_num == 1: + variablestochangespine1["IPNEIGHLEAF2IPV4"] = str(IPLEAFipv4[numero_rack][spine_num]) + variablestochangespine1["IPNEIGHLEAF2IPV6"] = str(IPLEAFipv6[numero_rack][spine_num]) + elif spine_num == 2: + variablestochangespine1["IPNEIGHLEAF2IPV4"] = str(IPLEAFipv4[numero_rack][spine_num - 2]) + variablestochangespine1["IPNEIGHLEAF2IPV6"] = str(IPLEAFipv6[numero_rack][spine_num - 2]) variablestochangespine1["IPNEIGHLEAFIPV4"] = str(IPLEAFipv4[numero_rack][spine_num - 1]) variablestochangespine1["IPNEIGHLEAFIPV6"] = str(IPLEAFipv6[numero_rack][spine_num - 1])