diff --git a/networkapi/api_rack/provision.py b/networkapi/api_rack/provision.py index ebb228b5..e4d6d634 100644 --- a/networkapi/api_rack/provision.py +++ b/networkapi/api_rack/provision.py @@ -419,15 +419,15 @@ def spine_provision(self, rack, equips): counter = 1 for ipv6 in IPSPINEipv6[numero_rack]: - variablestochangespine1[f'IPSPINE{counter}IPV6'] = ipv6 - variablestochangespine1[f"IPNEIGHLEAF{counter}IPV6"] = str(IPLEAFipv6[numero_rack][counter -1]) + variablestochangespine1["IPSPINE{}IPV6".format(counter)] = str(ipv6) + variablestochangespine1["IPNEIGHLEAF{}IPV6".format(counter)] = str(IPLEAFipv6[numero_rack][counter -1]) counter += 1 counter = 1 for ipv4 in IPSPINEipv4[numero_rack]: - variablestochangespine1[f'IPSPINE{counter}IPV4'] = str(ipv6) - variablestochangespine1[f"IPNEIGHLEAF{counter}IPV4"] = str(IPLEAFipv4[numero_rack][counter -1]) + variablestochangespine1["IPSPINE{}IPV4".format(counter)] = str(ipv6) + variablestochangespine1["IPNEIGHLEAF{}IPV4".format(counter)] = str(IPLEAFipv4[numero_rack][counter -1]) counter += 1 @@ -443,14 +443,14 @@ def spine_provision(self, rack, equips): variablestochangespine1["VLANFE2LEAF"] = str(vlanFE[spine_num - 2]) counter = 1 for ipv6 in IPSPINEipv6[numero_rack]: - variablestochangespine1[f'IPSPINE{counter}IPV6'] = str(ipv6) - variablestochangespine1[f"IPNEIGHLEAF{counter}IPV6"] = str(IPLEAFipv6[numero_rack][counter - 1]) + variablestochangespine1["IPSPINE{}IPV6".format(counter)] = str(ipv6) + variablestochangespine1["IPNEIGHLEAF{}IPV6".format(counter)] = str(IPLEAFipv6[numero_rack][counter - 1]) counter += 1 counter = 1 for ipv4 in IPSPINEipv4[numero_rack]: - variablestochangespine1[f'IPSPINE{counter}IPV4'] = str(ipv6) - variablestochangespine1[f"IPNEIGHLEAF{counter}IPV4"] = str(IPLEAFipv4[numero_rack][counter - 1]) + variablestochangespine1["IPSPINE{}IPV4".format(counter)] = str(ipv6) + variablestochangespine1["IPNEIGHLEAF{}IPV4".format(counter)] = str(IPLEAFipv4[numero_rack][counter - 1]) counter += 1