Class: Puppet::Util::NetworkDevice::Hpe3par::Device

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Device.



25
26
27
28
# File 'lib/puppet/util/network_device/hpe3par/device.rb', line 25

def initialize(url, options = {})
  @transport = HPE3PAR_API.new(url)
  Puppet.debug("Initializing HPE 3PAR Device : #{url}")
end

Instance Attribute Details

#transportObject

Returns the value of attribute transport.



23
24
25
# File 'lib/puppet/util/network_device/hpe3par/device.rb', line 23

def transport
  @transport
end

Instance Method Details

#factsObject



30
31
32
33
34
35
36
# File 'lib/puppet/util/network_device/hpe3par/device.rb', line 30

def facts
  Puppet.debug("#{self.class}.facts: connecting to HPE 3PAR device
               #{@transport.url.host}")
  @facts ||= Puppet::Util::NetworkDevice::Hpe3par::Facts.new(@transport)
  device_facts = @facts.retrieve
  device_facts
end