modify the operating for CMM doesn't rely on 'id' attribute

This commit is contained in:
zhaoertao 2013-10-16 02:20:54 -07:00
parent ace7a82ef9
commit 8081d7bf4f

View File

@ -3875,7 +3875,7 @@ sub build_depend {
if (!defined($ent->{mpa})) {
return("no mpa defined for node $name");
}
my $id = (defined($ent->{id})) ? $ent->{id} : "";
my $id = (defined($ent->{id}) && $name ne $ent->{mpa}) ? $ent->{id} : "";
push @{$mpa_hash{$name}},$ent->{mpa};
push @{$mpa_hash{$name}},$id;
@ -3887,7 +3887,7 @@ sub build_depend {
if (!defined($ent->{mpa})) {
return("no mpa defined for node $_");
}
my $id = (defined($ent->{id})) ? $ent->{id} : "";
my $id = (defined($ent->{id}) && $ent->{mpa} ne $_) ? $ent->{id} : "";
push @{$mpa_hash{$_}},$ent->{mpa};
push @{$mpa_hash{$_}},$id;
}
@ -4158,7 +4158,7 @@ sub preprocess_request {
$request = {};
return;
}
if (defined($ent->{id})) { push @{$mpa_hash{$ent->{mpa}}{ids}}, $ent->{id};}
if (defined($ent->{id}) && $node ne $ent->{mpa}) { push @{$mpa_hash{$ent->{mpa}}{ids}}, $ent->{id};}
else { push @{$mpa_hash{$ent->{mpa}}{ids}}, "";}
if (defined($mpatype{$ent->{mpa}})) { push @{$mpa_hash{$ent->{mpa}}{nodetype}}, $mpatype{$ent->{mpa}};}
else { push @{$mpa_hash{$ent->{mpa}}{nodetype}}, "mm";}
@ -4220,7 +4220,7 @@ sub build_more_info{
$callback->({data=>["no mpa defined for node $node"]});
return @moreinfo;;
}
if (defined($ent->{id})) { push @{$mpa_hash{$ent->{mpa}}{ids}}, $ent->{id};}
if (defined($ent->{id}) && $node ne $ent->{mpa}) { push @{$mpa_hash{$ent->{mpa}}{ids}}, $ent->{id};}
else { push @{$mpa_hash{$ent->{mpa}}{ids}}, "";}
if (defined($mpatype{$ent->{mpa}})) { push @{$mpa_hash{$ent->{mpa}}{nodetype}}, $mpatype{$ent->{mpa}};}
else { push @{$mpa_hash{$ent->{mpa}}{nodetype}}, "mm";}