Skip to content

Commit

Permalink
fix: fix deletion of vlan_pool binding
Browse files Browse the repository at this point in the history
When state is absent, only the subclass for the domain should be deleted (infraRsVlanNs) not the whole domain config.
  • Loading branch information
edudppaz authored Oct 15, 2024
1 parent 16cb183 commit bca4987
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions plugins/modules/aci_domain_to_vlan_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,21 +330,22 @@ def main():
module_object=domain_mo,
target_filter={"name": domain},
),
child_classes=["infraRsVlanNs"],
subclass_1=dict(
aci_class="infraRsVlanNs",
aci_rn="rsvlanNs",
target_filter={"dn": "{0}/rsvlanNs".format(domain_mo)},
)
)

aci.get_existing()

if state == "present":
aci.payload(
aci_class=domain_class,
class_config=dict(name=domain),
child_configs=[
{"infraRsVlanNs": {"attributes": {"tDn": aci_mo}}},
],
aci_class="infraRsVlanNs",
class_config=dict(tDn=aci_mo),
)

aci.get_diff(aci_class=domain_class)
aci.get_diff(aci_class="infraRsVlanNs")

aci.post_config()

Expand Down

0 comments on commit bca4987

Please sign in to comment.