From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id DC71D9AD90 for ; Sat, 18 Nov 2023 15:13:57 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9A5866E47 for ; Sat, 18 Nov 2023 15:13:27 +0100 (CET) Received: from bastionodiso.odiso.net (bastionodiso.odiso.net [185.151.191.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Sat, 18 Nov 2023 15:13:23 +0100 (CET) Received: from kvmformation3.odiso.net (formationkvm3.odiso.net [10.3.94.12]) by bastionodiso.odiso.net (Postfix) with ESMTP id DACB580FF; Sat, 18 Nov 2023 15:13:15 +0100 (CET) Received: by kvmformation3.odiso.net (Postfix, from userid 0) id C468C17FF69; Sat, 18 Nov 2023 15:13:15 +0100 (CET) From: Alexandre Derumier To: pve-devel@lists.proxmox.com Date: Sat, 18 Nov 2023 15:13:09 +0100 Message-Id: <20231118141314.2785997-3-aderumier@odiso.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231118141314.2785997-1-aderumier@odiso.com> References: <20231118141314.2785997-1-aderumier@odiso.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy HEADER_FROM_DIFFERENT_DOMAINS 0.25 From and EnvelopeFrom 2nd level mail domains are different KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods SPF_NONE 0.001 SPF: sender does not publish an SPF Record T_SCC_BODY_TEXT_LINE -0.01 - T_SPF_HELO_TEMPERROR 0.01 SPF: test of HELO record failed (temperror) URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [ipam.pm] Subject: [pve-devel] [PATCH pve-network 2/7] api2: ipam : remove add|del_mapping in mac/ip management X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2023 14:13:57 -0000 only register/del ip in ipam here. The dhcp mapping is done a vm start. Signed-off-by: Alexandre Derumier --- src/PVE/API2/Network/SDN/Ipam.pm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/PVE/API2/Network/SDN/Ipam.pm b/src/PVE/API2/Network/SDN/Ipam.pm index e71ca7d..722baa4 100644 --- a/src/PVE/API2/Network/SDN/Ipam.pm +++ b/src/PVE/API2/Network/SDN/Ipam.pm @@ -114,14 +114,11 @@ __PACKAGE__->register_method ({ my $vnet = extract_param($param, 'vnet'); my $mac = extract_param($param, 'mac'); - PVE::Network::SDN::Dhcp::remove_mapping($vnet, $mac); - eval { PVE::Network::SDN::Vnets::del_ips_from_mac($vnet, $mac); }; my $error = $@; - PVE::Network::SDN::Vnets::add_dhcp_mapping($vnet, $mac) if $error; die "$error\n" if $error; return undef; @@ -159,7 +156,6 @@ __PACKAGE__->register_method ({ my $ip = extract_param($param, 'ip'); PVE::Network::SDN::Vnets::add_ip($vnet, $ip, '', $mac, undef); - PVE::Network::SDN::Vnets::add_dhcp_mapping($vnet, $mac); return undef; }, @@ -198,7 +194,6 @@ __PACKAGE__->register_method ({ my $vmid = extract_param($param, 'vmid'); my $ip = extract_param($param, 'ip'); - PVE::Network::SDN::Dhcp::remove_mapping($vnet, $mac); my ($old_ip4, $old_ip6) = PVE::Network::SDN::Vnets::del_ips_from_mac($vnet, $mac, ''); eval { @@ -211,8 +206,6 @@ __PACKAGE__->register_method ({ PVE::Network::SDN::Vnets::add_ip($vnet, $old_ip6, '', $mac, $vmid) if $old_ip6; } - PVE::Network::SDN::Vnets::add_dhcp_mapping($vnet, $mac); - die "$error\n" if $error; return undef; }, -- 2.39.2