Ошибка синтаксиса.
This commit is contained in:
@@ -187,7 +187,7 @@ if __name__ == "__main__":
|
||||
# собираем комьюнити маршрутов
|
||||
bgp_community=str()
|
||||
for c in str(ip_list[clist]['community']).split(","):
|
||||
bgp_community+=f"bgp_community.add(({str(c).replace(":",",")})); "
|
||||
bgp_community+=f"bgp_community.add(({str(c).replace(':',',')})); "
|
||||
# сохраняем в файл
|
||||
with open(ipv4_out_file, "a") as file:
|
||||
file.write(f"protocol static static_{clist.lower()} {{\n ipv4 {{ import filter {{ {bgp_community}accept; }}; }};\n{ipv4_list}}}\n")
|
||||
@@ -203,7 +203,7 @@ if __name__ == "__main__":
|
||||
# собираем комьюнити маршрутов
|
||||
bgp_community=str()
|
||||
for c in str(ip_list[clist]['community']).split(","):
|
||||
bgp_community+=f"bgp_community.add(({str(c).replace(":",",")})); "
|
||||
bgp_community+=f"bgp_community.add(({str(c).replace(':',',')})); "
|
||||
# сохраняем в файл
|
||||
with open(ipv6_out_file, "a") as file:
|
||||
file.write(f"protocol static static_{clist.lower()} {{\n ipv6 {{ import filter {{ {bgp_community}accept; }}; }};\n{ipv6_list}}}\n")
|
||||
|
||||
Reference in New Issue
Block a user