From 0a337512e806c560cb6aec2c28066bf4f81c0563 Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Fri, 9 Aug 2024 15:31:44 -0300 Subject: [PATCH] fixed variable name and query filter to allocate vlans to a new rack --- networkapi/api_rack/rackenvironments.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/networkapi/api_rack/rackenvironments.py b/networkapi/api_rack/rackenvironments.py index 4582993b..598352ed 100644 --- a/networkapi/api_rack/rackenvironments.py +++ b/networkapi/api_rack/rackenvironments.py @@ -130,9 +130,12 @@ def spines_environment_read(self): def spine_leaf_vlans_save(self): log.debug("_create_spnlfvlans") + fabric = self.rack.dcroom.name + rackname = self.rack.nome + grupoL3name = fabric+"_"+rackname spn_lf_envs = models_env.Ambiente.objects.filter(dcroom=int(self.rack.dcroom.id), - grupo_l3__nome=str(self.rack.dcroom.name), + grupo_l3__nome=str(grupoL3name), ambiente_logico__nome__in=["SPINE01LEAF", "SPINE02LEAF", "SPINE03LEAF",