Commit Graph

1038 Commits

Author SHA1 Message Date
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
nott
5229862ac3 add get_nim_attrs subroutine
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7129 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-18 15:19:01 +00:00
lissav
34a349cae0 add support for Foreign keys in Schema
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7127 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-18 15:06:17 +00:00
ligc
75cdca63e6 fix for bug 3043788: the node attribut name may contain special characters such as .
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7106 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-17 08:08:58 +00:00
cjhardee
9db0c3a358 added checks for improper colons and newlines in the client xml. XCATXMLWARNING is the env variable to set to enable it
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7098 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-16 15:13:39 +00:00
lissav
ca175714e3 add comments for comment and disable attribute
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7093 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-15 11:10:53 +00:00
lissav
afaacb619f add comment and disable fields to performance table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7090 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-13 17:59:40 +00:00
nott
ac79a6dfdd add to postbootscript description
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7089 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-13 16:59:44 +00:00
cjhardee
f8c12d6285 fixed nodels to include mutliple results from the same group and to return [undef] when there are no results instead of [{}]
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7087 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-13 14:40:26 +00:00
lissav
37640c0498 More DB2/MYSQl fixes to setNodesAttribs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7071 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-12 16:26:20 +00:00
jbjohnso
74f3d9e3cf -Move the kvm_nodedata table to Schema.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7070 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-12 15:55:31 +00:00
nott
d190f1feb8 remove -I option from rnetboot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7069 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-12 14:31:05 +00:00
wanghuaz
f3e16ec584 fixed defect 3039322, rvitals returned error.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7066 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-12 09:22:12 +00:00
yinle
2a181f2f6c Fix defect 3037117:nodeset -v and -h returns nothing; Add nodeset usage to the usage data structure
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7060 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-12 09:00:31 +00:00
jbjohnso
30553d8b13 -Remove debug output
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7023 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-10 14:08:49 +00:00
lissav
b1c06a86ed fix bad problem in creating tables in db2- I introduces
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7022 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-10 13:29:46 +00:00
jjhua
2376ec6bac move the fsp_api_action from Utils to FSPUtils
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7008 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-09 06:56:45 +00:00
jjhua
536da9df52 modified the comments
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7007 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-09 06:56:18 +00:00
jjhua
72be03e99d use fsp_api_action in FSPUtils
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7006 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-09 06:40:45 +00:00
jjhua
466401693f use fsp_api_action in FSPUtils
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7005 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-09 06:38:27 +00:00
jjhua
ddf9c76601 use fsp_api_action in FSPUtils
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7004 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-09 06:23:36 +00:00
jjhua
7d4ff425ba use fsp_api_action in FSPUtils
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7003 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-09 06:17:58 +00:00
jjhua
9318fb42e3 use fsp_api_action in FSPUtils
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7002 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-09 06:05:35 +00:00
jbjohnso
e82e3f5f8b -Give up after 30 seconds of starvation
-Actually sleep in the retry loop rather than being a busy loop


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6992 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-06 12:54:41 +00:00
jbjohnso
4da5599717 -Avoid calling subprocesses in favor of perl builtins
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6991 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-06 12:36:39 +00:00
jjhua
4279cdb5de support for multiple hcps
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6985 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-05 06:48:09 +00:00
lissav
5f21467bca fix setting of types for attributes to invalid types for DB2 as much as possible for now
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6978 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-04 14:17:31 +00:00
linggao
b646e85284 linuximage.pkglist is used for full install now, comment modified.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6977 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-04 13:45:20 +00:00
jjhua
f98359ae33 rscan for multiple hardware control points
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6969 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-04 07:06:48 +00:00
lissav
9d7014c2ca fix mysql calls in setNodesAtt
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6954 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-03 14:12:05 +00:00
jjhua
fc2d34110e use getAttribs() to instead of getobjdefs()
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6951 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-03 09:32:34 +00:00
lissav
8c74a9fb43 explain AIX in postscripts table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6947 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-02 19:07:41 +00:00
lissav
d1f418d1d7 fix changed code in setNodesAttribs for DB2
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6941 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-02 13:24:53 +00:00
jjhua
3cbf22bdc2 move getTypeOfHcp from Utils.pm to FSPUtils.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6937 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-02 08:25:23 +00:00
jjhua
f5008b1354 move getTypeOfHcp from Utils.pm to FSPUtils.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6936 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-02 08:24:42 +00:00
jjhua
b8088dc328 add the getTypeOfHcp for multipel hcps
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6935 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-02 08:11:46 +00:00
jjhua
eaa2cbbe09 output the error for each node
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6934 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-02 08:04:26 +00:00
cjhardee
677a70a760 Just made some areas more readable since I'll be playing in them soon.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6932 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-31 02:15:57 +00:00
lissav
d561c84ce3 improve prescripts table comments
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6924 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-30 13:30:48 +00:00
lissav
5781a1275d fix prescript table comments
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6923 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-30 13:18:11 +00:00
jbjohnso
d67cdb6d92 -For VM nics after the first, default to *NOIP*. More complicated topologies will be considered when asked
In brief, modify discovery to discover by mac table if VM, so as to fill out the topology info


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6921 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-30 12:59:46 +00:00
lissav
4ea244e985 improve postscript table comments
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6919 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-30 12:40:43 +00:00
cjhardee
6cc88808d4 Fixed a problem with missing attributes from getNodeAttributes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6894 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-28 16:19:51 +00:00
cjhardee
1ed64502bb Fixed a bug I introduced when adding the ability to get multiple results from nodes and thier groups using nodels. The problem was the results had multiple entries for some attributes.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6884 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-28 06:17:30 +00:00
jjhua
1ee6515cf3 use xCAT::Utils::getNodeIPaddress Function to get ip
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6849 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-25 04:20:15 +00:00
cjhardee
21f033432c Rewrote how attributes from a node and it's groups are looked up and added the ability to concatinate values for these attributes from mulitple sources by adding "+=NEXTRECORD" to the values in the data.
For example, if bootparams.addkcmdline for the node is "test1+=NEXTRECORD" and bootparams.addkcmdline for the group it is in is "test2", the returned values from nodels for bootparams.addkcmdline will be "test1 test2".

Not that this stops after it finds a single occurance of a value for this attriute without the "+=NEXTRECORD".  If all values from the groups are wanted, each should have "+=NEXTRECORD" at the end of the entry.



git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6840 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-23 15:47:21 +00:00
nott
f7668a4109 add image_data to nimimage def
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6837 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-23 11:32:26 +00:00
nott
acce626b15 add image_data to osimage def
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6836 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-23 10:35:49 +00:00
jbjohnso
a64c7d0a60 -bug 3031635, (really a feature to allow shortcut port names on another switch syntax)
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6814 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-21 14:48:47 +00:00
jbjohnso
f7832796f2 -Put missing use into Utils in support of UUIDv5
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6813 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-21 14:13:12 +00:00