diff --git a/app/models/configuration_script.rb b/app/models/configuration_script.rb index 2e1e703f31c..8bde1286db7 100644 --- a/app/models/configuration_script.rb +++ b/app/models/configuration_script.rb @@ -2,5 +2,5 @@ class ConfigurationScript < ConfigurationScriptBase def self.base_model ConfigurationScript end - belongs_to :manager, :class_name => "ExtManagementSystem", :inverse_of => :configuration_scripts + belongs_to :manager, :class_name => "ManageIQ::Providers::AutomationManager", :inverse_of => :configuration_scripts end diff --git a/app/models/manageiq/providers/automation_manager.rb b/app/models/manageiq/providers/automation_manager.rb index 7f41485ec43..78af0e8827e 100644 --- a/app/models/manageiq/providers/automation_manager.rb +++ b/app/models/manageiq/providers/automation_manager.rb @@ -11,8 +11,12 @@ class ManageIQ::Providers::AutomationManager < ManageIQ::Providers::BaseManager has_many :configured_systems, :dependent => :destroy, :foreign_key => "manager_id" has_many :configuration_profiles, :dependent => :destroy, :foreign_key => "manager_id" - has_many :configuration_scripts, :dependent => :destroy, :foreign_key => "manager_id", - :class_name => "::ConfigurationScript" + has_many :configuration_scripts, + :dependent => :destroy, + :foreign_key => "manager_id", + :class_name => "::ConfigurationScript", + :inverse_of => :manager + has_many :configuration_workflows, :dependent => :destroy, :foreign_key => "manager_id", :inverse_of => :manager has_many :credentials, :class_name => "ManageIQ::Providers::AutomationManager::Authentication", :as => :resource, :dependent => :destroy