xcat-core/perl-xCAT/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
..
data -More enhancements for reventlog based on most recent IPMI markup 2008-09-06 19:09:49 +00:00
Client.pm added checks for improper colons and newlines in the client xml. XCATXMLWARNING is the env variable to set to enable it 2010-08-16 15:13:39 +00:00
Common.pm -Fix syntax error in esx plugin 2010-05-15 01:32:13 +00:00
DBobjUtils.pm fix for bug 3043788: the node attribut name may contain special characters such as . 2010-08-17 08:08:58 +00:00
DSHCLI.pm support new rsync file formats adding /tmp/file1 -> /tmp/ and /tmp/* -> /tmp/ 2010-06-24 16:41:08 +00:00
DSHContext.pm
DSHCore.pm fix for bug 2946475: use $::XCATROOT instead of hardcoded /opt/xcat 2010-02-23 11:26:19 +00:00
DSHRemoteShell.pm
ExtTab.pm
FSPboot.pm Netboot over HFI code commit 2010-06-01 08:46:21 +00:00
FSPcfg.pm HMC alternative rspconfig passwd support 2010-05-14 20:43:05 +00:00
FSPconn.pm use fsp_api_action in FSPUtils 2010-08-09 06:17:58 +00:00
FSPflash.pm use fsp_api_action in FSPUtils 2010-08-09 06:40:45 +00:00
FSPinv.pm use fsp_api_action in FSPUtils 2010-08-09 06:05:35 +00:00
FSPmac.pm output the error for each node 2010-08-02 08:04:26 +00:00
FSPpower.pm support for multiple hcps 2010-08-05 06:48:09 +00:00
FSPscan.pm use fsp_api_action in FSPUtils 2010-08-09 06:23:36 +00:00
FSPUtils.pm modified the comments 2010-08-09 06:56:18 +00:00
FSPvitals.pm use fsp_api_action in FSPUtils 2010-08-09 06:38:27 +00:00
GlobalDef.pm
hpoa.pm changed hpoa packaging to be compliant with xCAT practices 2010-02-11 17:10:32 +00:00
InstUtils.pm add get_nim_attrs subroutine 2010-08-18 15:19:01 +00:00
MacMap.pm -bug 3031635, (really a feature to allow shortcut port names on another switch syntax) 2010-07-21 14:48:47 +00:00
MsgUtils.pm fix 2986319 MsgUtils should not commit when running under sqllite when updating auditlog 2010-04-13 13:22:53 +00:00
NameRange.pm
NetworkUtils.pm add IPv6 subroutine prefixtomask 2010-06-17 07:18:00 +00:00
NodeRange.pm clean when retain_cache 2010-04-16 02:55:36 +00:00
NotifHandler.pm fixed a problem for notification 2010-04-01 20:02:08 +00:00
PPCboot.pm rnetboot change for boot over hfi 2010-06-17 11:51:25 +00:00
PPCcfg.pm Fixed one issue for rspconfig to initialize multiple BPA/CEC passwords 2010-03-25 06:38:39 +00:00
PPCcli.pm rpower softoff for system p partitions 2010-07-01 09:48:16 +00:00
PPCconn.pm Fixed one issue switching between direct attach and hmc connection for mkhwconn 2010-03-16 12:35:25 +00:00
PPCdb.pm Fixed the bugs in rscan -u that: removed otherinterfaces and mac attributes for nodes 2010-04-28 10:33:57 +00:00
PPCenergy.pm defect 3017334,3017335: modified the man page of error message of renergy command 2010-06-18 12:40:14 +00:00
PPCfsp.pm Update ASMI interface parsing for P5 systems 2010-06-18 16:19:10 +00:00
PPCinv.pm
PPClog.pm
PPCmac.pm Calculate secondary 1 and secondary 2 mac address based on the primary MAC for HFI devices 2010-06-02 09:57:06 +00:00
PPCpower.pm rpower softoff for system p partitions 2010-07-01 09:48:16 +00:00
PPCrflash.pm 1.FSPAPI supports for mkhwconn and rmhwconn 2. move the invoking fsp-api function in every FSPxxx.pm to Utils.pm 2010-02-26 09:42:41 +00:00
PPCscan.pm ipv6 fix, replace the Socket library calls with NetworkUtils subroutines 2010-05-12 05:36:35 +00:00
PPCvitals.pm fixed defect 3039322, rvitals returned error. 2010-08-12 09:22:12 +00:00
PPCvm.pm fix for bug 2976056: the physical location of HCA adapter on P7 HV32 is ended with C7. Add the C7 into the physical location check 2010-03-25 13:58:13 +00:00
RSH.pm
RSYNC.pm support recursive directory rsync 2010-06-24 17:46:44 +00:00
Schema.pm add comments for comment and disable attribute 2010-08-15 11:10:53 +00:00
Scope.pm
SINV.pm fix defect 3013918, uninitialized array caused report to have extra nodes in the wrong places 2010-06-11 10:52:06 +00:00
SPD.pm
SSH.pm
Table.pm 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
Usage.pm remove -I option from rnetboot 2010-08-12 14:31:05 +00:00
Utils.pm move the fsp_api_action from Utils to FSPUtils 2010-08-09 06:56:45 +00:00
vboxService.pm
VMCommon.pm -For VM nics after the first, default to *NOIP*. More complicated topologies will be considered when asked 2010-07-30 12:59:46 +00:00
Yum.pm
zvmCPUtils.pm Cleaned up xCAT code 2010-07-07 15:12:44 +00:00
zvmUtils.pm Cleaned up xCAT code 2010-07-07 15:12:44 +00:00