Class: ResourceIn::RacktablesDriver

Inherits:
Driver
  • Object
show all
Defined in:
lib/resource_in/driver_racktables.rb

Constant Summary

Constants inherited from Driver

Driver::DETAIL_FORMAT, Driver::FORMAT, Driver::VALID_PATTERN

Instance Method Summary collapse

Methods inherited from Driver

#invoke, #validate_condition

Constructor Details

#initializeRacktablesDriver

Returns a new instance of RacktablesDriver.



6
7
8
9
# File 'lib/resource_in/driver_racktables.rb', line 6

def initialize
  @cmd_lastupdate = 'get_vm_lastupdate'
  @cachepath = '/tmp/cache.racktables'
end

Instance Method Details

#get_lastupdate(vm) ⇒ Object



10
11
12
# File 'lib/resource_in/driver_racktables.rb', line 10

def get_lastupdate(vm)
  invoke("#{@cmd_lastupdate} '#{vm}'", @cachepath + ".last_update.#{vm}")
end