-
Notifications
You must be signed in to change notification settings - Fork 70
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
Dealing with disks which have no controller key #77
Conversation
I was talking with @agrare here and I think it's preferable to actually collect the disk, but set |
|
||
storage_mor = backing['datastore'] | ||
|
||
new_result = { | ||
:device_name => device.fetch_path('deviceInfo', 'label'), | ||
:device_type => device_type, | ||
:controller_type => controller_type, | ||
:controller_type => controller_type || 'unknown', |
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.
Since you already have if controller else 'unknown'
is the || 'unknown'
necessary?
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.
haha, yeah, WIP. Now is done. Thanks
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.
Hey I still think you only need the 'unknown'
in one place
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.
i can only ... 😭
done now. also updated the location
to nil
(instead of ''
) as suggested by Jason
:present => true, | ||
:filename => backing['fileName'] || backing['deviceName'], | ||
:location => "#{controller['busNumber']}:#{device['unitNumber']}", | ||
:location => controller ? "#{controller['busNumber']}:#{device['unitNumber']}": '' |
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.
Can you pull this into a location = if controller ...
like what you have for controller_type
?
@miq-bot remove_label wip |
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.
Just that one nit then this looks good :)
|
||
storage_mor = backing['datastore'] | ||
|
||
new_result = { | ||
:device_name => device.fetch_path('deviceInfo', 'label'), | ||
:device_type => device_type, | ||
:controller_type => controller_type, | ||
:controller_type => controller_type || 'unknown', |
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.
Hey I still think you only need the 'unknown'
in one place
:disk_type => "thin", | ||
:start_connected => true | ||
) | ||
|
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.
Huge 👍 for the test 😄
Checked commit https://github.com/jameswnl/manageiq-providers-vmware/commit/b5f1089beb71f98026f22e8352383ecf83a04593 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 spec/models/manageiq/providers/vmware/infra_manager/refresher_spec.rb
|
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.
👍 LGTM, will merge when green
Euwe backport (to manageiq repo) details:
|
Dealing with disks which have no controller key (cherry picked from commit 3438f9b) https://bugzilla.redhat.com/show_bug.cgi?id=1479976
Fine backport details:
|
Added LenovoXclarity Domain to EMS Events into Automate
https://bugzilla.redhat.com/show_bug.cgi?id=1465761