cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
247
Views
0
Helpful
1
Replies
Highlighted
Beginner

show deployed epgs using cobra

Hello,

 

I´m trying to get using a cobra python script to obtain info about deployed EPGs for a physical port on ACI fabric.

 

In ACI GUI you can see this information for deployed EPG under fabric inventory > node > phys port.

 

I reverse engineered from the web GUI that is can be done for a single port with this call:

 

https://{apic_address}/api/node/mo/{port_dn}.json?rsp-subtree-include=full-deployment&target-node=all&target-path=l1EthIfToEPg

 

I see that the real information is stored in a pconsResourceCtx record, but pcons seems acording to docs "generated and used by internal processes"

 

I try to get info for this class but I cannot get anything, apic said "No Mos found"

 

anyone can help me?

regards

1 REPLY 1
Highlighted
VIP Engager

Hi @Alberto Seg 

Interesting scenario. I tried using moquery to get the data, however, I get the an error even for a single port:

 

apic# moquery -c l1PhysIf -d  "topology/pod-1/node-101/sys/phys-[eth1/23]" -x "target-path=l1EthIfToEPg&rsp-subtree-include=full-deployment"
Error: too many values to unpack

 

Alternative to this, although not optimal - since is going the reverse way EPG -> port mapping, and also kinda incomplete: You can use the static path fvRsPathAtt class, but this will only show a section of the EPGs, basically the ones which are using static mapping, and you will be missing the EPGs associated to VMM domains, or through AAEP. So you will need to cover these two corner cases individually if you have them in your environment.

 

Hope it helps,

Sergiu

 

 

 

 

Content for Community-Ad

This widget could not be displayed.