mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-11 14:00:17 +00:00
nodelist table object should not fetch the attribs in groups
This patch intent to fix the undef reference for nodelist temporarily. partial-issue #1011
This commit is contained in:
@@ -2564,7 +2564,7 @@ sub getNodeAttribs_nosub_returnany
|
||||
if(defined{$data}) { #if there was some data for the node, loop through and check it
|
||||
foreach $result (@results) {
|
||||
foreach $attrib (keys %attribsToDo) {
|
||||
if (defined($result) && defined($result->{$attrib})
|
||||
if (defined($result) && defined($result->{$attrib}) && $self->{tabname} ne 'nodelist'
|
||||
&& @hierarchy_attrs && grep (/^$attrib$/, @hierarchy_attrs) ) {
|
||||
$result->{$attrib} .= ',+=NEXTRECORD';
|
||||
}
|
||||
@@ -2580,6 +2580,16 @@ sub getNodeAttribs_nosub_returnany
|
||||
return @results;
|
||||
}
|
||||
|
||||
if ($self->{tabname} eq 'nodelist') {
|
||||
return @results;
|
||||
}
|
||||
|
||||
# As self->nodelist is a weak reference, if error haddpens, log it.
|
||||
if (!defined($self->{nodelist})) {
|
||||
xCAT::MsgUtils->message("S","xcat Table: Unexpected error, nodelist object is undef.");
|
||||
return undef;
|
||||
}
|
||||
|
||||
#find the groups for this node
|
||||
my ($nodeghash) = $self->{nodelist}->getAttribs({node => $node}, 'groups');
|
||||
|
||||
|
Reference in New Issue
Block a user