[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Ovirt-devel] [PATCH] added ability to reprovision vm via edit vm form

Mohammed Morsi wrote:
 wui/src/app/controllers/vm_controller.rb |   29 +++++++++++++++++------------
 wui/src/app/views/vm/_form.rhtml         |    2 +-
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/wui/src/app/controllers/vm_controller.rb b/wui/src/app/controllers/vm_controller.rb
index e55ec28..6d32427 100644
--- a/wui/src/app/controllers/vm_controller.rb
+++ b/wui/src/app/controllers/vm_controller.rb
@@ -267,6 +271,7 @@ class VmController < ApplicationController
     @perm_obj = @vm.vm_resource_pool
     @redir_obj = @vm
     @current_pool_id= perm_obj id
+    _setup_provisioning
   def pre_vm_action
diff --git a/wui/src/app/views/vm/_form.rhtml b/wui/src/app/views/vm/_form.rhtml
index 60ed003..0dfe940 100644
--- a/wui/src/app/views/vm/_form.rhtml
+++ b/wui/src/app/views/vm/_form.rhtml
@@ -8,7 +8,7 @@
 <%= hidden_field_tag 'hardware_pool_id', @hardware_pool.id if @hardware_pool %>
<%= text_field_with_label "Name:", "vm", "description", {:style=>"width:250px;"} %>
-    <%= select_with_label "Operating System:", 'vm', 'provisioning_and_boot_settings', @provisioning_options, :style=>"width:250px;"  if create %>
+    <%= select_with_label "Operating System:", 'vm', 'provisioning_and_boot_settings', @provisioning_options, :style=>"width:250px;" %>
     <div class="clear_row" style="height:15px;"></div>
<div class="form_heading">Resources</div>

The UI needs to make it clear that changing the provisioning bits on a running VM will potentially wipe the contents of the current VM and reprovision from scratch. In addition, if the VM is currently running, should we provide the user an easy way to force an immediate reboot (so the provisioning can take effect). Currently we have a 'start VM now' button for creating VMs -- maybe for edit, we should provide the option to start/restart VM now.

Also, we need to be careful in how we handle the boot device and cobbler profile fields. Currently cobbler profile is only set on create -- so the above won't actually register a new cobbler system (and what of the old cobbler system -- do we need to un-register it? There's also the automatic update of the boot device on successful boot -- I don't think the above will cause any problems with that though.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]