Class: Fog::Compute::VcloudDirector::Tag
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::Compute::VcloudDirector::Tag
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
Instance Method Details
#destroy ⇒ Object
20
21
22
23
|
# File 'lib/fog/vcloud_director/models/compute/tag.rb', line 20
def destroy
response = service.delete_vapp_metadata_item_metadata(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.put_vapp_metadata_item_metadata(vm.id, id, value)
service.process_task(response.body)
end
end
|
#vm ⇒ Object
25
26
27
|
# File 'lib/fog/vcloud_director/models/compute/tag.rb', line 25
def vm
attributes[:vm]
end
|