From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <m.carrara@proxmox.com>
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 5FF2EB9FA9
 for <pve-devel@lists.proxmox.com>; Mon, 18 Mar 2024 13:41:24 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 3F3C310F77
 for <pve-devel@lists.proxmox.com>; Mon, 18 Mar 2024 13:41:24 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (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 <pve-devel@lists.proxmox.com>; Mon, 18 Mar 2024 13:41:22 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 78E7D4663A
 for <pve-devel@lists.proxmox.com>; Mon, 18 Mar 2024 13:41:22 +0100 (CET)
Content-Type: text/plain; charset=UTF-8
Date: Mon, 18 Mar 2024 13:41:21 +0100
Message-Id: <CZWVTKGMKX1W.348ZSCFUP2Y5@proxmox.com>
From: "Max Carrara" <m.carrara@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0
X-Mailer: aerc 0.17.0-72-g6a84f1331f1c
References: <20240103153753.407079-3-s.lendl@proxmox.com>
In-Reply-To: <20240103153753.407079-3-s.lendl@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.022 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
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [pve-devel] [PATCH pve-network 0/8] SDN Vnet blackbox testing
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Mon, 18 Mar 2024 12:41:24 -0000

On Wed Jan 3, 2024 at 4:37 PM CET, Stefan Lendl wrote:
> Add several tests for Vnets. State setup as well as testing results is
> done only via the API to test on the API boundaries not not against the
> internal state. Internal state is mocked to avoid requiring access to
> system files or pmxcfs.
>
> Tests validate the events of a nic joining a Vnet or a nic staring on a v=
net
> with different subnet configurations.
> Further descriptions in the commit.

I really like this! I'm always a fan of more testing being done.

There are some things I mentioned in patch 8, but I overall like this
series a lot.

>
> Stefan Lendl (8):
>   refactor(sdn): extract cfs_read_file(datacenter.cfg)
>   refactor(dnsmasq): extract systemctl_service function
>   refactor(dnsmasq): extract ethers_file function
>   refactor(dnsmasq): extract update_lease function
>   refactor(controllers): extract read_etc_network_interfaces
>   refactor(evpn): extract read_local_frr_config
>   refactor(api): extract create_etc_interfaces_sdn_dir

The naming here could be a little different though; I think you can just
skip the `refactor()` part, we don't really use that anywhere AFAIK.

>   test(vnets): add test_vnets_blackbox

Also, for this message you could just use "test: vnets: ..." instead.

See also: https://pve.proxmox.com/wiki/Developer_Documentation#Commits_and_=
Commit_Messages

>
>  src/PVE/API2/Network/SDN/Zones.pm             |   6 +-
>  src/PVE/Network/SDN/Controllers.pm            |  16 +-
>  src/PVE/Network/SDN/Controllers/EvpnPlugin.pm |  10 +-
>  src/PVE/Network/SDN/Dhcp/Dnsmasq.pm           |  47 +-
>  src/PVE/Network/SDN/Zones/EvpnPlugin.pm       |   3 +-
>  src/PVE/Network/SDN/Zones/Plugin.pm           |   5 +
>  src/PVE/Network/SDN/Zones/SimplePlugin.pm     |   2 +-
>  src/test/Makefile                             |   5 +-
>  src/test/run_test_vnets_blackbox.pl           | 797 ++++++++++++++++++
>  9 files changed, 863 insertions(+), 28 deletions(-)
>  create mode 100755 src/test/run_test_vnets_blackbox.pl