cli: --sysinfo: Set type=smbios by default

Libvirt requires it, so don't force users to manually specify it if
they pass any other --sysinfo params.
This commit is contained in:
Cole Robinson 2017-03-05 21:18:26 -05:00
parent a2df53db21
commit d056508d71
1 changed files with 4 additions and 0 deletions

View File

@ -1753,6 +1753,10 @@ class ParserSYSInfo(VirtCLIParser):
def _parse(self, inst):
if self.optstr == "host" or self.optstr == "emulate":
self.optdict['type'] = self.optstr
elif self.optstr:
# If any string specified, default to type=smbios otherwise
# libvirt errors. User args can still override this though
self.optdict['type'] = 'smbios'
return VirtCLIParser._parse(self, inst)