console: Move embeddable_graphics() to console.py

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Weishi Li <liweishi@kylinos.cn>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Feng Jiang 2023-01-30 15:23:37 +08:00 committed by Cole Robinson
parent 0d3b7f673f
commit 9c242ef79c
2 changed files with 5 additions and 5 deletions

View File

@ -208,10 +208,6 @@ class vmmConfig(object):
def get_ui_dir(self):
return self.ui_dir
def embeddable_graphics(self):
ret = ["vnc", "spice"]
return ret
def inspection_supported(self):
if not vmmInspection.libguestfs_installed():
return False # pragma: no cover

View File

@ -293,6 +293,10 @@ class _ConsoleMenu:
return True
return False
def embeddable_graphics(self):
ret = ["vnc", "spice"]
return ret
class vmmConsolePages(vmmGObjectUI):
"""
@ -700,7 +704,7 @@ class vmmConsolePages(vmmGObjectUI):
_("Graphical console not configured for guest"))
return
if ginfo.gtype not in self.config.embeddable_graphics():
if ginfo.gtype not in self._consolemenu.embeddable_graphics():
log.debug("Don't know how to show graphics type '%s' "
"disabling console page", ginfo.gtype)