Virtual Routers Lans
Editing
- PUT /virtualrouters/{uuid}/
Edits a virtual router LAN Interface. Note that only
nameandorderfields can be changed, and all other changes to the definition of a LAN Interface will be ignored.- Status Codes:
200 OK – no error
Example request:
PUT /api/2.0/lans/9b183b90-84cf-46fb-b3d8-12d2e5383eae/ HTTP/1.1 Content-Type: application/json Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop { "name": "WORM HOLE", "order": 1 }
Example response:
HTTP/1.1 202 ACCEPTED Content-Type: application/json; charset=utf-8 { "dhcp_range_from": "10.0.0.100", "dhcp_range_to": "10.0.0.200", "dhcp_vlan_gateway": "10.0.1.1/24", "iface": "vtnet1", "internet_protocol": "ipv4", "ip_aliases": [], "ipv4_address_gateway": "10.0.1.1/24", "ipv4_dhcp_enabled": false, "ipv6_address_gateway": null, "ipv6_router_advertirser_enabled": false, "name": "WORM HOLE", "order": 1, "resource_uri": "/api/2.0/lans/9b183b90-84cf-46fb-b3d8-12d2e5383eae/", "uuid": "9b183b90-84cf-46fb-b3d8-12d2e5383eae", "virtual_router": "13292e1f-0c3e-458d-a6d0-ed2ee2baa0b2", "vlan": { "resource_uri": "/api/2.0/vlans/68317648-0a2a-4fb4-b179-700fa4dc359d/", "uuid": "68317648-0a2a-4fb4-b179-700fa4dc359d" } }
Configure DHCP
- POST /lans/{uuid}/action/?do=configure_dhcp
Configures the DHCP service for a Virtual Router LAN Interface.
- Status Codes:
200 OK – no error
Example request:
POST /api/2.0/lans/9b183b90-84cf-46fb-b3d8-12d2e5383eae/action/?do=configure_dhcp HTTP/1.1 Content-Type: application/json Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop { "dhcp_range_from": "10.0.0.100", "dhcp_range_to": "10.0.0.200", "dhcp_vlan_gateway": "10.0.1.1/24", "ipv4_dhcp_enabled": false }
Example response:
HTTP/1.1 202 ACCEPTED Content-Type: application/json; charset=utf-8 { "action": "configure_dhcp", "job": { "resource_uri": "/api/2.0/jobs/7205b0a5-89f9-4726-aaaa-bfa422e630ee/", "uuid": "7205b0a5-89f9-4726-aaaa-bfa422e630ee" }, "result": "success", "uuid": "9b183b90-84cf-46fb-b3d8-12d2e5383eae" }
Schema
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"allowed_detail_http_methods": [
"get",
"put",
"delete"
],
"allowed_list_http_methods": [
"get",
"put",
"delete",
"post"
],
"default_format": "application/json",
"default_limit": 20,
"fields": {
"dhcp_range_from": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"dhcp_range_to": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"dhcp_vlan_gateway": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"iface": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"internet_protocol": {
"choices": [
"ipv4",
"ipv6",
"both"
],
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": true,
"type": "string"
},
"ip_aliases": {
"default": [],
"help_text": "A list of data. Ex: ['abc', 26.73, 8]",
"readonly": false,
"required": false,
"type": "list"
},
"ipv4_address_gateway": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"ipv4_dhcp_enabled": {
"default": null,
"help_text": "Boolean data. Ex: True",
"readonly": false,
"required": false,
"type": "boolean"
},
"ipv6_address_gateway": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"ipv6_router_advertirser_enabled": {
"default": null,
"help_text": "Boolean data. Ex: True",
"readonly": false,
"required": false,
"type": "boolean"
},
"name": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": false,
"type": "string"
},
"order": {
"default": null,
"help_text": "Integer data. Ex: 2673",
"readonly": false,
"required": true,
"type": "integer"
},
"resource_uri": {
"default": "No default provided.",
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": true,
"required": true,
"type": "string"
},
"uuid": {
"default": null,
"help_text": "UUID of the virtual router LAN interface",
"readonly": true,
"required": true,
"type": "string"
},
"virtual_router": {
"default": null,
"help_text": "Unicode string data. Ex: \"Hello World\"",
"readonly": false,
"required": true,
"type": "string"
},
"vlan": {
"default": null,
"help_text": "A single related resource. Can be either a URI or set of nested resource data.",
"readonly": false,
"required": true,
"type": "related"
}
},
"filtering": {
"name": "exact",
"name__contains": "exact",
"tag": "exact",
"uuid": "exact"
},
"ordering": [
"uuid",
"name"
]
}