Class: Fog::AWS::Compute::Image
- Defined in:
- lib/fog/aws/models/compute/image.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#collection, #initialize, #inspect, #reload, #to_json, #wait_for
Methods included from Fog::Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Attributes::InstanceMethods
#_dump, #attributes, #identity, #identity=, #merge_attributes, #new_record?, #requires
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#deregister(delete_snapshot = false) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fog/aws/models/compute/image.rb', line 26 def deregister(delete_snapshot = false) connection.deregister_image(@id) if(delete_snapshot && @root_device_type=="ebs") @block_device_mapping.each do |block_device| next if block_device["deviceName"] != @root_device_name snapshot_id = block_device["snapshotId"] snapshot = @connection.snapshots.get(snapshot_id) return snapshot.destroy end end return true end |