cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1375
Views
5
Helpful
1
Replies

rest api / python script for fabric access policies

ambi
Level 1
Level 1

Experts

Can anyone point me to an example of a python script or Rest API to configure the switch profile / interface profile / policy group etc ?

the examples i see are only pertaining to creating tenants / vrfs / BDs and contracts

thanks

Ambi

1 Reply 1

stcorry
Cisco Employee
Cisco Employee

Hi Ambi, I know for some of the access policies, you can right click and 'Save' from the GUI (be sure to select subtree and configuration only). 

But also, check this out. 

Physical Domain

<polUni dn="uni">
<physDomP name="physdom" ownerKey="" ownerTag="">
<infraRsVlanNs tDn="uni/infra/vlanns-[vlan_pool_name]-static"/>
</physDomP>
</polUni>

VPC Pairings


<fabricInst ownerKey="" ownerTag="">
<fabricProtPol descr="" dn="uni/fabric/protpol" name="default" ownerKey="" ownerTag="" pairT="explicit">
<fabricExplicitGEp id="1" name="Leaf101_102">
<fabricRsVpcInstPol tnVpcInstPolName="default"/>
<fabricNodePEp descr="" id="101" name=""/>
<fabricNodePEp descr="" id="102" name=""/>
</fabricExplicitGEp>
</fabricProtPol>

VLAN Pool - You'll notice the infraInfra object here. Pretty much all of the rest of the access (policy groups, interface policies, etc) policies go under this object. 


<polUni dn="uni">
<infraInfra ownerKey="" ownerTag="">
<fvnsVlanInstP allocMode="static" descr="" name="vlan_pool" ownerKey="" ownerTag="">
</fvnsVlanInstP>
</infraInfra>

Review Cisco Networking for a $25 gift card

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