Sha256: 24b5d998836c13d52fd6a8811ffcf5c3468f6732a8652dcba78f40b6ec271885

Contents?: true

Size: 760 Bytes

Versions: 24

Compression:

Stored size: 760 Bytes

Contents

require 'puppet/node/facts'
require 'puppet/indirector/code'

class Puppet::Node::Facts::NetworkDevice < Puppet::Indirector::Code
  desc "Retrieve facts from a network device."

  # Look a device's facts up through the current device.
  def find(request)
    result = Puppet::Node::Facts.new(request.key, Puppet::Util::NetworkDevice.current.facts)

    result.add_local_facts
    result.stringify
    result.downcase_if_necessary

    result
  end

  def destroy(facts)
    raise Puppet::DevError, "You cannot destroy facts in the code store; it is only used for getting facts from a remote device"
  end

  def save(facts)
    raise Puppet::DevError, "You cannot save facts to the code store; it is only used for getting facts from a remote device"
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
puppet-parse-0.1.4 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-parse-0.1.3 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-parse-0.1.2 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-parse-0.1.1 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-2.7.26 lib/puppet/indirector/facts/network_device.rb
puppet-2.7.25 lib/puppet/indirector/facts/network_device.rb
puppet-2.7.24 lib/puppet/indirector/facts/network_device.rb
puppet-2.7.23 lib/puppet/indirector/facts/network_device.rb
puppet-2.7.22 lib/puppet/indirector/facts/network_device.rb
puppet-parse-0.1.0 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-parse-0.0.6 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-2.7.21 lib/puppet/indirector/facts/network_device.rb
puppet-parse-0.0.5 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-parse-0.0.4 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-parse-0.0.2 lib/vendor/puppet/indirector/facts/network_device.rb
puppet-2.7.20 lib/puppet/indirector/facts/network_device.rb
puppet-2.7.20.rc1 lib/puppet/indirector/facts/network_device.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/indirector/facts/network_device.rb
puppet-2.7.19 lib/puppet/indirector/facts/network_device.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/indirector/facts/network_device.rb