Class: Fog::Compute::VcloudDirector::Vapp

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

Instance Attribute Summary

Attributes inherited from Model

#collection, #service

Instance Method Summary collapse

Methods inherited from Model

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

Methods inherited from Model

#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for

Methods included from Attributes::ClassMethods

#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes

Methods included from Fog::Core::DeprecatedConnectionAccessors

#connection, #connection=, #prepare_service_value

Methods included from Attributes::InstanceMethods

#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one

Constructor Details

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

Instance Method Details

#destroyObject



48
49
50
51
# File 'lib/fog/vcloud_director/models/compute/vapp.rb', line 48

def destroy
  response = service.delete_vapp(id)
  service.process_task(response.body)
end

#power_offObject



43
44
45
46
# File 'lib/fog/vcloud_director/models/compute/vapp.rb', line 43

def power_off
  response = service.post_vm_poweroff(id)
  service.process_task(response.body)
end

#power_onObject



38
39
40
41
# File 'lib/fog/vcloud_director/models/compute/vapp.rb', line 38

def power_on
  response = service.post_vm_poweron(id)
  service.process_task(response.body)
end

#tagsObject



28
29
30
31
# File 'lib/fog/vcloud_director/models/compute/vapp.rb', line 28

def tags
  requires :id
  service.tags(:vm => self)
end

#undeployObject



33
34
35
36
# File 'lib/fog/vcloud_director/models/compute/vapp.rb', line 33

def undeploy
  response = service.undeploy(id)
  service.process_task(response.body)
end

#vmsObject



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

def vms
  requires :id
  service.vms(:vapp => self)
end