Class: Fog::Compute::VcloudDirector::CatalogItem

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/vcloud_director/models/compute/catalog_item.rb

Instance Method Summary collapse

Methods inherited from Model

#initialize, #inspect, #lazy_load_attrs, #make_attr_loaded_method, #make_lazy_load_method

Constructor Details

This class inherits a constructor from Fog::Compute::VcloudDirector::Model

Instance Method Details

#instantiate(vapp_name, options = {}) ⇒ Object



22
23
24
25
26
# File 'lib/fog/vcloud_director/models/compute/catalog_item.rb', line 22

def instantiate(vapp_name, options={})
  response = service.instantiate_vapp_template(vapp_name, vapp_template_id, options)
  service.process_task(response.body[:Tasks][:Task])
  response.body[:href].split('/').last # returns the vapp_id if it was instantiated successfully .
end

#vapp_templateObject



16
17
18
19
# File 'lib/fog/vcloud_director/models/compute/catalog_item.rb', line 16

def vapp_template
  requires :id
  service.vapp_templates.get(self.vapp_template_id)
end