-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding VMware vSphere Disk Mode support (Dependent, Independent - P… #4314
Conversation
…ersistent, Independent - Nonpersistent)
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
Can an existing organization member please verify this patch? |
2 similar comments
Can an existing organization member please verify this patch? |
Can an existing organization member please verify this patch? |
@BernhardAtix, thanks for your PR! By analyzing the history of the files in this pull request, we identified @timogoebel, @tstrachota and @domcleal to be potential reviewers. |
@BernhardAtix thanks! FYI - please note that #3979 potentially rewrite this part of the form |
ok to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BernhardAtix : Thanks for your PR. I left some comments inline. Could you also please provide a Redmine issue for this?
@@ -23,3 +23,17 @@ | |||
:label => _("Eager zero"), :label_size => "col-md-2", :disabled => !new_host}, | |||
"true", | |||
"false" %> | |||
<% | |||
# regarding to the following documentation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please remove these comments? They don't belong in Foreman's source.
# ['undoable', :undoable], | ||
# ['append', :append]] | ||
%> | ||
<% disk_mode_values = [['Dependent', :persistent], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move these options to vmware's compute resource model.
firmware_types
is one example for this.
https://github.com/theforeman/foreman/blob/develop/app/models/compute_resources/foreman/model/vmware.rb#L170
Please note, that you need to mark the names as translatable, e.g. _('Dependent')
.
['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 %> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Please remote the empty line.
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
fixes #18815 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BernhardAtix : Thanks for the updates. I left one small comment inline.
@@ -175,6 +175,14 @@ def firmware_types | |||
} | |||
end | |||
|
|||
def disk_mode_types | |||
{ | |||
"persistent" => N_("Persistent"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't translated correctly.
N_()
just marks a string for translation but doesn't actually translate it.
Please use either _()
or translate it in the view.
<%= select_f f, :mode, compute_resource.disk_mode_types, :first, ->(d) { _(d.last) }, { }, :class => "span5", :label => _("Disk mode"), :label_size => "col-md-2", :disabled => !new_host %>
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @BernhardAtix. Works well.
fixes #18815 - Adding VMware vSphere Disk Mode support