-
Notifications
You must be signed in to change notification settings - Fork 69
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
Lookup SCSI Controller Device Type from Hardware [Depends manageiq-gems-pending/148] #51
Lookup SCSI Controller Device Type from Hardware [Depends manageiq-gems-pending/148] #51
Conversation
46921d1
to
e5adccd
Compare
@blomquisg can you take a look? |
@@ -92,16 +92,24 @@ def build_config_spec(options) | |||
|
|||
if options[:disk_remove] || options[:disk_add] | |||
with_provider_object do |vim_obj| | |||
options[:disk_remove].each { |d| remove_disk_config_spec(vim_obj, vmcs, d) } if options[:disk_remove] | |||
add_disks(vim_obj, vmcs, options[:disk_add]) if options[:disk_add] | |||
hardware = vim_obj.send(:getHardware) |
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.
Do you have to send
here? Could this just be vim_obj.getHardware
?
|
||
def add_disks(vim_obj, vmcs, hardware, disks) | ||
available_units = vim_obj.send(:available_scsi_units, hardware) | ||
available_scsi_buses = vim_obj.send(:available_scsi_buses, hardware) |
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.
Same send
question.
Overall it looks fine. Just wonder about the |
So unfortunately the answer to the send question is because it was always done that way and I assumed it had something to do with DRb because those methods are being called in the broker. I tested it out without the sends with a broker worker and its just fine so I'll push a commit to remove send from all the calls in this file. |
e5adccd
to
0039fcd
Compare
Checked commits agrare/manageiq-providers-vmware@8acb418~...0039fcd with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Done |
@blomquisg can you merge this one |
@agrare @blomquisg this has been requested to be backported to Euwe (which means also Fine). That would be ok? |
@simaishi that shouldn't be a problem We'll need ManageIQ/manageiq-gems-pending#148 to go back to those branches as well. |
Euwe backport (to manageiq repo) details:
|
…troller Lookup SCSI Controller Device Type from Hardware [Depends manageiq-gems-pending/148] (cherry picked from commit 774c485) https://bugzilla.redhat.com/show_bug.cgi?id=1459262
Fine backport details:
|
Generic Service State Machine method update.
When creating a new SCSI controller we used to always default to
VirtualLsiLogicController
, this isn't ideal since some operating systems depend on a certain type of controller.This change will lookup the type from the most recent scsi controller when adding a new one
Depends on: ManageIQ/manageiq-gems-pending#148
Here are some screenshots of adding a new controller when the first controller is of type LSI SAS:
Before:
After:
https://bugzilla.redhat.com/show_bug.cgi?id=1445874