-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add filtering of image attributes #348
Conversation
4e64438
to
52146a7
Compare
@aufi could you review? |
@@ -99,6 +99,8 @@ def self.create_image(ext_management_system, create_options) | |||
|
|||
def raw_update_image(options) | |||
ext_management_system.with_provider_connection(:service => 'Image') do |service| | |||
image_attrs = self.attributes |
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 seems to fix issue with miq_queue keys in attributes, but to have it fully correct, it is needed check attributes against Fog Image instead of MIQ Template.
self.attributes
are attributes of Template class, service.images.find_by_id(ems_ref)
returns Fog object - https://github.com/fog/fog-openstack/blob/master/lib/fog/image/openstack/v2/models/image.rb its attributes should be checked.
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.
Updated PR
Should this filtering also be added to create action? |
52146a7
to
6e7f446
Compare
6e7f446
to
1b7fc7f
Compare
Checked commits andyvesel/manageiq-providers-openstack@5583530~...1b7fc7f with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 app/models/manageiq/providers/openstack/cloud_manager/template.rb
|
Looks fine, but why are invalid parameters making it into the update call in the first place? |
@mansam, For some reason in |
@andyvesel Alright, thanks for the explanation. This workaround is fine, but we should discover why these incorrect parameters are reaching this method. |
Agree with that, I'll figure this out |
@andyvesel It looks like those extra parameters are inserted by the MiqTask and MiqQueue classes for some reason. ManageIQ/manageiq#17015 |
Added filtering in
options
from unnecessary data, which doesn't belong to image attributes