summaryrefslogtreecommitdiff
path: root/src/PVE/API2/Network/SDN
AgeCommit message (Collapse)Author
2025-09-04api: zones: update schema of endpointsStefan Hanreich
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>
2025-09-04api: vnets: update schema of endpointsStefan Hanreich
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>
2025-09-04api: controllers: update schema of endpointsStefan Hanreich
The possible properties returned by the controller endpoints were only partly documented. Add all missing properties and update descriptions for existing properties. Update the descriptions of the schemas in the plugin to provide more detailed information about the different configuration options. Move all duplicate properties between the GET endpoints into its own variable, so we can reuse them. 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>
2025-08-01api: sdn: ipams: status: ensure that guest ID is returned as an integerFiona Ebner
This is a breaking API change intended for PVE 9. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Link: https://lore.proxmox.com/20250801114455.85603-1-f.ebner@proxmox.com
2025-07-29api: add lock-token parameter to all api callsStefan Hanreich
The parameter is optional, so all existing create/update/delete invocations can work as before, only failing if the global lock is currently set. This ensures backwards-compatibility with the existing calls to the API in the frontend. If the lock is set, users will get an error message when trying to modify the configuration from the web UI. Co-authored-by: Gabriel Goller <g.goller@proxmox.com> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Link: https://lore.proxmox.com/20250729092933.90118-3-g.goller@proxmox.com
2025-07-17zone: vxlan: add fabrics integrationStefan Hanreich
Add a new property to the VXLAN zone, that can contain the name of a fabric. This automatically generates the peer-list from the fabric, instead of having to manually write a comma-separated IP list. This changes the peer field to optional from required. Either the peers or the fabric field needs to be set, and this is now validated in the update hook of the VXLAN zone. Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Link: https://lore.proxmox.com/20250716130837.585796-54-g.goller@proxmox.com
2025-07-17controller: evpn: add fabrics integrationStefan Hanreich
Provide a new option to the EVPN controller, fabric, that can be used to define a fabric as the underlay network for the EVPN controller. When applying the configuration, the EVPN controller then automatically generates the peer list and from the fabric configuration, rather than users having to specify all IP addresses manually. This also means that the peer list automatically updates when changing the fabric. An EVPN controller can only either define a peer list or a fabric, but not both. This requires the 'peers' property to now be optional, but the existence of either fabric / peers is now validated in the on_update_hook now instead. MTU is set automatically to 1450 (because of VXLAN overhead) when fabrics are used, unless otherwise specified in the EVPN zone configuration, since there is currently now way of reliably accessing the MTU of the interfaces of the fabric. This means users have to manually specify the MTU for the EVPN controller when using fabrics. This could be particularly relevant in the future, when Wireguard is introduced as a fabric, which incurs an overhead of 80 bytes, requiring users to manually set the MTU to 1370. Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Link: https://lore.proxmox.com/20250716130837.585796-53-g.goller@proxmox.com
2025-07-17api: fabrics: add fabricnode submoduleStefan Hanreich
Provides CRUD functionality for editing nodes inside a fabric, as well as an endpoint for listing all the nodes. The URL structure is modeled after the fact that a node can only be uniquely identified by its ID as well as the ID of the fabric that contains the node. Since fabrics can be used to edit the network configuration, we require addtional Sys.Modify permissions on the node itself, since that is the permission that is currently required by other endpoints that allow modifiying the network configuration. Co-authored-by: Gabriel Goller <g.goller@proxmox.com> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Link: https://lore.proxmox.com/20250716130837.585796-52-g.goller@proxmox.com
2025-07-17api: fabrics: add node submoduleStefan Hanreich
The GET endpoint lists all nodes from all fabrics - for listing the nodes of a specific fabric or editing nodes another submodule will be introduced below the node submodule in a future commit. Co-authored-by: Gabriel Goller <g.goller@proxmox.com> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Link: https://lore.proxmox.com/20250716130837.585796-51-g.goller@proxmox.com
2025-07-17api: fabrics: add fabric submoduleStefan Hanreich
This API module provides CRUD functionality for fabrics. The list endpoint works analogous to the existing SDN endpoints with their pending / running parameters. Co-authored-by: Gabriel Goller <g.goller@proxmox.com> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Link: https://lore.proxmox.com/20250716130837.585796-50-g.goller@proxmox.com
2025-07-17api: fabrics: add root-level moduleStefan Hanreich
There is one endpoint (/all) at the top-level that fetches both types of fabric entities (fabrics & nodes) and lists them separately. This is used for the main view, in order to avoid having to do two API calls. It works analogous to the existing root-level SDN API calls with the running / pending parameters. Also, since the interfaces key is used in the node sections, we need to add it to the function encoding the values so they are compared and returned from the API properly, when the pending parameter is set. Co-authored-by: Gabriel Goller <g.goller@proxmox.com> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Link: https://lore.proxmox.com/20250716130837.585796-49-g.goller@proxmox.com
2025-06-16auto-format code using perltidy with Proxmox style guideThomas Lamprecht
using the new top-level `make tidy` target, which calls perltidy via our wrapper to enforce the desired style as closely as possible. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-05-21api: controller: iterate over keys instead of whole mapGabriel Goller
Previously, we iterated over the entire hash (keys and values), which added unnecessary data to the configuration. This commit changes the loop to iterate only over the hash keys. Nothing should change as the garbled properties were removed down the line anyway. Signed-off-by: Gabriel Goller <g.goller@proxmox.com> Link: https://lore.proxmox.com/20250520150101.283640-1-g.goller@proxmox.com
2025-03-06tree-wide: remove unused Data::Dumper module inclusionHannes Duerr
Signed-off-by: Hannes Duerr <h.duerr@proxmox.com> [TL: drop all other unused Dumper use statements] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-19firewall: add endpoints for vnet-level firewallStefan Hanreich
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Reviewed-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-04-22api: sdn: fix missing types for 'pending' fields.Johannes Cornelis Draaijer via pve-devel
Signed-off-by: Johannes Cornelis Draaijer <jcdra1@gmail.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-08sdn: api: extract function that creates the sdn directory.Stefan Lendl
create_etc_interfaces_sdn_dir creates the /etc/pve/sdn directory. This allows mocking in tests to prevent system fs access in tests Signed-off-by: Stefan Lendl <s.lendl@proxmox.com> Reviewed-by: Max Carrara <m.carrara@proxmox.com> Tested-by: Max Carrara <m.carrara@proxmox.com> Reviewed-by: Stefan Hanreich <s.hanreich@proxmox.com> Tested-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-29api: vnet: fix warning in vnet APIStefan Hanreich
If zone is not set, we also check the pending changes for a zone key, since it is set as pending when the Vnet settings have not yet been applied. Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-22ipam: improve update / delete behaviorStefan Hanreich
Currently when updating or deleting a mapping in the IPAM we would delete all existing entries in the IPAM with that mac address. Now we only delete the specific entry we are updating / deleting. Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-22api: handle delete parameter when updating controllersWolfgang Bumiller
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-22api: handle delete parameter when updating dns entriesWolfgang Bumiller
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-22api: handle delete parameter when updating ipamsWolfgang Bumiller
this is for completeness, currently no plugin has optional properties... Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-22api: take partial configs for PUT /cluster/sdn/vnets/<n>/subnets/<i>Wolfgang Bumiller
Handle 'delete' parameter and partial updates. See 2 commits earlier for explanation. Cc: Alexandre Derumier <aderumier@odiso.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-22api: take partial configs for PUT /cluster/sdn/vnets/<id>Wolfgang Bumiller
Handle 'delete' parameter and partial updates. See previous commit for explanation. Cc: Alexandre Derumier <aderumier@odiso.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-22api: take partial configs for PUT /cluster/sdn/zones/<id>Wolfgang Bumiller
Zones previously expected a complete config, but the API schema also contains a 'delete' parameter via the SectionConfig's updateSchema() helper. This was not handled, and instead failed to validate as part of the config. The same is true for vnets and subnets, while ipams, dns and controller entries followed our usual update procedures (but also ignored the 'delete' parameter). Since all of our SectionConfig based API endpoints are supposed to take changes, rather than complete configs, this changes these endpoints to not replace the full configuration anymore. This is a major break for automation tools (the web UI already passed the full config each time). Cc: Alexandre Derumier <aderumier@odiso.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-11-20api: refactor URL structure for IpamStefan Hanreich
The initial URL structure was less than optimal due to Ipam as well as Ipams being endpoints in the API, which are too similar and might be confusing to users. Move the listing of PVE IPAM to /ipams/pve/status Move the create / update / delete endpoints to /vnets/{vnetid}/ips Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-18api2: ipam : remove add|del_mapping in mac/ip managementAlexandre Derumier
only register/del ip in ipam here. The dhcp mapping is done a vm start. Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2023-11-18api: zone: add dhcp optionStefan Hanreich
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-18api: subnet: add dhcp rangesStefan Hanreich
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-11-18api: add endpoints for managing PVE IPAMStefan Hanreich
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-06-12fix permissions && use new /sdn/zones/<zone>/<vnet> pathAlexandre Derumier
- use new /sdn/zones/zone/<vnet> path for vnet && subnets permissions - fix some permissions on /sdn/zones && /sdn Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2023-05-25separate packaging and source build systemThomas Lamprecht
like almost all of our repos do nowadays, modern git can detect such things on rebase so in development stuff should be hopefully not too much affected by this. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>