Me again... 

I pressed on using the /var/lib/puppet... configdir for the time-being, and 
with a bit more jiggery pokery, I've managed to successfully register a 
NetApp device, and extract some facts from it... And here's the 
photographic proof :) :D http://ow.ly/i/15SLN

Now to start looking at how to handle the next steps, such as volume 
creation, quota creation, export creation... :D

Latest code has been pushed to 
Github<https://github.com/fatmcgav/fatmcgav-netapp>
...

Still need to work out how to use a central confdir rather than agent 
specific ones, but can come back to that :) 

Cheers
Gavin 

On Monday, 5 November 2012 11:35:26 UTC, Gavin Williams wrote:
>
> Ok, have fixed that error aswell... 
>
> Replaced *':configdir' *with *':confdir'*. 
> However it's now failing due to the netapp.yml file not being present... 
> What's confused me is the path it's come up with for *':confdir'*. 
> According to the debug output, it's trying to use 
>
> ESC[0;36mDebugESC[0m: Puppet::Device::Netapp: connecting to Netapp device 
>> actint-star-nactl01.
>> ESC[0;36mDebugESC[0m: Puppet::Device::Netapp: configdir is 
>> /var/lib/puppet/devices/actint-star-nactl01.
>>
>
> However I would prefer it to use */etc/puppet* on the master...  
> Any way I could do this, other than hard-coding? 
>
> Cheers
> Gavin
>
> On Monday, 5 November 2012 11:24:16 UTC, Gavin Williams wrote:
>>
>> Ok, after a bit more googling, have solved the NaElement load error... 
>>
>> Tweaked the NaServer.rb file as follows:
>>
>> #require 'NaElement'
>>> require File.dirname(__FILE__) + "/NaElement"
>>>
>>
>> I've now successfully loaded the require Netapp SDK files, and started 
>> working through the connection process...
>> Though it looks like it's hit another error:
>>
>> Debug: Puppet::Device::Netapp: connecting to Netapp device 
>>> actint-star-nactl01.
>>> Debug: Puppet::Device::Netapp: configdir is .
>>> Error: Can't load netapp for actint-star-nactl01: undefined method `+' 
>>> for nil:NilClass
>>>
>>
>> Tracked the above back to *device.rb*, where it's attempting to use *
>> 'Puppet[:configdir]'* but is failing to find the value... 
>>
>> So now to work out what's going on there :) 
>>
>> Cheers
>> Gav
>>
>> On Monday, 5 November 2012 10:47:56 UTC, Gavin Williams wrote:
>>>
>>> Hi all
>>>
>>> Following on from my previous post Puppet Network 
>>> Devices..<https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/fuXshtYmhhk>I've
>>>  now started work on creating a NetApp network device provider for 
>>> Puppet... 
>>>
>>> I'm trying to start simply by just gathering some facts from our filers. 
>>>
>>> The code soo far is available here: 
>>> https://github.com/fatmcgav/shrug-netapp/ Credit to the original author 
>>> shrug for setting out the framework... 
>>>
>>> Anyhow, onto my first challenge. 
>>>
>>> I've downloaded and added the relevant NetApp SDK files into *
>>> modules/shrug-netapp/lib/puppet/util/network_device/netapp/* as shown 
>>> below:
>>>
>>> $ ls -l modules/shrug-netapp/lib/puppet/util/network_device/netapp/
>>>> total 88
>>>> -rw-r--r--. 1 puppet puppet   924 Nov  2 17:13 device.rb
>>>> -rw-r--r--. 1 puppet puppet  8229 Nov  2 17:16 DfmErrno.rb
>>>> -rw-r--r--. 1 puppet puppet   228 Nov  2 17:00 facts.rb
>>>> -rw-r--r--. 1 puppet puppet  9451 Nov  2 17:16 NaElement.rb
>>>> -rw-r--r--. 1 puppet puppet 36089 Nov  2 17:15 NaErrno.rb
>>>> -rw-r--r--. 1 puppet puppet 19036 Nov  2 17:15 NaServer.rb
>>>>
>>>  
>>> The NaServer class is then included within the device.rb file above. 
>>> However Puppet is currently failing with:
>>>
>>>> Info: starting applying configuration to actint-star-nactl01 at 
>>>> actint-star-nactl01
>>>> Error: Could not run: no such file to load -- NaElement
>>>>
>>>
>>> This NaElement file is require'd by the NaServer class. 
>>> However it seems to be failing due to the include path not including the 
>>> NaElement.rb file... 
>>> Therefore I'm guessing that Puppet/Ruby is looking for the NaElement 
>>> file in some default location, rather than the same location as the 
>>> NaServer class... 
>>>
>>> I've generated the same error on some tests scripts by moving the NetApp 
>>> SDK files into a sdk sub folder, and then just *"require sdk/NaServer"*in 
>>> my script, which generates a very similar error:
>>>
>>>> ruby hello_ontapi.rb  192.168.35.118 root xxx
>>>> ./sdk/NaServer.rb:21:in `require': no such file to load -- NaElement 
>>>> (LoadError)
>>>>         from ./sdk/NaServer.rb:21
>>>>         from hello_ontapi.rb:24:in `require'
>>>>         from hello_ontapi.rb:24
>>>>
>>>
>>> Any ideas how I could work around this? 
>>>
>>> Cheers
>>> Gavin 
>>>  
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/tYRDCDwxjlsJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to