Thanks so much for the help! You are exactly correct, I had failed to include the "$FindBin::Bin/../lib/NetApp" path which is the one the vcld uses as it executes from the /usr/local/vcl/bin path. I will commit an alpha version once I have something working.

Thanks again!


Brian Bouterse
NEXT Services

On Oct 5, 2009, at 12:11 PM, Andy Kurth wrote:

Hi Brian,
I downloaded and looked at the NetApp modules and I think I can see why the problem is occurring. The package names defined in the NetApp .pm files don't include "NetApp". The package lines in the NetApp .pm's are simply:
package NaServer;
package NaElement;

Because of this, the "use" lines in your module must be:
use NaServer;
use NaElement;

This alone doesn't solve the problem as your code still won't be able to find the NetApp modules. Add the following lines to before the "use" lines:
use lib "$FindBin::Bin/../../../NetApp";
use lib "$FindBin::Bin/../lib/NetApp";

The first line should allow the NetApp modules to be found if you run your module directly using "perl". When run in this manner, $FindBin::Bin is the path to the directory where lives, usually:

The second line should allow the modules to be found when your module is loaded by the vcld process. When vcld loads the module, $FindBin::Bin is the path to the directory where vcld resides, usually:

The paths listed above assume the NetApp files are in:

Hope this helps,

Brian Bouterse wrote:
I have a problem with the and VCL says it can't load VCL::Module::Provisioning::esxthin I've copied the to, and updated all the names and checks for esx to esxthin so that it is a valid VCL module. It is also installed correctly. The module performs the same functionality as and successfully deploys and manages VMs. The problem comes in when I add the following lines to import the NetApp perl client libraries:
use NetApp::NaServer;
use NetApp::NaElement;
I do this just below:      use lib "$FindBin::Bin/../../..";
The files are actually located at ../../../NetApp/ [NaServer,NaElement].pm so they should be found just fine. What's more puzzling is that there are certainly no compilation errors because 'perl' produces the same output as 'perl' Is it finding the file? If it is being found, why can't VCL load it when there are no compilation errors in the file?
Seeing if anyone has any ideas...
Brian Bouterse
NEXT Services

Andy Kurth
Virtual Computing Lab
Office of Information Technology
North Carolina State University

Reply via email to