From b0f4f913570bc5e2fcbd40e0dd3e399a9f5600fb Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 14 May 2008 19:53:15 +0000 Subject: [PATCH] -Update sample files with a more resiliant regex for node number extraction git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1398 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/templates/e1350/hosts.csv | 38 ++++++++++++++++---------------- xCAT/templates/e1350/ipmi.csv | 2 +- xCAT/templates/e1350/mp.csv | 2 +- xCAT/templates/e1350/nodepos.csv | 16 +++++++------- xCAT/templates/e1350/switch.csv | 10 ++++----- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/xCAT/templates/e1350/hosts.csv b/xCAT/templates/e1350/hosts.csv index 4dd8a96f8..0203352dd 100644 --- a/xCAT/templates/e1350/hosts.csv +++ b/xCAT/templates/e1350/hosts.csv @@ -1,20 +1,20 @@ #node,ip,hostnames,comments,disable -84bmcperrack,"|\D+(\d+)|172.29.(101+(($1-1)/84)).(($1-1)%84+1)|" -40bmcperrack,"|\D+(\d+)|172.29.(101+(($1-1)/40)).(($1-1)%40+1)|" -41bmcperrack,"|\D+(\d+)|172.29.(101+(($1-1)/41)).(($1-1)%41+1)|" -42bmcperrack,"|\D+(\d+)|172.29.(101+(($1-1)/42)).(($1-1)%42+1)|" -20bmcperrack,"|\D+(\d+)|172.29.(101+(($1-1)/20)).(($1-1)%20+1)|" -21bmcperrack,"|\D+(\d+)|172.29.(101+(($1-1)/21)).(($1-1)%21+1)|" -storagebmc,"|\D+(\d+)|172.29.1.($1)|" -userbmc,"|\D+(\d+)|172.29.4.($1)|" -84nodeperrack,"|\D+(\d+)|172.20.(101+(($1-1)/84)).(($1-1)%84+1)|" -56nodeperrack,"|\D+(\d+)|172.20.(101+(($1-1)/56)).(($1-1)%56+1)|" -40nodeperrack,"|\D+(\d+)|172.20.(101+(($1-1)/40)).(($1-1)%40+1)|" -41nodeperrack,"|\D+(\d+)|172.20.(101+(($1-1)/41)).(($1-1)%41+1)|" -42nodeperrack,"|\D+(\d+)|172.20.(101+(($1-1)/42)).(($1-1)%42+1)|" -20nodeperrack,"|\D+(\d+)|172.20.(101+(($1-1)/20)).(($1-1)%20+1)|" -21nodeperrack,"|\D+(\d+)|172.20.(101+(($1-1)/21)).(($1-1)%21+1)|" -switch,"|\D+(\d+)|172.30.50.($1)|" -bigswitch,"|\D+(\d+)|172.30.80.($1)|" -amm,"|\D+(\d+)|172.30.(101+(($1-1)/4)).(($1-1)%4+131)|" -ts,"|\D+(\d+)|172.30.20.($1)|" +84bmcperrack,"|\D+(\d+).*$|172.29.(101+(($1-1)/84)).(($1-1)%84+1)|" +40bmcperrack,"|\D+(\d+).*$|172.29.(101+(($1-1)/40)).(($1-1)%40+1)|" +41bmcperrack,"|\D+(\d+).*$|172.29.(101+(($1-1)/41)).(($1-1)%41+1)|" +42bmcperrack,"|\D+(\d+).*$|172.29.(101+(($1-1)/42)).(($1-1)%42+1)|" +20bmcperrack,"|\D+(\d+).*$|172.29.(101+(($1-1)/20)).(($1-1)%20+1)|" +21bmcperrack,"|\D+(\d+).*$|172.29.(101+(($1-1)/21)).(($1-1)%21+1)|" +storagebmc,"|\D+(\d+).*$|172.29.1.($1)|" +userbmc,"|\D+(\d+).*$|172.29.4.($1)|" +84nodeperrack,"|\D+(\d+).*$|172.20.(101+(($1-1)/84)).(($1-1)%84+1)|" +56nodeperrack,"|\D+(\d+).*$|172.20.(101+(($1-1)/56)).(($1-1)%56+1)|" +40nodeperrack,"|\D+(\d+).*$|172.20.(101+(($1-1)/40)).(($1-1)%40+1)|" +41nodeperrack,"|\D+(\d+).*$|172.20.(101+(($1-1)/41)).(($1-1)%41+1)|" +42nodeperrack,"|\D+(\d+).*$|172.20.(101+(($1-1)/42)).(($1-1)%42+1)|" +20nodeperrack,"|\D+(\d+).*$|172.20.(101+(($1-1)/20)).(($1-1)%20+1)|" +21nodeperrack,"|\D+(\d+).*$|172.20.(101+(($1-1)/21)).(($1-1)%21+1)|" +switch,"|\D+(\d+).*$|172.30.50.($1)|" +bigswitch,"|\D+(\d+).*$|172.30.80.($1)|" +amm,"|\D+(\d+).*$|172.30.(101+(($1-1)/4)).(($1-1)%4+131)|" +ts,"|\D+(\d+).*$|172.30.20.($1)|" diff --git a/xCAT/templates/e1350/ipmi.csv b/xCAT/templates/e1350/ipmi.csv index a1e72d543..064d531c6 100644 --- a/xCAT/templates/e1350/ipmi.csv +++ b/xCAT/templates/e1350/ipmi.csv @@ -1,2 +1,2 @@ #node,bmc,username,password,comments,disable -ipmi,|\D+(\d+)|bmc($1)| +ipmi,"|\D+(\d+).*$|bmc($1)|" diff --git a/xCAT/templates/e1350/mp.csv b/xCAT/templates/e1350/mp.csv index 12a71489e..eb3d9a10c 100644 --- a/xCAT/templates/e1350/mp.csv +++ b/xCAT/templates/e1350/mp.csv @@ -1,2 +1,2 @@ #node,mpa,id,comments,disable -"blade","|\D+(\d+)|amm(($1-1)/14+1)|","|\D+(\d+)|(($1-1)%14+1)|",, +"blade","|\D+(\d+).*$|amm(($1-1)/14+1)|","|\D+(\d+).*$|(($1-1)%14+1)|",, diff --git a/xCAT/templates/e1350/nodepos.csv b/xCAT/templates/e1350/nodepos.csv index f38f973f6..f7390f93d 100644 --- a/xCAT/templates/e1350/nodepos.csv +++ b/xCAT/templates/e1350/nodepos.csv @@ -1,9 +1,9 @@ #node,rack,u,chassis,slot,room,comments,disable -84nodeperrack,"|\D+(\d+)|(1+(($1-1)/84))|","|\D+(\d+)|(($1-1)%84+1)|" -56nodeperrack,"|\D+(\d+)|(1+(($1-1)/56))|","|\D+(\d+)|(($1-1)%56+1)|" -40nodeperrack,"|\D+(\d+)|(1+(($1-1)/40))|","|\D+(\d+)|(($1-1)%40+1)|" -41nodeperrack,"|\D+(\d+)|(1+(($1-1)/41))|","|\D+(\d+)|(($1-1)%41+1)|" -42nodeperrack,"|\D+(\d+)|(1+(($1-1)/42))|","|\D+(\d+)|(($1-1)%42+1)|" -20nodeperrack,"|\D+(\d+)|(1+(($1-1)/20))|","|\D+(\d+)|((($1-1)%20+1)*2-1)|" -21nodeperrack,"|\D+(\d+)|(1+(($1-1)/21))|","|\D+(\d+)|((($1-1)%21+1)*2-1)|" -"idataplex","|\D+(\d+)|(1+(($1-1)/84))|","|\D+(\d+)|(sprintf(""%c"",(65+2*((($1-1)/42)%2))))-(($1-1)%42+1)|",,,,"This creates U descriptions in the form A-1 to A-42 and C-1 to C-42" +84nodeperrack,"|\D+(\d+).*$|(1+(($1-1)/84))|","|\D+(\d+).*$|(($1-1)%84+1)|" +56nodeperrack,"|\D+(\d+).*$|(1+(($1-1)/56))|","|\D+(\d+).*$|(($1-1)%56+1)|" +40nodeperrack,"|\D+(\d+).*$|(1+(($1-1)/40))|","|\D+(\d+).*$|(($1-1)%40+1)|" +41nodeperrack,"|\D+(\d+).*$|(1+(($1-1)/41))|","|\D+(\d+).*$|(($1-1)%41+1)|" +42nodeperrack,"|\D+(\d+).*$|(1+(($1-1)/42))|","|\D+(\d+).*$|(($1-1)%42+1)|" +20nodeperrack,"|\D+(\d+).*$|(1+(($1-1)/20))|","|\D+(\d+).*$|((($1-1)%20+1)*2-1)|" +21nodeperrack,"|\D+(\d+).*$|(1+(($1-1)/21))|","|\D+(\d+).*$|((($1-1)%21+1)*2-1)|" +"idataplex","|\D+(\d+).*$|(1+(($1-1)/84))|","|\D+(\d+).*$|(sprintf(""%c"",(65+2*((($1-1)/42)%2))))-(($1-1)%42+1)|",,,,"This creates U descriptions in the form A-1 to A-42 and C-1 to C-42" diff --git a/xCAT/templates/e1350/switch.csv b/xCAT/templates/e1350/switch.csv index 1995861de..fc4500f7b 100644 --- a/xCAT/templates/e1350/switch.csv +++ b/xCAT/templates/e1350/switch.csv @@ -1,6 +1,6 @@ #node,switch,vlan,port,comments,disable -40perswitch,"|\D+(\d+)|switch(($1-1)/40+1)|",,"|\D+(\d+)|(($1-1)%40+1)|" -41perswitch,"|\D+(\d+)|switch(($1-1)/41+1)|",,"|\D+(\d+)|(($1-1)%41+1)|" -42perswitch,"|\D+(\d+)|switch(($1-1)/42+1)|",,"|\D+(\d+)|(($1-1)%42+1)|" -20perswitch,"|\D+(\d+)|switch(($1-1)/20+1)|",,"|\D+(\d+)|(($1-1)%20+1)|" -21perswitch,"|\D+(\d+)|switch(($1-1)/21+1)|",,"|\D+(\d+)|(($1-1)%21+1)|" +40perswitch,"|\D+(\d+).*$|switch(($1-1)/40+1)|",,"|\D+(\d+).*$|(($1-1)%40+1)|" +41perswitch,"|\D+(\d+).*$|switch(($1-1)/41+1)|",,"|\D+(\d+).*$|(($1-1)%41+1)|" +42perswitch,"|\D+(\d+).*$|switch(($1-1)/42+1)|",,"|\D+(\d+).*$|(($1-1)%42+1)|" +20perswitch,"|\D+(\d+).*$|switch(($1-1)/20+1)|",,"|\D+(\d+).*$|(($1-1)%20+1)|" +21perswitch,"|\D+(\d+).*$|switch(($1-1)/21+1)|",,"|\D+(\d+).*$|(($1-1)%21+1)|"