I. Introduction
In the previous article ACI Automation part 3, we discussed on how to create multiple EPG in ACI using Postman. It's suggest to go through the previous parts before attempting the configuration in this article as I'll assume that you have the fundamental discussed in the previous parts.
In this article, we are going to extend our automation to configure multiple EPG along with its BD, Physical Domain and Static Path.
The concept is the same from what is being presented from the previous part. However, in this article, I would like to show you how this can be used in bulk and larger scale.
With this automation you can save your time performing multiple repetitive configuration into a quick and comprehensive method using Postman.
II. Create the EPG Spreadsheet
Create the spreadsheet and fill in the associated EPG, BD, domain and static path.
Save this as .csv format.
III. Postman Collection Runner
You’ll need to perform the request in the correct sequence as to which object being created first.
1. Login to APIC
POST https://{{apic}}/api/aaaLogin.json
Body
{
"aaaUser" : {
"attributes": {
"name":"{{username}}",
"pwd":"{{password}}"
}
}
}
2. BD Object Information
POST https://{{apic}}/api/node/mo/uni/tn-rsantoso/BD-{{bdname}}.json
Body
{
"fvBD":{
"attributes":{
"dn":"uni/tn-rsantoso/BD-{{bdname}}",
"mac":"00:22:BD:F8:19:FF",
"name":"{{bdname}}",
"rn":"BD-{{bdname}}",
"status":"created"},
"children":[{
"fvRsCtx":{
"attributes":{
"tnFvCtxName":"{{vrfname}}",
"status":"created,modified"
},
"children":[]
}
}]
}
}
3. EPG Object Information
POST https://{{apic}}/api/node/mo/uni/tn-rsantoso/ap-rsantoso-ap/epg-{{epgname}}.json
Body
{
"fvAEPg": {
"attributes": {
"dn": "uni/tn-rsantoso/ap-rsantoso-ap/epg-{{epgname}}",
"name": "{{epgname}}",
"rn": "epg-{{epgname}}",
"status": "created"
},
"children": [{
"fvRsBd": {
"attributes": {
"tnFvBDName": "{{bdname}}",
"status": "created,modified"
},
"children": []
}
}]
}
}
4. Static Binding
POST https://{{apic}}/api/node/mo/uni/tn-rsantoso/ap-rsantoso-ap/epg-{{epgname}}.json
Body
{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{vlan}}",
"tDn": "topology/pod-1/paths-{{node}}/pathep-[{{interface}}]",
"status": "created"
},
"children": []
}
}
5. Domain Object Information
POST https://{{apic}}/api/node/mo/uni/tn-rsantoso/ap-rsantoso-ap/epg-{{epgname}}.json
Body
{
"fvRsDomAtt": {
"attributes": {
"resImedcy": "immediate",
"tDn":"uni/phys-{{domainname}}",
"status":"created"
},
"children":[]
}
}
6. Upload the Spreadsheet to the Postman Collection Runner
The Postman Collection Folder
Spreadsheet preview in Collection Runner
7. Enter the Iteration Accordingly
You can modify the Iteration number accordingly if you'd like to configure less than the total entries in the spreadsheet.
8. Run the Collection Runner
You can click on Run Summary for all the iteration summary
9. Result In ACI
9.1. BD
Example here bd-2104
9.2. EPG
Example here epg-v2104 associated with bd-v2104
9.3. Static Binding
Example here from epg-v2104 static binding associated with vlan 2104
9.4. Domain
Example here from epg-v2104 associated with rsantoso-phys domain