Class: Fog::Compute::OpenStack::Image
Instance Attribute Summary
#project
Instance Method Summary
collapse
#create, #initialize, #save, #update
Instance Method Details
#destroy ⇒ Object
35
36
37
38
39
|
# File 'lib/fog/compute/openstack/models/image.rb', line 35
def destroy
requires :id
service.delete_image(id)
true
end
|
22
23
24
25
26
27
|
# File 'lib/fog/compute/openstack/models/image.rb', line 22
def metadata
@metadata ||= begin
Fog::Compute::OpenStack::Metadata.new(:service => service,
:parent => self)
end
end
|
29
30
31
32
33
|
# File 'lib/fog/compute/openstack/models/image.rb', line 29
def metadata=(new_metadata = {})
metas = []
new_metadata.each_pair { |k, v| metas << {"key" => k, "value" => v} }
metadata.load(metas)
end
|
#ready? ⇒ Boolean
41
42
43
|
# File 'lib/fog/compute/openstack/models/image.rb', line 41
def ready?
status == 'ACTIVE'
end
|