Skip to content

Commit

Permalink
Use Websocket facilities from WoK
Browse files Browse the repository at this point in the history
The 'websocket' module was moved from Kimchi to WoK to allow
WoK and all its plug-ins to have websocket capabilities.

This patch removes the existing websocket module inside
Kimchi and updates all the references to use the WoK
module instead.

The initialization of the ws_proxy was also removed from
root.py - this process is also being done by WoK now.

Signed-off-by: Daniel Henrique Barboza <[email protected]>
  • Loading branch information
danielhb authored and alinefm committed Mar 10, 2017
1 parent 09d9a39 commit eb4dfde
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 133 deletions.
1 change: 0 additions & 1 deletion contrib/DEBIAN/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Depends: wok (>= 2.1.0),
ginger-base,
python-imaging,
python-configobj,
websockify,
novnc,
python-jsonschema (>= 1.3.0),
python-libvirt,
Expand Down
1 change: 0 additions & 1 deletion contrib/kimchi.spec.fedora.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Requires: gettext
Requires: libvirt
Requires: libvirt-python
Requires: libvirt-daemon-config-network
Requires: python-websockify
Requires: python-configobj
Requires: novnc
Requires: python-pillow
Expand Down
1 change: 0 additions & 1 deletion contrib/kimchi.spec.suse.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Requires: gettext-tools
Requires: libvirt
Requires: libvirt-python
Requires: libvirt-daemon-config-network
Requires: python-websockify
Requires: python-configobj
Requires: novnc
Requires: python-Pillow
Expand Down
2 changes: 1 addition & 1 deletion docs/fedora-deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Runtime Dependencies
$ sudo yum install libvirt-python libvirt libvirt-daemon-config-network \
qemu-kvm python-ethtool sos python-ipaddr nfs-utils \
iscsi-initiator-utils pyparted python-libguestfs \
libguestfs-tools python-websockify novnc spice-html5 \
libguestfs-tools novnc spice-html5 \
python-configobj python-magic python-paramiko \
python-pillow

Expand Down
3 changes: 1 addition & 2 deletions docs/opensuse-deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ Runtime Dependencies
python-ipaddr libvirt-daemon-config-network \
nfs-client open-iscsi python-parted \
python-libguestfs python-configobj guestfs-tools \
python-websockify novnc python-magic \
python-paramiko python-Pillow
novnc python-magic python-paramiko python-Pillow

Packages required for UI development
------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/ubuntu-deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Build Dependencies
Runtime Dependencies
--------------------

$ sudo apt-get install python-configobj websockify novnc python-libvirt \
$ sudo apt-get install python-configobj novnc python-libvirt \
libvirt-bin nfs-common qemu-kvm python-parted \
python-ethtool sosreport python-ipaddr \
python-lxml open-iscsi python-guestfs \
Expand Down
2 changes: 1 addition & 1 deletion model/vms.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from lxml.builder import E
from xml.etree import ElementTree

from wok import websocket
from wok.asynctask import AsyncTask
from wok.config import config
from wok.exception import InvalidOperation, InvalidParameter
Expand All @@ -48,7 +49,6 @@
from wok.xmlutils.utils import xml_item_remove, xml_item_update

from wok.plugins.kimchi import model
from wok.plugins.kimchi import websocket
from wok.plugins.kimchi import serialconsole
from wok.plugins.kimchi.config import READONLY_POOL_TYPE, get_kimchi_version
from wok.plugins.kimchi.kvmusertests import UserTests
Expand Down
4 changes: 1 addition & 3 deletions root.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import os
import tempfile

from wok.plugins.kimchi import config, mockmodel, websocket
from wok.plugins.kimchi import config, mockmodel
from wok.plugins.kimchi.i18n import messages
from wok.plugins.kimchi.control import sub_nodes
from wok.plugins.kimchi.model import model as kimchiModel
Expand Down Expand Up @@ -59,8 +59,6 @@ def remove_objectstore():
cherrypy.engine.subscribe('exit', remove_objectstore)
else:
self.model = kimchiModel.Model()
ws_proxy = websocket.new_ws_proxy()
cherrypy.engine.subscribe('exit', ws_proxy.terminate)

dev_env = wok_options.environment != 'production'
super(Kimchi, self).__init__(self.model, dev_env)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mockmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setUpModule():
iso_gen.construct_fake_iso(fake_iso, True, '12.04', 'ubuntu')


def tearDown():
def tearDownModule():
test_server.stop()
os.unlink(fake_iso)

Expand Down
121 changes: 0 additions & 121 deletions websocket.py

This file was deleted.

0 comments on commit eb4dfde

Please sign in to comment.