[pve-devel] [PATCH storage 4/9] ovf: implement parsing the ostype
Fiona Ebner
f.ebner at proxmox.com
Wed Apr 17 13:32:05 CEST 2024
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.csapak at proxmox.com>
>
Reviewed-by: Fiona Ebner <f.ebner at 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.
>
> 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();
More information about the pve-devel
mailing list