Skip to content
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

Update catalog item without config_options #14147

Merged
merged 2 commits into from
Mar 10, 2017
Merged

Update catalog item without config_options #14147

merged 2 commits into from
Mar 10, 2017

Conversation

jntullo
Copy link

@jntullo jntullo commented Mar 2, 2017

This will update the catalog item without the need for config_options. Will update #14068 based off of this.

@miq-bot add_label enhancement, services
@miq-bot assign @bzwei
cc: @abellotti

@bzwei
Copy link
Contributor

bzwei commented Mar 2, 2017

@jntullo https://github.com/ManageIQ/manageiq/blob/master/app/models/service_template.rb#L429 the validation on the service_type and prov_type, shouldn't we detect whether the actual values have changed or not?

@@ -426,7 +427,11 @@ def build_resource_action(ae_endpoint, action)
end

def validate_update_config_info(options)
raise _('service_type and prov_type cannot be changed') if options[:service_type] || options[:prov_type]
if options[:service_type] && options[:service_type] != service_type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be two independent if...end blocks

@@ -87,6 +87,27 @@
expect(updated.resource_actions.pluck(:action)).to match_array(%w(Provision Reconfigure))
end

it 'does not allow service_type to be changed' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may not need to repeat tests that are already covered in base class.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bzwei ok - just thought it would be a good idea to ensure that it includes the super class method call

@miq-bot
Copy link
Member

miq-bot commented Mar 3, 2017

Checked commits jntullo/manageiq@a8947bc~...4aafba6 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
6 files checked, 0 offenses detected
Everything looks good. 🏆

@bzwei
Copy link
Contributor

bzwei commented Mar 3, 2017

@miq-bot assign @gmcculloug

@miq-bot miq-bot assigned gmcculloug and unassigned bzwei Mar 3, 2017
@gmcculloug gmcculloug merged commit 30910fa into ManageIQ:master Mar 10, 2017
@gmcculloug gmcculloug added this to the Sprint 56 Ending Mar 13, 2017 milestone Mar 10, 2017
@jntullo jntullo deleted the enhancement/allow_for_simple_update branch November 28, 2017 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants