12-13-2023 05:07 AM
Hi,
Is it possible to configure interfaces with the new 6.0 "per-port configuration" format, instead of profiles and selectors, via APIC REST API?
All documentation I've found online refers to the GUI configuration.
Cheers,
Solved! Go to Solution.
12-15-2023 03:55 AM - edited 12-15-2023 04:08 AM
Hi, yes the MO/class is infraPortConfig. For example to attach a vPC Interface Policy Group (VPC-SERVER) to ports eth1/32 of leafs 101 and 102:
# POST /api/mo.json
{
"infraPortConfig": {
"attributes": {
"dn": "uni/infra/portconfnode-101-card-1-port-32-sub-0",
"assocGrp": "uni/infra/funcprof/accbundle-VPC-SERVER"
}
}
}
# POST /api/mo.json
{
"infraPortConfig": {
"attributes": {
"dn": "uni/infra/portconfnode-102-card-1-port-32-sub-0",
"assocGrp": "uni/infra/funcprof/accbundle-VPC-SERVER"
}
}
}
See https://developer.cisco.com/docs/apic-rest-api-configuration-guide/#!configuring-leaf-switch-physical-ports-using-the-interface-configuration - There are also more examples under the "Layer 2 Networking" menu on this page.
HTH
12-15-2023 03:55 AM - edited 12-15-2023 04:08 AM
Hi, yes the MO/class is infraPortConfig. For example to attach a vPC Interface Policy Group (VPC-SERVER) to ports eth1/32 of leafs 101 and 102:
# POST /api/mo.json
{
"infraPortConfig": {
"attributes": {
"dn": "uni/infra/portconfnode-101-card-1-port-32-sub-0",
"assocGrp": "uni/infra/funcprof/accbundle-VPC-SERVER"
}
}
}
# POST /api/mo.json
{
"infraPortConfig": {
"attributes": {
"dn": "uni/infra/portconfnode-102-card-1-port-32-sub-0",
"assocGrp": "uni/infra/funcprof/accbundle-VPC-SERVER"
}
}
}
See https://developer.cisco.com/docs/apic-rest-api-configuration-guide/#!configuring-leaf-switch-physical-ports-using-the-interface-configuration - There are also more examples under the "Layer 2 Networking" menu on this page.
HTH
12-15-2023 04:42 AM
Thanks Marcel!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide