Class: Puppet::Util::NetworkDevice::Cudawaf::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/util/network_device/cudawaf/device.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, options = {}) ⇒ Device

Returns a new instance of Device.



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/puppet/util/network_device/cudawaf/device.rb', line 15

def initialize(url, options = {})
  @url = URI.parse(url)

  @autoloader = Puppet::Util::Autoload.new(
    self,
    "puppet/util/network_device/transport"
  )
  if @autoloader.load("cudawaf")
    @transport = Puppet::Util::NetworkDevice::Transport::Cudawaf.new(url, options[:debug])
    Puppet.debug(self.class.to_s.split("::").last + ": Inside Device Initialize")
  end
end

Instance Attribute Details

#transportObject

Returns the value of attribute transport.



13
14
15
# File 'lib/puppet/util/network_device/cudawaf/device.rb', line 13

def transport
  @transport
end

#urlObject

Returns the value of attribute url.



13
14
15
# File 'lib/puppet/util/network_device/cudawaf/device.rb', line 13

def url
  @url
end

Instance Method Details

#factsObject



28
29
30
31
32
33
# File 'lib/puppet/util/network_device/cudawaf/device.rb', line 28

def facts
  Puppet.debug(self.class.to_s.split("::").last + ": Inside Device FACTS Initialize")
  @facts ||= Puppet::Util::NetworkDevice::Cudawaf::Facts.new(@transport, @url)

  return @facts.retrieve(@url)
end