From b5a0cd34f9a391685b9d354600114d31aebd99bb Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 16 May 2012 16:25:49 +0000 Subject: [PATCH] getNodesAttribs XML ALL attributes support git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12738 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/tabutils.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index efd4a7805..b49a142f7 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -2288,6 +2288,7 @@ sub getAllEntries } # getNodesAttribs # Read all the array of attributes for the noderange from the input table. +# If the ALL is input then read all the attributes # #PCM #getNodesAttribs @@ -2325,6 +2326,15 @@ sub getNodesAttribs my @attrs= @$attr; my %rsp; my %noderecs; + if (grep (/ALL/,@attrs)) { # read the schema and build array of all attrs + @attrs=(); + my $schema = xCAT::Table->getTableSchema($tablename); + my $desc = $schema->{descriptions}; + foreach my $c (@{$schema->{cols}}) { + # my $space = (length($c)<7 ? "\t\t" : "\t"); + push @attrs, $c; + } + } my $rechash = $tab->getNodesAttribs(\@nodes,\@attrs); foreach my $node (@nodes){ my %datseg=();