Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
Tested-by: Hannes Dürr <h.duerr at proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner at proxmox.com>
---
pve-api-types/pve-api.json | 286 ++++++++++++++++++++++++++++++++++++-
1 file changed, 282 insertions(+), 4 deletions(-)
diff --git a/pve-api-types/pve-api.json b/pve-api-types/pve-api.json
index e975972f..c954464f 100644
--- a/pve-api-types/pve-api.json
+++ b/pve-api-types/pve-api.json
@@ -50765,12 +50765,173 @@
"leaf": 1,
"path": "/nodes/{node}/sdn/zones/{zone}/content",
"text": "content"
+ },
+ {
+ "info": {
+ "GET": {
+ "allowtoken": 1,
+ "description": "Get a list of all bridges (vnets) that are part of a zone, as well as the ports that are members of that bridge.",
+ "method": "GET",
+ "name": "bridges",
+ "parameters": {
+ "additionalProperties": 0,
+ "properties": {
+ "node": {
+ "description": "The cluster node name.",
+ "format": "pve-node",
+ "type": "string"
+ },
+ "zone": {
+ "description": "zone name or \"localnetwork\"",
+ "type": "string"
+ }
+ }
+ },
+ "permissions": {
+ "check": [
+ "perm",
+ "/sdn/zones/{zone}",
+ [
+ "SDN.Audit"
+ ]
+ ]
+ },
+ "protected": 1,
+ "proxyto": "node",
+ "returns": {
+ "items": {
+ "description": "List of bridges contained in the SDN zone.",
+ "properties": {
+ "name": {
+ "description": "Name of the bridge.",
+ "type": "string"
+ },
+ "ports": {
+ "description": "All ports that are members of the bridge",
+ "items": {
+ "description": "Information about bridge ports.",
+ "properties": {
+ "index": {
+ "description": "The index of the guests network device that this interface belongs to.",
+ "optional": 1,
+ "type": "number"
+ },
+ "name": {
+ "description": "The name of the bridge port.",
+ "type": "string"
+ },
+ "primary_vlan": {
+ "description": "The primary VLAN configured for the port of this bridge (= PVID). Only for VLAN-aware bridges.",
+ "optional": 1,
+ "type": "number"
+ },
+ "vlans": {
+ "description": "A list of VLANs and VLAN ranges that are allowed for this bridge port in addition to the primary VLAN. Only for VLAN-aware bridges.",
+ "items": {
+ "description": "A single VLAN (123) or a VLAN range (234-435).",
+ "type": "string"
+ },
+ "optional": 1,
+ "type": "array"
+ },
+ "vmid": {
+ "description": "The ID of the guest that this interface belongs to.",
+ "optional": 1,
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "vlan_filtering": {
+ "description": "Whether VLAN filtering is enabled for this bridge (= VLAN-aware).",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "leaf": 1,
+ "path": "/nodes/{node}/sdn/zones/{zone}/bridges",
+ "text": "bridges"
+ },
+ {
+ "info": {
+ "GET": {
+ "allowtoken": 1,
+ "description": "Get the IP VRF of an EVPN zone.",
+ "method": "GET",
+ "name": "ip-vrf",
+ "parameters": {
+ "additionalProperties": 0,
+ "properties": {
+ "node": {
+ "description": "The cluster node name.",
+ "format": "pve-node",
+ "type": "string"
+ },
+ "zone": {
+ "description": "Name of an EVPN zone.",
+ "type": "string"
+ }
+ }
+ },
+ "permissions": {
+ "check": [
+ "perm",
+ "/sdn/zones/{zone}",
+ [
+ "SDN.Audit"
+ ]
+ ]
+ },
+ "protected": 1,
+ "proxyto": "node",
+ "returns": {
+ "description": "All entries in the VRF table of zone {zone} of the node.This does not include /32 routes for guests on this host,since they are handled via the respective vnet bridge directly.",
+ "items": {
+ "properties": {
+ "ip": {
+ "description": "The CIDR of the route table entry.",
+ "format": "CIDR",
+ "type": "string"
+ },
+ "metric": {
+ "description": "This route's metric.",
+ "type": "integer"
+ },
+ "nexthops": {
+ "description": "A list of nexthops for the route table entry.",
+ "items": {
+ "description": "the interface name or ip address of the next hop",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "protocol": {
+ "description": "The protocol where this route was learned from (e.g. BGP).",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "leaf": 1,
+ "path": "/nodes/{node}/sdn/zones/{zone}/ip-vrf",
+ "text": "ip-vrf"
}
],
"info": {
"GET": {
"allowtoken": 1,
- "description": "",
+ "description": "Directory index for SDN zone status.",
"method": "GET",
"name": "diridx",
"parameters": {
@@ -50794,9 +50955,7 @@
"/sdn/zones/{zone}",
[
"SDN.Audit"
- ],
- "any",
- 1
+ ]
]
},
"returns": {
@@ -50878,6 +51037,124 @@
"leaf": 0,
"path": "/nodes/{node}/sdn/zones",
"text": "zones"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "info": {
+ "GET": {
+ "allowtoken": 1,
+ "description": "Get the MAC VRF for a VNet in an EVPN zone.",
+ "method": "GET",
+ "name": "mac-vrf",
+ "parameters": {
+ "additionalProperties": 0,
+ "properties": {
+ "node": {
+ "description": "The cluster node name.",
+ "format": "pve-node",
+ "type": "string"
+ },
+ "vnet": {
+ "completion": ("Code")[],
+ "description": "The SDN vnet object identifier.",
+ "format": "pve-sdn-vnet-id",
+ "type": "string"
+ }
+ }
+ },
+ "permissions": {
+ "description": "Require 'SDN.Audit' permissions on '/sdn/zones/<zone>/<vnet>'",
+ "user": "all"
+ },
+ "protected": 1,
+ "proxyto": "node",
+ "returns": {
+ "description": "All routes from the MAC VRF that this node self-originates or has learned via BGP.",
+ "items": {
+ "properties": {
+ "ip": {
+ "description": "The IP address of the MAC VRF entry.",
+ "format": "ip",
+ "type": "string"
+ },
+ "mac": {
+ "description": "The MAC address of the MAC VRF entry.",
+ "format": "mac-addr",
+ "type": "string"
+ },
+ "nexthop": {
+ "description": "The IP address of the nexthop.",
+ "format": "ip",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "leaf": 1,
+ "path": "/nodes/{node}/sdn/vnets/{vnet}/mac-vrf",
+ "text": "mac-vrf"
+ }
+ ],
+ "info": {
+ "GET": {
+ "allowtoken": 1,
+ "description": "",
+ "method": "GET",
+ "name": "diridx",
+ "parameters": {
+ "additionalProperties": 0,
+ "properties": {
+ "node": {
+ "description": "The cluster node name.",
+ "format": "pve-node",
+ "type": "string"
+ },
+ "vnet": {
+ "completion": ("Code")[],
+ "description": "The SDN vnet object identifier.",
+ "format": "pve-sdn-vnet-id",
+ "type": "string"
+ }
+ }
+ },
+ "permissions": {
+ "description": "Require 'SDN.Audit' permissions on '/sdn/zones/<zone>/<vnet>'",
+ "user": "all"
+ },
+ "returns": {
+ "items": {
+ "properties": {
+ "subdir": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "links": [
+ {
+ "href": "{subdir}",
+ "rel": "child"
+ }
+ ],
+ "type": "array"
+ }
+ }
+ },
+ "leaf": 0,
+ "path": "/nodes/{node}/sdn/vnets/{vnet}",
+ "text": "{vnet}"
+ }
+ ],
+ "leaf": 0,
+ "path": "/nodes/{node}/sdn/vnets",
+ "text": "vnets"
}
],
"info": {
@@ -50899,6 +51176,7 @@
"permissions": {
"user": "all"
},
+ "proxyto": "node",
"returns": {
"items": {
"properties": {},
--
2.47.3