From 4cd6b3fffbe35a38d4c0a989ecb2ea5e90656335 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 12 Nov 2009 22:04:38 +0000 Subject: [PATCH] -Move license validation to only occur if not already in vCenter -Avoid direct connection if vCenter not in use git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4559 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 851684b08..ac691da61 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -288,9 +288,6 @@ sub process_request { if ($viavcenter or (defined $tablecfg{hypervisor}->{$hyp}->[0]->{mgr} and not $tablecfg{hypervisor}->{$hyp}->[0]->{preferdirect})) { $viavcenter=1; $hypready{$hyp} = 0; #This hypervisor requires a flag be set to signify vCenter sanenes before proceeding - $hyphash{$hyp}->{conn} = Vim->new(service_url=>"https://$hyp/sdk"); #Direct connect to install/check licenses - $hyphash{$hyp}->{conn}->login(user_name=>$hyphash{$hyp}->{username},password=>$hyphash{$hyp}->{password}); - validate_licenses($hyp); my $vcenter = $hyphash{$hyp}->{vcenter}->{name}; unless ($vcenterhash{$vcenter}->{conn}) { $vcenterhash{$vcenter}->{conn} = @@ -1412,6 +1409,9 @@ sub validate_vcenter_prereqs { #Communicate with vCenter and ensure this host is } } #If still in function, haven't found any likely host entries, make a new one + $hyphash{$hyp}->{conn} = Vim->new(service_url=>"https://$hyp/sdk"); #Direct connect to install/check licenses + $hyphash{$hyp}->{conn}->login(user_name=>$hyphash{$hyp}->{username},password=>$hyphash{$hyp}->{password}); + validate_licenses($hyp); addhosttovcenter(undef,{ depfun => $depfun, depargs => $depargs,