Class: Puppet::Provider::HPE3PAR
- Inherits:
-
Puppet::Provider
- Object
- Puppet::Provider
- Puppet::Provider::HPE3PAR
- Defined in:
- lib/puppet/provider/hpe3par.rb
Instance Attribute Summary collapse
-
#device ⇒ Object
Returns the value of attribute device.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#device ⇒ Object
Returns the value of attribute device.
19 20 21 |
# File 'lib/puppet/provider/hpe3par.rb', line 19 def device @device end |
Class Method Details
.transport(args = nil) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/puppet/provider/hpe3par.rb', line 23 def self.transport(args=nil) @device ||= Puppet::Util::NetworkDevice.current if not @device and Facter.value(:url) Puppet.debug "NetworkDevice::HPE3PAR: connecting via facter URL." @device ||= Puppet::Util::NetworkDevice::Hpe3par::Device.new(Facter.value(:url)) elsif not @device and args and args.length == 1 Puppet.debug "NetworkDevice::HPE3PAR: connecting via URL argument #{args[0]}." @device ||= Puppet::Util::NetworkDevice::Hpe3par::Device.new(args[0]) end raise Puppet::Error, "#{self.class} : device not initialized #{caller.join("\n")}" unless @device @transport = @device.transport end |
Instance Method Details
#conn_info ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/puppet/provider/hpe3par.rb', line 42 def conn_info if resource[:url] resource[:url] elsif resource[:ssip] and resource[:user] and resource[:password] "https://" + resource[:user] + ":" + resource[:password] + "@" + resource[:ssip] + ":8080/" else nil end end |
#transport(*args) ⇒ Object
36 37 38 39 40 |
# File 'lib/puppet/provider/hpe3par.rb', line 36 def transport(*args) # this calls the class instance of self.transport instead of the object # instance which causes an infinite loop. self.class.transport(args) end |