Strip out expensive cached XML data rettrieval if doing lsvm

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9900 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-06-22 19:07:40 +00:00
parent 5eccf45ec4
commit f506499ae1

View File

@ -96,7 +96,6 @@ my $doreq;
my %hyphash;
my $node;
my $vmtab;
my $kvmdatatab;
sub get_path_for_pool {
@ -2468,13 +2467,15 @@ sub process_request {
if ($::XCATSITEVALS{usexhrm}) { $use_xhrm=1; }
$vmtab = xCAT::Table->new("vm");
$confdata={};
unless ($command eq 'lsvm') { xCAT::VMCommon::grab_table_data($noderange,$confdata,$callback); }
$kvmdatatab = xCAT::Table->new("kvm_nodedata",-create=>0); #grab any pertinent pre-existing xml
unless ($command eq 'lsvm') {
xCAT::VMCommon::grab_table_data($noderange,$confdata,$callback);
my $kvmdatatab = xCAT::Table->new("kvm_nodedata",-create=>0); #grab any pertinent pre-existing xml
if ($kvmdatatab) {
$confdata->{kvmnodedata} = $kvmdatatab->getNodesAttribs($noderange,[qw/xml/]);
} else {
$confdata->{kvmnodedata} = {};
}
}
if ($command eq 'mkvm' or ($command eq 'clonevm' and (grep { "$_" eq '-b' } @exargs)) or ($command eq 'rpower' and (grep { "$_" eq "on" or $_ eq "boot" or $_ eq "reset" } @exargs))) {
xCAT::VMCommon::requestMacAddresses($confdata,$noderange);
my @dhcpnodes;