cli: Fix introspection for non-virt options

Like --location and --check
This commit is contained in:
Cole Robinson 2019-05-10 17:22:23 -04:00
parent 2a30a5f0bf
commit 4142b73c71
2 changed files with 4 additions and 2 deletions

View File

@ -717,7 +717,7 @@ c.add_invalid("--paravirt --import --print-xml 2") # PV Import install, no seco
c = vinst.add_category("misc-install", "--nographics --noautoconsole")
c.add_compare("", "noargs-fail", auto_printarg=False) # No arguments
c.add_valid("--panic help --disk=?") # Make sure introspection doesn't blow up
c.add_valid("--panic help --disk=? --check=help", grep="path_in_use") # Make sure introspection doesn't blow up
c.add_valid("--test-stub-command") # --test-stub-command
c.add_valid("--nodisks --pxe", grep="VM performance may suffer") # os variant warning
c.add_invalid("--hvm --nodisks --pxe foobar") # Positional arguments error

View File

@ -3189,7 +3189,9 @@ def check_option_introspection(options):
Check if the user requested option introspection with ex: '--disk=?'
"""
ret = False
for parserclass in VIRT_PARSERS:
for parserclass in _get_completer_parsers():
if not hasattr(options, parserclass.cli_arg_name):
continue
optlist = util.listify(getattr(options, parserclass.cli_arg_name))
if not optlist:
continue