Skip to content

Commit

Permalink
Merge pull request #14144 from bzwei/job_playbook_rels
Browse files Browse the repository at this point in the history
Add relationships between Ansible job and its playbook
  • Loading branch information
gmcculloug authored Mar 3, 2017
2 parents 7113841 + 92213ae commit 4f69952
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
class ManageIQ::Providers::AnsibleTower::AutomationManager::Playbook <
ManageIQ::Providers::ExternalAutomationManager::ConfigurationScriptPayload

has_many :jobs, :class_name => 'OrchestrationStack', :foreign_key => :configuration_script_base_id
end
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def status_class
included do
belongs_to :ext_management_system, :foreign_key => :ems_id, :class_name => "ManageIQ::Providers::AutomationManager"
belongs_to :job_template, :foreign_key => :orchestration_template_id, :class_name => "ConfigurationScript"
belongs_to :playbook, :foreign_key => :configuration_script_base_id

class << self
alias create_job create_stack
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Playbook <
ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScriptPayload

has_many :jobs, :class_name => 'OrchestrationStack', :foreign_key => :configuration_script_base_id
end

0 comments on commit 4f69952

Please sign in to comment.