-Attempt to pre-load VMWare SDK ahead of time to speed up loading

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4560 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2009-11-12 22:06:04 +00:00
parent 4cd6b3fffb
commit d7e93945b3

View File

@ -38,6 +38,11 @@ my $executerequest;
my %tablecfg; #to hold the tables
my $currkey;
my $viavcenter;
my $vmwaresdkdetect = eval {
require VMware::VIRuntime;
VMware::VIRuntime->import();
1;
};
my %guestidmap = (
@ -218,11 +223,13 @@ sub process_request {
}
#From here on out, code for managing guests under VMware
#Detect whether or not the VMware SDK is available on this specific system
my $vmwaresdkdetect = eval {
require VMware::VIRuntime;
VMware::VIRuntime->import();
1;
};
unless ($vmwaresdkdetect) {
$vmwaresdkdetect = eval {
require VMware::VIRuntime;
VMware::VIRuntime->import();
1;
};
}
unless ($vmwaresdkdetect) {
sendmsg([1,"VMWare SDK required for operation, but not installed"]);
return;