cli: Add --graphics connected option (bz 730923)

This commit is contained in:
Cole Robinson 2014-01-29 09:52:49 -05:00
parent 64b2d0c6b7
commit 6042d762b5
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">
<graphics type="spice" passwd="newpass" port="6000" tlsPort="6001" listen="1.2.3.4" passwdValidTo="2011-01-07T19:08:00" connected="disconnect">
<listen type="address" address="1.2.3.4"/>
<channel name="inputs" mode="secure"/>
<channel name="main" mode="any"/>

View File

@ -522,6 +522,7 @@ class XMLParseTest(unittest.TestCase):
check = self._make_checker(dev6)
check("type", "spice")
check("passwd", "foobar", "newpass")
check("connected", None, "disconnect")
check("port", 100, 6000)
check("tlsPort", 101, 6001)
check("listen", "0.0.0.0", "1.2.3.4")

View File

@ -1843,6 +1843,7 @@ class ParserGraphics(VirtCLIParser):
self.set_param(None, "keymap", setter_cb=set_keymap_cb)
self.set_param("passwd", "password")
self.set_param("passwdValidTo", "passwordvalidto")
self.set_param("connected", "connected")
########################

View File

@ -203,6 +203,7 @@ class VirtualGraphics(VirtualDevice):
passwd = XMLProperty("./@passwd")
passwdValidTo = XMLProperty("./@passwdValidTo")
socket = XMLProperty("./@socket")
connected = XMLProperty("./@connected")
listens = XMLChildProperty(_GraphicsListen)
def remove_listen(self, obj):