1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/vcloudng/models/compute/catalog_item.rb
Rodrigo Estebanez 60e8a5ec2a many changes...
2013-06-20 19:36:34 +02:00

29 lines
No EOL
699 B
Ruby

require 'fog/core/model'
module Fog
module Compute
class Vcloudng
class CatalogItem < Fog::Model
identity :id
attribute :name
attribute :type
attribute :href
attribute :description, :aliases => :Description
attribute :vapp_template_id
def instantiate(vapp_name, options={})
puts vapp_template_id
response = service.instantiate_vapp_template(vapp_name, vapp_template_id, options = {})
task = response.body[:Tasks][:Task]
task[:id] = task[:href].split('/').last
service.tasks.new(task)
end
end
end
end
end