From 89f49b120bf9e1799e2c38340bb2a20da90829b6 Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 15 Oct 2016 00:25:21 -0400 Subject: [PATCH 1/8] Fixin add storage regex issue on 'iso path' and 'lvm name' --- storages/templates/create_stg_block.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storages/templates/create_stg_block.html b/storages/templates/create_stg_block.html index 24dd2fd..fdb5a6e 100644 --- a/storages/templates/create_stg_block.html +++ b/storages/templates/create_stg_block.html @@ -66,7 +66,7 @@
- +
@@ -217,7 +217,7 @@
- +
@@ -235,4 +235,4 @@ -{% endif %} \ No newline at end of file +{% endif %} From d94ca38e5c8b5bb1323d33067ee6b991775cc390 Mon Sep 17 00:00:00 2001 From: "anatoliy.guskov@gmail.com" Date: Fri, 10 Mar 2017 21:02:52 +0200 Subject: [PATCH 2/8] Little fix #133 --- webvirtcloud/settings.py | 10 +++++----- webvirtcloud/wsgi.py | 5 +---- webvirtcloud/wsgi_custom.py | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 webvirtcloud/wsgi_custom.py diff --git a/webvirtcloud/settings.py b/webvirtcloud/settings.py index 0c31433..866ff36 100644 --- a/webvirtcloud/settings.py +++ b/webvirtcloud/settings.py @@ -8,7 +8,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = '4y(f4rfqc6f2!i8_vfuu)kav6tdv5#sc=n%o451dm+th0&3uci' -DEBUG = True +DEBUG = True TEMPLATE_DEBUG = DEBUG @@ -44,10 +44,10 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) -AUTHENTICATION_BACKENDS = ( - 'django.contrib.auth.backends.RemoteUserBackend', - #'accounts.backends.MyRemoteUserBackend', -) +#AUTHENTICATION_BACKENDS = ( +# 'django.contrib.auth.backends.RemoteUserBackend', +# #'accounts.backends.MyRemoteUserBackend', +#) LOGIN_URL = '/accounts/login' diff --git a/webvirtcloud/wsgi.py b/webvirtcloud/wsgi.py index a9bf44c..35ceb9b 100644 --- a/webvirtcloud/wsgi.py +++ b/webvirtcloud/wsgi.py @@ -7,10 +7,7 @@ For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ -execfile('/srv/webvirtcloud/venv/bin/activate_this.py', dict(__file__='/srv/webvirtcloud/venv/bin/activate_this.py')) - -import os, sys -sys.path.append('/srv/webvirtcloud') +import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings") from django.core.wsgi import get_wsgi_application diff --git a/webvirtcloud/wsgi_custom.py b/webvirtcloud/wsgi_custom.py new file mode 100644 index 0000000..a9bf44c --- /dev/null +++ b/webvirtcloud/wsgi_custom.py @@ -0,0 +1,17 @@ +""" +WSGI config for webvirtcloud project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ +""" + +execfile('/srv/webvirtcloud/venv/bin/activate_this.py', dict(__file__='/srv/webvirtcloud/venv/bin/activate_this.py')) + +import os, sys +sys.path.append('/srv/webvirtcloud') +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webvirtcloud.settings") + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() From 564bb45c876193429966ca20f47b896a8453da7a Mon Sep 17 00:00:00 2001 From: Anatoliy Guskov Date: Wed, 16 May 2018 21:08:27 +0300 Subject: [PATCH 3/8] Fixed default settings for auth --- webvirtcloud/settings.py.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webvirtcloud/settings.py.template b/webvirtcloud/settings.py.template index 0effb8e..e1f3c20 100644 --- a/webvirtcloud/settings.py.template +++ b/webvirtcloud/settings.py.template @@ -45,7 +45,7 @@ MIDDLEWARE_CLASSES = ( ) AUTHENTICATION_BACKENDS = ( - #'django.contrib.auth.backends.RemoteUserBackend', + 'django.contrib.auth.backends.RemoteUserBackend', #'accounts.backends.MyRemoteUserBackend', ) From 2450e9caff1127bfa0e62dae79a0f37f51c76d63 Mon Sep 17 00:00:00 2001 From: Anatoliy Guskov Date: Wed, 30 May 2018 12:17:26 +0300 Subject: [PATCH 4/8] Update libvirt-bootstrap.sh --- dev/libvirt-bootstrap.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dev/libvirt-bootstrap.sh b/dev/libvirt-bootstrap.sh index e129177..66eb6de 100644 --- a/dev/libvirt-bootstrap.sh +++ b/dev/libvirt-bootstrap.sh @@ -375,7 +375,7 @@ __check_end_of_life_versions # install_centos() { if [ $DISTRO_MAJOR_VERSION -ge 6 ]; then - yum -y install qemu-kvm libvirt bridge-utils python-libguestfs supervisor || return 1 + yum -y install qemu-kvm libvirt bridge-utils python-libguestfs supervisor cyrus-sasl-md5 || return 1 fi return 0 } @@ -401,6 +401,13 @@ install_centos_post() { echoerror "/etc/libvirt/qemu.conf not found. Exiting..." exit 1 fi + if [ -f /etc/sasl2/libvirt.conf ]; then + sed -i 's/: gssapi/: digest-md5/g' /etc/sasl2/libvirt.conf + sed -i 's/#sasldb_path/sasldb_path/g' /etc/sasl2/libvirt.conf + else + echoerror "/etc/sasl2/libvirt.conf not found. Exiting..." + exit 1 + fi if [ $DISTRO_MAJOR_VERSION -lt 7 ]; then if [ -f /etc/supervisord.conf ]; then curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd From 0622e577f486b5c3f35a62fb0b22e2a8a31763bd Mon Sep 17 00:00:00 2001 From: retspen Date: Thu, 31 May 2018 10:36:11 +0300 Subject: [PATCH 5/8] Updated requirements --- conf/requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conf/requirements.txt b/conf/requirements.txt index e01113b..acfaaed 100644 --- a/conf/requirements.txt +++ b/conf/requirements.txt @@ -1,6 +1,5 @@ Django==1.8.11 websockify==0.8.0 gunicorn==19.3.0 -libvirt-python==1.3.2 -#http://github.com/retspen/retspen.github.io/raw/master/libxml2-python-2.9.1.tar.gz -http://git.gnome.org/browse/libxml2/snapshot/libxml2-2.9.1.tar.gz#egg=libxml2-python&subdirectory=python +libvirt-python==3.10 +libxml2-python3==2.9.5 From 6587308ddaed2c6c46a792ea4bd0393385f9d3fb Mon Sep 17 00:00:00 2001 From: retspen Date: Thu, 31 May 2018 11:02:05 +0300 Subject: [PATCH 6/8] Fixed default auth model --- webvirtcloud/settings.py.template | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webvirtcloud/settings.py.template b/webvirtcloud/settings.py.template index e1f3c20..9e5c821 100644 --- a/webvirtcloud/settings.py.template +++ b/webvirtcloud/settings.py.template @@ -10,8 +10,6 @@ SECRET_KEY = '' DEBUG = True -TEMPLATE_DEBUG = DEBUG - ALLOWED_HOSTS = ['*'] INSTALLED_APPS = ( @@ -45,7 +43,7 @@ MIDDLEWARE_CLASSES = ( ) AUTHENTICATION_BACKENDS = ( - 'django.contrib.auth.backends.RemoteUserBackend', + 'django.contrib.auth.backends.ModelBackend', #'accounts.backends.MyRemoteUserBackend', ) From b533d59e2fcd9c78714b95110cb08f679cf0e5f6 Mon Sep 17 00:00:00 2001 From: retspen Date: Thu, 31 May 2018 11:04:19 +0300 Subject: [PATCH 7/8] Added vscode --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0772847..7a40b40 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .vagrant venv +.vscode .idea .DS_* *.pyc From dd2830eddb455009d841d6bd78486425ff229783 Mon Sep 17 00:00:00 2001 From: retspen Date: Thu, 31 May 2018 12:38:03 +0300 Subject: [PATCH 8/8] Quick fix if console type not support --- console/templates/console-base.html | 3 +++ console/views.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/console/templates/console-base.html b/console/templates/console-base.html index 10ef4a3..08aaf27 100644 --- a/console/templates/console-base.html +++ b/console/templates/console-base.html @@ -121,6 +121,9 @@ function log_info(msg) { log_message(msg,'info'); } + {% if console_error %} + log_error('{{ console_error|escapejs }}'); + {% endif %} {% block foot %}{% endblock %} diff --git a/console/views.py b/console/views.py index 4651c87..6828e1c 100644 --- a/console/views.py +++ b/console/views.py @@ -16,6 +16,7 @@ def console(request): :param request: :return: """ + console_error = None if request.method == 'GET': token = request.GET.get('token', '') @@ -49,7 +50,8 @@ def console(request): elif console_type == 'spice': response = render(request, 'console-spice.html', locals()) else: - response = "Console type %s no support" % console_type + console_error = "Console type: %s no support" % console_type + response = render(request, 'console-vnc.html', locals()) response.set_cookie('token', token) return response