cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2139
Views
6
Helpful
2
Replies

ACI - How to delete easily all EPG static path on an interface

ju.mahieu
Level 1
Level 1

Hi,

We have a lot of Epg - static path on each physical port on the fabric.

I would like to find an easy way (Gui, CLI or Ansible) to default an interface and delete all the static path binded ?

 

Below an example of the configuration I need to delete:

moquery -c fvRsPathAtt | grep dn | grep eth1/7
dn : uni/tn-mytenant1/ap-app1-app/epg-app1-epg/rspathAtt-[topology/pod-1/paths-101/pathep-[eth1/7]]
dn : uni/tn-mytenant1/ap-app1-app/epg-app1-epg/rspathAtt-[topology/pod-1/paths-101/pathep-[eth1/7]]
dn : uni/tn-mytenant1/ap-app2-app/epg-app2-epg/rspathAtt-[topology/pod-1/paths-101/pathep-[eth1/7]]
dn : uni/tn-mytenant1/ap-app2-app/epg-app2-epg/rspathAtt-[topology/pod-1/paths-101/pathep-[eth1/7]]
dn : uni/tn-mytenant2/ap-app3-app/epg-app3-epg/rspathAtt-[topology/pod-1/paths-101/pathep-[eth1/7]]
dn : uni/tn-mytenant2/ap-app4-app/epg-app4-epg/rspathAtt-[topology/pod-1/paths-101/pathep-[eth1/7]]

Any ideas...

Thank you 

Ju

 

2 Replies 2

ju.mahieu
Level 1
Level 1

Hi Experts,

I still have this kind of usecase. Any ideas to help ?

Thank you

Ju

 

Hi Ju

This article may provide help for your case:

https://www.richardstrnad.ch/posts/aci-bulk-delete-dns/

  1. Create a file containing the dn's to delete (one dn per line) directly on the APIC
  2. Delete the dn's using the following command:
    cat foo.txt | while read f; do icurl -g -k -X DELETE https://localhost/api/mo/"${f}".json; done;​

 

Kind Regards

Jonas

Save 25% on Day-2 Operations Add-On License