04-27-2020 08:04 AM
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
04-27-2020 09:01 AM
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
02-01-2024 07:43 AM
Still facing the issue?All sorted?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide