Class: Puppet::Util::NetworkDevice
- Defined in:
- lib/vendor/puppet/util/network_device.rb
Defined Under Namespace
Modules: Cisco, IPCalc, Transport Classes: Base, Config
Class Attribute Summary collapse
-
.current ⇒ Object
readonly
Returns the value of attribute current.
Class Method Summary collapse
- .init(device) ⇒ Object
-
.teardown ⇒ Object
Should only be used in tests.
Class Attribute Details
.current ⇒ Object (readonly)
Returns the value of attribute current.
3 4 5 |
# File 'lib/vendor/puppet/util/network_device.rb', line 3 def current @current end |
Class Method Details
.init(device) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/vendor/puppet/util/network_device.rb', line 6 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 |
.teardown ⇒ Object
Should only be used in tests
14 15 16 |
# File 'lib/vendor/puppet/util/network_device.rb', line 14 def self.teardown @current = nil end |