1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-01-29 16:45:19 +00:00

Compare commits

..

No commits in common. "9a675918c683d76b621ebd405960fd4c2e3be324" and "58e215f75532af85fd48daf254a11eb0b41bbe42" have entirely different histories.

6 changed files with 9 additions and 15 deletions

View file

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "base_auth.html" %}
{% load i18n %}
{% block title %}
{% trans "WebVirtCloud" %} - {% trans "Sign Out"%}
@ -14,4 +14,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -196,7 +196,7 @@ def get_dhcp_mac_address(vname):
def get_random_mac_address():
mac = settings.MAC_OUI + ":%02x:%02x:%02x" % (
mac = "52:54:00:%02x:%02x:%02x" % (
random.randint(0x00, 0xFF),
random.randint(0x00, 0xFF),
random.randint(0x00, 0xFF),

View file

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "base_auth.html" %}
{% load i18n %}
{% block title %}{% trans "403" %}{% endblock %}
{% block content %}

View file

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "base_auth.html" %}
{% load i18n %}
{% block title %}{% trans "404" %}{% endblock %}
{% block content %}

View file

@ -6,8 +6,6 @@ import string
import libvirt
import lxml.etree as etree
from django.conf import UserSettingsHolder, settings
def is_kvm_available(xml):
kvm_domains = get_xml_path(xml, "//domain/@type='kvm'")
@ -17,12 +15,10 @@ def is_kvm_available(xml):
def randomMAC():
"""Generate a random MAC address."""
# qemu MAC
mac = settings.MAC_OUI + ":%02x:%02x:%02x" % (
random.randint(0x00, 0xFF),
random.randint(0x00, 0xFF),
random.randint(0x00, 0xFF),
)
return mac
oui = [0x52, 0x54, 0x00]
mac = oui + [random.randint(0x00, 0xFF), random.randint(0x00, 0xFF), random.randint(0x00, 0xFF)]
return ":".join(map(lambda x: "%02x" % x, mac))
def randomUUID():

View file

@ -15,8 +15,6 @@ SECRET_KEY = ""
DEBUG = False
MAC_OUI = '52:54:10'
ALLOWED_HOSTS = ["*"]
CSRF_TRUSTED_ORIGINS = ['http://localhost',]