# File lib/puppet/util/network_device/config.rb, line 7 def self.main @main ||= self.new end
# File lib/puppet/util/network_device/config.rb, line 17 def exists? Puppet::FileSystem.exist?(@file.to_str) end
Read the configuration file.
# File lib/puppet/util/network_device/config.rb, line 30 def read(force = false) return unless exists? parse if force or @file.changed? end
# File lib/puppet/util/network_device/config.rb, line 11 def self.devices main.devices || [] end
# File lib/puppet/util/network_device/config.rb, line 7 def self.main @main ||= self.new end
# File lib/puppet/util/network_device/config.rb, line 21 def initialize @file = Puppet::Util::WatchedFile.new(Puppet[:deviceconfig]) @devices = {} read(true) # force reading at start end