diff --git a/app/models/cloud_tenant.rb b/app/models/cloud_tenant.rb index 69f72bb902a..23c57c9864e 100644 --- a/app/models/cloud_tenant.rb +++ b/app/models/cloud_tenant.rb @@ -57,7 +57,7 @@ def self.create_cloud_tenant_queue(userid, ext_management_system, options = {}) :userid => userid } queue_opts = { - :class_name => class_by_ems(ext_management_system), + :class_name => class_by_ems(ext_management_system).name, :method_name => 'create_cloud_tenant', :priority => MiqQueue::HIGH_PRIORITY, :role => 'ems_operations', @@ -156,7 +156,7 @@ def self.post_refresh_ems(ems_id, _) ems = ExtManagementSystem.find(ems_id) MiqQueue.put_unless_exists( - :class_name => ems.class, + :class_name => ems.class.name, :instance_id => ems_id, :method_name => 'sync_cloud_tenants_with_tenants', :zone => ems.my_zone diff --git a/app/models/manageiq/providers/cloud_manager/vm.rb b/app/models/manageiq/providers/cloud_manager/vm.rb index 225d879a3dd..71ff9ffe7a0 100644 --- a/app/models/manageiq/providers/cloud_manager/vm.rb +++ b/app/models/manageiq/providers/cloud_manager/vm.rb @@ -237,7 +237,7 @@ def self.live_migrate_queue(userid, vm, options = {}) :userid => userid } queue_opts = { - :class_name => vm.class, + :class_name => vm.class.name, :method_name => 'live_migrate', :priority => MiqQueue::HIGH_PRIORITY, :role => 'ems_operations', @@ -253,7 +253,7 @@ def self.evacuate_queue(userid, vm, options = {}) :userid => userid } queue_opts = { - :class_name => vm.class, + :class_name => vm.class.name, :method_name => 'evacuate', :priority => MiqQueue::HIGH_PRIORITY, :role => 'ems_operations', diff --git a/app/models/mixins/authentication_mixin.rb b/app/models/mixins/authentication_mixin.rb index 5fac8688cc6..37000b41d43 100644 --- a/app/models/mixins/authentication_mixin.rb +++ b/app/models/mixins/authentication_mixin.rb @@ -31,7 +31,7 @@ def self.validate_credentials_task(args, user_id, zone) queue_opts = { :args => [*args], - :class_name => self, + :class_name => name, :method_name => "raw_connect?", :queue_name => "generic", :role => "ems_operations", diff --git a/app/models/mixins/miq_provision_quota_mixin.rb b/app/models/mixins/miq_provision_quota_mixin.rb index 52e80d6f636..1586e779a7b 100644 --- a/app/models/mixins/miq_provision_quota_mixin.rb +++ b/app/models/mixins/miq_provision_quota_mixin.rb @@ -153,7 +153,7 @@ def quota_find_retired_vms_by_owner_and_group(options) end def quota_vm_stats(vms_method, options) - result = {:count => 0, :memory => 0, :cpu => 0, :snapshot_storage => 0, :used_storage => 0, :allocated_storage => 0, :ids => [], :class_name => Vm.name} + result = {:count => 0, :memory => 0, :cpu => 0, :snapshot_storage => 0, :used_storage => 0, :allocated_storage => 0, :ids => [], :class_name => "Vm"} vms = send(vms_method, options) result[:count] = vms.length vms.each do |vm| @@ -330,9 +330,9 @@ def bundle_quota_values(service_resource, result) end def quota_provision_stats(prov_method, options) - result = {:count => 0, :memory => 0, :cpu => 0, :storage => 0, :ids => [], :class_name => MiqProvisionRequest.name, + result = {:count => 0, :memory => 0, :cpu => 0, :storage => 0, :ids => [], :class_name => "MiqProvisionRequest", :active => { - :class_name => MiqProvision.name, :ids => [], :storage_by_id => Hash.new { |k, v| k[v] = 0 }, + :class_name => "MiqProvision", :ids => [], :storage_by_id => Hash.new { |k, v| k[v] = 0 }, :memory_by_host_id => Hash.new { |k, v| k[v] = 0 }, :cpu_by_host_id => Hash.new { |k, v| k[v] = 0 }, :vms_by_storage_id => Hash.new { |k, v| k[v] = [] } } diff --git a/app/models/service_template_transformation_plan_task.rb b/app/models/service_template_transformation_plan_task.rb index 0a8dd60cc2c..5a0c19ba52c 100644 --- a/app/models/service_template_transformation_plan_task.rb +++ b/app/models/service_template_transformation_plan_task.rb @@ -146,7 +146,7 @@ def transformation_log_queue(userid = nil, log_type = 'v2v') _log.info("Queuing the download of #{log_type} log for #{description} with ID [#{id}]") task_options = {:userid => userid, :action => 'transformation_log'} - queue_options = {:class_name => self.class, + queue_options = {:class_name => self.class.name, :method_name => 'transformation_log', :instance_id => id, :args => [log_type], diff --git a/spec/models/mixins/authentication_mixin_spec.rb b/spec/models/mixins/authentication_mixin_spec.rb index 89299a0ec2f..1e94e84463f 100644 --- a/spec/models/mixins/authentication_mixin_spec.rb +++ b/spec/models/mixins/authentication_mixin_spec.rb @@ -271,7 +271,7 @@ def self.name; "TestClass"; end let(:queue_opts) do { :args => [*args], - :class_name => ExtManagementSystem, + :class_name => "ExtManagementSystem", :method_name => "raw_connect?", :queue_name => "generic", :role => "ems_operations",