$ 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
Info: starting applying configuration to actint-star-nactl01 at actint-star-nactl01
Error: Could not run: no such file to load -- NaElement
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
#require 'NaElement'
require File.dirname(__FILE__) + "/NaElement"
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
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.
node 'actint-star-nactl01' {
# Test NetApp volume provider
netapp_volume { 'v_puppet_test':
ensure => present,
}
}
$ sudo puppet device -v
Info: starting applying configuration to actint-star-nactl01 at actint-star-nactl01
Warning: Local environment: "production" doesn't match server specified node environment "development", switching agent to "development".
Info: Retrieving plugin
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/type/netapp_volume.rb]/content: content changed '{md5}2f3e20a3878f9ed94a5fffc4a9811ef7' to '{md5}ebe14c73783c97063d9b6ae0bc791896'
Error: Could not autoload puppet/provider/netapp_volume/netapp_volume: uninitialized constant Puppet::Provider::Netapp
Error: Could not autoload puppet/type/netapp_volume: Could not autoload puppet/provider/netapp_volume/netapp_volume: uninitialized constant Puppet::Provider::Netapp
Error: Could not retrieve catalog from remote server: Could not intern from pson: Could not autoload puppet/type/netapp_volume: Could not autoload puppet/provider/netapp_volume/netapp_volume: uninitialized constant Puppet::Provider::Netapp
Using cached catalog
Info: Applying configuration version '1352132516'
Error: /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test]: Could not evaluate: No ability to determine if netapp_volume exists
Finished catalog run in 0.21 seconds
$ sudo puppet device -v
Info: starting applying configuration to actint-star-nactl01 at actint-star-nactl01
Warning: Local environment: "production" doesn't match server specified node environment "development", switching agent to "development".
Info: Retrieving plugin
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet]/mode: mode changed '0775' to '0755'
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/provider]/mode: mode changed '0775' to '0755'
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/provider/netapp.rb]/content: content changed '{md5}399796914d8aeb68387455de5b24f735' to '{md5}3be2121ab99116c4bc89db21d5d4b54b'
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/provider/netapp_volume/netapp_volume.rb]/content: content changed '{md5}46b2a0004e0245c577974e7a645e08f7' to '{md5}1b06628868826a8ea64744a7ae8ec8da'
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/type]/mode: mode changed '0775' to '0755'
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/type/netapp_volume.rb]/content: content changed '{md5}ebe14c73783c97063d9b6ae0bc791896' to '{md5}2fb244482c7d760e6cc132f104be619d'
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/util/network_device/netapp/facts.rb]/content: content changed '{md5}c7e59e79e19486cba9ae7e5314b2a061' to '{md5}b0c912dc663d5251219bbad895455834'
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/util/network_device/netapp/device.rb]/content: content changed '{md5}7354a748bd41582fcf76bf2643098fcd' to '{md5}9d2e26f97c7ea6ea16177acb8df85714'
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/util/network_device/netapp/NaServer.rb]/content: content changed '{md5}cd815964f9a2dfe757f5365a848b80d5' to '{md5}63f12abed9d1145b6d326c9fc06eb0c0'
Info: Caching catalog for actint-star-nactl01
Info: Applying configuration version '1352132516'
Error: /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test]: Could not evaluate: undefined method `transport' for #<Puppet::Util::NetworkDevice::Netapp::Device:0x7ff3142c80f8>
Finished catalog run in 0.11 seconds
/File[/var/lib/puppet/lib/puppet/provider/netapp_volume/netapp_volume.rb]/content:
--- /var/lib/puppet/lib/puppet/provider/netapp_volume/netapp_volume.rb 2012-11-05 17:26:56.257616498 +0000
+++ /tmp/puppet-file20121105-8521-10tepn6-0 2012-11-05 17:40:16.440612301 +0000
@@ -19,7 +19,7 @@
def exists?
Puppet.debug("Puppet::Provider::Netapp_volume: checking existance of Netapp Volume #{resource[:name]}")
- transport.invoke("volume-list-info").include?(resource[:name])
+ @transport.invoke("volume-list-info").include?(resource[:name])
end
Info: starting applying configuration to actint-star-nactl01 at actint-star-nactl01
Warning: Local environment: "production" doesn't match server specified node environment "development", switching agent to "development".
Info: Retrieving plugin
/File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/provider/netapp_volume/netapp_volume.rb]/content: content changed '{md5}1b06628868826a8ea64744a7ae8ec8da' to '{md5}feb535835cefd0921c8be5d0af6e11f2'
Info: Caching catalog for actint-star-nactl01
Info: Applying configuration version '1352132516'
Error: /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test]: Could not evaluate: undefined method `invoke' for nil:NilClass
Finished catalog run in 0.20 seconds
# Test NetApp volume provider
netapp_volume { 'v_puppet_test':
ensure => present,
initsize => "1g",
aggr => "aggr01",
spaceresv => "none",
}
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter aggr at /etc/puppet/manifests/site.pp:30 on node actint-star-nactl01
Error: Could not set 'present' on ensure: undefined method `result_reason' for #<NaElement:0x7ffb9cb5d160> at 27:/etc/puppet/manifests/site.pp
Error: Could not set 'present' on ensure: undefined method `result_reason' for #<NaElement:0x7ffb9cb5d160> at 27:/etc/puppet/manifests/site.pp
Wrapped exception:
undefined method `result_reason' for #<NaElement:0x7ffb9cb5d160>
Error: /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test]/ensure: change from absent to present failed: Could not set 'present' on ensure: undefined method `result_reason' for #<NaElement:0x7ffb9cb5d160> at 27:/etc/puppet/manifests/site.pp
^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance of Netapp Volume v_puppet_test
^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info: <results status="failed" reason="No volume named 'v_puppet_test' exists" errno="13040"></results>
^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't currently exist.
^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp Volume v_puppet_test of initial size 1g
Puppet::Type.newtype(:netapp_volume) do@doc = "Manage Netapp Volume creation, modification and deletion."apply_to_deviceensurable dodesc "Netapp Volume resource state. Valid values are: present, absent."defaultto(:present)newvalue(:present) doprovider.createendnewvalue(:absent) doprovider.destroyendendnewparam(:name) dodesc "The volume name."isnamevar#newvalues(/^[[:alpha:][:digit:]\.]+$/)endnewparam(:initsize) dodesc "The initial volume size."defaultto "1g"endnewparam(:aggr) dodesc "The aggregate this volume should be created in."endnewparam(:spaceresv) dodesc "The space reservation mode."endend
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/netapp_volume: Could not autoload puppet/provider/netapp_volume/netapp_volume: uninitialized constant Puppet::Util::NetworkDevice on node actint-star-nactl01
netapp_qtree { 'q_puppet_test1':
ensure => present,
volume => 'v_puppet_test',
require => Netapp_volume['v_puppet_test1']
}
netapp_volume { 'v_puppet_test1':
ensure => present,
initsize => "1t",
aggregate => "aggr01",
spaceres => "none",
}
Jakov
Thank you for the positive feedback.
The NetApp puppet stuff is on the back burner atm, hopefully should be able to get back to buy in the new year :-)
Cheers
Gav
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.