def remove(cartridge)
unless options.confirm
results { say "Removing a cartridge is a destructive operation that may result in loss of data associated with the cartridge. You must pass the --confirm switch to this command in order to to remove the cartridge." }
return 1
end
rest_domain = rest_client.find_domain(options.namespace)
rest_app = rest_domain.find_application(options.app)
rest_cartridge = rest_app.find_cartridge cartridge, :type => "embedded"
rest_cartridge.destroy
results { say "Success: Cartridge '#{rest_cartridge.name}' removed from application '#{rest_app.name}'." }
0
end