Sha256: 1a76c9d5fc418695c92db00adebc8ec9e6a73c9481fbdb25dbe3bab85b26f429
Contents?: true
Size: 599 Bytes
Versions: 23
Compression:
Stored size: 599 Bytes
Contents
module Fog module Compute class Google class InstanceTemplates < Fog::Collection model Fog::Compute::Google::InstanceTemplate def all data = service.list_instance_templates.items || [] load(data.map(&:to_h)) end 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 end end end end
Version data entries
23 entries across 23 versions & 2 rubygems