-Allow getNodeAttribs and getAttribs to take either a listref or list of attributes

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1384 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-05-14 00:04:55 +00:00
parent 3fa832cc45
commit 43d9279061

View File

@ -899,7 +899,12 @@ sub getNodeAttribs
{
my $self = shift;
my $node = shift;
my @attribs = @{shift()};
my @attribs;
if (ref $_[0]) {
@attribs = @{shift()};
} else {
@attribs = @_;
}
my $datum;
my @data = $self->getNodeAttribs_nosub($node, \@attribs);
#my ($datum, $extra) = $self->getNodeAttribs_nosub($node, \@attribs);
@ -1462,7 +1467,12 @@ sub getAttribs
#my $key = shift;
#my $keyval = shift;
my %keypairs = %{shift()};
my @attribs = @_;
my @attribs;
if (ref $_[0]) {
@attribs = @{shift()};
} else {
@attribs = @_;
}
my @return;
my $statement = 'SELECT * FROM ' . $self->{tabname} . ' WHERE ';
my @exeargs;