Class: Puppet::GoogleAPI::Compute::MachineTypes

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

Instance Method Summary collapse

Constructor Details

#initialize(api, compute) ⇒ MachineTypes

Returns a new instance of MachineTypes.



239
240
241
242
# File 'lib/puppet/google_api/compute.rb', line 239

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

Instance Method Details

#get(project, zone, name) ⇒ Object



244
245
246
247
248
# File 'lib/puppet/google_api/compute.rb', line 244

def get(project, zone, name)
  @api.execute(@compute.machine_types.get, project: project, zone: zone, machineType: name).first
rescue
  nil
end