-
Notifications
You must be signed in to change notification settings - Fork 898
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 create_catalog_item to ServiceTemplateAnsibleTower #13646
add create_catalog_item to ServiceTemplateAnsibleTower #13646
Conversation
create(options.except(:config_info)) do |service_template| | ||
config_info = validate_config_info(options) | ||
|
||
service_template.job_template = ConfigurationScript.find(config_info[:configuration_script_id]) |
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.
We want to accept :configuration_script_id
or :configuration
. The later points to an object that can be directly assigned. Same to manager. Need to update the validate method too.
@miq-bot remove_label wip |
create(options.except(:config_info)) do |service_template| | ||
config_info = validate_config_info(options) | ||
|
||
service_template.job_template = if config_info[:configuration_script_id] |
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.
@jntullo
Wouldn't a single service template have a job template per resource action (provision, reconfigure, retirement).
Its not a one to one relationship, I think its 1 to max 3 job templates.
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.
@miq-bot assign @gmcculloug |
end | ||
private_class_method :validate_config_info | ||
|
||
def create_resource_actions(ae_endpoints) |
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.
@jntullo This method does not appear to differ from the one in the parent ServiceTemplate model here: app/models/service_template.rb#create_resource_actions
Is this really needed?
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.
You're right. It should not be needed. Good catch.
allow for configuration to be passed in
Checked commits jntullo/manageiq@51f4ac3~...22fa778 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
This adds class method
create_catalog_item
toServiceTemplateAnsibleTower
and takes in the following:@miq-bot add_label wip, enhancement, orchestration, services, euwe/no
@miq-bot assign @bzwei