On 4/17/24 13:32, Fiona Ebner wrote:
Am 16.04.24 um 15:18 schrieb Dominik Csapak:
use the standards info about the ostypes to map to our own
(see comment for link to the relevant part of the dmtf schema)

every type that is not listed we map to 'other', so no need to have it
in a list.

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>

Reviewed-by: Fiona Ebner <f.eb...@proxmox.com>

diff --git a/src/test/run_ovf_tests.pl b/src/test/run_ovf_tests.pl
index 1ef78cc..e949c15 100755
--- a/src/test/run_ovf_tests.pl
+++ b/src/test/run_ovf_tests.pl
@@ -59,13 +59,16 @@ print "\ntesting vm.conf extraction\n";
  is($win2008->{qm}->{name}, 'Win2008-R2x64', 'win2008 VM name is correct');
  is($win2008->{qm}->{memory}, '2048', 'win2008 VM memory is correct');
  is($win2008->{qm}->{cores}, '1', 'win2008 VM cores are correct');
+is($win2008->{qm}->{ostype}, 'win7', 'win2008 VM ostype is correcty');
is($win10->{qm}->{name}, 'Win10-Liz', 'win10 VM name is correct');
  is($win10->{qm}->{memory}, '6144', 'win10 VM memory is correct');
  is($win10->{qm}->{cores}, '4', 'win10 VM cores are correct');
+is($win10->{qm}->{ostype}, 'other', 'win10 VM ostype is correct');

Yes, 'other', because the ovf config has id=1, but is there a special
reason why? Maybe worth a comment here and below to avoid potential
confusion.

my guess is that the ovf spec did not include windows 10 yet (or something
similar like the esxi exporter not knowing the newest spec)

and i did not want to change the testcase just for this


is($win10noNs->{qm}->{name}, 'Win10-Liz', 'win10 VM (no default rasd NS) name is correct');
  is($win10noNs->{qm}->{memory}, '6144', 'win10 VM (no default rasd NS) memory 
is correct');
  is($win10noNs->{qm}->{cores}, '4', 'win10 VM (no default rasd NS) cores are 
correct');
+is($win10noNs->{qm}->{ostype}, 'other', 'win10 VM (no default rasd NS) ostype 
is correct');
done_testing();



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to