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 esxthin.pm 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 esxthin.pm". When run in this manner, $FindBin::Bin is the path to the directory where esxthin.pm lives, usually:
/usr/local/vcl/lib/VCL/Module/Provisioning

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:
/usr/local/vcl/bin.

The paths listed above assume the NetApp files are in:
/usr/local/vcl/lib/NetApp


Hope this helps,
Andy



Brian Bouterse wrote:
I have a problem with the esxthin.pm and VCL says it can't load VCL::Module::Provisioning::esxthin I've copied the esx.pm to esxthin.pm, 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 esx.pm 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 esxthin.pm' produces the same output as 'perl esx.pm'

Is it finding the NaServer.pm file? If it is being found, why can't VCL load it when there are no compilation errors in the NaServer.pm file?

Seeing if anyone has any ideas...

Brian

Brian Bouterse
NEXT Services
919.698.8796


--
Andy Kurth
Virtual Computing Lab
Office of Information Technology
North Carolina State University
andy_ku...@ncsu.edu
919.513.4090

Reply via email to