cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
791
Views
0
Helpful
2
Replies

show deployed epgs using cobra

Alberto Seg
Level 1
Level 1

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

2 Replies 2

Sergiu.Daniluk
VIP Alumni
VIP Alumni

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

 

 

 

 

Ruben Cocheno
Spotlight
Spotlight

@Alberto Seg 

Still facing the issue?All sorted?

Tag me to follow up.
Please mark it as Helpful and/or Solution Accepted if that is the case. Thanks for making Engineering easy again.
Connect with me for more on Linkedin https://www.linkedin.com/in/rubencocheno/
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community