cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

ACI Automation Part 4 - ACI with Postman On Combining Multiple EPG, BD, Domain and Static Path

4242
Views
15
Helpful
0
Comments

 

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.

 

Screen Shot 2018-01-31 at 1.21.54 pm.png

 

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

 

1.png

 

Spreadsheet preview in Collection Runner

 

2.png

 

 

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.

 

 3.png

8. Run the Collection Runner

 

4.png

 

You can click on Run Summary for all the iteration summary

 

5.png

 

9. Result In ACI

 

9.1. BD

 

a.png

 

 

Example here bd-2104

 

b.png

 

 

 

9.2. EPG

 

 

EPG1.png

 

Example here epg-v2104 associated with bd-v2104

 

8.png

 

9.3. Static Binding

 

Example here from epg-v2104 static binding associated with vlan 2104

 

c.png

 

9.4. Domain

 

Example here from epg-v2104 associated with rsantoso-phys domain

 

d.png

 

Content for Community-Ad