mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +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"> | ||||
|                                     <select id="cache_mode" name="cache_mode" class="form-control"> | ||||
|                                         {% 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 %} | ||||
|                                     </select> | ||||
|                                 </div> | ||||
|  | @ -222,7 +223,8 @@ | |||
|                                     <div class="col-sm-6"> | ||||
|                                         <select id="cache_mode" name="cache_mode" class="form-control"> | ||||
|                                             {% 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 %} | ||||
|                                         </select> | ||||
|                                     </div> | ||||
|  | @ -386,7 +388,8 @@ | |||
|                                                                 <div class="col-sm-6"> | ||||
|                                                                     <select id="cache_mode" name="cache_mode" class="form-control"> | ||||
|                                                                         {% 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 %} | ||||
|                                                                     </select> | ||||
|                                                                 </div> | ||||
|  |  | |||
|  | @ -11,6 +11,7 @@ from vrtManager.create import wvmCreate | |||
| from vrtManager import util | ||||
| from libvirt import libvirtError | ||||
| from webvirtcloud.settings import QEMU_CONSOLE_LISTEN_ADDRESSES | ||||
| from webvirtcloud.settings import INSTANCE_VOLUME_DEFAULT_CACHE | ||||
| from django.contrib import messages | ||||
| 
 | ||||
| @login_required | ||||
|  | @ -43,6 +44,7 @@ def create_instance(request, compute_id): | |||
|         instances = conn.get_instances() | ||||
|         videos = conn.get_video() | ||||
|         cache_modes = sorted(conn.get_cache_modes().items()) | ||||
|         default_cache = INSTANCE_VOLUME_DEFAULT_CACHE | ||||
|         listener_addr = QEMU_CONSOLE_LISTEN_ADDRESSES | ||||
|         mac_auto = util.randomMAC() | ||||
|         get_images = sorted(conn.get_storages_images()) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue