Method: Fog::OpenStack::Compute::Snapshots#get

Defined in:
lib/fog/openstack/compute/models/snapshots.rb

#get(snapshot_id) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/fog/openstack/compute/models/snapshots.rb', line 27

def get(snapshot_id)
  if snapshot = service.get_snapshot_details(snapshot_id).body['snapshot']
    new(snapshot)
  end
rescue Fog::OpenStack::Compute::NotFound
  nil
end