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

APIC CLI. Is there any way to figure out EPG assosiated with the contract?

atcapaev
Cisco Employee
Cisco Employee

 Hello Experts,

 

I was given the contracts name. I have to delete the contract along with assosiated EPGs.

I cannot figure out a was where I can pull the EPG list based on the contract.

 

I see there is 2 commands show contract XXXX and show tenant YYY contract XXXXX but they rather display subjects not assosiated EPGs.

 

Could you please tell me if there is any command (way) that would display such EPG based on contract as argument.

Any suggestion will bi highly appriciated.

1 Accepted Solution

Accepted Solutions

Remi Astruc
Level 1
Level 1

Hello,

From APIC CLI, you can run that moquery command:

moquery -c vzBrCP -f 'vz.BrCP.dn=="uni/tn-<YOUR-TENANT-NAME>/brc-<YOUR-CONTRACT-NAME>"' -x 'rsp-subtree=children rsp-subtree-class=relnFrom' | egrep "name |tDn"

It will list you the contract name and associated EPGs.

 

Remi Astruc

 

View solution in original post

4 Replies 4

Remi Astruc
Level 1
Level 1

Hello,

From APIC CLI, you can run that moquery command:

moquery -c vzBrCP -f 'vz.BrCP.dn=="uni/tn-<YOUR-TENANT-NAME>/brc-<YOUR-CONTRACT-NAME>"' -x 'rsp-subtree=children rsp-subtree-class=relnFrom' | egrep "name |tDn"

It will list you the contract name and associated EPGs.

 

Remi Astruc

 

hey Remi, thank you very very much!

I do accept it as solution!

 

 

P.S. what an intuitively clear command))))))

Thanks.

Yes, you need to find the DB/Linux Admin within you :-)

 

Remi Astruc

 

Your command doesn't tell you which EPG is the Provider or Consumer. 
If you do
moquery -c vzBrCP -f 'vz.BrCP.dn=="uni/tn-<YOUR-TENANT-NAME>/brc-<YOUR-CONTRACT-NAME>"' -x 'rsp-subtree=children rsp-subtree-class=relnFrom' | egrep "name |rn"

 

It will list the Consumer and Provider EPGs - fvCons - xxxxxxEPGName/fvProv - xxxxxEPGName.

 

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