cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5818
Views
10
Helpful
4
Replies

Reset port config

DaH1
Level 1
Level 1

Hi,

 

I have a port set up in APIC with an Interface Policy Group and (for sake of example) 20 separate epgs- is there a way (simply) to reset the port to default (no config), rather than going into each epg and removing the port, then going into the port and removing the policy groups etc.  There must be an easier way - but I can't see it.

 

Apologies if this is obvious, but I can't see the wood for the trees now.

4 Replies 4

Martin.Falberg
Level 1
Level 1

Hi,

Sorry to say this but this is the hard part you either haver to remove it manually or script it.

I dont think removing the Interface will clear all the EPGs from the configuration.

 

GL

 

Martin

You don't happen to have a script do you? I've looked around the internet can find nothing.

Thanks

Hi @Jamie1107 ,

If you use postman collection runner you can achieve this :

https://blog.getpostman.com/2018/04/11/looping-through-a-data-file-in-the-postman-collection-runner/

=*===========================================================================*=

Post URL:https://APIC-IP/api/node/mo/uni/tn-{{TenantName}}/ap-{{ApplicationProfileName}}/epg-{{EPGName}}/rspathAtt-[topology/pod-{{PODID}}/paths-{{LEAFID}}/pathep-[eth1/{{PORTNUMBER}}]].json

Post Body .json format:

{

    "fvRsPathAtt": {

        "attributes": {

            "dn": "uni/tn-{{TenantName}}/ap-{{ApplicationProfileName}}/epg-{{EPGName}}/rspathAtt-[topology/pod-{{PODID}}/paths-{{LEAFID}}/pathep-[eth1/{{PORTNUMBER}}]]",

            "status": "deleted"

        },

        "children": []

    }

=*===========================================================================*=

The Read words are the variables already created on the postman , you just would need to create the cvs file with the Variables and then run it on postman.

Just keep in mind you need to authenticat as well to the apic via postman before doing this.

 

Alejandro Avila Picado .:|:.:|:.

aizakduran
Level 1
Level 1

Hi, did you find a way to remove the EPG from the Port?
thank you

Review Cisco Networking for a $25 gift card

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