From 750a8bbf70811b28d227fdd69404b2995edd303e Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 27 Sep 2010 13:50:49 +0000 Subject: [PATCH] rmdef could not remove all the entries in the tables with multiple keys, such as ppcdirect git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7669 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DBobjUtils.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 0dd41e1f0..ef4e745c1 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -1552,6 +1552,18 @@ sub rmobjdefs foreach my $key (keys %{$tablehash{$table}{$obj}{$attr}}) { + #multiple keys support + if (defined($keyhash{$key}) && ($keyhash{$key} ne $tablehash{$table}{$obj}{$attr}{$key})) + { + my %tmpkeyhash; + # copy hash + foreach my $hashkey (keys %keyhash) + { + $tmpkeyhash{$hashkey} = $keyhash{$hashkey}; + } + push @all_keyhash, \%tmpkeyhash; + #$thistable->delEntries(\@all_keyhash); + } # ex. $keyhash{node}=c68m3hvp01 $keyhash{$key} = $tablehash{$table}{$obj}{$attr}{$key}; }