Class: Fog::Compute::Google::Snapshot

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/google/models/compute/snapshot.rb

Instance Attribute Summary

Attributes inherited from Model

#collection, #service

Instance Method Summary collapse

Methods inherited from Model

#initialize, #inspect, #symbolize_keys, #to_json, #wait_for

Methods included from Attributes::ClassMethods

#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes

Methods included from Fog::Core::DeprecatedConnectionAccessors

#connection, #connection=, #prepare_service_value

Methods included from Attributes::InstanceMethods

#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#reloadObject



20
21
22
23
24
25
26
27
# File 'lib/fog/google/models/compute/snapshot.rb', line 20

def reload
  requires :name

  data = service.get_snapshot(name, self.service.project).body

  self.merge_attributes(data)
  self
end

#resource_urlObject



29
30
31
# File 'lib/fog/google/models/compute/snapshot.rb', line 29

def resource_url
  "#{self.service.project}/global/snapshots/#{name}"
end