cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1485
Views
0
Helpful
4
Replies

Question on using postman to configure a static vpc port binding

jgesualdi
Level 1
Level 1

I use postman in the following way to configure a static epg port binding, a vpc connection.

 

https://apic01/api/node/mo/uni/tn-tn_{{tenant}}/ap-ap_{{ap}}/epg-epg_{{epg}}_{{tenant}}.json

 

{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{epg}}",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-a-p1-p2_PolGrp]",
"status": "created"
},
"children": []
}
}

 

 

This works but I need to run it twice for redundant devices. I was wondring if I could set two static ports binding in one post request.

 

Something that would look like this:

{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{epg}}",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-A-p1-p2_PolGrp]",

"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-B-p3-p4_PolGrp]",
"status": "created"
},
"children": []
}

 

This obviously doesn't work. 

 

Any suggestions?
}

 

 

Thanks.

4 Replies 4

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

Not sure about ACI, but from a programming perspective you have a datastrucutre with duplicate keys. Have you tried making the tDN key hold a list value:

{
  "fvRsPathAtt": {
    "attributes": {
      "encap": "vlan-{{epg}}",
      "tDn": ["topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-A-p1-p2_PolGrp]",
        "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-B-p3-p4_PolGrp]"],
      "status": "created"
    },
    "children": []
} }

cheers,

Seb.

Claudia de Luna
Spotlight
Spotlight

Hi @jgesualdi,

 

I ran into something similar a while ago and used Postman Command or Collection Runner. 

 

https://vimeo.com/385381561

 

 

Remi-Astruc
Cisco Employee
Cisco Employee

Hi @jgesualdi ,

Here it is...

https://apic01/api/node/mo/uni/tn-tn_{{tenant}}/ap-ap_{{ap}}.json

{
"fvAEPg": {
"attributes": {
"dn": "uni/tn-tn_{{tenant}}/ap-ap_{{ap}}/epg-epg_{{epg}}_{{tenant}}"
},
"children": [
{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{epg}}",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-a-p1-p2_PolGrp]",
"status": "created"
}
}
},
{
"fvRsPathAtt": {
"attributes": {
"encap": "vlan-{{epg}}",
"tDn": "topology/pod-1/protpaths-101-102/pathep-[fmdr-ucs-fi-B-p3-p4_PolGrp]",
"status": "created"
}
}
}
]
}
}

Remi Astruc

rtmtoky
Level 1
Level 1

Hello @Remi-Astruc,

I have a similar question but it is not for APIC but  Nexus Dashboard Orchestrator API. Do you know by chance what’s wrong with my code?

Thank you in advance for your time. 

Regards,

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

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