From edcc516389739029e7215230c493fcf89ffd4275 Mon Sep 17 00:00:00 2001 From: Lucy Fu Date: Thu, 4 Feb 2021 16:54:08 -0500 Subject: [PATCH] Add PxeServer.verify_depot_settings_queue https://github.com/ManageIQ/manageiq-api/issues/926 --- app/models/mixins/file_depot_mixin.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/models/mixins/file_depot_mixin.rb b/app/models/mixins/file_depot_mixin.rb index b5bd8559b9b2..ba74010614fc 100644 --- a/app/models/mixins/file_depot_mixin.rb +++ b/app/models/mixins/file_depot_mixin.rb @@ -24,6 +24,22 @@ def verify_depot_settings(settings) res end + def verify_depot_settings_queue(userid, zone, options) + task_opts = { + :action => "Verify #{display_name} Credentials", + :userid => userid + } + + queue_opts = { + :class_name => name, + :method_name => "verify_depot_settings", + :args => [options], + :zone => zone + } + + MiqTask.generic_action_with_callback(task_opts, queue_opts) + end + def mnt_instance(settings) settings[:uri_prefix] ||= get_uri_prefix(settings[:uri]) klass = "Miq#{settings[:uri_prefix].capitalize}Session".constantize