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