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

Expose job_template from a service template #13895

Merged
merged 3 commits into from
Feb 14, 2017

Conversation

mkanoor
Copy link
Contributor

@mkanoor mkanoor commented Feb 13, 2017

Automate methods need to get to the credentials from a service template.
The ServiceTemplateAnsiblePlaybook exposes the job_template method.
Given a job_template we can get to the manager and from the manager get the credentials.

Will add specs later once the spec file changes have been finalized from PR #13736

Links

@mkanoor
Copy link
Contributor Author

mkanoor commented Feb 13, 2017

@bzwei @gmcculloug
Please review

@@ -7,6 +7,11 @@ def self.default_retirement_entry_point
'/Service/Generic/StateMachines/GenericLifecycle/retire'
end

def job_template(service_action)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use find_by as shown https://github.com/ManageIQ/manageiq/blob/master/app/models/service_ansible_playbook.rb#L41
And you can change ServiceAnsiblePlaybook to delegate this method through the service template.

@mkanoor
Copy link
Contributor Author

mkanoor commented Feb 13, 2017

@bzwei @gmcculloug
Please review

For ServiceTemplateAnsiblePlaybook expose the job_template
associated with a service action
@miq-bot
Copy link
Member

miq-bot commented Feb 13, 2017

Checked commits mkanoor/manageiq@91aeff7~...59ec117 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
5 files checked, 0 offenses detected
Everything looks good. 👍

@gmcculloug gmcculloug merged commit a9c00ef into ManageIQ:master Feb 14, 2017
@gmcculloug gmcculloug added this to the Sprint 55 Ending Feb 27, 2017 milestone Feb 14, 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.

5 participants