summaryrefslogtreecommitdiff
path: root/src/PVE/API2/Network
AgeCommit message (Collapse)Author
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-06-06network reload: fix UPID parsingAlexandre Derumier
When warning or error from ifreload are logged they are received in 1 line in result of pvesh. So, the UPID might not always start at the beginning, which was assumed by the old code, failing parsing it, throwing a warning like: > Use of uninitialized value $upid in pattern match (m//) at /usr/share/perl5/PVE/Tools.pm line 1106. > Use of uninitialized value $upid in concatenation (.) or string at /usr/share/perl5/PVE/Tools.pm line 1120. Drop the start anchor of the regex. Signed-off-by: Alexandre Derumier <aderumier@odiso.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.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>