[et-mgmt-tools] [PATCH] check the VNC port number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

When I execute "virt-install --vnc --vncport=5900", domain starts 
with 5900 + domain ID.
I think that it is necessary to check, because we cannot appoint 
the VNC port number equal to or less than 5900.

The attached patch adds to check the VNC port number.

Signed-off-by: Nobuhiro Itou <fj0873gn@xxxxxxxxxxxxxxxxx>

Thanks,
Nobuhiro Itou.

Index: virtinst/Guest.py (python-virtinst-0.100.0)
===================================================================
--- Guest.py	2007-02-23 02:28:02.000000000 +0900
+++ Guest.py.vncport_check	2007-02-23 02:24:07.000000000 +0900
@@ -157,7 +157,9 @@ class VirtualGraphics:
 class VNCVirtualGraphics(VirtualGraphics):
     def __init__(self, *args):
         self.name = "vnc"
-        if len(args) >= 1 and args[0]:
+        if len(args) >= 1 and not args[0] is None:
+            if args[0] < 5901:
+                raise ValueError, "Invalid value for vncport, vncport must be no less than 5901"
             self.port = args[0]
         else:
             self.port = -1


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux