API: Create VNET with VXLAN

Hi,

According with documentation, 3 fields are mandatory for create a VNET with VXLAN: NAME, VN_MAD and PHYDEV. But if you not specify vlan information happen a error:

$ cat vnet_template
NAME=“net_test”
PHYDEV=“bond1”
VN_MAD=“vxlan”

$ onevnet create vnet_template
[one.vn.allocate] VLAN_ID (or AUTOMATIC) is mandatory for driver vxlan

I solved my problem adding AUTOMATIC_VLAN_ID=“YES” in template. Wouldn’t it be the case to update the documentation?

2 Likes

Just stumbled accross this, been trying to work out the correct value for ages, the error isn’t exactly helpfull.

AUTOMATIC_VLAN_ID=YES OR

<AUTOMATIC_VLAN_ID>YES</AUTOMATIC_VLAN_ID> if like me you are using XML RPC.

Apprently

[one.vn.allocate] VLAN_ID (or AUTOMATIC) is mandatory for driver vxlan

Actualy means

[one.vn.allocate] VLAN_ID (or AUTOMATIC_VLAN_ID) is mandatory for driver vxlan

Thanks you though really appreciate you posting your findings.

1 Like

Thanks! We improved the error message as suggested.

1 Like

Also updated the documentation

1 Like

excellent thank you