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

Add a add_to_service method to Vm #14416

Merged
merged 2 commits into from
Mar 20, 2017
Merged

Conversation

mkanoor
Copy link
Contributor

@mkanoor mkanoor commented Mar 20, 2017

https://www.pivotaltracker.com/n/projects/1937537/stories/142057167

Any object that can be added to a service should have a method called add_to_service.

@mkanoor
Copy link
Contributor Author

mkanoor commented Mar 20, 2017

@gmcculloug @jntullo @abellotti
Please review

@@ -6,7 +6,7 @@ def remote_console_url=(url)

def add_to_service(service)
raise ArgumentError, "service must be a MiqAeServiceService" unless service.kind_of?(MiqAeMethodService::MiqAeServiceService)
ar_method { wrap_results(Service.find_by(:id => service.id).add_resource!(@object)) }
ar_method { wrap_results(@object.add_to_service(Service.find(service.id))) }
Copy link
Member

Choose a reason for hiding this comment

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

Should continue to use find_by(:id => service.id).

@miq-bot
Copy link
Member

miq-bot commented Mar 20, 2017

Checked commits mkanoor/manageiq@11cb5cb~...c13b5fd with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
3 files checked, 0 offenses detected
Everything looks good. 🍪

@gmcculloug
Copy link
Member

Looks good.

@gmcculloug gmcculloug merged commit fe31966 into ManageIQ:master Mar 20, 2017
@gmcculloug gmcculloug added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 20, 2017
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.

3 participants