diff --git a/app/models/manageiq/providers/vmware/infra_manager.rb b/app/models/manageiq/providers/vmware/infra_manager.rb index fd8b58e42..1db5b9a3a 100644 --- a/app/models/manageiq/providers/vmware/infra_manager.rb +++ b/app/models/manageiq/providers/vmware/infra_manager.rb @@ -31,7 +31,6 @@ class Vmware::InfraManager < InfraManager include VimConnectMixin include CisConnectMixin - before_save :stop_event_monitor_queue_on_change, :stop_refresh_worker_queue_on_change before_destroy :stop_event_monitor, :stop_refresh_worker supports :catalog @@ -345,9 +344,14 @@ def validate_remote_console_webmks_support true end - def after_update_authentication + def after_update_authentication(changes) super - stop_refresh_worker_queue_on_credential_change + stop_refresh_worker_queue_on_credential_change(changes) + end + + def after_update_endpoints(changes) + super + stop_refresh_worker_queue_on_change(changes) end def self.event_monitor_class diff --git a/spec/models/manageiq/providers/vmware/infra_manager_spec.rb b/spec/models/manageiq/providers/vmware/infra_manager_spec.rb index 44c86e988..3f03cf504 100644 --- a/spec/models/manageiq/providers/vmware/infra_manager_spec.rb +++ b/spec/models/manageiq/providers/vmware/infra_manager_spec.rb @@ -239,39 +239,6 @@ end end - context "handling changes that may require EventCatcher restart" do - before(:each) do - zone = EvmSpecHelper.local_miq_server.zone - @ems = FactoryBot.create(:ems_vmware, :zone => zone) - end - - it "will restart EventCatcher when ipaddress changes" do - @ems.update(:ipaddress => "1.1.1.1") - assert_event_catcher_restart_queued - end - - it "will restart EventCatcher when hostname changes" do - @ems.update(:hostname => "something-else") - assert_event_catcher_restart_queued - end - - it "will restart EventCatcher when credentials change" do - @ems.update_authentication(:default => {:userid => "new_user_id"}) - assert_event_catcher_restart_queued - end - - it "will not put multiple restarts of the EventCatcher on the queue" do - @ems.update(:ipaddress => "1.1.1.1") - @ems.update(:hostname => "something else") - assert_event_catcher_restart_queued - end - - it "will not restart EventCatcher when name changes" do - @ems.update(:name => "something else") - expect(MiqQueue.count).to eq(0) - end - end - context "catalog types" do it "#catalog_types" do ems = FactoryBot.create(:ems_vmware)