I get Error: Could not prefetch zenoss_device provider 'zenoss_device': undefined local variable or method `resource' for Puppet::Type::Zenoss_device::ProviderZenoss_device:Class when using the following
def self.prefetch(r)
@transport ||= PuppetX::Puppetlabs::Transport.retrieve(:resource_ref => resource[:transport], :catalog => resource.catalog, :provider => 'vsphere')
p "#{r}"
end
The above is only for testing purposes
Im writing a type provider for zenoss my first so please be kind and im trying to access the resource hash but cannot
All id like to know is what module (is it the provider) that will allow me to access this resource hash
I tried accessing it from within a provider but that does not work "resource[:transport]".
Im using a usefull hack from
https://github.com/vmware/vmware-vmware_lib where instead of using a SSH as a connector im using a Rest class i created for connecting to a Zenoss master
I guess the issue here is how do I use this transport type provider
Any clues anyone??