mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
activate default cache which is in settings for vm creation.
This commit is contained in:
parent
ca545878c4
commit
d63c0a8163
2 changed files with 8 additions and 3 deletions
|
@ -89,7 +89,8 @@
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select id="cache_mode" name="cache_mode" class="form-control">
|
<select id="cache_mode" name="cache_mode" class="form-control">
|
||||||
{% for mode, name in cache_modes %}
|
{% for mode, name in cache_modes %}
|
||||||
<option value="{{ mode }}">{% trans name %}</option>
|
<option value="{{ mode }}" {% ifequal mode default_cache %}selected {% endifequal %}>
|
||||||
|
{% trans name %}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -222,7 +223,8 @@
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select id="cache_mode" name="cache_mode" class="form-control">
|
<select id="cache_mode" name="cache_mode" class="form-control">
|
||||||
{% for mode, name in cache_modes %}
|
{% for mode, name in cache_modes %}
|
||||||
<option value="{{ mode }}">{% trans name %}</option>
|
<option value="{{ mode }}" {% ifequal mode default_cache %}selected {% endifequal %}>
|
||||||
|
{% trans name %}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -386,7 +388,8 @@
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<select id="cache_mode" name="cache_mode" class="form-control">
|
<select id="cache_mode" name="cache_mode" class="form-control">
|
||||||
{% for mode, name in cache_modes %}
|
{% for mode, name in cache_modes %}
|
||||||
<option value="{{ mode }}">{% trans name %}</option>
|
<option value="{{ mode }}" {% ifequal mode default_cache %}selected {% endifequal %}>
|
||||||
|
{% trans name %}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,6 +11,7 @@ from vrtManager.create import wvmCreate
|
||||||
from vrtManager import util
|
from vrtManager import util
|
||||||
from libvirt import libvirtError
|
from libvirt import libvirtError
|
||||||
from webvirtcloud.settings import QEMU_CONSOLE_LISTEN_ADDRESSES
|
from webvirtcloud.settings import QEMU_CONSOLE_LISTEN_ADDRESSES
|
||||||
|
from webvirtcloud.settings import INSTANCE_VOLUME_DEFAULT_CACHE
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -43,6 +44,7 @@ def create_instance(request, compute_id):
|
||||||
instances = conn.get_instances()
|
instances = conn.get_instances()
|
||||||
videos = conn.get_video()
|
videos = conn.get_video()
|
||||||
cache_modes = sorted(conn.get_cache_modes().items())
|
cache_modes = sorted(conn.get_cache_modes().items())
|
||||||
|
default_cache = INSTANCE_VOLUME_DEFAULT_CACHE
|
||||||
listener_addr = QEMU_CONSOLE_LISTEN_ADDRESSES
|
listener_addr = QEMU_CONSOLE_LISTEN_ADDRESSES
|
||||||
mac_auto = util.randomMAC()
|
mac_auto = util.randomMAC()
|
||||||
get_images = sorted(conn.get_storages_images())
|
get_images = sorted(conn.get_storages_images())
|
||||||
|
|
Loading…
Reference in a new issue