1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

Clean header

This commit is contained in:
Retspen 2015-02-27 14:44:44 +02:00
parent 7dee5b94ac
commit 2ed6ca6518
18 changed files with 33 additions and 37 deletions

View file

@ -1,7 +1,7 @@
import re
from django import forms
from django.utils.translation import ugettext_lazy as _
from definst.models import Flavor
from create.models import Flavor
class FlavorAddForm(forms.Form):

View file

@ -3,15 +3,15 @@ from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from computes.models import Compute
from definst.models import Flavor
from definst.forms import FlavorAddForm, NewVMForm
from create.models import Flavor
from create.forms import FlavorAddForm, NewVMForm
from instances.models import Instance
from vrtManager.create import wvmCreate
from vrtManager import util
from libvirt import libvirtError
def create(request, host_id):
def create_instance(request, host_id):
"""
:param request:
:return:
@ -133,4 +133,4 @@ def create(request, host_id):
error_messages.append(lib_err)
conn.close()
return render('definst.html', locals())
return render('create.html', locals())

View file

@ -16,5 +16,6 @@
{% block content %}{% endblock %}
<script src="{% static "js/jquery.min.js" %}"></script>
<script src="{% static "js/bootstrap.min.js" %}"></script>
{% block javascript %}{% endblock %}
</body>
</html>

View file

@ -105,3 +105,10 @@
</div>
</div>
{% endblock %}
{% block javascript %}
<script type="application/javascript">
function open_console(uuid) {
window.open("/{% url 'console' %}/?token=" + uuid, "", "width=850,height=485");
}
</script>
{% endblock %}

View file

@ -1,16 +1,10 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import libvirt
import threading
import socket
from vrtManager import util
from libvirt import libvirtError
from rwlock import ReadWriteLock
from django.conf import settings
from libvirt import libvirtError
CONN_SOCKET = 4

View file

@ -1,11 +1,7 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import string
from vrtManager import util
from vrtManager.connection import wvmConnect
from webvirtmgr.settings import QEMU_CONSOLE_DEFAULT_TYPE
from webvirtcloud.settings import QEMU_CONSOLE_DEFAULT_TYPE
def get_rbd_storage_data(stg):

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import time
from vrtManager.connection import wvmConnect
from vrtManager.util import get_xml_path

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import time
import os.path
try:
@ -11,8 +8,7 @@ from vrtManager import util
from xml.etree import ElementTree
from datetime import datetime
from vrtManager.connection import wvmConnect
from webvirtmgr.settings import QEMU_CONSOLE_TYPES
from webvirtcloud.settings import QEMU_CONSOLE_TYPES
class wvmInstances(wvmConnect):

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
from vrtManager import util
from vrtManager.IPy import IP
from vrtManager.connection import wvmConnect

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
from vrtManager import util
from vrtManager.connection import wvmConnect

View file

@ -1,6 +1,3 @@
#
# Copyright (C) 2013 Webvirtmgr.
#
import re
import random
import libxml2

View file

@ -68,7 +68,21 @@ TEMPLATE_DIRS = (
)
# WebVirtCloud settings
# Wobsock port
WS_PORT = 6080
# Websock host
WS_HOST = '0.0.0.0'
# Websock public port
WS_PUBLIC_HOST = None
WS_CERT = None
# Websock SSL connection
WS_CERT = None
# list of console types
QEMU_CONSOLE_TYPES = ['vnc', 'spice']
# default console type
QEMU_CONSOLE_DEFAULT_TYPE = 'vnc'

View file

@ -29,7 +29,7 @@ urlpatterns = patterns('',
# url(r'^accounts/$', 'accounts.views.accounts', name='accounts'),
# url(r'^account/(\d+)/$', 'accounts.views.account', name='account'),
#
# url(r'^console/$', 'console.views.console', name='console'),
# url(r'^create/(\d+)/$', 'create.views.create', name='create'),
url(r'^console/$', 'console.views.console', name='console'),
url(r'^create/(\d+)/$', 'create.views.create_instance', name='create_instance'),
(r'^admin/', include(admin.site.urls)),
)