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 config_info as additional attribute to Service Templates API #13842

Merged
merged 2 commits into from
Feb 13, 2017
Merged

Add config_info as additional attribute to Service Templates API #13842

merged 2 commits into from
Feb 13, 2017

Conversation

jntullo
Copy link

@jntullo jntullo commented Feb 9, 2017

This returns the config_info of a ServiceTemplate so the format returned matches the format that is expected for both create and update actions. IE, the expected input is:

      {
        :name         => 'Ansible Tower',
        :service_type => 'generic_ansible_tower',
        :prov_type    => 'amazon',
        :display      => 'false',
        :description  => 'a description',
        :config_info  => {
          :configuration_script_id => configuration_script.id,
          :provision               => {
            :fqname    => ra1.fqname,
            :dialog_id => service_dialog.id
          },
          :retirement              => {
            :fqname    => ra2.fqname,
            :dialog_id => service_dialog.id
          }
        }
      }

This format will now be returned when retrieving the service template.

@miq-bot add_label enhancement, api
@miq-bot assign @abellotti

cc: @bzwei

@abellotti
Copy link
Member

@jntullo I'm generally ok with this. only concern is possible performance hit. Do folks querying /api/service_templates/ always want the config_info (as compared to asking for them via attributes=config_info) ? how much longer does it take to fetch let's say 100 or so templates with the related config_info. Thanks.

@jntullo
Copy link
Author

jntullo commented Feb 13, 2017

@abellotti yes, very true. After looking at the performance on index, it isn't pretty. I think we will remove it from index and just keep it on show.

@miq-bot
Copy link
Member

miq-bot commented Feb 13, 2017

Checked commits jntullo/manageiq@b11c1b1~...6b6c6aa with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. 🍰

@abellotti
Copy link
Member

Thanks @jntullo for the update, LGTM!!

@abellotti abellotti merged commit ca866e1 into ManageIQ:master Feb 13, 2017
@abellotti abellotti added this to the Sprint 54 Ending Feb 13, 2017 milestone Feb 13, 2017
@jntullo jntullo deleted the enhancement/return_config_info 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.

3 participants