From 59be37974b11ed72655edca604718fcc910c4702 Mon Sep 17 00:00:00 2001 From: Andrei Veselov Date: Tue, 17 Apr 2018 17:25:48 +0200 Subject: [PATCH 1/2] Fix wrong class name --- app/models/manageiq/providers/cloud_manager/template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/cloud_manager/template.rb b/app/models/manageiq/providers/cloud_manager/template.rb index 54a7e733bef..e11f0e74873 100644 --- a/app/models/manageiq/providers/cloud_manager/template.rb +++ b/app/models/manageiq/providers/cloud_manager/template.rb @@ -27,7 +27,7 @@ def self.create_image_queue(userid, ext_management_system, options = {}) } queue_opts = { - :class_name => self.class.name, + :class_name => self.name, :method_name => 'create_image', :role => 'ems_operations', :zone => ext_management_system.my_zone, From 8defcf7530f4a40cfe8933b3e465afad79970576 Mon Sep 17 00:00:00 2001 From: Andrei Veselov Date: Tue, 17 Apr 2018 17:28:56 +0200 Subject: [PATCH 2/2] Add class_by_ems to find correct EMS for Template --- app/models/manageiq/providers/cloud_manager/template.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/manageiq/providers/cloud_manager/template.rb b/app/models/manageiq/providers/cloud_manager/template.rb index e11f0e74873..e58fe78adf7 100644 --- a/app/models/manageiq/providers/cloud_manager/template.rb +++ b/app/models/manageiq/providers/cloud_manager/template.rb @@ -20,6 +20,10 @@ def self.eligible_for_provisioning ManageIQ::Providers::Openstack::CloudManager::VolumeSnapshotTemplate)) end + def self.class_by_ems(ext_management_system) + ext_management_system.class::Template + end + def self.create_image_queue(userid, ext_management_system, options = {}) task_opts = { :action => "Creating Cloud Template for user #{userid}",