-Fix problem with the noderes sample
-Provide sane error when a csv has unrecognized columns, TODO: option to drop unrecognized column on restore git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2598 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d549325b97
commit
b2debb322d
@ -266,6 +266,10 @@ sub tabrestore
|
||||
}
|
||||
$tab->delEntries(); #Yes, delete *all* entries
|
||||
my $header = shift @{$request->{data}};
|
||||
unless ($header =~ /^#/) {
|
||||
$cb->({error => "Data missing header line starting with #",errorcode=>1});
|
||||
return;
|
||||
}
|
||||
$header =~ s/"//g; #Strip " from overzealous CSV apps
|
||||
$header =~ s/^#//;
|
||||
$header =~ s/\s+$//;
|
||||
|
@ -1,2 +1,2 @@
|
||||
#node,servicenode,netboot,tftpserver,nfsserver,kernel,initrd,kcmdline,nfsdir,serialport,installnic,primarynic,xcatmaster,current_osimage,next_osimage,comments,disable
|
||||
#node,servicenode,netboot,tftpserver,nfsserver,nfsdir,installnic,primarynic,xcatmaster,current_osimage,next_osimage,comments,disable
|
||||
"compute",,pxe,,
|
||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
Loading…
Reference in New Issue
Block a user