class Puppet::Util::NetworkDevice
Attributes
current[R]
Public Class Methods
init(device)
click to toggle source
# File lib/puppet/util/network_device.rb 6 def self.init(device) 7 require "puppet/util/network_device/#{device.provider}/device" 8 @current = Puppet::Util::NetworkDevice.const_get(device.provider.capitalize).const_get(:Device).new(device.url, device.options) 9 rescue => detail 10 raise detail, _("Can't load %{provider} for %{device}: %{detail}") % { provider: device.provider, device: device.name, detail: detail }, detail.backtrace 11 end
teardown()
click to toggle source
Should only be used in tests
# File lib/puppet/util/network_device.rb 14 def self.teardown 15 @current = nil 16 end