VM management API
virtManager/connection.py is a thin wrapper around the
libvirt Python module. The primary purpose of the wrapper
is to isolate the code which periodically polls libvirt to
identify VM lifecycle changes. Thus the rest of the application
code can simply hook onto signals such as
vm-removed. If libvirt later obtains ability to have asychronous
notification of state changes, only this module need be changed.
Guest domain handle
virtManager/domain.py is a thin wrapper around the
libvirt.domain Python module. The primary purpose of the
wrapper is to provide a means to track resource utilization
over time, by periodically sampling & recording the virtual
The code for the VNC console widget is pure Python, which leverages the RFB protocol handler code from the pyswf2vnc application for most of the work.
vncClient/vnc.py contains the RFB extensions & GTK widget for
rendering the VNC console and sending mouse/keyboard events back
to the server. The RFB code integrates the VNC socket with the
GTK main event loop for non-blocking IO. It also provides for taking
a screenshot of the console.
RFB protocol handler
vncClient/rfb.py contains the pyswf2vnc code for handling the
RGB protocol. This is unchanged from the pyswf2vnc codebase.
RFB data manipulation routines
vncClient/image.py contains functions used for efficiently
decoding the framebuffer updates coming off the wire. It can
use either Python Imaging, or Python Game libraries, however,
the former is preferred due to smaller dependancy chain.
GTK windows / dialogs
There is a 1-to-1 mapping between Python modules and GTK windows defined in the Glade data file.
The open connection window is used to collect information required to connect to a hypervisor.
The host summary window displays a summary of all virtual machines known to a hypervisor / host. This is an implementation of the host summary mockup.
Guest performance / configuration
This is an implementation of the guest console mockup.
The standard application
about dialog window.
A simple dialog for controlling a couple of GConf preferences, although these will likely be changed in near future.
None of the GTK window modules know anything about each other, so
when a button
"show console" is pressed, they merely emit a
signal indicating a particular action is requested. The UI engine
class registers a bunch of signal handlers to integrate the actions
from the various windows.
The remote control module provides the DBus service allowing various UI functions to be controlled remotely.