Class: Fog::Brightbox::Compute::Image
Instance Method Summary
collapse
#lock!, #locked?, #unlock!
#collection_name, #resource_name
Instance Method Details
#destroy ⇒ Object
62
63
64
65
66
|
# File 'lib/fog/brightbox/models/compute/image.rb', line 62
def destroy
requires :identity
service.delete_image(identity)
true
end
|
#ready? ⇒ Boolean
40
41
42
|
# File 'lib/fog/brightbox/models/compute/image.rb', line 40
def ready?
status == "available"
end
|
#save ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/fog/brightbox/models/compute/image.rb', line 44
def save
raise Fog::Errors::Error, "Resaving an existing object may create a duplicate" if persisted?
options = {
arch: arch,
description: description,
http_url: http_url,
name: name,
server: server,
source: source,
username: username,
volume: volume
}.delete_if { |_k, v| v.nil? || v == "" }
data = service.create_image(options)
merge_attributes(data)
true
end
|