Class: Fog::Scaleway::Compute::Image
- Inherits:
-
Model
- Object
- Model
- Fog::Scaleway::Compute::Image
- Defined in:
- lib/fog/scaleway/models/compute/image.rb
Instance Method Summary collapse
Instance Method Details
#default_bootscript=(value) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fog/scaleway/models/compute/image.rb', line 17 def default_bootscript=(value) attributes[:default_bootscript] = case value when Hash service.bootscripts.new(value) when String service.bootscripts.new(identity: value) else value end end |
#destroy ⇒ Object
47 48 49 50 51 52 |
# File 'lib/fog/scaleway/models/compute/image.rb', line 47 def destroy requires :identity service.delete_image(identity) true end |
#root_volume=(value) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/fog/scaleway/models/compute/image.rb', line 28 def root_volume=(value) attributes[:root_volume] = case value when Hash service.snapshots.new(value) when String service.snapshots.new(identity: value) else value end end |
#save ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/fog/scaleway/models/compute/image.rb', line 39 def save if persisted? update else create end end |