From 952c1fcc58cf3f4604825bcd67001d2efb3d32ce Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Wed, 28 Nov 2018 10:29:37 -0500 Subject: [PATCH] Merge pull request #18200 from agrare/bz_1644770_disconnect_storage_when_disconnecting_vms Disconnect storage when disconnecting the VM (cherry picked from commit 3e466eb1f562fba5743a8c4cbb66bf900b8e6a21) https://bugzilla.redhat.com/show_bug.cgi?id=1644770 --- app/models/ems_event/automate.rb | 4 ---- app/models/vm_or_template.rb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/models/ems_event/automate.rb b/app/models/ems_event/automate.rb index a821dea46de..a8ddd06fb93 100644 --- a/app/models/ems_event/automate.rb +++ b/app/models/ems_event/automate.rb @@ -95,10 +95,6 @@ def src_vm_destroy_all_snapshots call("src_vm", "snapshots.destroy_all") end - def src_vm_disconnect_storage - call("src_vm", "disconnect_storage") - end - private def parse_policy_parameters(target_str, policy_event, param) diff --git a/app/models/vm_or_template.rb b/app/models/vm_or_template.rb index 44ec9cabad6..dadf946190e 100644 --- a/app/models/vm_or_template.rb +++ b/app/models/vm_or_template.rb @@ -663,7 +663,7 @@ def disconnect_inv end disconnect_host - + disconnect_storage disconnect_stack if respond_to?(:orchestration_stack) end