VM management API
Hypervisor connection virtManager/connection.py
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-added
and
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
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
machine state.
VNC console vncClient/*
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.
VNC widget vncClient/vnc.py
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
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
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.
Open connection virtManager/connect.py
The open connection window is used to collect information required to connect to a hypervisor.
Host summary virtManager/manager.py
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 virtManager/details.py
This is an implementation of the guest performance and guest configuration mockups.
Guest console virtManager/console.py
This is an implementation of the guest console mockup.
About dialog virtManager/about.py
The standard application about
dialog window.
Preferences dialog virtManager/preferences.py
A simple dialog for controlling a couple of GConf preferences, although these will likely be changed in near future.
Miscellaneous modules
UI engine virtManager/engine.py
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.
Remote control virtManager/remote.py
The remote control module provides the DBus service allowing various UI functions to be controlled remotely.