Skip to content

Commit

Permalink
Pass the VM so delete_snapshot won't need to look it up
Browse files Browse the repository at this point in the history
Review comments requested the above.
  • Loading branch information
jerryk55 committed Jan 25, 2018
1 parent 4fb0b82 commit 08e8b59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/vm_scan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def call_snapshot_delete
(vm.kind_of?(ManageIQ::Providers::Azure::CloudManager::Vm) && vm.require_snapshot_for_scan?)
vm.ext_management_system.vm_delete_evm_snapshot(vm, :snMor => mor)
else
delete_snapshot(mor)
delete_snapshot(mor, vm)
end
rescue => err
_log.error(err.to_s)
Expand Down Expand Up @@ -505,7 +505,7 @@ def process_abort(*args)
mor = context[:snapshot_mor]
context[:snapshot_mor] = nil
set_status("Deleting snapshot before aborting job")
delete_snapshot(mor)
delete_snapshot(mor, vm)
end
if vm
inputs = {:vm => vm, :host => vm.host}
Expand Down

0 comments on commit 08e8b59

Please sign in to comment.