cli: --sysinfo: Add chasis suboptions

Add the following --sysinfo suboptions:

- chassis.manufacturer
- chassis.version
- chassis.serial
- chassis.asset
- chassis.sku
This commit is contained in:
Cole Robinson 2019-05-14 14:05:08 -04:00
parent 773625bfab
commit d16425aa8f
4 changed files with 30 additions and 1 deletions

View File

@ -63,6 +63,13 @@
<entry name="asset">Tag</entry>
<entry name="location">Chassis</entry>
</baseBoard>
<chassis>
<entry name="manufacturer">Chassis Corp.</entry>
<entry name="version">4.0</entry>
<entry name="serial">1234chassis</entry>
<entry name="asset">chasset</entry>
<entry name="sku">chassku</entry>
</chassis>
</sysinfo>
<bootloader>/new/bootld</bootloader>
<os>
@ -251,6 +258,13 @@
<entry name="asset">Tag</entry>
<entry name="location">Chassis</entry>
</baseBoard>
<chassis>
<entry name="manufacturer">Chassis Corp.</entry>
<entry name="version">4.0</entry>
<entry name="serial">1234chassis</entry>
<entry name="asset">chasset</entry>
<entry name="sku">chassku</entry>
</chassis>
</sysinfo>
<bootloader>/new/bootld</bootloader>
<os>

View File

@ -461,6 +461,7 @@ cache.mode=emulate,cache.level=3
--sysinfo type=smbios,bios_vendor="Acme LLC",bios_version=1.2.3,bios_date=01/01/1970,bios_release=10.22
--sysinfo type=smbios,system_manufacturer="Acme Inc.",system_product=Computer,system_version=3.2.1,system_serial=123456789,system_uuid=00000000-1111-2222-3333-444444444444,system_sku=abc-123,system_family=Server
--sysinfo type=smbios,baseBoard_manufacturer="Acme Corp.",baseBoard_product=Motherboard,baseBoard_version=A01,baseBoard_serial=1234-5678,baseBoard_asset=Tag,baseBoard_location=Chassis
--sysinfo type=smbios,chassis.manufacturer="Chassis Corp.",chassis.serial=1234chassis,chassis.asset=chasset,chassis.sku=chassku,chassis.version=4.0
--pm suspend_to_mem=yes,suspend_to_disk=no
--resource partition=/virtualmachines/production
--events on_poweroff=destroy,on_reboot=restart,on_crash=preserve,on_lockfailure=ignore

View File

@ -2411,6 +2411,12 @@ class ParserSysinfo(VirtCLIParser):
cls.add_arg("baseBoard.asset", "baseBoard_asset")
cls.add_arg("baseBoard.location", "baseBoard_location")
cls.add_arg("chassis.manufacturer", "chassis_manufacturer")
cls.add_arg("chassis.version", "chassis_version")
cls.add_arg("chassis.serial", "chassis_serial")
cls.add_arg("chassis.asset", "chassis_asset")
cls.add_arg("chassis.sku", "chassis_sku")
##############################
# --qemu-commandline parsing #

View File

@ -19,7 +19,9 @@ class DomainSysinfo(XMLBuilder):
"system_manufacturer", "system_product", "system_version",
"system_serial", "system_uuid", "system_sku", "system_family",
"baseBoard_manufacturer", "baseBoard_product", "baseBoard_version",
"baseBoard_serial", "baseBoard_asset", "baseBoard_location"]
"baseBoard_serial", "baseBoard_asset", "baseBoard_location",
"chassis_manufacturer", "chassis_version",
"chassis_serial", "chassis_asset", "chassis_sku"]
type = XMLProperty("./@type")
@ -43,3 +45,9 @@ class DomainSysinfo(XMLBuilder):
baseBoard_serial = XMLProperty("./baseBoard/entry[@name='serial']")
baseBoard_asset = XMLProperty("./baseBoard/entry[@name='asset']")
baseBoard_location = XMLProperty("./baseBoard/entry[@name='location']")
chassis_manufacturer = XMLProperty("./chassis/entry[@name='manufacturer']")
chassis_version = XMLProperty("./chassis/entry[@name='version']")
chassis_serial = XMLProperty("./chassis/entry[@name='serial']")
chassis_asset = XMLProperty("./chassis/entry[@name='asset']")
chassis_sku = XMLProperty("./chassis/entry[@name='sku']")