Skip to content

Commit

Permalink
Merge pull request #236 from andyvesel/add_delete_queue_for_template
Browse files Browse the repository at this point in the history
Add delete_queue method for Template
  • Loading branch information
mansam authored Mar 2, 2018
2 parents 411ee54 + 705f456 commit c2637ee
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/models/manageiq/providers/openstack/cloud_manager/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,22 @@ def update_image(options)
raw_update_image(options)
end

def delete_image_queue(userid)
task_opts = {
:action => "Deleting image for user #{userid}",
:userid => userid
}
queue_opts = {
:class_name => "ManageIQ::Providers::Openstack::CloudManager::Template",
:method_name => 'delete_image',
:instance_id => id,
:role => 'ems_operations',
:zone => ext_management_system.my_zone,
:args => []
}
MiqTask.generic_action_with_callback(task_opts, queue_opts)
end

def raw_delete_image
ext_management_system.with_provider_connection(:service => 'Image') do |service|
service.delete_image(ems_ref)
Expand Down

0 comments on commit c2637ee

Please sign in to comment.