more on plugable DB schema.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2596 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
dd9da780a0
commit
e15c3791dc
@ -33,7 +33,11 @@ foreach (@extSchema) {
|
||||
if (${"xCAT_schema::" . "$modname" . "::"}{tabspec}) {
|
||||
my %tabspec=%{${"xCAT_schema::" . "$modname" . "::"}{tabspec}};
|
||||
foreach my $tabname (keys(%tabspec)) {
|
||||
$ext_tabspec{$tabname}=$tabspec{$tabname};
|
||||
if (exists($ext_tabspec{$tabname})) {
|
||||
xCAT::MsgUtils->message('ES', "\n Warning: File $file: the table name $tabname is used by other applications. Please rename the table.\n");
|
||||
} else {
|
||||
$ext_tabspec{$tabname}=$tabspec{$tabname};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
xCAT::MsgUtils->message('ES', "\n Warning: Cannot find \%tabspec variable in the user defined database table schema file $file\n");
|
||||
@ -105,6 +109,7 @@ foreach (@extSchema) {
|
||||
sub updateTables
|
||||
{
|
||||
#print "\nupdateTables\n";
|
||||
print "\n";
|
||||
foreach (keys %ext_tabspec) {
|
||||
my $table= xCAT::Table->new($_,-create=>1,-autocommit=>1);
|
||||
}
|
||||
|
@ -589,7 +589,11 @@ performance => {
|
||||
# adding user defined external tables
|
||||
##################################################
|
||||
foreach my $tabname (keys(%xCAT::ExtTab::ext_tabspec)) {
|
||||
$tabspec{$tabname}=$xCAT::ExtTab::ext_tabspec{$tabname};
|
||||
if (exists($tabspec{$tabname})) {
|
||||
xCAT::MsgUtils->message('ES', "\n Warning: Conflict when adding user defined tablespec. Duplicate table name: $tabname. \n");
|
||||
} else {
|
||||
$tabspec{$tabname}=$xCAT::ExtTab::ext_tabspec{$tabname};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user