[pve-devel] [pve-network 3/4] subnets: call add_range_next_freeip only if dhcp is defined

2024-01-04 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Subnets.pm | 13 + src/PVE/Network/SDN/Vnets.pm | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/PVE/Network/SDN/Subnets.pm b/src/PVE/Network/SDN/Subnets.pm index 3b08dcd..4767850 100644 --- a/sr

[pve-devel] [pve-network 1/4] vnets: use ipam without dhcp

2024-01-04 Thread Alexandre Derumier
User should be able to use ipam without need to use dhcp. (with static configuration for example). Could be use to firewall rules or other rules based on ipam Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Vnets.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[pve-devel] [pve-network 2/4] vnets: add_next_free_cidr : skip if ipamreservation is not defined

2024-01-04 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Vnets.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Vnets.pm b/src/PVE/Network/SDN/Vnets.pm index 060cb3c..0268684 100644 --- a/src/PVE/Network/SDN/Vnets.pm +++ b/src/PVE/Network/SDN/Vnets.pm @@

[pve-devel] [pve-manager 1/1] sdn: zones: add ipam reservation option.

2024-01-04 Thread Alexandre Derumier
Manual: user need to manually do reservation static: ip is auto assign at vm create && remove at vm delete dynamic: ip is auto assign at vm start && remove at vm stop (not yet implemented) Signed-off-by: Alexandre Derumier --- www/manager6/sdn/zones/Base.js | 12 1 file changed, 12

[pve-devel] [pve-network 4/4] api2: ipam status: display ipam zones without dhcp flag

2024-01-04 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/API2/Network/SDN/Ipams.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/API2/Network/SDN/Ipams.pm b/src/PVE/API2/Network/SDN/Ipams.pm index 27ead02..a70a2f3 100644 --- a/src/PVE/API2/Network/SDN/Ipams.pm +++ b/src/PVE/AP

[pve-devel] [qemu-server 1/1] add_next_free_cidr: remove old dhcprange param

2024-01-04 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 600d0a8..a00e09e 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5279,7 +5279,7 @@ sub vmconfig_apply_pending

[pve-devel] [pve-network/qemu-server/pve-container/pve-manager] RFC: use ipam without dhcp

2024-01-04 Thread Alexandre Derumier
This patch serie add support to use ipam without dhcp. Users could want to use ipam to manage cloudinit for example, or firewall rules,.. with static assignement of ips in vm configuration a new "ipamreservation" option is defined on zone - Manual (undefined): user need to do manually the ips r

[pve-devel] [pve-network 2/5] ipams : add_next_freeip : return ip not cidr

2024-01-04 Thread Alexandre Derumier
we want same result than add_next_free_range Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/NetboxPlugin.pm | 13 - src/PVE/Network/SDN/Ipams/PVEPlugin.pm | 2 +- src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 2 +- 3 files changed, 6 insertions(+), 11 deletions

[pve-devel] [pve-network 5/5] ipam: phpipam: add_range_next_freeip

2024-01-04 Thread Alexandre Derumier
Currently is not possible in phpipam to search in specific range, fallback to full subnet search Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 12 1 file changed, 12 insertions(+) diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PV

[pve-devel] [pve-network 4/5] ipam: phpipam: fix get_ip_from_mac

2024-01-04 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm index f3f22b5..bb9f322 100644 --- a/src/PVE/Network/

[pve-devel] [pve-network 3/5] ipam: phpipam: fix subnet create

2024-01-04 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm index 7b3168d..f3f22b5 100644 --- a/src/PVE/Network/SDN/I

[pve-devel] [pve-network 0/5] external ipams fixes

2024-01-04 Thread Alexandre Derumier
This patch serie is fixing multiple bug in phpipam, and dd_next_freeip in differents ipams Alexandre Derumier (5): sdn: add proxy support for api calls ipams : add_next_freeip : return ip not cidr ipam: phpipam: fix subnet create ipam: phpipam: fix get_ip_from_mac ipam: phpipam: add_rang

[pve-devel] [pve-network 1/5] sdn: add proxy support for api calls

2024-01-04 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN.pm | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm index 3af09b5..b8f27d9 100644 --- a/src/PVE/Network/SDN.pm +++ b/src/PVE/Network/SDN.pm @@ -264,10 +264,9 @@ sub

Re: [pve-devel] [PATCH widget-toolkit] fix #5074: notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

2024-01-04 Thread Lukas Wagner
On 1/4/24 13:38, Fiona Ebner wrote: by doing a cbind of isCreate to the top-level widget so that cbind in the nested widgets for deleteEmpty works. In the GUI, when a sendmail/smtp target is edited and either 'Additional Recipients' or 'Recipients' is completely removed (only possible if the

Re: [pve-devel] [PATCH widget-toolkit v2] notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

2024-01-04 Thread Lukas Wagner
On 1/4/24 13:41, Fiona Ebner wrote: Worked for me too :) However, I noticed that there were already cbinds for deleteEmpty for the mailto/mailto-user fields and wondered why that didn't have an effect. Turns out, it's because they're nested in another widget and that requires an additional c

Re: [pve-devel] [PATCH widget-toolkit v2] notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

2024-01-04 Thread Fiona Ebner
Am 12.12.23 um 09:50 schrieb Lukas Wagner: > In the GUI, when a sendmail/smtp target is edited and either > 'Additional Recipients' or 'Recipients' is completely removed (only > possible if the other field contains a value), parameter deletion did > not work properly. After applying the changes, th

[pve-devel] [PATCH widget-toolkit] fix #5074: notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

2024-01-04 Thread Fiona Ebner
by doing a cbind of isCreate to the top-level widget so that cbind in the nested widgets for deleteEmpty works. In the GUI, when a sendmail/smtp target is edited and either 'Additional Recipients' or 'Recipients' is completely removed (only possible if the other field contains a value), parameter