Skip to content

Commit

Permalink
Adding Child Managers to EMS
Browse files Browse the repository at this point in the history
* This PR is needed for Amazon refresh consolidation PR
  and
* Orchestrate destroy of dependent managers.

It allows us to say things like:

`ems.child_managers.collect ...` which gets all the child mangers
of a parent.
  • Loading branch information
Julian Cheal committed Aug 24, 2017
1 parent 9e75dc4 commit 961b02f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def self.supported_types_and_descriptions_hash
end

belongs_to :provider
has_many :child_managers, :class_name => 'ExtManagementSystem', :foreign_key => 'parent_ems_id'

include CustomAttributeMixin
belongs_to :tenant
has_many :container_deployments, :foreign_key => :deployed_on_ems_id, :inverse_of => :deployed_on_ems
Expand Down

0 comments on commit 961b02f

Please sign in to comment.