Skip to content

Instantly share code, notes, and snippets.

@usrdev usrdev/native_vlan Secret
Created Apr 29, 2019

Embed
What would you like to do?
Native VLAN API
API to assign native VLAN:
POST https://api.packet.net/ports/<bond_id>/native-vlan with body:
{
“vnid”: <VLAN_Number>
}
API to list native VLAN:
Use the api below to get the list of native vlans configured.
GET https://api.packet.net/ports/<bond0>?include=native_virtual_network
{
"id": "77ecde07-4b32-408e-bbc0-87295c496f8a",
"type": "NetworkBondPort",
"name": "bond0",
...
"native_virtual_network": {
"id": "100",
"vxlan": 1058,
"href": "/virtual-networks/100"
},
"virtual_networks": [
{
"href": "/virtual-networks/100"
},
...
],
"href": "/ports/77ecde07-4b32-408e-bbc0-87295c496f8a"
}
GET https://api.packet.net/ports/<bond1>?include=native_virtual_network
{
"id": "77ecde07-4b32-408e-bbc0-87295c496f8b",
"type": "NetworkBondPort",
"name": "bond1",
...
"native_virtual_network": {
"id": "200",
"vxlan": 1058,
"href": "/virtual-networks/200"
},
"virtual_networks": [
{
"href": "/virtual-networks/200"
},
...
],
"href": "/ports/77ecde07-4b32-408e-bbc0-87295c496f8b"
}
API to delete native VLAN:
DELETE https://api.packet.net/ports/<bond0>/native-vlan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.