Skip to content

Commit

Permalink
- Fix issue requested by code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernhard committed Mar 6, 2017
1 parent 3e16400 commit f448cab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 8 additions & 0 deletions app/models/compute_resources/foreman/model/vmware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ def firmware_types
}
end

def disk_mode_types
{
"persistent" => N_("Persistent"),
"independent_persistent" => N_("Independent - Persistent"),
"independent_nonpersistent" => N_("Independent - Nonpersistent")
}
end

# vSphere guest OS type descriptions
# list fetched from RbVmomi::VIM::VirtualMachineGuestOsIdentifier.values and
# http://pubs.vmware.com/vsphere-60/topic/com.vmware.wssdk.apiref.doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html
Expand Down
5 changes: 1 addition & 4 deletions app/views/compute_resources_vms/form/vmware/_volume.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@
:label => _("Eager zero"), :label_size => "col-md-2", :disabled => !new_host},
"true",
"false" %>
<% disk_mode_values = [['Dependent', :persistent],
['Independent - Persistent', :independent_persistent],
['Independent - Nonpersistent', :independent_nonpersistent]] %>
<%= selectable_f f, :mode, disk_mode_values, { }, :class => "span5", :label => _("Disk mode"), :label_size => "col-md-2", :disabled => !new_host %>
<%= select_f f, :mode, compute_resource.disk_mode_types, :first, :last, { }, :class => "span5", :label => _("Disk mode"), :label_size => "col-md-2", :disabled => !new_host %>

0 comments on commit f448cab

Please sign in to comment.