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

Support provider name & template name to uniquely identify a template #11669

Merged
merged 2 commits into from
Nov 28, 2016

Conversation

mkanoor
Copy link
Contributor

@mkanoor mkanoor commented Oct 3, 2016

Optionally support 'ansible_provider_name' to uniquely identify a
job template. This is needed where you might have multiple Ansible
Towers with the same named templates.

Links

Testing:
Bugzilla provides the details

@mfalesni
Copy link
Contributor

mfalesni commented Oct 4, 2016

Just noted this PR in the bug, I was wondering why is provider name better than provider ID? Provider ID (or GUID) cannot change for one given provider but name can.

@mkanoor
Copy link
Contributor Author

mkanoor commented Oct 4, 2016

@mfalesni
ID can uniquely identify a template or rather any object in the vmdb.
In the customers case they have names that they are picking from the service dialogs.

When you specify a template you can pass one of the following to uniquely identify a job template

  1. job_template object passed in using ConfigurationScript::job_template=<>
  2. job_template_id
  3. job_template_name & ansible_provider_name
  4. job_template_name

This PR adds option 3 from above.

@gmcculloug
Copy link
Member

@bzwei Please review

@bzwei
Copy link
Contributor

bzwei commented Oct 31, 2016

@mkanoor should the provider name key ansinble_tower_provider_name? Do we need the alternative name with prefix dialog_?

https://bugzilla.redhat.com/show_bug.cgi?id=1378606

Optionally support 'ansible_provider_name' to uniquely identify a
job template. This is needed where you might have multiple Ansible
Towers with the same named templates.
@miq-bot
Copy link
Member

miq-bot commented Nov 1, 2016

Checked commits mkanoor/manageiq@23f8ac3~...4fc0d67 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
2 files checked, 1 offense detected

db/fixtures/ae_datastore/ManageIQ/ConfigurationManagement/AnsibleTower/Operations/StateMachines/Job.class/methods/launch_ansible_job.rb

@mkanoor
Copy link
Contributor Author

mkanoor commented Nov 1, 2016

@bzwei
Changes made. There is lot of code duplication in spec, which I think we can cleanup in a separate PR.

@bzwei
Copy link
Contributor

bzwei commented Nov 1, 2016

@mkanoor definitely we should simplify the spec. I am OK with a separate PR.

@gmcculloug gmcculloug merged commit 76c643b into ManageIQ:master Nov 28, 2016
@gmcculloug gmcculloug added this to the Sprint 50 Ending Dec 5, 2016 milestone Nov 28, 2016
simaishi pushed a commit that referenced this pull request Jan 9, 2017
Support provider name & template name to uniquely identify a template
(cherry picked from commit 76c643b)

https://bugzilla.redhat.com/show_bug.cgi?id=1411359
@simaishi
Copy link
Contributor

simaishi commented Jan 9, 2017

Euwe backport details:

$ git log -1
commit 166c703906fed68236023d53f702b431e4a1ef8b
Author: Greg McCullough <gmccullo@redhat.com>
Date:   Mon Nov 28 14:12:23 2016 -0500

    Merge pull request #11669 from mkanoor/bugzilla_1378606
    
    Support provider name & template name to uniquely identify a template
    (cherry picked from commit 76c643b434e10061a7d5e93db62f3eff17ecfacf)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1411359

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.

6 participants