blob: a650670cea588ef4bf2b1cce74b490c646f73fb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
class Puppet::Util::NetworkDevice
class << self
attr_reader :current
end
def self.init(device)
require "puppet/util/network_device/#{device.provider}/device"
@current = Puppet::Util::NetworkDevice.const_get(device.provider.capitalize).const_get(:Device).new(device.url)
rescue => detail
raise "Can't load #{device.provider} for #{device.name}: #{detail}"
end
# for tests reset
def self.clear
@current = nil
end
end
|