Cisco ACI Automation through POSTMAN (P2): Create vPC Policy Group


Postman is a powerful GUI client designed to mainly test API development by building API requests within the client framework. This is second post of Cisco ACI Automation through POSTMAN. Before reading this, please read first post https://packetdreamer.wordpress.com/2020/07/11/cisco-aci-automation-with-postman/

1. Create a Collection

Go to https://packetdreamer.wordpress.com/2020/07/11/cisco-aci-automation-with-postman/ to create collection and POST login request

2. After creation of collection and login request, we will create POST request for vPC policy group

[We will use below parameters for vPC policy group name ‘vPC_SERVERXY_POLICYGRP’.

Assumption: Below parameters are already configured

  • STP: BPDU_DISABLE
  • AEP: AEP_PHYSICAL
  • CDP: CDP_OFF
  • Speed: 10G_AUTO_ON
  • LACP: LACP_ACTIVE
  • LLDP: LLDP_ON]

Click ‘New’ at the top left

Select Request

Provide name of the request, select collection and save

Now you have 2 request under this collection. Note Policy Group is created as GET request

3. We will change ‘Policy Group’ from GET to POST request. Click this request, a new tab will open. Select POST as show below

In the URL box, give below URL

https://apic/api/node/mo/uni/infra.json

Below is the body for POST request to configure policy group. Copy this json config in POSTMAN as shown in the below image

{

       “totalCount”: “1”,

       “imdata”: [

              {

                     “infraAccBndlGrp”: {

                           “attributes”: {

                                  “annotation”: “”,

                                  “descr”: “”,

                                  “dn”: “uni/infra/funcprof/accbundle-vPC_SERVERXY_POLICYGRP”,

                                  “lagT”: “node”,

                                  “name”: “vPC_SERVERXY_POLICYGRP”,

                                  “nameAlias”: “”,

                                  “ownerKey”: “”,

                                  “ownerTag”: “”

                           },

                           “children”: [

                                  {

                                         “infraRsStpIfPol”: {

                                                “attributes”: {

                                                       “annotation”: “”,

                                                       “tnStpIfPolName”: “BDPU_DISABLE”

                                                }

                                         }

                                  },

                                  {

                                         “infraRsAttEntP”: {

                                                “attributes”: {

                                                       “annotation”: “”,

                                                       “tDn”: “uni/infra/attentp-AEP_PHYSICAL”

                                                }

                                         }

                                  },

                                  {

                                         “infraRsCdpIfPol”: {

                                                “attributes”: {

                                                       “annotation”: “”,

                                                       “tnCdpIfPolName”: “CDP_OFF”

                                                }

                                         }

                                  },

                                  {

                                         “infraRsHIfPol”: {

                                                “attributes”: {

                                                       “annotation”: “”,

                                                       “tnFabricHIfPolName”: “10G_AUTO_ON”

                                                }

                                         }

                                  },

                                  {

                                         “infraRsLacpPol”: {

                                                “attributes”: {

                                                       “annotation”: “”,

                                                       “tnLacpLagPolName”: “LACP_ACTIVE”

                                                }

                                         }

                                  },

                                  {

                                         “infraRsLldpIfPol”: {

                                                “attributes”: {

                                                       “annotation”: “”,

                                                       “tnLldpIfPolName”: “LLDP_ON”

                                                }

                                         }

                                  }

                           ]

                     }

              }

       ]

}

After copying all script, click save

4. Now select the small pointer in the collection as shown below. You will option to ‘Run’ the scripts

A new window will open. Click big blue button in the bottom left to run two scripts shown on right side window

If all goes well, you should see below results

5. Now let’s verify on Cisco sandbox APIC.

Great!! We have configured vPC policy group. In Next post, we will see how to configure 20 vPC policy group through POSTMAN (Remember the main advantage of automation)