diff --git a/app/models/conversion_host.rb b/app/models/conversion_host.rb index 45eb7737b18..cd1f50c817f 100644 --- a/app/models/conversion_host.rb +++ b/app/models/conversion_host.rb @@ -1,3 +1,5 @@ +require 'resolv' + class ConversionHost < ApplicationRecord include NewWithTypeStiMixin include AuthenticationMixin diff --git a/app/models/conversion_host/configurations.rb b/app/models/conversion_host/configurations.rb index cdb77b85e94..dc24431baf7 100644 --- a/app/models/conversion_host/configurations.rb +++ b/app/models/conversion_host/configurations.rb @@ -34,7 +34,7 @@ def enable_queue(params, auth_user = nil) resource = params.delete(:resource) params[:resource_id] = resource.id - params[:resource_type] = resource.class.name + params[:resource_type] = resource.class.base_class.name queue_configuration('enable', nil, resource, params, auth_user) end diff --git a/spec/models/conversion_host/configurations_spec.rb b/spec/models/conversion_host/configurations_spec.rb index c58d5b50d9a..2d90432bdc6 100644 --- a/spec/models/conversion_host/configurations_spec.rb +++ b/spec/models/conversion_host/configurations_spec.rb @@ -5,7 +5,7 @@ let(:params) do { :name => 'transformer', - :resource_type => vm.class.name, + :resource_type => vm.class.base_class.name, :resource_id => vm.id, :resource => vm }