class Fog::Compute::Google::InstanceTemplates

Public Instance Methods

all() click to toggle source
# File lib/fog/compute/google/models/instance_templates.rb, line 7
def all
  data = service.list_instance_templates.items || []
  load(data.map(&:to_h))
end
get(identity) click to toggle source
# File lib/fog/compute/google/models/instance_templates.rb, line 12
def get(identity)
  if identity
    instance_template = service.get_instance_template(identity).to_h
    return new(instance_template)
  end
rescue ::Google::Apis::ClientError => e
  raise e unless e.status_code == 404
  nil
end