1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Revert "Spice feature"

This commit is contained in:
Julien Duponchelle 2017-06-21 10:32:28 +02:00 committed by GitHub
parent efd5d82c88
commit 36dc264a6c
4 changed files with 4 additions and 28 deletions

View File

@ -1304,14 +1304,6 @@ class QemuVM(BaseNode):
else: else:
return [] return []
def _spice_options(self):
if self._console:
return ["-spice",
"addr={},port={},disable-ticketing".format(self._manager.port_manager.console_host, self._console)]
else:
return []
def _monitor_options(self): def _monitor_options(self):
if self._monitor: if self._monitor:
@ -1571,8 +1563,6 @@ class QemuVM(BaseNode):
command.extend(self._serial_options()) command.extend(self._serial_options())
elif self._console_type == "vnc": elif self._console_type == "vnc":
command.extend(self._vnc_options()) command.extend(self._vnc_options())
elif self._console_type == "spice":
command.extend(self._spice_options())
else: else:
raise QemuError("Console type {} is unknown".format(self._console_type)) raise QemuError("Console type {} is unknown".format(self._console_type))
command.extend(self._monitor_options()) command.extend(self._monitor_options())

View File

@ -144,7 +144,7 @@ NODE_OBJECT_SCHEMA = {
}, },
"console_type": { "console_type": {
"description": "Console type", "description": "Console type",
"enum": ["vnc", "telnet", "http", "spice", None] "enum": ["vnc", "telnet", "http", None]
}, },
"properties": { "properties": {
"description": "Properties specific to an emulator", "description": "Properties specific to an emulator",

View File

@ -63,7 +63,7 @@ QEMU_CREATE_SCHEMA = {
}, },
"console_type": { "console_type": {
"description": "Console type", "description": "Console type",
"enum": ["telnet", "vnc", "spice"] "enum": ["telnet", "vnc"]
}, },
"hda_disk_image": { "hda_disk_image": {
"description": "QEMU hda disk image path", "description": "QEMU hda disk image path",
@ -244,7 +244,7 @@ QEMU_UPDATE_SCHEMA = {
}, },
"console_type": { "console_type": {
"description": "Console type", "description": "Console type",
"enum": ["telnet", "vnc", "spice"] "enum": ["telnet", "vnc"]
}, },
"linked_clone": { "linked_clone": {
"description": "Whether the VM is a linked clone or not", "description": "Whether the VM is a linked clone or not",
@ -541,7 +541,7 @@ QEMU_OBJECT_SCHEMA = {
}, },
"console_type": { "console_type": {
"description": "Console type", "description": "Console type",
"enum": ["telnet", "vnc", "spice"] "enum": ["telnet", "vnc"]
}, },
"initrd": { "initrd": {
"description": "QEMU initrd path", "description": "QEMU initrd path",

View File

@ -359,20 +359,6 @@ def test_bios_option(vm, tmpdir, loop, fake_qemu_img_binary):
assert ' '.join(['-bios', str(tmpdir / "test.img")]) in ' '.join(options) assert ' '.join(['-bios', str(tmpdir / "test.img")]) in ' '.join(options)
def test_vnc_option(vm, tmpdir, loop, fake_qemu_img_binary):
vm._console_type = 'vnc'
vm._console = 5905
options = loop.run_until_complete(asyncio.async(vm._build_command()))
assert '-vnc 127.0.0.1:5' in ' '.join(options)
def test_spice_option(vm, tmpdir, loop, fake_qemu_img_binary):
vm._console_type = 'spice'
vm._console = 5905
options = loop.run_until_complete(asyncio.async(vm._build_command()))
assert '-spice addr=127.0.0.1,port=5905,disable-ticketing' in ' '.join(options)
def test_disk_options_multiple_disk(vm, tmpdir, loop, fake_qemu_img_binary): def test_disk_options_multiple_disk(vm, tmpdir, loop, fake_qemu_img_binary):
vm._hda_disk_image = str(tmpdir / "test0.qcow2") vm._hda_disk_image = str(tmpdir / "test0.qcow2")