Skip to content

Commit

Permalink
Merge pull request #14359 from zeari/delete_archived_entities_on_ems_…
Browse files Browse the repository at this point in the history
…delete

Delete archived entities when a container manager is deleted
(cherry picked from commit 48d0291)

https://bugzilla.redhat.com/show_bug.cgi?id=1460397
  • Loading branch information
chessbyte authored and simaishi committed Jun 9, 2017
1 parent bc3d903 commit a2cc7af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/manageiq/providers/container_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class ContainerManager < BaseManager
has_one :container_deployment, :foreign_key => :deployed_ems_id, :inverse_of => :deployed_ems
has_many :computer_systems, :through => :container_nodes

# Archived entities to destroy when the container manager is deleted
has_many :old_container_groups, :foreign_key => :old_ems_id, :dependent => :destroy, :class_name => "ContainerGroup"
has_many :old_container_projects, :foreign_key => :old_ems_id, :dependent => :destroy, :class_name => "ContainerProject"
has_many :old_container_images, :foreign_key => :old_ems_id, :dependent => :destroy, :class_name => "ContainerImage"

virtual_column :port_show, :type => :string

supports :external_logging do
Expand Down

0 comments on commit a2cc7af

Please sign in to comment.