diff options
| author | Stefan Hanreich <s.hanreich@proxmox.com> | 2025-09-04 10:18:34 +0200 | 
|---|---|---|
| committer | Wolfgang Bumiller <w.bumiller@proxmox.com> | 2025-09-04 14:16:41 +0200 | 
| commit | b8efb8065449420a0d207e4ca4c8908e1c3ad0f8 (patch) | |
| tree | 807e19b69be2569e2e92bc3951df24e834059d65 /src/PVE/Network/SDN/Zones | |
| parent | d3bd0d5b48265f5f9e1e872cfdded385a0d28725 (diff) | |
api: zones: update schema of endpoints
The possible properties returned by the zone 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/Zones')
| -rw-r--r-- | src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 22 | ||||
| -rw-r--r-- | src/PVE/Network/SDN/Zones/QinQPlugin.pm | 6 | ||||
| -rw-r--r-- | src/PVE/Network/SDN/Zones/VlanPlugin.pm | 1 | ||||
| -rw-r--r-- | src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 16 | 
4 files changed, 28 insertions, 17 deletions
diff --git a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm index 0153364..6d89499 100644 --- a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm +++ b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm @@ -45,41 +45,47 @@ sub properties {      return {          'vrf-vxlan' => {              type => 'integer', -            description => "l3vni.", +            description => "VNI for the zone VRF.", +            minimum => 1, +            maximum => 16777215,          },          'controller' => {              type => 'string', -            description => "Frr router name", +            description => 'Controller for this zone.',          },          'mac' => {              type => 'string', -            description => "Anycast logical router mac address", +            description => "Anycast logical router mac address.",              optional => 1,              format => 'mac-addr',          },          'exitnodes' => get_standard_option('pve-node-list'),          'exitnodes-local-routing' => {              type => 'boolean', -            description => "Allow exitnodes to connect to evpn guests", +            description => "Allow exitnodes to connect to EVPN guests.",              optional => 1,          },          'exitnodes-primary' => get_standard_option(              'pve-node', -            { description => "Force traffic to this exitnode first." }, +            { +                description => "Force traffic through this exitnode first.", +            },          ),          'advertise-subnets' => {              type => 'boolean', -            description => "Advertise evpn subnets if you have silent hosts", +            description => +                "Advertise IP prefixes (Type-5 routes) instead of MAC/IP pairs (Type-2 routes).",              optional => 1,          },          'disable-arp-nd-suppression' => {              type => 'boolean', -            description => "Disable ipv4 arp && ipv6 neighbour discovery suppression", +            description => "Suppress IPv4 ARP && IPv6 Neighbour Discovery messages.",              optional => 1,          },          'rt-import' => {              type => 'string', -            description => "Route-Target import", +            description => +                'List of Route Targets that should be imported into the VRF of the zone.',              optional => 1,              format => 'pve-sdn-bgp-rt-list',          }, diff --git a/src/PVE/Network/SDN/Zones/QinQPlugin.pm b/src/PVE/Network/SDN/Zones/QinQPlugin.pm index 5806e69..a75940c 100644 --- a/src/PVE/Network/SDN/Zones/QinQPlugin.pm +++ b/src/PVE/Network/SDN/Zones/QinQPlugin.pm @@ -18,11 +18,11 @@ sub properties {          tag => {              type => 'integer',              minimum => 0, -            description => "Service-VLAN Tag", +            description => "Service-VLAN Tag (outer VLAN)",          },          mtu => {              type => 'integer', -            description => "MTU", +            description => "MTU of the zone, will be used for the created VNet bridges.",              optional => 1,          },          'vlan-protocol' => { @@ -30,6 +30,8 @@ sub properties {              enum => ['802.1q', '802.1ad'],              default => '802.1q',              optional => 1, +            description => +                "Which VLAN protocol should be used for the creation of the QinQ zone.",          },      };  } diff --git a/src/PVE/Network/SDN/Zones/VlanPlugin.pm b/src/PVE/Network/SDN/Zones/VlanPlugin.pm index 90f16bf..9102b34 100644 --- a/src/PVE/Network/SDN/Zones/VlanPlugin.pm +++ b/src/PVE/Network/SDN/Zones/VlanPlugin.pm @@ -27,6 +27,7 @@ sub properties {      return {          'bridge' => {              type => 'string', +            description => 'The bridge for which VLANs should be managed.',          },          'bridge-disable-mac-learning' => {              type => 'boolean', diff --git a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm index 8f6fba0..1db610f 100644 --- a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm +++ b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm @@ -27,20 +27,22 @@ sub type {  sub properties {      return {          'peers' => { -            description => "peers address list.", +            description => +                "Comma-separated list of peers, that are part of the VXLAN zone. Usually the IPs of the nodes.",              type => 'string',              format => 'ip-list',          }, -        fabric => { -            description => "SDN fabric to use as underlay for this VXLAN zone.", -            type => 'string', -            format => 'pve-sdn-fabric-id', -        },          'vxlan-port' => { -            description => "Vxlan tunnel udp port (default 4789).", +            description => "UDP port that should be used for the VXLAN tunnel (default 4789).",              minimum => 1,              maximum => 65536,              type => 'integer', +            default => 4789, +        }, +        fabric => { +            description => "SDN fabric to use as underlay for this VXLAN zone.", +            type => 'string', +            format => 'pve-sdn-fabric-id',          },      };  }  | 
