Class: PuppetX::NetdevStdlib::Check
- Inherits:
-
Object
- Object
- PuppetX::NetdevStdlib::Check
- Defined in:
- lib/puppet_x/puppetlabs/netdev_stdlib/check.rb
Overview
Helper function to check if we should load the resource_api
Class Method Summary collapse
Class Method Details
.use_old_netdev_type ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/puppet_x/puppetlabs/netdev_stdlib/check.rb', line 5 def self.use_old_netdev_type # check if Resource API is available begin require 'puppet/resource_api' use_old_netdev = false rescue LoadError return true end # is this an agent running on a network device do no use RSAPI - there are only a few of them use_old_netdev = %w[aristaeos ios_xr].include? Facter.value('operatingsystem').downcase use_old_netdev end |