From b4e4f683761c55259bd5ed4b3c5549568d6147bb Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 27 Feb 2014 17:43:59 -0500 Subject: [PATCH] cli: Add --graphics defaultMode --- tests/xmlparse-xml/change-graphics-out.xml | 2 +- tests/xmlparse.py | 1 + virtinst/cli.py | 1 + virtinst/devicegraphics.py | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/xmlparse-xml/change-graphics-out.xml b/tests/xmlparse-xml/change-graphics-out.xml index 5c6b4ea5..67ad7f72 100644 --- a/tests/xmlparse-xml/change-graphics-out.xml +++ b/tests/xmlparse-xml/change-graphics-out.xml @@ -31,7 +31,7 @@ - + diff --git a/tests/xmlparse.py b/tests/xmlparse.py index a2448d28..397da456 100644 --- a/tests/xmlparse.py +++ b/tests/xmlparse.py @@ -559,6 +559,7 @@ class XMLParseTest(unittest.TestCase): check("channel_cursor_mode", "any", "any") check("channel_playback_mode", "any", "insecure") check("passwdValidTo", "2010-04-09T15:51:00", "2011-01-07T19:08:00") + check("defaultMode", None, "secure") self._alter_compare(guest.get_xml_config(), outfile) diff --git a/virtinst/cli.py b/virtinst/cli.py index 826663a3..41d6a8c1 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1810,6 +1810,7 @@ class ParserGraphics(VirtCLIParser): self.set_param("passwd", "password") self.set_param("passwdValidTo", "passwordvalidto") self.set_param("connected", "connected") + self.set_param("defaultMode", "defaultMode") def _parse(self, opts, inst): if opts.fullopts == "none": diff --git a/virtinst/devicegraphics.py b/virtinst/devicegraphics.py index 37f268af..a87b71c8 100644 --- a/virtinst/devicegraphics.py +++ b/virtinst/devicegraphics.py @@ -204,6 +204,7 @@ class VirtualGraphics(VirtualDevice): passwdValidTo = XMLProperty("./@passwdValidTo") socket = XMLProperty("./@socket") connected = XMLProperty("./@connected") + defaultMode = XMLProperty("./@defaultMode") listens = XMLChildProperty(_GraphicsListen) def remove_listen(self, obj):