From a3b589af67e771fabf165e16a9bd8743e20f8ea1 Mon Sep 17 00:00:00 2001 From: linggao Date: Thu, 19 Dec 2013 22:51:39 -0500 Subject: [PATCH] Changed the table name from capacity to hwinv. --- perl-xCAT/xCAT/Schema.pm | 22 ++++++++++---------- xCAT-server/lib/xcat/plugins/nodediscover.pm | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index f819b8bc7..1c981c358 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -1499,10 +1499,10 @@ mic => { disable => "Do not use. tabprune will not work if set to yes or 1", }, }, -capacity => { +hwinv => { cols => [qw(node cputype cpucount memory disksize comments disable)], keys => [qw(node)], - table_desc => 'The basic node capacity.', + table_desc => 'The hardware inventory for the node.', descriptions => { node => 'The node name or group name.', cputype => 'The cpu model name for the node.', @@ -2492,23 +2492,23 @@ my @nodeattrs = ( access_tabentry => 'mic.node=attr:node', }, ##################### -## capacity table # +## hwinv table # ##################### {attr_name => 'cputype', - tabentry => 'capacity.cputype', - access_tabentry => 'capacity.node=attr:node', + tabentry => 'hwinv.cputype', + access_tabentry => 'hwinv.node=attr:node', }, {attr_name => 'cpucount', - tabentry => 'capacity.cpucount', - access_tabentry => 'capacity.node=attr:node', + tabentry => 'hwinv.cpucount', + access_tabentry => 'hwinv.node=attr:node', }, {attr_name => 'memory', - tabentry => 'capacity.memory', - access_tabentry => 'capacity.node=attr:node', + tabentry => 'hwinv.memory', + access_tabentry => 'hwinv.node=attr:node', }, {attr_name => 'disksize', - tabentry => 'capacity.disksize', - access_tabentry => 'capacity.node=attr:node', + tabentry => 'hwinv.disksize', + access_tabentry => 'hwinv.node=attr:node', }, ); # end of @nodeattrs that applies to both nodes and groups diff --git a/xCAT-server/lib/xcat/plugins/nodediscover.pm b/xCAT-server/lib/xcat/plugins/nodediscover.pm index 61268fc9b..aea08954b 100644 --- a/xCAT-server/lib/xcat/plugins/nodediscover.pm +++ b/xCAT-server/lib/xcat/plugins/nodediscover.pm @@ -154,10 +154,10 @@ sub process_request { } } - # save basic capacities in the capacity table + # save inventory info into the hwinv table if (defined($request->{cpucount}) or defined($request->{cputype}) or defined($request->{memory}) or defined($request->{disksize})) { my $basicdata; - my $cap_tab = xCAT::Table->new("capacity",-create=>1); + my $hwinv_tab = xCAT::Table->new("hwinv",-create=>1); if ($request->{memory}->[0]) { $basicdata->{memory} = $request->{memory}->[0]; } @@ -170,7 +170,7 @@ sub process_request { if ($request->{cputype}->[0]) { $basicdata->{cputype} = $request->{cputype}->[0]; } - $cap_tab->setNodeAttribs($node, $basicdata); + $hwinv_tab->setNodeAttribs($node, $basicdata); }