Skip to content

Commit

Permalink
Merge pull request #272 from agrare/disconnect_storage_no_op
Browse files Browse the repository at this point in the history
Make disconnect_storage a no-op

(cherry picked from commit d9dcef8)

https://bugzilla.redhat.com/show_bug.cgi?id=1644770
  • Loading branch information
gmcculloug authored and simaishi committed Nov 30, 2018
1 parent 4a01657 commit 449522d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ def self.miq_src_vm_destroy_all_snapshots(obj, _inputs)
event_object_from_workspace(obj).src_vm_destroy_all_snapshots
end

def self.miq_src_vm_disconnect_storage(obj, _inputs)
event_object_from_workspace(obj).src_vm_disconnect_storage
def self.miq_src_vm_disconnect_storage(_obj, _inputs)
# Logic for storage disconnect has been moved to VmOrTemplate#disconnect_inv
# This method is kept for compatibility and will be removed in a future version
end

def self.miq_event_enforce_policy(obj, _inputs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def src_vm_destroy_all_snapshots
end

def src_vm_disconnect_storage
ar_method { @object.src_vm_disconnect_storage }
# Logic for storage disconnect has been moved to VmOrTemplate#disconnect_inv
# This method is kept for compatibility and will be removed in a future version
end
end
end
2 changes: 1 addition & 1 deletion spec/service_models/miq_ae_service_ems_event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
end

it "#src_vm_disconnect_storage" do
expect_any_instance_of(VmOrTemplate).to receive("disconnect_storage".to_sym).once
expect_any_instance_of(VmOrTemplate).not_to receive("disconnect_storage".to_sym).once
@service_event.src_vm_disconnect_storage
end
end

0 comments on commit 449522d

Please sign in to comment.