Class: Fog::Compute::VcloudDirector::Tag

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/vcloud_director/models/compute/tag.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

#destroyObject



20
21
22
23
# File 'lib/fog/vcloud_director/models/compute/tag.rb', line 20

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

#value=(new_value) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/fog/vcloud_director/models/compute/tag.rb', line 10

def value=(new_value)
  has_changed = ( value != new_value )
  not_first_set = !value.nil?
  attributes[:value] = new_value
  if not_first_set && has_changed
    response = service.(vm.id, id, value)
    service.process_task(response.body)
  end
end

#vmObject



25
26
27
# File 'lib/fog/vcloud_director/models/compute/tag.rb', line 25

def vm
  attributes[:vm]
end