Class: Puppet::GoogleAPI::Compute::Images

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/google_api/compute.rb

Instance Method Summary collapse

Constructor Details

#initialize(api, compute) ⇒ Images

Returns a new instance of Images.



256
257
258
259
# File 'lib/puppet/google_api/compute.rb', line 256

def initialize(api, compute)
  @api     = api
  @compute = compute
end

Instance Method Details

#get(project, name) ⇒ Object



261
262
263
264
265
# File 'lib/puppet/google_api/compute.rb', line 261

def get(project, name)
  @api.execute(@compute.images.get, project: project, image: name).first
rescue
  nil
end