mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
feat(console): remove deprecated SPICE support in favor of noVNC
- Remove obsolete spice-html5 static assets and SPICE console templates - Restrict default console types to VNC with migration 0012 - Filter out SPICE in VM creation form and backend capabilities - Return friendly deprecation notice if legacy VM is opened with SPICE - Clean up docs, architecture references, and libvirt-bootstrap scripts
This commit is contained in:
parent
4b55630b2d
commit
e980aca2ff
48 changed files with 62 additions and 69095 deletions
|
|
@ -0,0 +1,38 @@
|
|||
from django.db import migrations
|
||||
|
||||
|
||||
def update_console_type(apps, schema_editor):
|
||||
AppSettings = apps.get_model("appsettings", "AppSettings")
|
||||
db_alias = schema_editor.connection.alias
|
||||
setting = (
|
||||
AppSettings.objects.using(db_alias)
|
||||
.filter(key="QEMU_CONSOLE_DEFAULT_TYPE")
|
||||
.first()
|
||||
)
|
||||
if setting:
|
||||
setting.value = "vnc"
|
||||
setting.choices = "vnc"
|
||||
setting.save(using=db_alias)
|
||||
|
||||
|
||||
def reverse_console_type(apps, schema_editor):
|
||||
AppSettings = apps.get_model("appsettings", "AppSettings")
|
||||
db_alias = schema_editor.connection.alias
|
||||
setting = (
|
||||
AppSettings.objects.using(db_alias)
|
||||
.filter(key="QEMU_CONSOLE_DEFAULT_TYPE")
|
||||
.first()
|
||||
)
|
||||
if setting:
|
||||
setting.choices = "vnc,spice"
|
||||
setting.save(using=db_alias)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("appsettings", "0011_alter_appsettings_id"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(update_console_type, reverse_console_type),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue