From 46af214a9e1a629ac8c8e3427657863832e41bff Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 20 Sep 2012 15:12:03 +0000 Subject: [PATCH] add ALL option git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13851 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/tabutils.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index f45b4810e..93355e625 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -2798,7 +2798,8 @@ sub delEntries return; } # getAttribs -# Read all the array of attributes for the key from the input table. +# Read and returns array of attributes for the key from the input table. +# and attributes input. Use "ALL" in the ALL for all attributes # #PCM #getAttribs @@ -2826,6 +2827,16 @@ sub getAttribs my $tab=xCAT::Table->new($tablename); my %rsp; my %keyhash; + # if request for ALL attributes + 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; + } + } foreach my $k (keys %{$request->{keys}->[0]}) { $keyhash{$k} = $request->{keys}->[0]->{$k}->[0]; }