python/qemu: Add args property to the QEMUMachine class

This added the args property to QEMUMachine so that users of the class
can access and handle the list of arguments to be given to the QEMU
binary.

Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20210430133414.39905-6-wainersm@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
This commit is contained in:
Wainer dos Santos Moschetta 2021-04-30 10:34:12 -03:00 committed by Cleber Rosa
parent 2d14975963
commit 555fe0c2a8
1 changed files with 5 additions and 0 deletions

View File

@ -316,6 +316,11 @@ class QEMUMachine:
args.extend(['-device', device])
return args
@property
def args(self) -> List[str]:
"""Returns the list of arguments given to the QEMU binary."""
return self._args
def _pre_launch(self) -> None:
if self._console_set:
self._remove_files.append(self._console_address)