-
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
Save playbook service template #13600
Save playbook service template #13600
Conversation
c5d980f
to
e604e15
Compare
|
||
info[:provision][:fqname] ||= default_provisioning_entry_point if info.key?(:provision) | ||
info[:retirement][:fqname] ||= default_retirement_entry_point if info.key?(:retirement) | ||
info[:reconfigure][:fqname] ||= default_reconfiguration_entry_point if info.key?(:reconfigure) |
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.
I thought we weren't doing reconfigure yet.
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.
The backend is made ready here, but UI will not provide reconfigure selection.
end | ||
|
||
def self.prepare_job_template_and_dialog(action, service_name, description, config_info) | ||
job_template = create_job_template("#{service_name}_#{action}", description, config_info[action]) |
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 should consider naming the job template name with something that can't change like "MiqService_#{id}_#{action}"
.
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.
@syncrou will enhance the naming in his following up PR
|
||
build_options = {:action => action[:name], :fqname => fqname} | ||
build_options.merge!(ae_endpoint.slice(:dialog, :dialog_id)) | ||
build_options.merge!(ae_endpoint.slice(:configuration_template, :configuration_template_id, :configuration_template_type)) |
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.
Can we do a single slice
?
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.
Yes, we can. I split into two lines because the list is too long. Maybe we could create an array in one line and pass it to the slice
method in the second line. @jntullo
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.
Or just multi-line the params to slice
This pull request is not mergeable. Please rebase and repush. |
e604e15
to
ddbfde0
Compare
@bzwei Cannot remove the following label because they are not recognized: "sql migration" |
@miq-bot remove_label sql migration |
ddbfde0
to
9b7fb42
Compare
private_class_method :create_job_template | ||
|
||
def self.validate_config_info(options) | ||
info = opitons[:config_info] |
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.
@bzwei - Looks like a spelling error /opitons/options/
Initial implementation of .create_catalog_item
9b7fb42
to
bc04d82
Compare
Checked commit bzwei@bc04d82 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/service_template_ansible_playbook.rb
|
Create a service catalog item for type AnsiblePlaybook
@miq-bot add_label wip