ovf: implement parsing the ostype
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@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
cbf788754d
commit
61e1576c5c
@ -59,13 +59,18 @@ 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');
|
||||
# older esxi/ovf standard used 'other' for windows10
|
||||
is($win10->{qm}->{ostype}, 'other', 'win10 VM ostype is correct');
|
||||
|
||||
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');
|
||||
# older esxi/ovf standard used 'other' for windows10
|
||||
is($win10noNs->{qm}->{ostype}, 'other', 'win10 VM (no default rasd NS) ostype is correct');
|
||||
|
||||
done_testing();
|
||||
|
||||
Reference in New Issue
Block a user