summaryrefslogtreecommitdiff
path: root/src/PVE/Network/SDN/VnetPlugin.pm
diff options
context:
space:
mode:
authorStefan Hanreich <s.hanreich@proxmox.com>2025-09-04 10:18:33 +0200
committerWolfgang Bumiller <w.bumiller@proxmox.com>2025-09-04 14:16:41 +0200
commitd3bd0d5b48265f5f9e1e872cfdded385a0d28725 (patch)
treefeac62f5d1e1b9a68eba35ed8a69bb456b9d0fa6 /src/PVE/Network/SDN/VnetPlugin.pm
parented013f92ce890b82d919ccb0aaf309e65973bfc8 (diff)
api: vnets: update schema of endpoints
The possible properties returned by the vnet endpoints were only partly documented. Add all missing properties and improve descriptions for existing properties. Extract all duplicate properties into a separate variable, so we don't have to rewrite the whole API definition for every endpoint. Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Reviewed-by: Dominik Csapak <d.csapak@proxmox.com> Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Diffstat (limited to 'src/PVE/Network/SDN/VnetPlugin.pm')
-rw-r--r--src/PVE/Network/SDN/VnetPlugin.pm21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/PVE/Network/SDN/VnetPlugin.pm b/src/PVE/Network/SDN/VnetPlugin.pm
index 035aaca..717438c 100644
--- a/src/PVE/Network/SDN/VnetPlugin.pm
+++ b/src/PVE/Network/SDN/VnetPlugin.pm
@@ -60,30 +60,39 @@ sub properties {
return {
zone => {
type => 'string',
- description => "zone id",
+ description => 'Name of the zone this VNet belongs to.',
},
type => {
- description => "Type",
+ type => 'string',
+ enum => ['vnet'],
+ description => 'Type of the VNet.',
optional => 1,
},
tag => {
type => 'integer',
- description => "vlan or vxlan id",
+ description =>
+ 'VLAN Tag (for VLAN or QinQ zones) or VXLAN VNI (for VXLAN or EVPN zones).',
+ optional => 1,
+ minimum => 1,
+ maximum => 16777215,
},
vlanaware => {
type => 'boolean',
- description => 'Allow vm VLANs to pass through this vnet.',
+ description => 'Allow VLANs to pass through this vnet.',
+ optional => 1,
},
alias => {
type => 'string',
- description => "alias name of the vnet",
+ description => "Alias name of the VNet.",
pattern => qr/[\(\)-_.\w\d\s]{0,256}/i,
maxLength => 256,
optional => 1,
},
'isolate-ports' => {
type => 'boolean',
- description => "If true, sets the isolated property for all members of this VNet",
+ description =>
+ "If true, sets the isolated property for all interfaces on the bridge of this VNet.",
+ optional => 1,
},
};
}