[Kimchi-devel] [PATCH v3] [Kimchi 0/9] Virt-Viewer launcher backend

dhbarboza82 at gmail.com dhbarboza82 at gmail.com
Fri Jul 8 20:53:27 UTC 2016


From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>

v3:
- fixed 'virviewerfiles' dir to 'virtviewerfiles' in Makefile.am

v2:
- fixed typo and capital letters in i18n.py
- fixed 'double dict' error in virtviewer module
- added tests with virtual machine containing utf-8 characters

This patch set adds the Virt-Viewer launcher backend to
Kimchi.

This feature consists of a new resource located in:

 **URI:** /plugins/kimchi/vms/*:name*/snapshots/current

that retrieves a download link to a .vv file to be
used by a Virt-Viewer compatible desktop app  to connect
to the remote virtual machine.

This backend takes cares of handling firewall rules to
allow the connection to be succesfull. Note that no firewall
port will be opened unless a download is made - if the user
decides to use noVNC or spice-html5 instead Kimchi will
not touch the host firewall.


Example:

[danielhb at arthas kimchi]$ curl -u root -H "Content-Type: application/json" -H "Accept: application/json" -X GET "http://localhost:8010/plugins/kimchi/vms/OpenSUSE-Leap-42.1/virtviewerfile"
Enter host password for user 'root':
[virt-viewer]
type=vnc
host=localhost
port=5904


After this call, port 5904 was opened in the host to allow for a
virt-viewer connection.

When shutting down the virtual machine or WoK, a cleanup is made
to close any ports left opened. 


Daniel Henrique Barboza (9):
  Virt-Viewer launcher: docs and i18n changes
  Virt-Viewer launcher: Makefile and config changes
  Virt-Viewer launcher: control/vms.py and model/vms.py changes
  Virt-Viewer launcher: virtviewerfile module
  Virt-Viewer launcher: test changes
  Virt-Viewer launcher: adding FirewallManager class
  Virt-Viewer launcher: test changes for firewall manager
  Virt-Viewer launcher: libvirt events to control firewall
  Virt-Viewer launcher: changes after adding libvirt event listening

 Makefile.am             |   2 +
 config.py.in            |  10 ++-
 control/vms.py          |  12 +++
 docs/API.md             |   6 ++
 i18n.py                 |   2 +
 model/virtviewerfile.py | 234 ++++++++++++++++++++++++++++++++++++++++++++++++
 model/vms.py            |   9 +-
 tests/test_config.py.in |   6 ++
 tests/test_model.py     | 228 +++++++++++++++++++++++++++++++++++++++++++++-
 9 files changed, 503 insertions(+), 6 deletions(-)
 create mode 100644 model/virtviewerfile.py

-- 
2.5.5




More information about the Kimchi-devel mailing list