xcat-core/perl-xCAT
cjhardee 5b4ba54a2d Cross your fingers that this makes the million and a half dependant things happy. Changed the output of getNodeAttributes to merge the data from its different groups and to clone entries from one group for each entry in a folowing group with data in it.
I'm just gonna paste the description Jarrod sent to the group via email:

So if getAttribs ever returns more than one result, then getNodeAttribs will have it's output multiplied by that factor.  I'll draw out a table with changes Chris started adding while he was also trying to flatten the recursion.  Let's say 'n1' is in groups 'g1,g2,g3', and that we request columns 'c1,c2,c3,c4'  Let's also assume the primary key is not simply 'node', allowing the node column to contain duplicates (as in switch table).  I don't expect anyone to actually construct something this convoluted in practice, but:

node    |c1     |c2     |c3     |c4
n1      |v1     |       |       |
g2      |       |V2+=   |       |
g2      |       |v3     |v4     |
g3      |       |v5     |       |v6
g3      |       |v7     |v8     |v9

First, we get n1s record:
[
{ node => 'n1',  c1 => 'v1',}
]
We see that c2-c4 are still unsatisfiad, then we check g1, see there is no record, so no action takes place, then getAttribs node=>'g2' returns two records.  As a result, we clone our results so far and independently populate them:
[
{ node => 'n1', c1=> 'v1', c2 => 'v2+=' },
{ node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4'},
]
Now, in the first record, we are still looking to fill in c3, c4, and we are also still looking at c2 to complete the '+=' operation.
In the second record, we only need c4 now, no other columns will be checked for that record.

Then we hit g3.  We also get two results back (two was easier, but arbitrarily many are possible, btw).  Since both records are still looking to be completed, the two become 4 records (if one of the two records were satisfied before this point, the two would have become three instead):

[
{ node => 'n1', c1=> 'v1', c2 => 'v2v5',c4=>'v6' },
{ node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4',c4=>'v6'},
{ node => 'n1', c1=> 'v1', c2 => 'v2v7',c3=>v8,c4=>'v9' },
{ node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4',c4=>'v9'},
]

And that would be what getNodesAttribs would return in this case.




git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7131 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-18 18:14:48 +00:00
..
debian some minor clean-up... 2008-07-23 19:36:25 +00:00
xCAT Cross your fingers that this makes the million and a half dependant things happy. Changed the output of getNodeAttributes to merge the data from its different groups and to clone entries from one group for each entry in a folowing group with data in it. 2010-08-18 18:14:48 +00:00
db2man add additional info on setting up cfgloc 2010-07-18 12:07:46 +00:00
LICENSE.html -Move perl-xCAT to not have version in trunk name 2008-06-03 15:00:37 +00:00
Makefile.PL -Move perl-xCAT to not have version in trunk name 2008-06-03 15:00:37 +00:00
modifyUtils -Fixup build information 2009-05-08 18:46:56 +00:00
perl-xCAT.spec changed hpoa packaging to be compliant with xCAT practices 2010-02-11 17:10:32 +00:00
README Test check in for build process. 2009-01-30 14:44:01 +00:00

xCAT - eXtreme Cluster Administration Toolkit

xCAT is a toolkit for the deployment and administration of clusters.

For documentation on getting started with xCAT you can download the 
following xCAT 2.0 Cookbooks.

Linux Cookbook:
http://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/trunk/perl-xCAT-2.0/xCAT2.0.pdf

AIX Cookbook:
http://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/trunk/perl-xCAT-2.0/xCAT2onAIX.pdf

The Cookbooks are also available on an installed system in the
/opt/xcat/share/doc/ directory.

xCAT is made available as OSS under the EPL license:
http://www.opensource.org/licenses/eclipse-1.0.php