cli: Add --graphics defaultMode

This commit is contained in:
Cole Robinson 2014-02-27 17:43:59 -05:00
parent f67df11701
commit b4e4f68376
4 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,7 @@
<graphics type="vnc" autoport="no">
<listen type="network" network="mynewnet"/>
</graphics>
<graphics type="spice" passwd="newpass" port="6000" tlsPort="6001" listen="1.2.3.4" passwdValidTo="2011-01-07T19:08:00" connected="disconnect">
<graphics type="spice" passwd="newpass" port="6000" tlsPort="6001" listen="1.2.3.4" passwdValidTo="2011-01-07T19:08:00" connected="disconnect" defaultMode="secure">
<listen type="address" address="1.2.3.4"/>
<channel name="inputs" mode="secure"/>
<channel name="main" mode="any"/>

View File

@ -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)

View File

@ -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":

View File

@ -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):