Skip to content

Commit

Permalink
move configuration_scripts association up to ems
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswnl committed Jul 12, 2018
1 parent 822d658 commit e4a7fc4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/configuration_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ class ConfigurationScript < ConfigurationScriptBase
def self.base_model
ConfigurationScript
end
belongs_to :manager, :class_name => "ExtManagementSystem", :inverse_of => :configuration_scripts_and_workflows
belongs_to :manager, :class_name => "ExtManagementSystem", :inverse_of => :configuration_scripts
end
3 changes: 1 addition & 2 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ def self.api_allowed_attributes
has_many :miq_events, :as => :target, :dependent => :destroy
has_many :cloud_subnets, :foreign_key => :ems_id, :dependent => :destroy

has_many :configuration_scripts_and_workflows,
:class_name => 'ConfigurationScript',
has_many :configuration_scripts,
:dependent => :destroy,
:foreign_key => "manager_id",
:inverse_of => :manager
Expand Down
1 change: 0 additions & 1 deletion app/models/manageiq/providers/automation_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ 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"
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
Expand Down

0 comments on commit e4a7fc4

Please sign in to comment.