diff --git a/definst/__init__.py b/create/__init__.py similarity index 100% rename from definst/__init__.py rename to create/__init__.py diff --git a/definst/admin.py b/create/admin.py similarity index 100% rename from definst/admin.py rename to create/admin.py diff --git a/definst/forms.py b/create/forms.py similarity index 98% rename from definst/forms.py rename to create/forms.py index ec866f0..5b9fab5 100644 --- a/definst/forms.py +++ b/create/forms.py @@ -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): diff --git a/definst/migrations/__init__.py b/create/migrations/__init__.py similarity index 100% rename from definst/migrations/__init__.py rename to create/migrations/__init__.py diff --git a/definst/models.py b/create/models.py similarity index 100% rename from definst/models.py rename to create/models.py diff --git a/definst/tests.py b/create/tests.py similarity index 100% rename from definst/tests.py rename to create/tests.py diff --git a/definst/views.py b/create/views.py similarity index 97% rename from definst/views.py rename to create/views.py index 9f17680..27eb9c6 100644 --- a/definst/views.py +++ b/create/views.py @@ -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()) diff --git a/templates/base.html b/templates/base.html index 62f6d84..3c63d72 100644 --- a/templates/base.html +++ b/templates/base.html @@ -16,5 +16,6 @@ {% block content %}{% endblock %} + {% block javascript %}{% endblock %} \ No newline at end of file diff --git a/templates/instances.html b/templates/instances.html index 4a5e304..22edd2e 100644 --- a/templates/instances.html +++ b/templates/instances.html @@ -105,3 +105,10 @@ {% endblock %} +{% block javascript %} + +{% endblock %} \ No newline at end of file diff --git a/vrtManager/connection.py b/vrtManager/connection.py index 02e0731..b0de72d 100644 --- a/vrtManager/connection.py +++ b/vrtManager/connection.py @@ -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 diff --git a/vrtManager/create.py b/vrtManager/create.py index a525eeb..1d37300 100644 --- a/vrtManager/create.py +++ b/vrtManager/create.py @@ -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): diff --git a/vrtManager/hostdetails.py b/vrtManager/hostdetails.py index f40f967..0c12e09 100644 --- a/vrtManager/hostdetails.py +++ b/vrtManager/hostdetails.py @@ -1,6 +1,3 @@ -# -# Copyright (C) 2013 Webvirtmgr. -# import time from vrtManager.connection import wvmConnect from vrtManager.util import get_xml_path diff --git a/vrtManager/instance.py b/vrtManager/instance.py index 7e5c6d4..ceeb3f4 100644 --- a/vrtManager/instance.py +++ b/vrtManager/instance.py @@ -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): diff --git a/vrtManager/network.py b/vrtManager/network.py index 0e8512b..a9e1afb 100644 --- a/vrtManager/network.py +++ b/vrtManager/network.py @@ -1,6 +1,3 @@ -# -# Copyright (C) 2013 Webvirtmgr. -# from vrtManager import util from vrtManager.IPy import IP from vrtManager.connection import wvmConnect diff --git a/vrtManager/storage.py b/vrtManager/storage.py index 6a6e74f..0a59b97 100644 --- a/vrtManager/storage.py +++ b/vrtManager/storage.py @@ -1,6 +1,3 @@ -# -# Copyright (C) 2013 Webvirtmgr. -# from vrtManager import util from vrtManager.connection import wvmConnect diff --git a/vrtManager/util.py b/vrtManager/util.py index d62ea14..b152e92 100644 --- a/vrtManager/util.py +++ b/vrtManager/util.py @@ -1,6 +1,3 @@ -# -# Copyright (C) 2013 Webvirtmgr. -# import re import random import libxml2 diff --git a/webvirtcloud/settings.py b/webvirtcloud/settings.py index a4b5365..146dcaa 100644 --- a/webvirtcloud/settings.py +++ b/webvirtcloud/settings.py @@ -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 \ No newline at end of file + +# Websock SSL connection +WS_CERT = None + +# list of console types +QEMU_CONSOLE_TYPES = ['vnc', 'spice'] + +# default console type +QEMU_CONSOLE_DEFAULT_TYPE = 'vnc' \ No newline at end of file diff --git a/webvirtcloud/urls.py b/webvirtcloud/urls.py index 060d115..3f87d94 100644 --- a/webvirtcloud/urls.py +++ b/webvirtcloud/urls.py @@ -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)), )