From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id B6F041FF37F for ; Thu, 18 Apr 2024 10:23:18 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 14F1216CB9; Thu, 18 Apr 2024 10:23:18 +0200 (CEST) Message-ID: <0eb745f0-7508-4404-ba68-4df100fd0793@proxmox.com> Date: Thu, 18 Apr 2024 10:22:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Dominik Csapak References: <20240416131909.2867605-1-d.csapak@proxmox.com> <20240416131909.2867605-8-d.csapak@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20240416131909.2867605-8-d.csapak@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.120 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 PROLO_LEO1 0.1 Meta Catches all Leo drug variations so far SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH storage 7/9] ovf: implement parsing nics 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: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Am 16.04.24 um 15:19 schrieb Dominik Csapak: > @@ -355,9 +361,21 @@ ovf:Item[rasd:InstanceID='%s']/rasd:ResourceType", $controller_id); > > $qm->{boot} = "order=" . join(';', @$boot); > > + my $nic_id = dtmf_name_to_id('Ethernet Adapter'); > + my $xpath_find_nics = "/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:ResourceType=${nic_id}]"; > + my @nic_items = $xpc->findnodes($xpath_find_nics); > + > + my $net = {}; > + > + my $net_count = 0; > + foreach my $item_node (@nic_items) { > + my $model = $xpc->findvalue('rasd:ResourceSubType', $item_node); > + $model = lc($model); > + $model = 'vmxnet3' if ! grep $model, @$allowed_nic_models; Noticed another issue while testing. This doesn't work and should be > $model = 'vmxnet3' if !grep { $_ eq $model } @$allowed_nic_models; > + $net->{"net${net_count}"} = { model => $model }; > } > > - return {qm => $qm, disks => \@disks}; > + return {qm => $qm, disks => \@disks, net => $net}; > } > > 1; _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel