cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
342
Views
0
Helpful
2
Replies

Add VLAN into existing vlansInstP in REST

Rodiger
Level 1
Level 1

Hi,

I have PhysDom and this already has vlansInstP object, example: uni/infra/vlanns-[SRV]-static

This vlansInstP object already has lots of fvnsEncapBlk object with from/to vlan IDs.

I have checked if vlan exists in any of the fvnsEncapBlk ranges and this would be new vlan.

So, how do I add new fvnsEncapBlk object (with new vlan) into vlansInstP object.

POST https://apic/api/mo/uni/infra/vlanns-[SRV]-static.xml with body

<fvnsEncapBlk status="" role="inherit" from="vlan-555" to="vlan-555">

Do I need to change any status values, because I don't want to delete existing vlans or change existing vlansInstP object, just add new vlan (fvnsEncapBlk)?

If I want to delete fvnsEncapBlk, is it just same operation and status="deleted" in fvnsEncapBlk object?

Thanks

1 Accepted Solution

Accepted Solutions

Rodiger
Level 1
Level 1

To reply to myself:

POST https://apic/api/mo/uni/infra/vlanns-[SRV]-static.xml with body

<fvnsEncapBlk status="" role="inherit" from="vlan-555" to="vlan-555">

Will add VLAN 555 into vlanns.

I guess status="deleted" will remove VLAN from vlanns

View solution in original post

2 Replies 2

Rodiger
Level 1
Level 1

To reply to myself:

POST https://apic/api/mo/uni/infra/vlanns-[SRV]-static.xml with body

<fvnsEncapBlk status="" role="inherit" from="vlan-555" to="vlan-555">

Will add VLAN 555 into vlanns.

I guess status="deleted" will remove VLAN from vlanns

ativaderbrazil
Level 1
Level 1

You're trying to add a new VLAN to an existing vlansInstP object in Cisco APIC using REST API. The vlansInstP object already contains multiple fvnsEncapBlk objects defining VLAN ranges. You want to add a new fvnsEncapBlk with a single VLAN without affecting the existing configuration.

 

<config>
  <fvnsEncapBlk status="created" role="inherit" from="vlan-555" to="vlan-555">
  </fvnsEncapBlk>
</config>

 

https://shorturl.at/SUQB6

Review Cisco Networking for a $25 gift card

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